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

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

?? parsefun.c

?? clips源代碼
?? C
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.24  06/02/06            */   /*                                                     */   /*               PARSING FUNCTIONS MODULE              */   /*******************************************************//*************************************************************//* Purpose: Contains the code for several parsing related    *//*   functions including...                                  *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*                                                           *//* Revision History:                                         *//*                                                           *//*      6.23: Correction for FalseSymbol/TrueSymbol. DR0859  *//*                                                           *//*      6.24: Corrected code to remove run-time program      *//*            compiler warnings.                             *//*                                                           *//*************************************************************/#define _PARSEFUN_SOURCE_#include "setup.h"#include <string.h>#include "argacces.h"#include "cstrcpsr.h"#include "envrnmnt.h"#include "exprnpsr.h"#include "extnfunc.h"#include "memalloc.h"#include "multifld.h"#include "prcdrpsr.h"#include "router.h"#include "strngrtr.h"#include "utility.h"#include "parsefun.h"#define PARSEFUN_DATA 11struct parseFunctionData  {    char *ErrorString;   size_t ErrorCurrentPosition;   size_t ErrorMaximumPosition;   char *WarningString;   size_t WarningCurrentPosition;   size_t WarningMaximumPosition;  };#define ParseFunctionData(theEnv) ((struct parseFunctionData *) GetEnvironmentData(theEnv,PARSEFUN_DATA))/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/#if (! RUN_TIME) && (! BLOAD_ONLY)   static int                     FindErrorCapture(void *,char *);   static int                     PrintErrorCapture(void *,char *,char *);   static void                    DeactivateErrorCapture(void *);   static void                    SetErrorCaptureValues(void *,DATA_OBJECT_PTR);#endif/*****************************************//* ParseFunctionDefinitions: Initializes *//*   the parsing related functions.      *//*****************************************/globle void ParseFunctionDefinitions(  void *theEnv)  {   AllocateEnvironmentData(theEnv,PARSEFUN_DATA,sizeof(struct parseFunctionData),NULL);#if ! RUN_TIME   EnvDefineFunction2(theEnv,"check-syntax",'u',PTIEF CheckSyntaxFunction,"CheckSyntaxFunction","11s");#endif  }#if (! RUN_TIME) && (! BLOAD_ONLY)/*******************************************//* CheckSyntaxFunction: H/L access routine *//*   for the check-syntax function.        *//*******************************************/globle void CheckSyntaxFunction(  void *theEnv,  DATA_OBJECT *returnValue)  {   DATA_OBJECT theArg;   /*===============================*/   /* Set up a default return value */   /* (TRUE for problems found).    */   /*===============================*/   SetpType(returnValue,SYMBOL);   SetpValue(returnValue,EnvTrueSymbol(theEnv));   /*=====================================================*/   /* Function check-syntax expects exactly one argument. */   /*=====================================================*/   if (EnvArgCountCheck(theEnv,"check-syntax",EXACTLY,1) == -1) return;   /*========================================*/   /* The argument should be of type STRING. */   /*========================================*/   if (EnvArgTypeCheck(theEnv,"check-syntax",1,STRING,&theArg) == FALSE)     { return; }   /*===================*/   /* Check the syntax. */   /*===================*/   CheckSyntax(theEnv,DOToString(theArg),returnValue);  }/*********************************//* CheckSyntax: C access routine *//*   for the build function.     *//*********************************/globle int CheckSyntax(  void *theEnv,  char *theString,  DATA_OBJECT_PTR returnValue)  {   char *name;   struct token theToken;   struct expr *top;   short rv;   /*==============================*/   /* Set the default return value */   /* (TRUE for problems found).   */   /*==============================*/   SetpType(returnValue,SYMBOL);   SetpValue(returnValue,EnvTrueSymbol(theEnv));   /*===========================================*/   /* Create a string source router so that the */   /* string can be used as an input source.    */   /*===========================================*/   if (OpenStringSource(theEnv,"check-syntax",theString,0) == 0)     { return(TRUE); }   /*=================================*/   /* Only expressions and constructs */   /* can have their syntax checked.  */   /*=================================*/   GetToken(theEnv,"check-syntax",&theToken);   if (theToken.type != LPAREN)     {      CloseStringSource(theEnv,"check-syntax");      SetpValue(returnValue,EnvAddSymbol(theEnv,"MISSING-LEFT-PARENTHESIS"));      return(TRUE);     }   /*========================================*/   /* The next token should be the construct */   /* type or function name.                 */   /*========================================*/   GetToken(theEnv,"check-syntax",&theToken);   if (theToken.type != SYMBOL)     {      CloseStringSource(theEnv,"check-syntax");      SetpValue(returnValue,EnvAddSymbol(theEnv,"EXPECTED-SYMBOL-AFTER-LEFT-PARENTHESIS"));      return(TRUE);     }   name = ValueToString(theToken.value);   /*==============================================*/   /* Set up a router to capture the error output. */   /*==============================================*/   EnvAddRouter(theEnv,"error-capture",40,              FindErrorCapture, PrintErrorCapture,              NULL, NULL, NULL);   /*================================*/   /* Determine if it's a construct. */   /*================================*/   if (FindConstruct(theEnv,name))     {      ConstructData(theEnv)->CheckSyntaxMode = TRUE;      rv = (short) ParseConstruct(theEnv,name,"check-syntax");      GetToken(theEnv,"check-syntax",&theToken);      ConstructData(theEnv)->CheckSyntaxMode = FALSE;      if (rv)        {         EnvPrintRouter(theEnv,WERROR,"\nERROR:\n");         PrintInChunks(theEnv,WERROR,GetPPBuffer(theEnv));         EnvPrintRouter(theEnv,WERROR,"\n");        }      DestroyPPBuffer(theEnv);      CloseStringSource(theEnv,"check-syntax");      if ((rv != FALSE) || (ParseFunctionData(theEnv)->WarningString != NULL))        {         SetErrorCaptureValues(theEnv,returnValue);         DeactivateErrorCapture(theEnv);         return(TRUE);        }      if (theToken.type != STOP)        {         SetpValue(returnValue,EnvAddSymbol(theEnv,"EXTRANEOUS-INPUT-AFTER-LAST-PARENTHESIS"));         DeactivateErrorCapture(theEnv);         return(TRUE);        }      SetpType(returnValue,SYMBOL);      SetpValue(returnValue,EnvFalseSymbol(theEnv));      DeactivateErrorCapture(theEnv);      return(FALSE);     }   /*=======================*/   /* Parse the expression. */   /*=======================*/   top = Function2Parse(theEnv,"check-syntax",name);   GetToken(theEnv,"check-syntax",&theToken);   ClearParsedBindNames(theEnv);   CloseStringSource(theEnv,"check-syntax");   if (top == NULL)     {      SetErrorCaptureValues(theEnv,returnValue);      DeactivateErrorCapture(theEnv);      return(TRUE);     }   if (theToken.type != STOP)     {      SetpValue(returnValue,EnvAddSymbol(theEnv,"EXTRANEOUS-INPUT-AFTER-LAST-PARENTHESIS"));      DeactivateErrorCapture(theEnv);      ReturnExpression(theEnv,top);      return(TRUE);     }   DeactivateErrorCapture(theEnv);   ReturnExpression(theEnv,top);   SetpType(returnValue,SYMBOL);   SetpValue(returnValue,EnvFalseSymbol(theEnv));   return(FALSE);  }/**************************************************//* DeactivateErrorCapture: Deactivates the error  *//*   capture router and the strings used to store *//*   the captured information.                    *//**************************************************/static void DeactivateErrorCapture(  void *theEnv)  {      if (ParseFunctionData(theEnv)->ErrorString != NULL)     {      rm(theEnv,ParseFunctionData(theEnv)->ErrorString,ParseFunctionData(theEnv)->ErrorMaximumPosition);      ParseFunctionData(theEnv)->ErrorString = NULL;     }   if (ParseFunctionData(theEnv)->WarningString != NULL)     {      rm(theEnv,ParseFunctionData(theEnv)->WarningString,ParseFunctionData(theEnv)->WarningMaximumPosition);      ParseFunctionData(theEnv)->WarningString = NULL;     }   ParseFunctionData(theEnv)->ErrorCurrentPosition = 0;   ParseFunctionData(theEnv)->ErrorMaximumPosition = 0;   ParseFunctionData(theEnv)->WarningCurrentPosition = 0;   ParseFunctionData(theEnv)->WarningMaximumPosition = 0;   EnvDeleteRouter(theEnv,"error-capture");  }/******************************************************************//* SetErrorCaptureValues: Stores the error/warnings captured when *//*   parsing an expression or construct into a multifield value.  *//*   The first field contains the output sent to the WERROR       *//*   logical name and the second field contains the output sent   *//*   to the WWARNING logical name. FALSE is stored in either      *//*   position if no output was sent to those logical names.       *//******************************************************************/static void SetErrorCaptureValues(  void *theEnv,  DATA_OBJECT_PTR returnValue)  {   struct multifield *theMultifield;   theMultifield = (struct multifield *) EnvCreateMultifield(theEnv,2L);   if (ParseFunctionData(theEnv)->ErrorString != NULL)     {      SetMFType(theMultifield,1,STRING);      SetMFValue(theMultifield,1,EnvAddSymbol(theEnv,ParseFunctionData(theEnv)->ErrorString));     }   else     {      SetMFType(theMultifield,1,SYMBOL);      SetMFValue(theMultifield,1,EnvFalseSymbol(theEnv));     }   if (ParseFunctionData(theEnv)->WarningString != NULL)     {      SetMFType(theMultifield,2,STRING);      SetMFValue(theMultifield,2,EnvAddSymbol(theEnv,ParseFunctionData(theEnv)->WarningString));     }   else     {      SetMFType(theMultifield,2,SYMBOL);      SetMFValue(theMultifield,2,EnvFalseSymbol(theEnv));     }   SetpType(returnValue,MULTIFIELD);   SetpDOBegin(returnValue,1);   SetpDOEnd(returnValue,2);   SetpValue(returnValue,(void *) theMultifield);  }/**********************************//* FindErrorCapture: Find routine *//*   for the check-syntax router. *//**********************************/#if IBM_TBC#pragma argsused#endifstatic int FindErrorCapture(  void *theEnv,  char *logicalName)  {#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#endif   if ((strcmp(logicalName,WERROR) == 0) ||       (strcmp(logicalName,WWARNING) == 0))     { return(TRUE); }   return(FALSE);  }/************************************//* PrintErrorCapture: Print routine *//*   for the check-syntax router.   *//************************************/static int PrintErrorCapture(  void *theEnv,  char *logicalName,  char *str)  {   if (strcmp(logicalName,WERROR) == 0)     {      ParseFunctionData(theEnv)->ErrorString = AppendToString(theEnv,str,ParseFunctionData(theEnv)->ErrorString,                                   &ParseFunctionData(theEnv)->ErrorCurrentPosition,                                   &ParseFunctionData(theEnv)->ErrorMaximumPosition);     }   else if (strcmp(logicalName,WWARNING) == 0)     {      ParseFunctionData(theEnv)->WarningString = AppendToString(theEnv,str,ParseFunctionData(theEnv)->WarningString,                                     &ParseFunctionData(theEnv)->WarningCurrentPosition,                                     &ParseFunctionData(theEnv)->WarningMaximumPosition);     }   return(1);  }#else/****************************************************//* CheckSyntaxFunction: This is the non-functional  *//*   stub provided for use with a run-time version. *//****************************************************/globle void CheckSyntaxFunction(  void *theEnv,  DATA_OBJECT *returnValue)  {   PrintErrorID(theEnv,"PARSEFUN",1,FALSE);   EnvPrintRouter(theEnv,WERROR,"Function check-syntax does not work in run time modules.\n");   SetpType(returnValue,SYMBOL);   SetpValue(returnValue,EnvTrueSymbol(theEnv));  }/************************************************//* CheckSyntax: This is the non-functional stub *//*   provided for use with a run-time version.  *//************************************************/globle int CheckSyntax(  void *theEnv,  char *theString,  DATA_OBJECT_PTR returnValue)  {#if (MAC_MCW || IBM_MCW) && (RUN_TIME || BLOAD_ONLY)#pragma unused(theString)#pragma unused(returnValue)#endif   PrintErrorID(theEnv,"PARSEFUN",1,FALSE);   EnvPrintRouter(theEnv,WERROR,"Function check-syntax does not work in run time modules.\n");   SetpType(returnValue,SYMBOL);   SetpValue(returnValue,EnvTrueSymbol(theEnv));   return(TRUE);  }#endif /* (! RUN_TIME) && (! BLOAD_ONLY) */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区高清播放| 国产精品日日摸夜夜摸av| 综合色天天鬼久久鬼色| 国产一区二区中文字幕| 日韩一区二区在线观看视频| 午夜视频在线观看一区二区三区| 成人激情av网| 国产精品电影院| 波多野结衣亚洲一区| 中文字幕第一区综合| 国产a精品视频| 国产精品久久久久久久久久久免费看 | 精品国产sm最大网站| 日韩精彩视频在线观看| 91精品国产91综合久久蜜臀| 亚洲精品国产视频| 色哦色哦哦色天天综合| 一区二区三区不卡在线观看| 精品视频免费看| 五月天亚洲精品| 日韩欧美国产综合| 国产九九视频一区二区三区| 国产欧美日本一区二区三区| 成人av综合一区| 亚洲免费成人av| 欧洲生活片亚洲生活在线观看| 亚洲精品乱码久久久久久久久| 日本高清不卡在线观看| 性做久久久久久免费观看| 欧美一区二区三区免费视频| 久久av资源网| 国产精品第五页| 99久久国产免费看| 偷拍日韩校园综合在线| 亚洲精品在线免费播放| 国产成人自拍在线| 青青草国产精品97视觉盛宴| 久久综合色鬼综合色| 91同城在线观看| 日韩精品三区四区| 久久理论电影网| 一本色道亚洲精品aⅴ| 亚洲综合在线观看视频| 欧美一级片免费看| 不卡一卡二卡三乱码免费网站| 一区二区三区国产| 欧美精品一区二区精品网| www.66久久| 秋霞电影一区二区| 专区另类欧美日韩| 精品少妇一区二区三区| 色综合色综合色综合色综合色综合| 综合激情成人伊人| 日韩一区二区麻豆国产| www.成人网.com| 午夜成人免费电影| 中文字幕的久久| 日韩女优av电影在线观看| 色综合久久中文综合久久牛| 精品在线你懂的| 亚洲小说欧美激情另类| 欧美一卡二卡三卡四卡| 91亚洲男人天堂| 风间由美一区二区av101 | 91国偷自产一区二区使用方法| 国产精品18久久久久久久久久久久| 麻豆一区二区99久久久久| 午夜视频一区在线观看| 亚洲1区2区3区4区| 亚洲一区二区三区四区五区黄| 亚洲日本在线a| 国产精品久久久一本精品| 国产女人18毛片水真多成人如厕| 久久久五月婷婷| 26uuu精品一区二区| 26uuuu精品一区二区| 欧美α欧美αv大片| 欧美电影免费观看高清完整版在线观看| 88在线观看91蜜桃国自产| 欧美日韩国产高清一区| 欧美日韩五月天| 6080日韩午夜伦伦午夜伦| 制服丝袜av成人在线看| 日韩视频一区二区| 欧美精品一区二区三区在线| 精品国产凹凸成av人网站| 国产亚洲午夜高清国产拍精品| 久久亚洲二区三区| 日本一二三四高清不卡| 中文字幕日韩精品一区| 亚洲一级二级在线| 日韩成人精品在线观看| 韩国女主播成人在线观看| 国产激情精品久久久第一区二区| 成人黄色小视频| 色欧美片视频在线观看在线视频| 欧美在线短视频| 欧美一区二区三区在线| 久久久精品免费网站| 亚洲欧洲国产日韩| 亚洲成人免费观看| 久久99精品国产麻豆婷婷| 国产黄色精品视频| 色婷婷精品久久二区二区蜜臂av | 亚洲激情六月丁香| 天天操天天色综合| 国产福利精品一区二区| 一本久久综合亚洲鲁鲁五月天| 欧美绝品在线观看成人午夜影视| 精品国产污网站| 亚洲三级电影网站| 日本视频一区二区| av动漫一区二区| 欧美精品高清视频| 久久精品一二三| 亚洲午夜精品在线| 国产成人精品免费网站| 欧美日韩亚洲高清一区二区| 国产欧美日韩久久| 亚洲曰韩产成在线| 国产精品一区免费在线观看| 欧美午夜精品一区| 国产色产综合产在线视频| 一区二区三区高清在线| 国产福利一区二区| 欧美精品久久久久久久久老牛影院| 亚洲国产精品国自产拍av| 日韩国产精品久久久久久亚洲| 粉嫩13p一区二区三区| 欧美精品丝袜中出| 亚洲成人精品影院| 国产精品综合一区二区三区| 欧美麻豆精品久久久久久| 国产精品视频在线看| 蜜乳av一区二区| 欧美自拍丝袜亚洲| 中文字幕成人在线观看| 久久se精品一区二区| 欧美老女人在线| 一区二区三区在线影院| 国产麻豆精品在线| 日韩精品自拍偷拍| 婷婷丁香激情综合| 91精品91久久久中77777| 欧美高清在线视频| 国产一区视频在线看| 欧美大片日本大片免费观看| 性欧美疯狂xxxxbbbb| 日本韩国欧美一区| 国产精品久久久久毛片软件| 精品一区二区日韩| 欧美一级二级三级蜜桃| 丝袜a∨在线一区二区三区不卡| 一本色道久久综合狠狠躁的推荐| 久久精品人人做人人爽人人 | 国产精品综合一区二区| 欧美精品久久一区二区三区| 亚洲精品乱码久久久久| 99re视频这里只有精品| 国产精品女主播在线观看| 国产成人免费视频网站高清观看视频 | 国产精品日韩成人| 国产成人8x视频一区二区 | 日韩一区二区免费高清| 日本伊人精品一区二区三区观看方式 | 日韩一区二区三区电影| 午夜电影网亚洲视频| 欧美高清视频一二三区| 天堂av在线一区| 91精品国产综合久久精品图片| 日韩成人精品在线| 69av一区二区三区| 麻豆精品久久精品色综合| 精品国产第一区二区三区观看体验| 蜜桃一区二区三区在线| 精品国产亚洲在线| 国产精品一二三四五| 久久久91精品国产一区二区精品 | 欧美日韩一二三| 亚洲国产精品久久久久婷婷884| 欧美精品日韩综合在线| 99久久久国产精品| 国产精品1区2区3区| 亚洲一区在线观看免费 | 欧美国产日产图区| 久久成人麻豆午夜电影| 精品少妇一区二区三区在线视频 | 国产91在线|亚洲| 中文字幕色av一区二区三区| 日本韩国欧美国产| 日韩av中文字幕一区二区三区 | 成人免费视频一区| 亚洲综合激情小说| 4438成人网| 国产精品中文欧美| 亚洲欧美综合色| 在线播放视频一区| 粉嫩av一区二区三区粉嫩| 亚洲自拍都市欧美小说| 日韩一区二区影院|