亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品自拍三区| 久久机这里只有精品| 欧美丰满高潮xxxx喷水动漫| 激情五月婷婷综合网| 亚洲欧美日韩国产一区二区三区| 欧美日韩国产乱码电影| 国产91富婆露脸刺激对白| 亚洲3atv精品一区二区三区| 国产精品无遮挡| 日韩视频在线你懂得| 欧美性欧美巨大黑白大战| 国产综合久久久久久鬼色| 亚洲午夜精品在线| 国产精品天美传媒| 欧美成人免费网站| 欧美色精品天天在线观看视频| 国产成人小视频| 久久99精品久久久久婷婷| 亚洲一二三区不卡| 亚洲人成小说网站色在线 | 日韩一区二区三区免费看| 91美女在线观看| 国产精品18久久久久久久久久久久| 天堂午夜影视日韩欧美一区二区| 18成人在线观看| 欧美国产一区二区| 国产亚洲一区二区在线观看| 欧美精品tushy高清| 欧美日产在线观看| 精品1区2区3区| 欧洲一区在线电影| 在线观看欧美精品| 欧美亚洲一区二区在线观看| 色综合久久六月婷婷中文字幕| 成人av在线资源| 99久久精品国产观看| 99精品桃花视频在线观看| 成人黄色小视频| 国产成人av福利| 国产成人在线网站| 成人在线一区二区三区| 成人午夜视频福利| 成人丝袜18视频在线观看| 成人午夜免费视频| 99久久精品情趣| 色系网站成人免费| 欧美亚洲国产bt| 欧美日韩黄视频| 日韩欧美视频一区| 久久久久久久久免费| 国产欧美日韩亚州综合| 国产精品乱码一区二区三区软件| 国产精品久久毛片| 亚洲欧美日韩在线| 亚洲福利视频三区| 精品一区二区免费| 成人午夜视频在线观看| 91香蕉视频黄| 欧美猛男男办公室激情| 日韩精品中午字幕| 欧美激情一区二区| 久久精品国产99国产| 国产一区二区三区免费观看| 成人理论电影网| 91福利精品第一导航| 欧美一区二区在线播放| 久久综合九色综合97婷婷女人 | 国产成人精品影视| 91女人视频在线观看| 欧美精品久久一区| 久久久久久久综合色一本| 亚洲欧美一区二区久久| 免费在线观看成人| 99久免费精品视频在线观看| 欧美三级视频在线观看| 欧美精品一区二区三| 自拍偷拍亚洲综合| 日韩精品亚洲一区二区三区免费| 国产在线观看一区二区| 在线播放91灌醉迷j高跟美女 | 亚洲在线观看免费视频| 亚洲成av人在线观看| 激情五月婷婷综合网| 色综合久久99| 日韩三级视频在线看| 中文字幕一区二区三区乱码在线| 亚洲国产视频一区| 国产精品夜夜爽| 欧美视频在线不卡| 久久麻豆一区二区| 亚洲一区二区三区四区五区黄 | 欧美激情一区二区三区四区 | 日精品一区二区三区| 国产成a人无v码亚洲福利| 精品视频全国免费看| 精品国产髙清在线看国产毛片 | 美日韩一区二区三区| 9色porny自拍视频一区二区| 欧美一区二区三区四区在线观看 | 欧美人xxxx| 2022国产精品视频| 亚洲福利视频一区| zzijzzij亚洲日本少妇熟睡| 欧美mv日韩mv亚洲| 亚洲综合偷拍欧美一区色| 国产成人精品亚洲777人妖| 欧美一区二区三区四区五区 | 亚洲国产电影在线观看| 奇米精品一区二区三区在线观看一 | 韩国av一区二区三区| 欧美日韩一区二区在线视频| 一区在线观看免费| 韩国一区二区在线观看| 这里只有精品电影| 亚洲一区视频在线观看视频| 成人99免费视频| 久久精品欧美日韩| 久久国产精品色婷婷| 在线不卡一区二区| 亚洲国产成人精品视频| 色综合天天综合| ...xxx性欧美| aaa欧美日韩| 一区在线播放视频| 97久久超碰精品国产| 中文字幕一区二区视频| www.成人网.com| 中文成人av在线| 国产成人在线看| 国产色一区二区| 国产精品66部| 国产女主播视频一区二区| 国产综合色在线| 国产午夜亚洲精品午夜鲁丝片| 激情五月播播久久久精品| 欧美v国产在线一区二区三区| 午夜免费久久看| 91精品综合久久久久久| 日韩精品欧美精品| 5858s免费视频成人| 日本亚洲一区二区| 欧美一级免费观看| 裸体健美xxxx欧美裸体表演| 日韩精品中文字幕在线不卡尤物| 久久精品国产亚洲5555| 久久综合九色综合欧美亚洲| 国产夫妻精品视频| 中文字幕中文字幕中文字幕亚洲无线| 粉嫩aⅴ一区二区三区四区五区| 中文字幕免费在线观看视频一区| av影院午夜一区| 综合自拍亚洲综合图不卡区| 麻豆精品国产传媒mv男同| 欧美成人a∨高清免费观看| 国产在线精品一区二区三区不卡 | 欧美日韩中字一区| 天天色天天爱天天射综合| 日韩欧美中文一区二区| 韩国毛片一区二区三区| 亚洲gay无套男同| 日韩视频一区在线观看| 国产一区二区三区在线观看免费视频| 国产亚洲成aⅴ人片在线观看| 国产成人精品影视| 亚洲一区二区三区中文字幕在线| 欧美日本一区二区三区四区| 久久99精品久久只有精品| 中文字幕免费一区| 欧美日韩精品是欧美日韩精品| 免费在线观看成人| 国产精品午夜春色av| 欧美日韩国产一区二区三区地区| 美腿丝袜亚洲三区| 亚洲色欲色欲www在线观看| 欧美日韩精品是欧美日韩精品| 狠狠色丁香婷综合久久| 亚洲特黄一级片| 91麻豆精品国产91久久久久久久久| 精品在线你懂的| 亚洲免费在线视频| 日韩精品一区二区在线观看| 成人动漫在线一区| 岛国一区二区三区| 中文字幕一区二区三区精华液| 欧美在线免费观看视频| 久久国产尿小便嘘嘘尿| 亚洲手机成人高清视频| 777奇米四色成人影色区| 成人三级在线视频| 日韩成人午夜电影| √…a在线天堂一区| 亚洲精品一区二区三区福利 | 午夜久久久久久电影| 久久九九久久九九| 欧美精品日日鲁夜夜添| 成人看片黄a免费看在线| 天堂在线亚洲视频| 伊人夜夜躁av伊人久久| 久久久亚洲欧洲日产国码αv| 欧美三级午夜理伦三级中视频|