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

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

?? factcom.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.24  06/05/06            */   /*                                                     */   /*                FACT COMMANDS MODULE                 */   /*******************************************************//*************************************************************//* Purpose: Provides the facts, assert, retract, save-facts, *//*   load-facts, set-fact-duplication, get-fact-duplication, *//*   assert-string, and fact-index commands and functions.   *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*      Brian L. Donnell                                     *//*                                                           *//* Revision History:                                         *//*      6.23: Correction for FalseSymbol/TrueSymbol. DR0859  *//*                                                           *//*      6.24: Added environment parameter to GenClose.       *//*            Added environment parameter to GenOpen.        *//*                                                           *//*            Renamed BOOLEAN macro type to intBool.         *//*                                                           *//*************************************************************/#include <stdio.h>#define _STDIO_INCLUDED_#include <string.h>#include "setup.h"#if DEFTEMPLATE_CONSTRUCT#define _FACTCOM_SOURCE_#include "memalloc.h"#include "envrnmnt.h"#include "exprnpsr.h"#include "factmngr.h"#include "argacces.h"#include "match.h"#include "router.h"#include "scanner.h"#include "constant.h"#include "factrhs.h"#include "factmch.h"#include "extnfunc.h"#include "tmpltpsr.h"#include "tmpltutl.h"#include "facthsh.h"#include "modulutl.h"#include "strngrtr.h"#include "tmpltdef.h"#include "tmpltfun.h"#include "sysdep.h"#if BLOAD_AND_BSAVE || BLOAD || BLOAD_ONLY#include "bload.h"#endif#include "factcom.h"#define INVALID     -2L#define UNSPECIFIED -1L/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/#if (! RUN_TIME)   static struct expr            *AssertParse(void *,struct expr *,char *);#endif#if DEBUGGING_FUNCTIONS   static long long               GetFactsArgument(void *,int,int);#endif   static struct expr            *StandardLoadFact(void *,char *,struct token *);   static DATA_OBJECT_PTR         GetSaveFactsDeftemplateNames(void *,struct expr *,int,int *,int *);/***************************************//* FactCommandDefinitions: Initializes *//*   fact commands and functions.      *//***************************************/globle void FactCommandDefinitions(  void *theEnv)  {#if ! RUN_TIME#if DEBUGGING_FUNCTIONS   EnvDefineFunction2(theEnv,"facts", 'v', PTIEF FactsCommand,        "FactsCommand", "*4iu");#endif   EnvDefineFunction(theEnv,"assert", 'u', PTIEF AssertCommand,  "AssertCommand");   EnvDefineFunction2(theEnv,"retract", 'v', PTIEF RetractCommand, "RetractCommand","1*z");   EnvDefineFunction2(theEnv,"assert-string", 'u', PTIEF AssertStringFunction,   "AssertStringFunction", "11s");   EnvDefineFunction2(theEnv,"str-assert", 'u', PTIEF AssertStringFunction,   "AssertStringFunction", "11s");   EnvDefineFunction2(theEnv,"get-fact-duplication",'b',                   GetFactDuplicationCommand,"GetFactDuplicationCommand", "00");   EnvDefineFunction2(theEnv,"set-fact-duplication",'b',                   SetFactDuplicationCommand,"SetFactDuplicationCommand", "11");   EnvDefineFunction2(theEnv,"save-facts", 'b', PTIEF SaveFactsCommand, "SaveFactsCommand", "1*wk");   EnvDefineFunction2(theEnv,"load-facts", 'b', PTIEF LoadFactsCommand, "LoadFactsCommand", "11k");   EnvDefineFunction2(theEnv,"fact-index", 'g', PTIEF FactIndexFunction,"FactIndexFunction", "11y");   AddFunctionParser(theEnv,"assert",AssertParse);   FuncSeqOvlFlags(theEnv,"assert",FALSE,FALSE);#else#if MAC_MCW || IBM_MCW || MAC_XCD#pragma unused(theEnv)#endif#endif  }/***************************************//* AssertCommand: H/L access routine   *//*   for the assert function.          *//***************************************/globle void AssertCommand(  void *theEnv,  DATA_OBJECT_PTR rv)  {   struct deftemplate *theDeftemplate;   struct field *theField;   DATA_OBJECT theValue;   struct expr *theExpression;   struct templateSlot *slotPtr;   struct fact *newFact;   int error = FALSE;   int i;   struct fact *theFact;      /*===================================================*/   /* Set the default return value to the symbol FALSE. */   /*===================================================*/   SetpType(rv,SYMBOL);   SetpValue(rv,EnvFalseSymbol(theEnv));   /*================================*/   /* Get the deftemplate associated */   /* with the fact being asserted.  */   /*================================*/   theExpression = GetFirstArgument();   theDeftemplate = (struct deftemplate *) theExpression->value;   /*=======================================*/   /* Create the fact and store the name of */   /* the deftemplate as the 1st field.     */   /*=======================================*/   if (theDeftemplate->implied == FALSE)     {      newFact = CreateFactBySize(theEnv,theDeftemplate->numberOfSlots);      slotPtr = theDeftemplate->slotList;     }   else     {      newFact = CreateFactBySize(theEnv,1);      if (theExpression->nextArg == NULL)        {         newFact->theProposition.theFields[0].type = MULTIFIELD;         newFact->theProposition.theFields[0].value = CreateMultifield2(theEnv,0L);        }      slotPtr = NULL;     }   newFact->whichDeftemplate = theDeftemplate;   /*===================================================*/   /* Evaluate the expression associated with each slot */   /* and store the result in the appropriate slot of   */   /* the newly created fact.                           */   /*===================================================*/   theField = newFact->theProposition.theFields;   for (theExpression = theExpression->nextArg, i = 0;        theExpression != NULL;        theExpression = theExpression->nextArg, i++)     {      /*===================================================*/      /* Evaluate the expression to be stored in the slot. */      /*===================================================*/      EvaluateExpression(theEnv,theExpression,&theValue);      /*============================================================*/      /* A multifield value can't be stored in a single field slot. */      /*============================================================*/      if ((slotPtr != NULL) ?          (slotPtr->multislot == FALSE) && (theValue.type == MULTIFIELD) :          FALSE)        {         MultiIntoSingleFieldSlotError(theEnv,slotPtr,theDeftemplate);         theValue.type = SYMBOL;         theValue.value = EnvFalseSymbol(theEnv);         error = TRUE;        }      /*==============================*/      /* Store the value in the slot. */      /*==============================*/      theField[i].type = theValue.type;      theField[i].value = theValue.value;      /*========================================*/      /* Get the information for the next slot. */      /*========================================*/      if (slotPtr != NULL) slotPtr = slotPtr->next;     }   /*============================================*/   /* If an error occured while generating the   */   /* fact's slot values, then abort the assert. */   /*============================================*/   if (error)     {      ReturnFact(theEnv,newFact);      return;     }   /*================================*/   /* Add the fact to the fact-list. */   /*================================*/   theFact = (struct fact *) EnvAssert(theEnv,(void *) newFact);   /*========================================*/   /* The asserted fact is the return value. */   /*========================================*/   if (theFact != NULL)     {      SetpType(rv,FACT_ADDRESS);      SetpValue(rv,(void *) theFact);     }   return;  }/****************************************//* RetractCommand: H/L access routine   *//*   for the retract command.           *//****************************************/globle void RetractCommand(  void *theEnv)  {   long long factIndex;   struct fact *ptr;   struct expr *theArgument;   DATA_OBJECT theResult;   int argNumber;   /*================================*/   /* Iterate through each argument. */   /*================================*/   for (theArgument = GetFirstArgument(), argNumber = 1;        theArgument != NULL;        theArgument = GetNextArgument(theArgument), argNumber++)     {      /*========================*/      /* Evaluate the argument. */      /*========================*/      EvaluateExpression(theEnv,theArgument,&theResult);      /*===============================================*/      /* If the argument evaluates to an integer, then */      /* it's assumed to be the fact index of the fact */      /* to be retracted.                              */      /*===============================================*/      if (theResult.type == INTEGER)        {         /*==========================================*/         /* A fact index must be a positive integer. */         /*==========================================*/         factIndex = ValueToLong(theResult.value);         if (factIndex < 0)           {            ExpectedTypeError1(theEnv,"retract",argNumber,"fact-address, fact-index, or the symbol *");            return;           }         /*================================================*/         /* See if a fact with the specified index exists. */         /*================================================*/         ptr = FindIndexedFact(theEnv,factIndex);         /*=====================================*/         /* If the fact exists then retract it, */         /* otherwise print an error message.   */         /*=====================================*/         if (ptr != NULL)           { EnvRetract(theEnv,(void *) ptr); }         else           {            char tempBuffer[20];            gensprintf(tempBuffer,"f-%lld",factIndex);            CantFindItemErrorMessage(theEnv,"fact",tempBuffer);           }        }      /*===============================================*/      /* Otherwise if the argument evaluates to a fact */      /* address, we can directly retract it.          */      /*===============================================*/      else if (theResult.type == FACT_ADDRESS)        { EnvRetract(theEnv,theResult.value); }      /*============================================*/      /* Otherwise if the argument evaluates to the */      /* symbol *, then all facts are retracted.    */      /*============================================*/      else if ((theResult.type == SYMBOL) ?               (strcmp(ValueToString(theResult.value),"*") == 0) : FALSE)        {         RemoveAllFacts(theEnv);         return;        }      /*============================================*/      /* Otherwise the argument has evaluated to an */      /* illegal value for the retract command.     */      /*============================================*/      else        {         ExpectedTypeError1(theEnv,"retract",argNumber,"fact-address, fact-index, or the symbol *");         SetEvaluationError(theEnv,TRUE);        }     }  }/***************************************************//* SetFactDuplicationCommand: H/L access routine   *//*   for the set-fact-duplication command.         *//***************************************************/globle int SetFactDuplicationCommand(  void *theEnv)  {   int oldValue;   DATA_OBJECT theValue;   /*=====================================================*/   /* Get the old value of the fact duplication behavior. */   /*=====================================================*/   oldValue = EnvGetFactDuplication(theEnv);   /*============================================*/   /* Check for the correct number of arguments. */   /*============================================*/   if (EnvArgCountCheck(theEnv,"set-fact-duplication",EXACTLY,1) == -1)     { return(oldValue); }   /*========================*/   /* Evaluate the argument. */   /*========================*/   EnvRtnUnknown(theEnv,1,&theValue);   /*===============================================================*/   /* If the argument evaluated to FALSE, then the fact duplication */   /* behavior is disabled, otherwise it is enabled.                */   /*===============================================================*/   if ((theValue.value == EnvFalseSymbol(theEnv)) && (theValue.type == SYMBOL))     { EnvSetFactDuplication(theEnv,FALSE); }   else     { EnvSetFactDuplication(theEnv,TRUE); }   /*========================================================*/   /* Return the old value of the fact duplication behavior. */   /*========================================================*/   return(oldValue);  }/***************************************************//* GetFactDuplicationCommand: H/L access routine   *//*   for the get-fact-duplication command.         *//***************************************************/globle int GetFactDuplicationCommand(  void *theEnv)  {   int currentValue;   /*=========================================================*/   /* Get the current value of the fact duplication behavior. */   /*=========================================================*/   currentValue = EnvGetFactDuplication(theEnv);   /*============================================*/   /* Check for the correct number of arguments. */   /*============================================*/   if (EnvArgCountCheck(theEnv,"get-fact-duplication",EXACTLY,0) == -1)     { return(currentValue); }   /*============================================================*/   /* Return the current value of the fact duplication behavior. */   /*============================================================*/   return(currentValue);  }/*******************************************//* FactIndexFunction: H/L access routine   *//*   for the fact-index function.          *//*******************************************/globle long long FactIndexFunction(  void *theEnv)  {   DATA_OBJECT item;   /*============================================*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚日韩国产aⅴ精品中极品| www.亚洲在线| 日本欧美在线看| 日韩高清欧美激情| 免费在线看成人av| 精品一区二区免费| 久久精品99久久久| 久久久久久久综合日本| 日韩一级成人av| 国产情人综合久久777777| 久久久99精品免费观看| 久久人人爽爽爽人久久久| 日韩精品中午字幕| 日韩欧美美女一区二区三区| 91精品国产综合久久精品app| 欧美日本一区二区三区四区| 欧美三级蜜桃2在线观看| 69堂国产成人免费视频| www国产成人| 中文字幕亚洲一区二区av在线| 一级做a爱片久久| 国产在线播放一区| 97精品久久久午夜一区二区三区| 91丨porny丨蝌蚪视频| 欧美日韩一区二区在线视频| 日韩欧美在线123| 国产精品第13页| 日韩电影在线观看一区| 波多野结衣精品在线| 欧美一级xxx| 中文字幕一区二区5566日韩| 精品一区二区免费在线观看| 97精品超碰一区二区三区| 久久在线免费观看| 亚洲精品成人精品456| 亚洲一区二区精品3399| 国产精品一区二区视频| 欧美美女bb生活片| 亚洲欧美色综合| 国产91精品一区二区麻豆亚洲| 欧美乱熟臀69xxxxxx| 亚洲乱码国产乱码精品精98午夜| 韩国毛片一区二区三区| 欧美精品视频www在线观看| 一区二区在线免费观看| 99久久99精品久久久久久 | 精品久久久久久久久久久久包黑料| 1000精品久久久久久久久| 91在线视频播放地址| 中文字幕亚洲一区二区av在线| 成人黄色免费短视频| 久久九九全国免费| 成人av在线观| 亚洲超碰精品一区二区| 69堂精品视频| 国产在线一区二区综合免费视频| 精品国产百合女同互慰| 国产xxx精品视频大全| 亚洲免费成人av| 欧美日韩一卡二卡| 麻豆91在线播放| 国产精品久久久久影院亚瑟| 91片黄在线观看| 日韩精品福利网| 国产精品乱码人人做人人爱 | 91精品国产综合久久婷婷香蕉| 欧美日本一区二区| 免费不卡在线观看| 国产精品久久久久永久免费观看| 欧美一区二区免费视频| 91精品婷婷国产综合久久性色| 91国内精品野花午夜精品| 一本大道久久a久久综合婷婷| 国产老妇另类xxxxx| 国产高清精品网站| 成人99免费视频| 色成年激情久久综合| 欧美日韩1区2区| 久久久久久日产精品| 中文字幕国产精品一区二区| 国产喷白浆一区二区三区| 国产精品国产馆在线真实露脸| 亚洲精品一二三四区| 美女国产一区二区三区| 337p粉嫩大胆色噜噜噜噜亚洲| 日韩精品一区二区三区在线播放 | 亚洲日本va午夜在线电影| 日韩精品一区在线| 91麻豆精品国产无毒不卡在线观看 | 久久久久久日产精品| 精品国内片67194| 日韩一区二区三区在线观看| 91精品国产一区二区人妖| 欧美白人最猛性xxxxx69交| 欧美电影免费观看高清完整版在线| 欧美一级一级性生活免费录像| 日韩免费高清电影| 日韩欧美国产1| 国产欧美1区2区3区| 亚洲精品菠萝久久久久久久| 亚洲一区二区在线免费看| 亚洲va国产天堂va久久en| 美女一区二区三区在线观看| 国产精品99久久不卡二区| jlzzjlzz亚洲女人18| 欧美日韩电影在线| 婷婷综合久久一区二区三区| 中文字幕一区二区三区乱码在线 | jiyouzz国产精品久久| 亚洲国产欧美日韩另类综合 | 日韩一区二区免费在线电影 | 中文字幕av一区二区三区高| 一区二区三区中文字幕| 热久久一区二区| 风间由美一区二区三区在线观看| 波多野结衣精品在线| 在线综合视频播放| 亚洲免费观看高清完整| 精品一区二区三区在线观看国产 | 欧美成人aa大片| 亚洲精品国产一区二区精华液| 美洲天堂一区二卡三卡四卡视频 | 日韩一级二级三级| 亚洲线精品一区二区三区八戒| 国产成人在线色| 日韩视频123| 日韩中文字幕区一区有砖一区 | 日韩欧美在线影院| 亚洲精品国产a| 欧美亚洲高清一区| 久久精品欧美日韩| 国产剧情av麻豆香蕉精品| 日韩一级二级三级| 精品在线你懂的| 欧美一卡2卡3卡4卡| 蜜臀久久久久久久| 日韩欧美在线网站| 国产综合色产在线精品 | 亚洲综合久久久久| 风间由美性色一区二区三区| 国产精品全国免费观看高清| 激情六月婷婷久久| 国产精品网曝门| 99v久久综合狠狠综合久久| 国产精品久久精品日日| 91一区一区三区| 午夜精品成人在线视频| 日韩欧美在线网站| 国产不卡免费视频| 亚洲少妇屁股交4| 欧美日本韩国一区| 国产精品18久久久久久久网站| 国产日韩欧美精品一区| 91老师片黄在线观看| 亚洲国产成人porn| 精品国产精品一区二区夜夜嗨| 成人免费高清在线| 18成人在线观看| 日韩欧美在线不卡| 色婷婷av久久久久久久| 国产真实精品久久二三区| 亚洲日本电影在线| 日韩一区二区在线看片| 色综合中文字幕国产 | 欧美一区永久视频免费观看| 激情国产一区二区 | 在线一区二区观看| 国产成人午夜精品5599| 亚洲丶国产丶欧美一区二区三区| 欧美成人性战久久| 欧美午夜电影在线播放| 国产成人av自拍| 九一久久久久久| 免费成人av资源网| 亚洲成av人片一区二区梦乃| 亚洲欧洲性图库| 国产精品超碰97尤物18| 精品国产乱码久久久久久久| 欧美一级高清片在线观看| 精品视频一区二区三区免费| 欧美亚洲禁片免费| 欧美性高清videossexo| 欧美三级日韩在线| 欧美视频一区二区在线观看| 欧美性猛交xxxxxxxx| 91福利国产精品| 欧美无人高清视频在线观看| 精品视频免费在线| 欧美日韩中文字幕精品| 日韩欧美国产综合在线一区二区三区 | 成人精品视频一区二区三区| 99久久国产免费看| 一本大道久久精品懂色aⅴ| 欧美三片在线视频观看| 26uuu亚洲综合色| 国产欧美一区视频| 亚洲一区二区黄色| 国产一区二区在线观看视频| 国产mv日韩mv欧美| 欧美丝袜丝交足nylons图片|