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

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

?? rulecmp.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.24  05/17/06            */   /*                                                     */   /*            DEFRULE CONSTRUCTS-TO-C MODULE           */   /*******************************************************//*************************************************************//* Purpose: Implements the constructs-to-c feature for the   *//*    defrule construct.                                     *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*      Brian L. Donnell                                     *//*                                                           *//* Revision History:                                         *//*                                                           *//*      6.24: Removed DYNAMIC_SALIENCE and                   *//*            LOGICAL_DEPENDENCIES compilation flags.        *//*                                                           *//*************************************************************/#define _RULECMP_SOURCE_#include "setup.h"#if DEFRULE_CONSTRUCT && (! RUN_TIME) && CONSTRUCT_COMPILER#include <stdio.h>#define _STDIO_INCLUDED_#include <string.h>#include "envrnmnt.h"#include "factbld.h"#include "reteutil.h"#include "rulecmp.h"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/   static int                     ConstructToCode(void *,char *,int,FILE *,int,int);   static void                    JoinToCode(void *,FILE *,struct joinNode *,int,int);   static void                    LinkToCode(void *,FILE *,struct joinLink *,int,int);   static void                    DefruleModuleToCode(void *,FILE *,struct defmodule *,int,int,int);   static void                    DefruleToCode(void *,FILE *,struct defrule *,int,int,int);   static void                    CloseDefruleFiles(void *,FILE *,FILE *,FILE *,FILE*,int);   static void                    BeforeDefrulesCode(void *);   static void                    InitDefruleCode(void *,FILE *,int,int);   static int                     RuleCompilerTraverseJoins(void *,struct joinNode *,char *,int,                                                            FILE *,int,int,FILE **,FILE **,                                                            int *,int *,int *,int *,int *);   static int                     TraverseJoinLinks(void *,struct joinLink *,char *,int,FILE *,                                                    int,int,FILE **,int *,int *, int *);  /***********************************************************//* DefruleCompilerSetup: Initializes the defrule construct *//*   for use with the constructs-to-c command.             *//***********************************************************/globle void DefruleCompilerSetup(  void *theEnv)  {   DefruleData(theEnv)->DefruleCodeItem = AddCodeGeneratorItem(theEnv,"defrules",0,BeforeDefrulesCode,                                          InitDefruleCode,ConstructToCode,4);  }/**************************************************************//* BeforeDefrulesCode: Assigns each defrule and join with a   *//*   unique ID which will be used for pointer references when *//*   the data structures are written to a file as C code      *//**************************************************************/static void BeforeDefrulesCode(  void *theEnv)  {   long int moduleCount, ruleCount, joinCount, linkCount;   TagRuleNetwork(theEnv,&moduleCount,&ruleCount,&joinCount, &linkCount);  }/*********************************************************//* ConstructToCode: Produces defrule code for a run-time *//*   module created using the constructs-to-c function.  *//*********************************************************/static int ConstructToCode(  void *theEnv,  char *fileName,  int fileID,  FILE *headerFP,  int imageID,  int maxIndices)  {   int fileCount = 1;   struct defmodule *theModule;   struct defrule *theDefrule;   int joinArrayCount = 0, joinArrayVersion = 1;   int linkArrayCount = 0, linkArrayVersion = 1;   int moduleCount = 0, moduleArrayCount = 0, moduleArrayVersion = 1;   int defruleArrayCount = 0, defruleArrayVersion = 1;   FILE *joinFile = NULL, *moduleFile = NULL, *defruleFile = NULL, *linkFile = NULL;   /*==============================================*/   /* Include the appropriate defrule header file. */   /*==============================================*/   fprintf(headerFP,"#include \"ruledef.h\"\n");   /*======================================*/   /* Save the left and right prime links. */   /*======================================*/      if (! TraverseJoinLinks(theEnv,DefruleData(theEnv)->LeftPrimeJoins,fileName,fileID,headerFP,imageID,                           maxIndices,&linkFile,&fileCount,&linkArrayVersion,&linkArrayCount))     {      CloseDefruleFiles(theEnv,moduleFile,defruleFile,joinFile,linkFile,maxIndices);      return(0);     }   if (! TraverseJoinLinks(theEnv,DefruleData(theEnv)->RightPrimeJoins,fileName,fileID,headerFP,imageID,                           maxIndices,&linkFile,&fileCount,&linkArrayVersion,&linkArrayCount))     {      CloseDefruleFiles(theEnv,moduleFile,defruleFile,joinFile,linkFile,maxIndices);      return(0);     }        /*=========================================================*/   /* Loop through all the modules, all the defrules, and all */   /* the join nodes writing their C code representation to   */   /* the file as they are traversed.                         */   /*=========================================================*/   for (theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,NULL);        theModule != NULL;        theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,theModule))     {      /*=========================*/      /* Set the current module. */      /*=========================*/      EnvSetCurrentModule(theEnv,(void *) theModule);      /*==========================*/      /* Save the defrule module. */      /*==========================*/      moduleFile = OpenFileIfNeeded(theEnv,moduleFile,fileName,fileID,imageID,&fileCount,                                    moduleArrayVersion,headerFP,                                    "struct defruleModule",ModulePrefix(DefruleData(theEnv)->DefruleCodeItem),                                    FALSE,NULL);      if (moduleFile == NULL)        {         CloseDefruleFiles(theEnv,moduleFile,defruleFile,joinFile,linkFile,maxIndices);         return(0);        }      DefruleModuleToCode(theEnv,moduleFile,theModule,imageID,maxIndices,moduleCount);      moduleFile = CloseFileIfNeeded(theEnv,moduleFile,&moduleArrayCount,&moduleArrayVersion,                                     maxIndices,NULL,NULL);      /*=========================================*/      /* Loop through all of the defrules (and   */      /* their disjuncts) in the current module. */      /*=========================================*/      theDefrule = (struct defrule *) EnvGetNextDefrule(theEnv,NULL);      while (theDefrule != NULL)        {         /*===================================*/         /* Save the defrule data structures. */         /*===================================*/         defruleFile = OpenFileIfNeeded(theEnv,defruleFile,fileName,fileID,imageID,&fileCount,                                        defruleArrayVersion,headerFP,                                        "struct defrule",ConstructPrefix(DefruleData(theEnv)->DefruleCodeItem),                                        FALSE,NULL);         if (defruleFile == NULL)           {            CloseDefruleFiles(theEnv,moduleFile,defruleFile,joinFile,linkFile,maxIndices);            return(0);           }         DefruleToCode(theEnv,defruleFile,theDefrule,imageID,maxIndices,                        moduleCount);         defruleArrayCount++;         defruleFile = CloseFileIfNeeded(theEnv,defruleFile,&defruleArrayCount,&defruleArrayVersion,                                         maxIndices,NULL,NULL);         /*================================*/         /* Save the join data structures. */         /*================================*/         if (! RuleCompilerTraverseJoins(theEnv,theDefrule->lastJoin,fileName,fileID,headerFP,imageID,                                         maxIndices,&joinFile,&linkFile,&fileCount,&joinArrayVersion,&joinArrayCount,                                         &linkArrayVersion,&linkArrayCount))           {            CloseDefruleFiles(theEnv,moduleFile,defruleFile,joinFile,linkFile,maxIndices);            return(0);           }         /*==========================================*/         /* Move on to the next disjunct or defrule. */         /*==========================================*/         if (theDefrule->disjunct != NULL) theDefrule = theDefrule->disjunct;         else theDefrule = (struct defrule *) EnvGetNextDefrule(theEnv,theDefrule);        }      moduleCount++;      moduleArrayCount++;     }   CloseDefruleFiles(theEnv,moduleFile,defruleFile,joinFile,linkFile,maxIndices);   return(1);  }/*********************************************************************//* RuleCompilerTraverseJoins: Traverses the join network for a rule. *//*********************************************************************/static int RuleCompilerTraverseJoins(  void *theEnv,  struct joinNode *joinPtr,  char *fileName,  int fileID,  FILE *headerFP,  int imageID,  int maxIndices,  FILE **joinFile,  FILE **linkFile,  int *fileCount,  int *joinArrayVersion,  int *joinArrayCount,  int *linkArrayVersion,  int *linkArrayCount)  {         for (;        joinPtr != NULL;        joinPtr = joinPtr->lastLevel)     {       if (joinPtr->marked)        {         *joinFile = OpenFileIfNeeded(theEnv,*joinFile,fileName,fileID,imageID,fileCount,                                      *joinArrayVersion,headerFP,                                      "struct joinNode",JoinPrefix(),FALSE,NULL);         if (*joinFile == NULL)           { return(FALSE); }         JoinToCode(theEnv,*joinFile,joinPtr,imageID,maxIndices);         (*joinArrayCount)++;         *joinFile = CloseFileIfNeeded(theEnv,*joinFile,joinArrayCount,joinArrayVersion,                                       maxIndices,NULL,NULL);                                                                      if (! TraverseJoinLinks(theEnv,joinPtr->nextLinks,fileName,fileID,headerFP,imageID,                                 maxIndices,linkFile,fileCount,linkArrayVersion,linkArrayCount))           { return(FALSE); }         }            if (joinPtr->joinFromTheRight)        {          if (RuleCompilerTraverseJoins(theEnv,joinPtr->rightSideEntryStructure,fileName,                                       fileID,headerFP,imageID,maxIndices,joinFile,linkFile,fileCount,                                       joinArrayVersion,joinArrayCount,                                       linkArrayVersion,linkArrayCount) == FALSE)           { return(FALSE); }        }     }   return(TRUE);  }/*******************************************************//* TraverseJoinLinks: Writes out a list of join links. *//*******************************************************/static int TraverseJoinLinks(  void *theEnv,  struct joinLink *linkPtr,  char *fileName,  int fileID,  FILE *headerFP,  int imageID,  int maxIndices,  FILE **linkFile,  int *fileCount,  int *linkArrayVersion,  int *linkArrayCount)  {      for (;        linkPtr != NULL;        linkPtr = linkPtr->next)     {      *linkFile = OpenFileIfNeeded(theEnv,*linkFile,fileName,fileID,imageID,fileCount,                                   *linkArrayVersion,headerFP,                                   "struct joinLink",LinkPrefix(),FALSE,NULL);                 if (*linkFile == NULL)        { return(FALSE); }                 LinkToCode(theEnv,*linkFile,linkPtr,imageID,maxIndices);      (*linkArrayCount)++;      *linkFile = CloseFileIfNeeded(theEnv,*linkFile,linkArrayCount,linkArrayVersion,                                    maxIndices,NULL,NULL);     }   return(TRUE);  }/********************************************************//* CloseDefruleFiles: Closes all of the C files created *//*   for defrule. Called when an error occurs or when   *//*   the defrules have all been written to the files.   *//********************************************************/static void CloseDefruleFiles(  void *theEnv,  FILE *moduleFile,  FILE *defruleFile,  FILE *joinFile,  FILE *linkFile,  int maxIndices)  {   int count = maxIndices;   int arrayVersion = 0;   if (linkFile != NULL)     {      count = maxIndices;      CloseFileIfNeeded(theEnv,linkFile,&count,&arrayVersion,maxIndices,NULL,NULL);     }   if (joinFile != NULL)     {      count = maxIndices;      CloseFileIfNeeded(theEnv,joinFile,&count,&arrayVersion,maxIndices,NULL,NULL);     }   if (defruleFile != NULL)     {      count = maxIndices;      CloseFileIfNeeded(theEnv,defruleFile,&count,&arrayVersion,maxIndices,NULL,NULL);     }   if (moduleFile != NULL)     {      count = maxIndices;      CloseFileIfNeeded(theEnv,moduleFile,&count,&arrayVersion,maxIndices,NULL,NULL);     }  }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本少妇一区二区| 激情图区综合网| 蜜臀av一级做a爰片久久| 国产一区二区看久久| 91福利小视频| 精品国产第一区二区三区观看体验| 中文字幕亚洲精品在线观看| 青娱乐精品视频在线| 99精品欧美一区二区蜜桃免费 | 91精选在线观看| 欧美国产亚洲另类动漫| 日本中文字幕一区二区有限公司| 91在线一区二区| 国产性天天综合网| 蜜桃视频免费观看一区| 欧美日韩一区二区欧美激情| 亚洲欧美在线另类| 国产老肥熟一区二区三区| 欧美剧在线免费观看网站| 国产精品久久久久久久岛一牛影视| 极品美女销魂一区二区三区| 欧美一区三区四区| 亚洲bdsm女犯bdsm网站| 94-欧美-setu| 一区精品在线播放| 国产伦精品一区二区三区免费| 欧美一区二区三区公司| 午夜激情久久久| 在线观看网站黄不卡| 亚洲日本在线天堂| 99re成人在线| 亚洲女人小视频在线观看| 成人性视频免费网站| 国产视频911| 国产精品影视在线| 国产欧美精品一区| 精品一区二区三区免费| 精品国产一区二区国模嫣然| 免费在线观看不卡| 日韩欧美国产小视频| 免费成人美女在线观看.| 正在播放亚洲一区| 蜜臀国产一区二区三区在线播放| 欧美一区二区三区的| 国模娜娜一区二区三区| 久久综合精品国产一区二区三区| 国产精品亚洲一区二区三区妖精| 欧美激情综合五月色丁香小说| 成人网在线播放| 自拍偷拍国产精品| 欧美午夜一区二区三区免费大片| 午夜精品久久久久久久蜜桃app| 欧美军同video69gay| 激情五月婷婷综合网| 国产精品女主播在线观看| 日本道精品一区二区三区 | 精品久久久久久综合日本欧美| 久久黄色级2电影| 久久久久国产精品厨房| 99v久久综合狠狠综合久久| 一区二区三区精密机械公司| 欧美三片在线视频观看| 色综合天天做天天爱| 无码av免费一区二区三区试看| 欧美大白屁股肥臀xxxxxx| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美精品在线观看播放| 男人的天堂久久精品| 久久精品夜色噜噜亚洲a∨ | 午夜视频久久久久久| 在线播放一区二区三区| 国产精品小仙女| 亚洲激情在线激情| 6080午夜不卡| 岛国一区二区三区| 天天综合色天天| 国产欧美一区二区三区在线老狼| 色av成人天堂桃色av| 狠狠色综合日日| 亚洲日穴在线视频| 精品人伦一区二区色婷婷| 99久久精品一区二区| 视频精品一区二区| 国产精品天天看| 日韩一本二本av| 色诱亚洲精品久久久久久| 精品亚洲国内自在自线福利| 国产丝袜在线精品| 欧美绝品在线观看成人午夜影视| 成人免费毛片aaaaa**| 理论片日本一区| 亚洲国产一区二区三区| 国产精品黄色在线观看| 精品欧美乱码久久久久久| 欧美视频在线观看一区| 91丨九色丨蝌蚪丨老版| 久久er99热精品一区二区| 亚洲一区二区精品3399| 中文字幕一区二区三区不卡| 精品国产1区2区3区| 91精品中文字幕一区二区三区| 91亚洲永久精品| 国产精品 欧美精品| 九九**精品视频免费播放| 亚洲成人自拍网| 亚洲欧美日韩中文播放| 国产精品国产馆在线真实露脸| 精品国产麻豆免费人成网站| 91精品国产一区二区| 欧美日韩中字一区| 91福利视频在线| 99re成人精品视频| 白白色亚洲国产精品| 成人app在线观看| 国产mv日韩mv欧美| 国产成人免费在线观看不卡| 国产激情一区二区三区四区 | 成人高清免费观看| 福利一区二区在线| 成人激情黄色小说| 99在线视频精品| 色综合色狠狠天天综合色| 91蝌蚪porny九色| 99精品一区二区| 91麻豆福利精品推荐| 色诱亚洲精品久久久久久| 在线观看一区日韩| 欧美女孩性生活视频| 91精品欧美一区二区三区综合在 | 99国产精品国产精品毛片| 91免费国产视频网站| 91国内精品野花午夜精品| 欧美性大战久久| 91精品国产综合久久婷婷香蕉| 日韩欧美国产一区二区三区| 久久中文字幕电影| 午夜成人在线视频| 天天亚洲美女在线视频| 秋霞av亚洲一区二区三| 国产麻豆成人传媒免费观看| 成人激情开心网| 欧美精品一卡二卡| 久久伊99综合婷婷久久伊| 国产精品欧美一区喷水| 一个色综合av| 奇米色一区二区| 成人精品视频.| 欧美嫩在线观看| 日本一区二区三区久久久久久久久不| 亚洲视频每日更新| 日本不卡免费在线视频| 国产精品一级片在线观看| 一本色道**综合亚洲精品蜜桃冫 | 免费观看在线色综合| 国产xxx精品视频大全| 色噜噜狠狠色综合中国| 日韩欧美一区二区在线视频| 国产精品久久影院| 免费看精品久久片| 成人久久18免费网站麻豆| 欧美日韩三级一区| 久久精品欧美日韩精品| 视频一区二区三区中文字幕| 成人永久aaa| 日韩一区国产二区欧美三区| 中文成人av在线| 日韩综合在线视频| 成人午夜av在线| 日韩一区二区免费电影| 亚洲日本在线看| 久久91精品国产91久久小草 | 欧美性生交片4| 久久女同性恋中文字幕| 五月激情六月综合| 91麻豆123| 亚洲国产成人一区二区三区| 日本aⅴ免费视频一区二区三区| 91丨九色丨尤物| 国产日韩av一区二区| 日本午夜精品视频在线观看| 91丨九色丨黑人外教| 欧美韩国日本一区| 免费成人在线观看| 欧美日韩精品欧美日韩精品一 | 91麻豆.com| 欧美激情在线看| 国内精品伊人久久久久影院对白| 欧美日韩一级二级三级| 自拍偷在线精品自拍偷无码专区 | 蜜臀久久久久久久| 欧美视频一区二区三区在线观看| 亚洲人123区| youjizz国产精品| 久久九九影视网| 国产精品一区二区久久不卡| 日韩欧美精品在线| 一本大道久久a久久精品综合| 国产精品进线69影院| www.视频一区| 亚洲视频你懂的|