亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? genrcpsr.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*               CLIPS Version 6.24  06/05/06          */   /*                                                     */   /*                                                     */   /*******************************************************//*************************************************************//* Purpose: Generic Functions Parsing Routines               *//*                                                           *//* Principal Programmer(s):                                  *//*      Brian L. Donnell                                     *//*                                                           *//* Contributing Programmer(s):                               *//*                                                           *//* Revision History:                                         *//*                                                           *//*      6.24: Renamed BOOLEAN macro type to intBool.         *//*                                                           *//*            If the last construct in a loaded file is a    *//*            deffunction or defmethod with no closing right *//*            parenthesis, an error should be issued, but is *//*            not. DR0872                                    *//*                                                           *//*************************************************************//* =========================================   *****************************************               EXTERNAL DEFINITIONS   =========================================   ***************************************** */#include "setup.h"#if DEFGENERIC_CONSTRUCT && (! BLOAD_ONLY) && (! RUN_TIME)#if BLOAD || BLOAD_AND_BSAVE#include "bload.h"#endif#if DEFFUNCTION_CONSTRUCT#include "dffnxfun.h"#endif#if OBJECT_SYSTEM#include "classfun.h"#include "classcom.h"#endif#include "memalloc.h"#include "cstrcpsr.h"#include "envrnmnt.h"#include "exprnpsr.h"#include "genrccom.h"#include "immthpsr.h"#include "modulutl.h"#include "prcdrpsr.h"#include "prccode.h"#include "router.h"#include "scanner.h"#define _GENRCPSR_SOURCE_#include "genrcpsr.h"/* =========================================   *****************************************                   CONSTANTS   =========================================   ***************************************** */#define HIGHER_PRECEDENCE -1#define IDENTICAL          0#define LOWER_PRECEDENCE   1#define CURR_ARG_VAR "current-argument"/* =========================================   *****************************************      INTERNALLY VISIBLE FUNCTION HEADERS   =========================================   ***************************************** */static intBool ValidGenericName(void *,char *);static SYMBOL_HN *ParseMethodNameAndIndex(void *,char *,int *);#if DEBUGGING_FUNCTIONSstatic void CreateDefaultGenericPPForm(void *,DEFGENERIC *);#endifstatic int ParseMethodParameters(void *,char *,EXPRESSION **,SYMBOL_HN **);static RESTRICTION *ParseRestriction(void *,char *);static void ReplaceCurrentArgRefs(void *,EXPRESSION *);static int DuplicateParameters(void *,EXPRESSION *,EXPRESSION **,SYMBOL_HN *);static EXPRESSION *AddParameter(void *,EXPRESSION *,EXPRESSION *,SYMBOL_HN *,RESTRICTION *);static EXPRESSION *ValidType(void *,SYMBOL_HN *);static intBool RedundantClasses(void *,void *,void *);static DEFGENERIC *AddGeneric(void *,SYMBOL_HN *,int *);static DEFMETHOD *AddGenericMethod(void *,DEFGENERIC *,int,short);static int RestrictionsCompare(EXPRESSION *,int,int,int,DEFMETHOD *);static int TypeListCompare(RESTRICTION *,RESTRICTION *);static DEFGENERIC *NewGeneric(void *,SYMBOL_HN *);/* =========================================   *****************************************          EXTERNALLY VISIBLE FUNCTIONS   =========================================   ***************************************** *//***************************************************************************  NAME         : ParseDefgeneric  DESCRIPTION  : Parses the defgeneric construct  INPUTS       : The input logical name  RETURNS      : FALSE if successful parse, TRUE otherwise  SIDE EFFECTS : Inserts valid generic function defn into generic entry  NOTES        : H/L Syntax :                 (defgeneric <name> [<comment>]) ***************************************************************************/globle intBool ParseDefgeneric(  void *theEnv,  char *readSource)  {   SYMBOL_HN *gname;   DEFGENERIC *gfunc;   int newGeneric;   SetPPBufferStatus(theEnv,ON);   FlushPPBuffer(theEnv);   SavePPBuffer(theEnv,"(defgeneric ");   SetIndentDepth(theEnv,3);#if BLOAD || BLOAD_AND_BSAVE   if ((Bloaded(theEnv) == TRUE) && (! ConstructData(theEnv)->CheckSyntaxMode))     {      CannotLoadWithBloadMessage(theEnv,"defgeneric");      return(TRUE);     }#endif   gname = GetConstructNameAndComment(theEnv,readSource,&DefgenericData(theEnv)->GenericInputToken,"defgeneric",                                      EnvFindDefgeneric,NULL,"^",TRUE,                                      TRUE,TRUE);   if (gname == NULL)     return(TRUE);   if (ValidGenericName(theEnv,ValueToString(gname)) == FALSE)     return(TRUE);   if (DefgenericData(theEnv)->GenericInputToken.type != RPAREN)     {      PrintErrorID(theEnv,"GENRCPSR",1,FALSE);      EnvPrintRouter(theEnv,WERROR,"Expected ')' to complete defgeneric.\n");      return(TRUE);     }   SavePPBuffer(theEnv,"\n");   /* ========================================================      If we're only checking syntax, don't add the      successfully parsed deffacts to the KB.      ======================================================== */   if (ConstructData(theEnv)->CheckSyntaxMode)     { return(FALSE); }   gfunc = AddGeneric(theEnv,gname,&newGeneric);#if DEBUGGING_FUNCTIONS   SetDefgenericPPForm((void *) gfunc,EnvGetConserveMemory(theEnv) ? NULL : CopyPPBuffer(theEnv));#endif   return(FALSE);  }/***************************************************************************  NAME         : ParseDefmethod  DESCRIPTION  : Parses the defmethod construct  INPUTS       : The input logical name  RETURNS      : FALSE if successful parse, TRUE otherwise  SIDE EFFECTS : Inserts valid method definition into generic entry  NOTES        : H/L Syntax :                 (defmethod <name> [<index>] [<comment>]                    (<restriction>* [<wildcard>])                    <action>*)                 <restriction> :== ?<name> |                                   (?<name> <type>* [<restriction-query>])                 <wildcard>    :== $?<name> |                                   ($?<name> <type>* [<restriction-query>]) ***************************************************************************/globle intBool ParseDefmethod(  void *theEnv,  char *readSource)  {   SYMBOL_HN *gname;   int rcnt,mposn,mi,newMethod,mnew = FALSE,lvars,error;   EXPRESSION *params,*actions,*tmp;   SYMBOL_HN *wildcard;   DEFMETHOD *meth;   DEFGENERIC *gfunc;   int theIndex;   SetPPBufferStatus(theEnv,ON);   FlushPPBuffer(theEnv);   SetIndentDepth(theEnv,3);   SavePPBuffer(theEnv,"(defmethod ");#if BLOAD || BLOAD_AND_BSAVE   if ((Bloaded(theEnv) == TRUE) && (! ConstructData(theEnv)->CheckSyntaxMode))     {      CannotLoadWithBloadMessage(theEnv,"defmethod");      return(TRUE);     }#endif   gname = ParseMethodNameAndIndex(theEnv,readSource,&theIndex);   if (gname == NULL)     return(TRUE);   if (ValidGenericName(theEnv,ValueToString(gname)) == FALSE)     return(TRUE);   /* ========================================================      Go ahead and add the header so that the generic function      can be called recursively      ======================================================== */   gfunc = AddGeneric(theEnv,gname,&newMethod);#if DEBUGGING_FUNCTIONS   if (newMethod && (! ConstructData(theEnv)->CheckSyntaxMode))      CreateDefaultGenericPPForm(theEnv,gfunc);#endif   IncrementIndentDepth(theEnv,1);   rcnt = ParseMethodParameters(theEnv,readSource,&params,&wildcard);   DecrementIndentDepth(theEnv,1);   if (rcnt == -1)     goto DefmethodParseError;   PPCRAndIndent(theEnv);   for (tmp = params ; tmp != NULL ; tmp = tmp->nextArg)     {      ReplaceCurrentArgRefs(theEnv,((RESTRICTION *) tmp->argList)->query);      if (ReplaceProcVars(theEnv,"method",((RESTRICTION *) tmp->argList)->query,                                  params,wildcard,NULL,NULL))        {         DeleteTempRestricts(theEnv,params);         goto DefmethodParseError;        }     }   meth = FindMethodByRestrictions(gfunc,params,rcnt,wildcard,&mposn);   error = FALSE;   if (meth != NULL)     {      if (meth->system)        {         PrintErrorID(theEnv,"GENRCPSR",17,FALSE);         EnvPrintRouter(theEnv,WERROR,"Cannot replace the implicit system method #");         PrintLongInteger(theEnv,WERROR,(long long) meth->index);         EnvPrintRouter(theEnv,WERROR,".\n");         error = TRUE;        }      else if ((theIndex != 0) && (theIndex != meth->index))        {         PrintErrorID(theEnv,"GENRCPSR",2,FALSE);         EnvPrintRouter(theEnv,WERROR,"New method #");         PrintLongInteger(theEnv,WERROR,(long long) theIndex);         EnvPrintRouter(theEnv,WERROR," would be indistinguishable from method #");         PrintLongInteger(theEnv,WERROR,(long long) meth->index);         EnvPrintRouter(theEnv,WERROR,".\n");         error = TRUE;        }     }   else if (theIndex != 0)     {      mi = FindMethodByIndex(gfunc,theIndex);      if (mi == -1)        mnew = TRUE;      else if (gfunc->methods[mi].system)        {         PrintErrorID(theEnv,"GENRCPSR",17,FALSE);         EnvPrintRouter(theEnv,WERROR,"Cannot replace the implicit system method #");         PrintLongInteger(theEnv,WERROR,(long long) theIndex);         EnvPrintRouter(theEnv,WERROR,".\n");         error = TRUE;        }     }   else     mnew = TRUE;   if (error)     {      DeleteTempRestricts(theEnv,params);      goto DefmethodParseError;     }   ExpressionData(theEnv)->ReturnContext = TRUE;   actions = ParseProcActions(theEnv,"method",readSource,                              &DefgenericData(theEnv)->GenericInputToken,params,wildcard,                              NULL,NULL,&lvars,NULL);                                 /*===========================================================*/   /* Check for the closing right parenthesis of the defmethod. */   /*===========================================================*/   if ((DefgenericData(theEnv)->GenericInputToken.type != RPAREN) &&  /* DR0872 */       (actions != NULL))     {      SyntaxErrorMessage(theEnv,"defmethod");      DeleteTempRestricts(theEnv,params);      ReturnPackedExpression(theEnv,actions);      goto DefmethodParseError;     }   if (actions == NULL)     {      DeleteTempRestricts(theEnv,params);      goto DefmethodParseError;     }   /*==============================================*/   /* If we're only checking syntax, don't add the */   /* successfully parsed deffunction to the KB.   */   /*==============================================*/   if (ConstructData(theEnv)->CheckSyntaxMode)     {      DeleteTempRestricts(theEnv,params);      ReturnPackedExpression(theEnv,actions);      if (newMethod)        {         RemoveConstructFromModule(theEnv,(struct constructHeader *) gfunc);         RemoveDefgeneric(theEnv,(struct constructHeader *) gfunc);        }      return(FALSE);     }   PPBackup(theEnv);   PPBackup(theEnv);   SavePPBuffer(theEnv,DefgenericData(theEnv)->GenericInputToken.printForm);   SavePPBuffer(theEnv,"\n");#if DEBUGGING_FUNCTIONS   meth = AddMethod(theEnv,gfunc,meth,mposn,theIndex,params,rcnt,lvars,wildcard,actions,             EnvGetConserveMemory(theEnv) ? NULL : CopyPPBuffer(theEnv),FALSE);#else   meth = AddMethod(theEnv,gfunc,meth,mposn,theIndex,params,rcnt,lvars,wildcard,actions,NULL,FALSE);#endif   DeleteTempRestricts(theEnv,params);   if (GetPrintWhileLoading(theEnv) && GetCompilationsWatch(theEnv))     {      EnvPrintRouter(theEnv,WDIALOG,"   Method #");      PrintLongInteger(theEnv,WDIALOG,(long long) meth->index);      EnvPrintRouter(theEnv,WDIALOG,(char *) (mnew ? " defined.\n" : " redefined.\n"));     }   return(FALSE);DefmethodParseError:   if (newMethod)     {      RemoveConstructFromModule(theEnv,(struct constructHeader *) gfunc);      RemoveDefgeneric(theEnv,(void *) gfunc);     }   return(TRUE);  }/************************************************************************  NAME         : AddMethod  DESCRIPTION  : (Re)defines a new method for a generic                 If method already exists, deletes old information                    before proceeding.  INPUTS       : 1) The generic address                 2) The old method address (can be NULL)                 3) The old method array position (can be -1)                 4) The method index to assign (0 if don't care)                 5) The parameter expression-list                    (restrictions attached to argList pointers)                 6) The number of restrictions                 7) The number of locals vars reqd                 8) The wildcard symbol (NULL if none)                 9) Method actions                 10) Method pretty-print form                 11) A flag indicating whether to copy the                     restriction types or just use the pointers  RETURNS      : The new (old) method address  SIDE EFFECTS : Method added to (or changed in) method array for generic                 Restrictions repacked into new method                 Actions and pretty-print form attached  NOTES        : Assumes if a method is being redefined, its busy                   count is 0!!                 IMPORTANT: Expects that FindMethodByRestrictions() has                   previously been called to determine if this method                   is already present or not.  Arguments #1 and #2                   should be the values obtained from FindMethod...().

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲午夜久久久久久久久电影网| 精品亚洲成a人| 国产精品对白交换视频 | 色欧美88888久久久久久影院| 激情综合色综合久久综合| 免费高清视频精品| 老司机精品视频在线| 国产一区二区视频在线播放| 国产乱理伦片在线观看夜一区| 久久精品二区亚洲w码| 美国三级日本三级久久99| 久久国产精品99久久久久久老狼| 免费观看在线综合色| 国产精品综合视频| 成人aa视频在线观看| 欧美视频精品在线观看| 欧美一区二区网站| 国产日韩欧美高清| 亚洲伦在线观看| 日韩黄色片在线观看| 国产精品自拍一区| 色综合中文综合网| 91免费视频大全| 欧美人与禽zozo性伦| 欧美mv日韩mv国产网站| 欧美国产日韩精品免费观看| 洋洋av久久久久久久一区| 蜜桃视频在线观看一区| 高清视频一区二区| 欧美欧美欧美欧美| 国产亚洲欧美中文| 亚洲午夜在线视频| 国产成人欧美日韩在线电影| 欧美亚洲国产一卡| 欧美国产日韩a欧美在线观看| 一区二区三区成人| 国产精品主播直播| 欧美色大人视频| 欧美韩国一区二区| 丝袜美腿亚洲一区| 成人18视频在线播放| 91精品婷婷国产综合久久性色 | 亚洲精品在线电影| 亚洲人妖av一区二区| 九九视频精品免费| 欧美三区在线视频| 亚洲丝袜精品丝袜在线| 国产乱码精品一区二区三区忘忧草 | 亚洲一区二区精品视频| 国产乱码精品一区二区三区五月婷 | 欧美大尺度电影在线| 亚洲欧美色图小说| 国产激情一区二区三区四区| 欧美福利视频导航| 一区二区欧美在线观看| 成人自拍视频在线观看| 欧美精品一区二区三区蜜臀| 午夜影院久久久| 色中色一区二区| 一区视频在线播放| 丁香六月综合激情| 久久久不卡网国产精品二区| 奇米一区二区三区| 欧美精品国产精品| 亚洲国产中文字幕| 欧美日韩一级片网站| 一区二区免费在线播放| 91丝袜美女网| 最新国产精品久久精品| 99久久夜色精品国产网站| 国产欧美日韩综合精品一区二区| 精品一区二区国语对白| 亚洲精品在线三区| 国产精品一二三四| 国产亚洲污的网站| 国产丶欧美丶日本不卡视频| 久久嫩草精品久久久精品| 国产麻豆精品久久一二三| 国产视频一区不卡| 成人av在线一区二区| 日韩理论在线观看| 在线免费不卡视频| 日本中文在线一区| www精品美女久久久tv| 国产.欧美.日韩| 中文字幕一区二| 91国产视频在线观看| 亚洲sss视频在线视频| 日韩精品专区在线影院观看| 国模少妇一区二区三区| 中文子幕无线码一区tr| 91小视频免费观看| 亚洲不卡在线观看| 精品国产免费一区二区三区四区 | 日韩美女在线视频| 丁香天五香天堂综合| 亚洲欧美日韩国产中文在线| 欧美日本在线观看| 国产资源精品在线观看| 国产精品美女久久久久久2018 | 日产欧产美韩系列久久99| 久久综合av免费| 日本乱码高清不卡字幕| 男人的天堂久久精品| 国产精品视频线看| 欧美日韩国产小视频在线观看| 美女任你摸久久| 自拍偷拍欧美激情| 精品免费日韩av| 成人av免费在线观看| 丝袜美腿亚洲综合| 中文字幕av一区二区三区| 欧美精品一二三区| 99国产精品99久久久久久| 热久久国产精品| 综合婷婷亚洲小说| 久久只精品国产| 欧美日本一区二区在线观看| 成a人片国产精品| 丝袜诱惑制服诱惑色一区在线观看| 久久久美女毛片| 884aa四虎影成人精品一区| 国产成人在线视频免费播放| 日韩中文字幕亚洲一区二区va在线 | 麻豆精品久久精品色综合| 日韩美女啊v在线免费观看| 日韩欧美电影一区| 91福利在线看| 99久久婷婷国产综合精品| 久草精品在线观看| 日韩高清欧美激情| 亚洲高清一区二区三区| 中文字幕一区日韩精品欧美| 久久视频一区二区| 日韩欧美一二三四区| 欧美日韩在线精品一区二区三区激情 | 久久综合久久综合久久| 91麻豆精品国产自产在线观看一区| 不卡免费追剧大全电视剧网站| 精油按摩中文字幕久久| 蜜臀va亚洲va欧美va天堂| 亚洲国产成人精品视频| 亚洲欧美日本在线| 亚洲人妖av一区二区| 亚洲色图一区二区| 亚洲美腿欧美偷拍| 亚洲色图视频网站| 亚洲精品少妇30p| 亚洲免费av高清| 亚洲愉拍自拍另类高清精品| 一区二区三区小说| 亚洲国产一区二区a毛片| 亚洲综合色婷婷| 一区二区三区精品在线| 亚洲欧美日韩久久| 亚洲永久精品国产| 午夜精品123| 琪琪一区二区三区| 麻豆精品精品国产自在97香蕉| 精品一区二区日韩| 国产一区二区久久| 成人蜜臀av电影| 97精品电影院| 欧美色手机在线观看| 欧美一级理论性理论a| 日韩欧美在线一区二区三区| 久久精品亚洲麻豆av一区二区| 国产欧美一区二区精品秋霞影院 | 欧美日韩国产一级二级| 欧美一级免费大片| 久久久久久久久久久电影| 国产精品欧美极品| 亚洲综合在线免费观看| 日韩国产欧美三级| 国产乱码精品1区2区3区| 成人avav在线| 91麻豆精品国产自产在线| 久久日韩粉嫩一区二区三区| 国产精品久久福利| 日日摸夜夜添夜夜添精品视频| 精品一区二区三区免费视频| 99久久婷婷国产综合精品| 欧美精品 国产精品| 中文字幕免费不卡| 午夜精品久久久久久| 国产成人精品免费视频网站| 欧美亚洲愉拍一区二区| 精品国产一区二区三区不卡| 亚洲欧美日韩小说| 国内精品伊人久久久久影院对白| 波多野结衣视频一区| 欧美肥妇bbw| 亚洲欧洲日韩av| 九九**精品视频免费播放| 欧美在线999| 国产日本欧美一区二区| 蜜桃久久精品一区二区| 91色porny在线视频| 欧美xxxx在线观看| 天天综合网 天天综合色|