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

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

?? rulelhs.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.22  06/15/04            */   /*                                                     */   /*             DEFRULE LHS PARSING MODULE              */   /*******************************************************//*************************************************************//* Purpose: Coordinates parsing of the LHS conditional       *//*   elements of a rule.                                     *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*                                                           *//* Revision History:                                         *//*                                                           *//*************************************************************/#define _RULELHS_SOURCE_#include "setup.h"#if (! RUN_TIME) && (! BLOAD_ONLY) &&  DEFRULE_CONSTRUCT#include <stdio.h>#define _STDIO_INCLUDED_#include <string.h>#include "agenda.h"#include "argacces.h"#include "constant.h"#include "constrct.h"#include "constrnt.h"#include "cstrnchk.h"#include "envrnmnt.h"#include "exprnpsr.h"#include "memalloc.h"#include "pattern.h"#include "reorder.h"#include "router.h"#include "ruledef.h"#include "scanner.h"#include "symbol.h"#include "rulelhs.h"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/   static struct lhsParseNode    *RuleBodyParse(void *,char *,struct token *,char *,int *);   static void                    DeclarationParse(void *,char *,char *,int *);   static struct lhsParseNode    *LHSPattern(void *,char *,int,char *,int *,int,                                             struct token *,char *);   static struct lhsParseNode    *ConnectedPatternParse(void *,char *,struct token *,int *);   static struct lhsParseNode    *GroupPatterns(void *,char *,int,char *,int *);   static struct lhsParseNode    *TestPattern(void *,char *,int *);   static struct lhsParseNode    *AssignmentParse(void *,char *,SYMBOL_HN *,int *);   static void                    TagLHSLogicalNodes(struct lhsParseNode *);   static struct lhsParseNode    *SimplePatternParse(void *,char *,struct token *,int *);   static void                    ParseSalience(void *,char *,char *,int *);   static void                    ParseAutoFocus(void *,char *,int *);/*******************************************************************//* ParseRuleLHS: Coordinates all the actions necessary for parsing *//*   the LHS of a rule including the reordering of pattern         *//*   conditional elements to conform with the KB Rete topology.    *//*******************************************************************/globle struct lhsParseNode *ParseRuleLHS(  void *theEnv,  char *readSource,  struct token *theToken,  char *ruleName,  int *error)  {   struct lhsParseNode *theLHS;   int result;      *error = FALSE;   /*========================================*/   /* Initialize salience parsing variables. */   /*========================================*/   PatternData(theEnv)->GlobalSalience = 0;   PatternData(theEnv)->GlobalAutoFocus = FALSE;   PatternData(theEnv)->SalienceExpression = NULL;   /*============================*/   /* Set the indentation depth. */   /*============================*/   SetIndentDepth(theEnv,3);   /*=====================================================*/   /* Get the raw representation for the LHS of the rule. */   /*=====================================================*/   theLHS = RuleBodyParse(theEnv,readSource,theToken,ruleName,error);   if (*error) return(NULL);   /*====================================================*/   /* Reorder the raw representation so that it consists */   /* of at most a single top level OR CE containing one */   /* or more AND CEs.                                   */   /*====================================================*/   theLHS = ReorderPatterns(theEnv,theLHS,&result);   /*================================*/   /* Return the LHS representation. */   /*================================*/   return(theLHS);  }/*********************************************************//* RuleBodyParse: Parses the LHS of a rule, but does not *//*   reorder any of the LHS patterns to conform with the *//*   KB Rete Topology.                                   *//*                                                       *//* <rule-body> ::= [<declaration>]                       *//*                 <conditional-element>*                *//*                 =>                                    *//*********************************************************/static struct lhsParseNode *RuleBodyParse(  void *theEnv,  char *readSource,  struct token *theToken,  char *ruleName,  int *error)  {   struct lhsParseNode *theNode, *otherNodes;   /*=============================*/   /* Set the error return value. */   /*=============================*/   *error = FALSE;   /*==================================================*/   /* If we're already at the separator, "=>", between */   /* the LHS and RHS, then the LHS is empty.          */   /*==================================================*/   if ((theToken->type == SYMBOL) ?       (strcmp(ValueToString(theToken->value),"=>") == 0) : FALSE)     { return(NULL); }   /*===========================================*/   /* Parse the first pattern as a special case */   /* (the declare statement is allowed).       */   /*===========================================*/   theNode = LHSPattern(theEnv,readSource,SYMBOL,"=>",error,TRUE,theToken,ruleName);   if (*error == TRUE)     {      ReturnLHSParseNodes(theEnv,theNode);      return(NULL);     }   PPCRAndIndent(theEnv);   /*======================================*/   /* Parse the other patterns in the LHS. */   /*======================================*/   otherNodes = GroupPatterns(theEnv,readSource,SYMBOL,"=>",error);   if (*error == TRUE)     {      ReturnLHSParseNodes(theEnv,theNode);      return(NULL);     }   /*================================================*/   /* Construct the final LHS by combining the first */   /* pattern with the remaining patterns.           */   /*================================================*/   if (theNode == NULL)     { theNode = otherNodes; }   else     { theNode->bottom = otherNodes; }   /*=======================*/   /* Return the final LHS. */   /*=======================*/   return(theNode);  }/********************************************************//* DeclarationParse: Parses a defrule declaration.      *//*                                                      *//* <declaration> ::= (declare <rule-property>+)         *//*                                                      *//* <rule-property> ::= (salience <integer-expression>)  *//* <rule-property> ::= (auto-focus TRUE | FALSE)        *//********************************************************/static void DeclarationParse(  void *theEnv,  char *readSource,  char *ruleName,  int *error)  {   struct token theToken;   struct expr *packPtr;   int notDone = TRUE;   int salienceParsed = FALSE, autoFocusParsed = FALSE;   /*===========================*/   /* Next token must be a '('. */   /*===========================*/   SavePPBuffer(theEnv," ");   GetToken(theEnv,readSource,&theToken);   if (theToken.type != LPAREN)     {      SyntaxErrorMessage(theEnv,"declare statement");      *error = TRUE;      return;     }   /*==========================================*/   /* Continue parsing until there are no more */   /* valid rule property declarations.        */   /*==========================================*/   while (notDone)     {      /*=============================================*/      /* The name of a rule property must be symbol. */      /*=============================================*/      GetToken(theEnv,readSource,&theToken);      if (theToken.type != SYMBOL)        {         SyntaxErrorMessage(theEnv,"declare statement");         *error = TRUE;        }      /*==============================================*/      /* Parse a salience declaration if encountered. */      /*==============================================*/      else if (strcmp(ValueToString(theToken.value),"salience") == 0)        {         if (salienceParsed)           {            AlreadyParsedErrorMessage(theEnv,"salience declaration",NULL);            *error = TRUE;           }         else           {            ParseSalience(theEnv,readSource,ruleName,error);            salienceParsed = TRUE;           }        }      /*=================================================*/      /* Parse an auto-focus declaration if encountered. */      /* A global flag is used to indicate if the        */      /* auto-focus feature for a rule was parsed.       */      /*=================================================*/      else if (strcmp(ValueToString(theToken.value),"auto-focus") == 0)        {         if (autoFocusParsed)           {            AlreadyParsedErrorMessage(theEnv,"auto-focus declaration",NULL);            *error = TRUE;           }         else           {            ParseAutoFocus(theEnv,readSource,error);            autoFocusParsed = TRUE;           }         }       /*==========================================*/       /* Otherwise the symbol does not correspond */       /* to a valid rule property.                */       /*==========================================*/       else        {         SyntaxErrorMessage(theEnv,"declare statement");         *error = TRUE;        }      /*=====================================*/      /* Return if an error was encountered. */      /*=====================================*/      if (*error)        {         ReturnExpression(theEnv,PatternData(theEnv)->SalienceExpression);         PatternData(theEnv)->SalienceExpression = NULL;         return;        }      /*=======================================*/      /* Both the salience and auto-focus rule */      /* properties are closed with a ')'.     */      /*=======================================*/      GetToken(theEnv,readSource,&theToken);      if (theToken.type != RPAREN)        {         PPBackup(theEnv);         SavePPBuffer(theEnv," ");         SavePPBuffer(theEnv,theToken.printForm);         ReturnExpression(theEnv,PatternData(theEnv)->SalienceExpression);         PatternData(theEnv)->SalienceExpression = NULL;         SyntaxErrorMessage(theEnv,"declare statement");         *error = TRUE;         return;        }      /*=============================================*/      /* The declare statement is closed with a ')'. */      /*=============================================*/      GetToken(theEnv,readSource,&theToken);      if (theToken.type == RPAREN) notDone = FALSE;      else if (theToken.type != LPAREN)        {         ReturnExpression(theEnv,PatternData(theEnv)->SalienceExpression);         PatternData(theEnv)->SalienceExpression = NULL;         SyntaxErrorMessage(theEnv,"declare statement");         *error = TRUE;         return;        }      else        {         PPBackup(theEnv);         SavePPBuffer(theEnv," (");        }     }   /*==========================================*/   /* Return the value of the salience through */   /* the global variable SalienceExpression.  */   /*==========================================*/   packPtr = PackExpression(theEnv,PatternData(theEnv)->SalienceExpression);   ReturnExpression(theEnv,PatternData(theEnv)->SalienceExpression);   PatternData(theEnv)->SalienceExpression = packPtr;   return;  }/************************************************************//* ParseSalience: Parses the rest of a defrule salience     *//*   declaration once the salience keyword has been parsed. *//************************************************************/static void ParseSalience(  void *theEnv,  char *readSource,  char *ruleName,  int *error)  {   int salience;   DATA_OBJECT salienceValue;   /*==============================*/   /* Get the salience expression. */   /*==============================*/   SavePPBuffer(theEnv," ");   PatternData(theEnv)->SalienceExpression = ParseAtomOrExpression(theEnv,readSource,NULL);   if (PatternData(theEnv)->SalienceExpression == NULL)     {      *error = TRUE;      return;     }   /*============================================================*/   /* Evaluate the expression and determine if it is an integer. */   /*============================================================*/   SetEvaluationError(theEnv,FALSE);   if (EvaluateExpression(theEnv,PatternData(theEnv)->SalienceExpression,&salienceValue))     {      SalienceInformationError(theEnv,"defrule",ruleName);      *error = TRUE;      return;     }   if (salienceValue.type != INTEGER)     {      SalienceNonIntegerError(theEnv);      *error = TRUE;      return;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产高清aⅴ视频| 欧美精品一区二区三区久久久| 91亚洲大成网污www| 欧美视频你懂的| 久久婷婷国产综合精品青草| 亚洲综合激情另类小说区| 狠狠色狠狠色合久久伊人| 色偷偷88欧美精品久久久| 国产日韩在线不卡| 久久精品国产久精国产爱| 在线观看中文字幕不卡| 国产蜜臀97一区二区三区| 麻豆精品新av中文字幕| 国产视频视频一区| 日韩中文字幕一区二区三区| 色一区在线观看| 国产精品久久久久久亚洲伦| 国产乱码一区二区三区| 日韩视频在线永久播放| 日韩高清中文字幕一区| 欧美怡红院视频| 亚洲黄色免费电影| 99久久精品99国产精品| 中文字幕精品三区| 国产精品12区| 久久精品一区蜜桃臀影院| 美女脱光内衣内裤视频久久网站| 欧美日韩综合在线免费观看| 一区二区三区欧美日韩| 91久久免费观看| 伊人色综合久久天天人手人婷| yourporn久久国产精品| 国产精品美女一区二区三区 | 成av人片一区二区| 国产日韩三级在线| 懂色av一区二区夜夜嗨| 日本一区二区三级电影在线观看| 国产乱码精品一区二区三区av| 26uuu精品一区二区在线观看| 久久国产乱子精品免费女| 欧美不卡一二三| 国产高清在线精品| 国产精品久久久久久亚洲伦| 99久久精品免费看| 亚洲综合无码一区二区| 欧美日韩亚洲综合在线| 日本免费在线视频不卡一不卡二| 制服.丝袜.亚洲.中文.综合| 久久综合综合久久综合| 欧美成人乱码一区二区三区| 国产真实乱偷精品视频免| 国产欧美日韩在线| 在线视频中文字幕一区二区| 日日夜夜免费精品视频| 久久网站最新地址| 91啪九色porn原创视频在线观看| 亚洲已满18点击进入久久| 91精品国产色综合久久不卡蜜臀| 国产在线播放一区三区四| 国产精品久久久久毛片软件| 欧美日韩国产首页| 国产精品一区二区在线播放| 中文字幕一区二区三区精华液| 在线观看一区不卡| 精品一区二区三区在线播放视频 | 尤物视频一区二区| 欧美精品粉嫩高潮一区二区| 在线视频综合导航| 奇米影视在线99精品| 久久美女高清视频| 欧美日韩中字一区| 国产精品亚洲а∨天堂免在线| 综合精品久久久| 欧美一级久久久久久久大片| 成人免费视频免费观看| 丝袜美腿一区二区三区| 亚洲国产精品高清| 91麻豆精品国产91久久久使用方法 | 欧美国产一区二区| 欧美日韩高清不卡| zzijzzij亚洲日本少妇熟睡| 蜜桃av噜噜一区| 一区二区三区小说| 久久久777精品电影网影网| 欧美日韩高清影院| aaa国产一区| 狠狠色丁香久久婷婷综| 亚洲成a人片综合在线| 欧美高清在线一区二区| 精品乱人伦小说| 欧美日韩中文国产| 色激情天天射综合网| 国产成人av网站| 色婷婷综合激情| 中文字幕乱码亚洲精品一区| 亚洲成人av中文| 国产亚洲精品福利| 精品蜜桃在线看| 91精品黄色片免费大全| 欧美午夜在线一二页| caoporen国产精品视频| 国产一区二区三区日韩| 美女视频网站久久| 日韩精品久久理论片| 亚洲一级在线观看| 亚洲三级在线观看| 国产精品久久午夜夜伦鲁鲁| 国产三级三级三级精品8ⅰ区| 依依成人综合视频| 中文字幕高清一区| 亚洲国产精品成人综合| 久久久精品免费网站| 精品久久久久久无| 精品日韩一区二区| 久久久www成人免费无遮挡大片| 日韩精品一区二区三区老鸭窝| 日韩视频不卡中文| 欧美电影免费观看高清完整版| 日韩精品一区二区三区老鸭窝| 日韩一级大片在线观看| 日韩精品一区二区三区蜜臀| 欧美zozozo| 国产偷国产偷精品高清尤物| 国产欧美久久久精品影院| 欧美国产乱子伦| 中文字幕一区日韩精品欧美| 中文字幕中文字幕在线一区 | 亚洲国产wwwccc36天堂| 亚洲成人黄色影院| 日韩av午夜在线观看| 精品一区二区三区av| 国产sm精品调教视频网站| 99久久er热在这里只有精品66| 91官网在线观看| 91精品国产乱码| 久久综合久久99| 国产精品福利影院| 亚洲一本大道在线| 美女尤物国产一区| 成人性生交大片免费看中文| 色综合色综合色综合色综合色综合 | 亚洲欧美日本在线| 亚洲成人动漫在线免费观看| 蜜桃视频一区二区| 高清不卡在线观看av| 欧美专区亚洲专区| 久久久久亚洲蜜桃| 亚洲人成亚洲人成在线观看图片 | 韩国在线一区二区| 91社区在线播放| 91精品久久久久久蜜臀| 中文字幕不卡在线播放| 一区二区三区产品免费精品久久75| 天堂蜜桃一区二区三区| 懂色av一区二区三区免费看| 精品视频一区三区九区| 久久综合九色综合欧美98| 亚洲同性gay激情无套| 久久精品久久综合| 91网上在线视频| 久久毛片高清国产| 午夜精品久久久久影视| 高清在线观看日韩| 91精品国产综合久久香蕉麻豆| 国产精品污www在线观看| 亚洲福利视频三区| 99久久免费视频.com| 欧美成人综合网站| 亚洲综合免费观看高清完整版| 亚洲va韩国va欧美va| 亚洲人快播电影网| 99视频一区二区| 欧美精品一区二区三区蜜臀| 亚洲综合久久av| 成人激情综合网站| 一区免费观看视频| 久久91精品国产91久久小草| 91美女精品福利| 久久精品这里都是精品| 日韩电影在线一区二区| 一本色道久久加勒比精品| 久久伊人蜜桃av一区二区| 日本欧美在线看| 欧美午夜精品免费| 亚洲激情欧美激情| 97精品久久久久中文字幕| 国产亚洲欧美一区在线观看| 久久草av在线| 精品久久久久久最新网址| 男女男精品视频| 国产精品996| 国产精品乱码一区二区三区软件 | 日韩欧美亚洲国产精品字幕久久久 | 国产超碰在线一区| 国产精品成人免费精品自在线观看| 91在线免费播放| 成人黄色综合网站| 欧美韩国日本不卡| 成人动漫精品一区二区| 国产精品久久精品日日|