#define YY_CHAR char /* added by Xavier Billault */ #include "Defines.hpp" #ifdef D_ED_IR_ACTIVE /* end added by Xavier Billault*/ /* A lexical scanner generated by flex */ /* scanner skeleton version: * $Header: /usr/fsys/odin/a/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp $ */ /* MODIFIED FOR C++ CLASS BY Alain Coetmeur: coetmeur(at)icdc.fr */ /* Note that (at) mean the 'at' symbol that I cannot write */ /* because it is expanded to the class name */ /* made at Informatique-CDC, Research&development department */ /* company from the Caisse Des Depots et Consignations */ /* institutional financial group (say 'Cat Doc Cad') */ /* theses symbols are added before this file */ /* #define YY_CHAR 'unsigned char' if 8bit or 'char' if 7bit */ /* #define FLEX_DEBUG if debug mode */ #define FLEX_SCANNER /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus /*added by Xavier Billault*/ #ifndef YY_USE_CLASS /*added by Xavier Billault*/ #define YY_USE_CLASS /*added by Xavier Billault*/ #endif /*added by Xavier Billault*/ #endif /*added by Xavier Billault*/ /* Old MSC, before c7 */ #ifdef MSDOS #ifndef _MSDOS #define _MSDOS #endif #endif /* turboc */ #ifdef __MSDOS__ #ifndef _MSDOS #define _MSDOS #endif #endif #ifdef __cplusplus #include #define YY_USE_CONST #define YY_USE_PROTOS #ifndef _MSDOS //#include #endif #else /* ! __cplusplus */ #ifdef __STDC__ #ifdef __GNUC__ #include void *malloc( size_t ); void free( void* ); int read(); #else #include #endif /* __GNUC__ */ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #define YY_USE_CONST #endif #include /*********************************************/ /* COMPILER DEPENDENT MACROS */ /*********************************************/ /* use prototypes in function declarations */ /* the "const" storage-class-modifier is valid */ #ifndef YY_USE_CONST #define const #endif /* use prototypes in function declarations */ #ifndef YY_PROTO #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif #endif /*********************/ /* parameters */ /* amount of stuff to slurp up with each read */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* size of default input buffer */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) #endif /***********************************/ /* to be redefined for application */ /* returned upon end-of-file */ #define YY_END_TOK 0 /* no semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #define yyterminate() return ( YY_NULL ) /* code executed at the end of each rule */ #define YY_BREAK break; /* #define YY_USER_ACTION */ /* #define YY_USER_INIT */ #ifndef YY_USE_CLASS /* copy whatever the last rule matched to the standard output */ /* cast to (char *) is because for 8-bit chars, yy___text is (unsigned char *) */ /* this used to be an fputs(), but since the string might contain NUL's, * we now use fwrite() */ #define ECHO (void) fwrite( (char *) yy___text, yy___leng, 1, yy___out ) /* gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifdef _MSDOS #define YY_INPUT(buf,result,max_size) \ if ( (result = fread(buf,1,max_size,yy___in)) < 0 ) \ YY_FATAL_ERROR( "fread() in flex scanner failed" ); #else #define YY_INPUT(buf,result,max_size) \ if ( (result = read( fileno(yy___in), (char *) buf, max_size )) < 0 ) \ YY_FATAL_ERROR( "read() in flex scanner failed" ); #endif /* report a fatal error */ /* The funky do-while is used to turn this macro definition into * a single C statement (which needs a semi-colon terminator). * This avoids problems with code like: * * if ( something_happens ) * YY_FATAL_ERROR( "oops, the something happened" ); * else * everything_okay(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the YY_FATAL_ERROR() call. */ #define YY_FATAL_ERROR(msg) \ do \ { \ (void) fputs( msg, stderr ); \ (void) putc( '\n', stderr ); \ exit( 1 ); \ } \ while ( 0 ) /* default yywrap function - always treat EOF as an EOF */ #define yywrap() 1 /* default declaration of generated scanner - a define so the user can * easily add parameters */ #define YY_DECL int yylex YY_PROTO(( void )) #else /* c++ */ #define ECHO yy___echo() #define YY_INPUT(buf,result,max_size) \ if ( yy___input((char *)buf, result,max_size) < 0 ) \ YY_FATAL_ERROR( "YY_INPUT() in flex scanner failed" ); #define YY_FATAL_ERROR(msg) yy___fatal_error(msg) #define yywrap() yy___wrap() #endif /***********************************/ /* not to be changed */ #define YY_NULL 0 #define YY_END_OF_BUFFER_CHAR 0 /* special action meaning "start processing a new file" */ #define YY_NEW_FILE yy___newfile /* enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN */ #define BEGIN yy_start = 1 + 2 * /* action number for EOF rule of a given start state */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* % section 1 definitions go here */ #define INITIAL 0 #include //for read() #include "EdIRbis.hpp" #include "EdIRDVLs.hpp" #include "EdIRMacL.hpp" #include "EdIRFrm.hpp" #include "EdIRIRD.hpp" #include "EdIRBeEn.hpp" #include "EdIRBeha.hpp" #include "EdIR2Eng.hpp" #include "EdIRGlob.hpp" #include "EdIRDict.hpp" #include "EdIRIAWd.hpp" #include "EdIRStrg.hpp" #include "ai_intf.hpp" //for g_pclAIInterface #include "CPA_NLL.hpp" #include "EDACModl.hpp" extern long gl_MacroAddress; #include "GAM.h" #if 0 /////////////////////////////////////////////////////////////////////////// //TEMPORAIRE A ENLEVER LE PLUS RAPIDEMENT POSSIBLE //#include "GAM\GamInven.h" #endif //0 #include "IPT.h" #include "x:\cpa\main\inc\_EditID.h" #include "TLS/LPSconst.hpp" #include "GMT.h" #include "TFA.h" #include "incAI.h" #include "_Actors.hpp" #define YY_USE_CLASS //ANNECY CB CString gcsGlob; //END //ROMTEAM Optimisation (Ionut Grozea 24/04/98) CString cs_params; int iCount; long l_id; //END ROMTEAM Optimisation (Ionut Grozea 24/04/98) /**********/ /* Macros */ /**********/ #define M_COMPUTE_POSITION() if(!m_bIsInMacro && !m_bIsInDefine) \ { \ m_lOldIndex=m_lIndexWithoutSpaceAndTab; \ m_lIndex+=yyleng; \ m_lIndexWithoutSpaceAndTab=m_lIndex; \ } #define M_COMPUTE_ALL() M_COMPUTE_POSITION(); \ g_clParse.yylval.csInitial=yytext #define M_COMPUTE_ALL_4_KW() M_COMPUTE_ALL(); \ long lIndex=fn_lGetKeyWordIdFromEditorName(yytext); \ fn_vInitNode(&(g_clParse.yylval),m_lIndex,eKeyWord,lIndex); \ if(M_ID_IS_INVALID(lIndex)) \ { \ g_clParse.m_csMsgError="Unknown KeyWord"; \ return CParse::SYNTAXERROR; \ } #define M_COMPUTE_ALL_4_OP() M_COMPUTE_ALL(); \ long lIndex=fn_lGetOperatorIdFromEditorName(yytext); \ fn_vInitNode(&(g_clParse.yylval),m_lIndex,eOperator,lIndex); \ if(M_ID_IS_INVALID(lIndex)) \ { \ g_clParse.m_csMsgError="Unknown Operator"; \ return CParse::SYNTAXERROR; \ } #define M_COMPUTE_ALL_4_OPC() M_COMPUTE_ALL(); \ long lIndex=fn_lGetConditionIdFromEditorName(yytext); \ fn_vInitNode(&(g_clParse.yylval),m_lIndex,eCondition,lIndex); \ if(M_ID_IS_INVALID(lIndex)) \ { \ g_clParse.m_csMsgError="Unknown Condition"; \ return CParse::SYNTAXERROR; \ } #define M_COMPUTE_ALL_4_BOOL(a) M_COMPUTE_ALL(); \ fn_vInitNode(&(g_clParse.yylval),m_lIndex,eConstant,(long)(a)) #define M_COMPUTE_ALL_4_COND() M_COMPUTE_ALL(); \ if(!fn_bIsCondition(yytext,&(g_clParse.yylval))) \ { \ g_clParse.m_csMsgError="Unknown Condition"; \ return CParse::SYNTAXERROR; \ } //BEGIN ROMTEAM Cristi Petrescu 98-04- #define M_EXPAND_DEFINE() CString csDefineText; \ if (m_clDefineList . Lookup (yytext, csDefineText)) \ { \ m_bIsInDefine = TRUE; \ m_fn_vEnterContext ((char *) (LPCSTR) (csDefineText)); \ return yylex (); \ } //END ROMTEAM Cristi Petrescu 98-04- /*************/ /* Functions */ /*************/ //MetaAction //ANNECY CB BOOL fn_bIsMetaAction(CString&,stReturn *); //BOOL fn_bIsMetaAction(CString,stReturn *); BOOL fn_bIsMetaAction(char *,stReturn *); //END //Condition //ANNECY CB BOOL fn_bIsCondition(CString&,stReturn *); //BOOL fn_bIsCondition(CString,stReturn *); BOOL fn_bIsCondition(char *,stReturn *); //END //Designer Variable //ANNECY CB BOOL fn_bIsDesignerVariable(CString&,stReturn *); //BOOL fn_bIsDesignerVariable(CString,stReturn *); BOOL fn_bIsDesignerVariable(char *,stReturn *); //END //ConstantInt //ANNECY CB BOOL fn_bIsAConstantInt(CString&,stReturn *); //BOOL fn_bIsAConstantInt(CString,stReturn *); BOOL fn_bIsAConstantInt(char *,stReturn *); //END //ConstantReal //ANNECY CB BOOL fn_bIsAConstantReal(CString&,stReturn *); //BOOL fn_bIsAConstantReal(CString,stReturn *); BOOL fn_bIsAConstantReal(char *,stReturn *); //END //Type //ANNECY CB BOOL fn_bIsAType(CString&,stReturn *); //BOOL fn_bIsAType(CString,stReturn *); BOOL fn_bIsAType(char *,stReturn *); //END //Function //ANNECY CB BOOL fn_bIsFunction(CString&,stReturn *); //BOOL fn_bIsFunction(CString,stReturn *); BOOL fn_bIsFunction(char *,stReturn *); //END //Procedure //ANNECY CB BOOL fn_bIsProcedure(CString&,stReturn *); //BOOL fn_bIsProcedure(CString,stReturn *); BOOL fn_bIsProcedure(char *,stReturn *); //END //BEGIN ROMTEAM Cristi Petrescu 98-04- //Subr BOOL fn_bIsSubr(CString&,stReturn *); BOOL fn_bIsSubr(char *,stReturn *); //END ROMTEAM Cristi Petrescu 98-04- //Field //ANNECY CB BOOL fn_bIsField(CString&,stReturn *); //BOOL fn_bIsField(CString,stReturn *); BOOL fn_bIsField(char *,stReturn *); //END //Perso (and Always) //ANNECY CB BOOL fn_bIsAPerso(CString&,stReturn *); //BOOL fn_bIsAPerso(CString,stReturn *); BOOL fn_bIsAPerso(char *,stReturn *); //END //ZDD //ANNECY CB long fn_lIsAZdd(CString&,stReturn *); //long fn_lIsAZdd(CString,stReturn *); long fn_lIsAZdd(char *,stReturn *); //END //ZDE //ANNECY CB long fn_lIsAZde(CString&,stReturn *); //long fn_lIsAZde(CString,stReturn *); long fn_lIsAZde(char *,stReturn *); //END //ZDM //ANNECY CB long fn_lIsAZdm(CString&,stReturn *); //long fn_lIsAZdm(CString,stReturn *); long fn_lIsAZdm(char *,stReturn *); //END //ZDR //ANNECY CB long fn_lIsAZdr(CString&,stReturn *); //long fn_lIsAZdr(CString,stReturn *); long fn_lIsAZdr(char *,stReturn *); //END //Action //ANNECY CB BOOL fn_bIsAnAction(CString&,stReturn *); //BOOL fn_bIsAnAction(CString,stReturn *); BOOL fn_bIsAnAction(char *,stReturn *); //END //WayPoint //ANNECY CB BOOL fn_bIsAWayPoint(CString&,stReturn *); //BOOL fn_bIsAWayPoint(CString,stReturn *); BOOL fn_bIsAWayPoint(char *,stReturn *); //END //Channel //ANNECY CB BOOL fn_bIsAChannel(CString&,stReturn *); //BOOL fn_bIsAChannel(CString,stReturn *); BOOL fn_bIsAChannel(char *,stReturn *); //END //Surface //ANNECY CB BOOL fn_bIsASurface(CString&,stReturn *); //BOOL fn_bIsASurface(CString,stReturn *); BOOL fn_bIsASurface(char *,stReturn *); //END //Environment //ANNECY CB BOOL fn_bIsAEnvironment(CString&,stReturn *); //BOOL fn_bIsAEnvironment(CString,stReturn *); BOOL fn_bIsAEnvironment(char *,stReturn *); //END //LipSynchro //ANNECY CB BOOL fn_bIsALipSynchro(CString&,stReturn *); //BOOL fn_bIsALipSynchro(CString,stReturn *); BOOL fn_bIsALipSynchro(char *,stReturn *); //END //Sector //ANNECY CB BOOL fn_bIsASector(CString&,stReturn *); //BOOL fn_bIsASector(CString,stReturn *); BOOL fn_bIsASector(char *,stReturn *); //END //SuperObject //ANNECY CB BOOL fn_bIsASuperObject(CString&,stReturn *); //BOOL fn_bIsASuperObject(CString,stReturn *); BOOL fn_bIsASuperObject(char *,stReturn *); //END //ObjectTable //ANNECY CB BOOL fn_bIsAObjectTable(CString&,stReturn *); //BOOL fn_bIsAObjectTable(CString,stReturn *); BOOL fn_bIsAObjectTable(char *,stReturn *); //END //Family //ANNECY CB BOOL fn_bIsAFamily(CString&,stReturn *); //BOOL fn_bIsAFamily(CString,stReturn *); BOOL fn_bIsAFamily(char *,stReturn *); //END //Model //ANNECY CB BOOL fn_bIsAModel(CString&,stReturn *); //BOOL fn_bIsAModel(CString,stReturn *); BOOL fn_bIsAModel(char *,stReturn *); //END //SoundEvent //ANNECY CB BOOL fn_bIsASoundEvent(CString&,stReturn *); //BOOL fn_bIsASoundEvent(CString,stReturn *); BOOL fn_bIsASoundEvent(char *,stReturn *); //END //GameMaterial //ANNECY CB BOOL fn_bIsAGameMaterial(CString&,stReturn *); //BOOL fn_bIsAGameMaterial(CString,stReturn *); BOOL fn_bIsAGameMaterial(char *,stReturn *); //END //Light //ANNECY CB BOOL fn_bIsALight(CString&,stReturn *); //BOOL fn_bIsALight(CString,stReturn *); BOOL fn_bIsALight(char *,stReturn *); //END //Capabilities //ANNECY CB BOOL fn_bIsACaps(CString&,stReturn *); //BOOL fn_bIsACaps(CString,stReturn *); BOOL fn_bIsACaps(char *,stReturn *); //END //Graph //ANNECY CB BOOL fn_bIsAGraph(CString&,stReturn *); //BOOL fn_bIsAGraph(CString,stReturn *); BOOL fn_bIsAGraph(char *,stReturn *); //END //Reflex Behaviour //ANNECY CB BOOL fn_bIsAReflexBehaviour(CString&,stReturn *); //BOOL fn_bIsAReflexBehaviour(CString,stReturn *); BOOL fn_bIsAReflexBehaviour(char *,stReturn *); //END //Intelligence Behaviour //ANNECY CB BOOL fn_bIsAIntelligenceBehaviour(CString&,stReturn *); //BOOL fn_bIsAIntelligenceBehaviour(CString,stReturn *); BOOL fn_bIsAIntelligenceBehaviour(char *,stReturn *); //END //Reflex Behaviour (for me) //ANNECY CB BOOL fn_bIsMyReflexBehaviour(CString&,stReturn *); //BOOL fn_bIsMyReflexBehaviour(CString,stReturn *); BOOL fn_bIsMyReflexBehaviour(char *,stReturn *); //END //Intelligence Behaviour (for me) //ANNECY CB BOOL fn_bIsMyIntelligenceBehaviour(CString&,stReturn *); //BOOL fn_bIsMyIntelligenceBehaviour(CString,stReturn *); BOOL fn_bIsMyIntelligenceBehaviour(char *,stReturn *); //END //KeyButton //ANNECY CB BOOL fn_bIsAKeyButton(CString&,stReturn *); //BOOL fn_bIsAKeyButton(CString,stReturn *); BOOL fn_bIsAKeyButton(char *,stReturn *); //END //Mask Type //ANNECY CB BOOL fn_bIsAMaskType(CString&,stReturn *); //BOOL fn_bIsAMaskType(CString,stReturn *); BOOL fn_bIsAMaskType(char *,stReturn *); //END #if 0 //Power //ANNECY CB BOOL fn_bIsAPower(CString&,stReturn *); //BOOL fn_bIsAPower(CString,stReturn *); BOOL fn_bIsAPower(char *,stReturn *); //END #endif //0 car inutilise dans RM 2 //Text //ANNECY CB BOOL fn_bIsAText(CString&,stReturn *); //BOOL fn_bIsAText(CString,stReturn *); BOOL fn_bIsAText(char *,stReturn *); //END //ParticleGenerator //ANNECY CB BOOL fn_bIsAParticleGenerator(CString&,stReturn *); //BOOL fn_bIsAParticleGenerator(CString,stReturn *); BOOL fn_bIsAParticleGenerator(char *,stReturn *); //END //State //ANNECY CB BOOL fn_bIsAState(CString&,stReturn *); //BOOL fn_bIsAState(CString,stReturn *); BOOL fn_bIsAState(char *,stReturn *); //END //Init IntermediateCode Node void fn_vInitNode(stReturn *,long,tdeNodeType,long,CPA_Actor *pclModel=NULL); void fn_vInitNode(stReturn *,long,tdeNodeType,double); void fn_vInitNode(stReturn *,long,tdeNodeType,CString); #define YY_CLex_FLEX_SCANNER #define ENGLISH 1 #define FRENCH 2 #define DECL_DSG_VAR 3 #define DEFINE 4 #define DEFINE_TEXT 5 /*world {M_COMPUTE_ALL_4_KW();return CParse::WORLD;}*/ /*monde {M_COMPUTE_ALL_4_KW();return CParse::WORLD;}*/ #include "..\Inc\EdIRflx.hpp" #define yy___text YY_CLex_TEXT #define yy___leng YY_CLex_LENG #define yy___in YY_CLex_IN #define yy___out YY_CLex_OUT #define yy___newfile \ do \ { \ YY_CLex_INIT_BUFFER( yy_current_buffer, yy___in ); \ YY_CLex_LOAD_BUFFER_STATE(); \ } \ while ( 0 ) #if YY_CLex_DEBUG != 0 #define yy___flex_debug YY_CLex_DEBUG_FLAG #endif #ifdef YY_USE_CLASS #define yy___echo YY_CLex_ECHO #define yy___input YY_CLex_INPUT #define yy___fatal_error YY_CLex_FATAL_ERROR #define yy___wrap YY_CLex_WRAP #endif /* done after the current pattern has been matched and before the * corresponding action - sets up yy___text */ #define YY_DO_BEFORE_ACTION \ yy___text = yy_bp; \ /* % code to fiddle yy___text and yy___leng for yymore() goes here */ \ yy___leng = yy_cp - yy_bp; \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* return all but the first 'n' matched characters back to the input stream */ #define yyless(n) \ do \ { \ /* undo effects of setting up yy___text */ \ *yy_cp = yy_hold_char; \ yy_c_buf_p = yy_cp = yy_bp + n; \ YY_DO_BEFORE_ACTION; /* set up yy___text again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yy___text ) struct yy_buffer_state { FILE *yy_input_file; YY_CLex_CHAR *yy_ch_buf; /* input buffer */ YY_CLex_CHAR *yy_buf_pos; /* current position in input buffer */ /* size of input buffer in bytes, not including room for EOB characters */ int yy_buf_size; /* number of characters read into yy_ch_buf, not including EOB characters */ int yy_n_chars; int yy_eof_status; /* whether we've seen an EOF on this buffer */ #define EOF_NOT_SEEN 0 /* "pending" happens when the EOF has been seen but there's still * some text process */ #define EOF_PENDING 1 #define EOF_DONE 2 }; /* we provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state" */ #ifndef YY_USE_CLASS #if YY_CLex_DEBUG != 0 int YY_CLex_DEBUG_FLAG=YY_CLex_DEBUG_INIT; #endif #define YY_CURRENT_BUFFER yy_current_buffer static YY_BUFFER_STATE yy_current_buffer; /* yy_hold_char holds the character lost when yy___text is formed */ static YY_CLex_CHAR yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ /* GLOBAL */ YY_CLex_CHAR *yy___text; int yy___leng; FILE *yy___in = (FILE *) 0, *yy___out = (FILE *) 0; #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif /* these variables are all declared out here so that section 3 code can * manipulate them */ /* points to current character in buffer */ static YY_CLex_CHAR *yy_c_buf_p = (YY_CLex_CHAR *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yy___in. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; static int yy_get_next_buffer YY_PROTO(( void )); static void yyunput YY_PROTO(( YY_CLex_CHAR c, YY_CLex_CHAR *buf_ptr )); #else /* c++ */ #ifndef YY_CLex_ECHO_NOCODE void YY_CLex_CLASS::yy___echo() {YY_CLex_ECHO_CODE } #endif #ifndef YY_CLex_INPUT_NOCODE int YY_CLex_CLASS::yy___input(char * buffer,int &result,int max_size) {YY_CLex_INPUT_CODE } #endif #ifndef YY_CLex_FATAL_ERROR_NOCODE void YY_CLex_CLASS::yy___fatal_error(char *msg) {YY_CLex_FATAL_ERROR_CODE } #endif #ifndef YY_CLex_WRAP_NOCODE int YY_CLex_CLASS::yy___wrap() {YY_CLex_WRAP_CODE } #endif void YY_CLex_CLASS::yy_initialize() { yy___in=0;yy___out=0;yy_init = 1; yy_start=0; yy___text=0;yy___leng=0; yy_current_buffer=0; yy_did_buffer_switch_on_eof=0; yy_c_buf_p=0;yy_hold_char=0;yy_n_chars=0; #if YY_CLex_DEBUG != 0 YY_CLex_DEBUG_FLAG=YY_CLex_DEBUG_INIT; #endif } YY_CLex_CLASS::YY_CLex_CLASS(YY_CLex_CONSTRUCTOR_PARAM) YY_CLex_CONSTRUCTOR_INIT {yy_initialize(); YY_CLex_CONSTRUCTOR_CODE; } #endif #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif #ifndef YY_USER_INIT #define YY_USER_INIT #endif /* % data tables for the DFA go here */ #define YY_END_OF_BUFFER 116 typedef int yy_state_type; static const short int yy_accept[718] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 115, 115, 115, 115, 115, 115, 115, 115, 79, 82, 78, 99, 99, 99, 105, 106, 106, 105, 105, 105, 105, 105, 105, 103, 105, 1, 79, 82, 78, 99, 105, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 105, 105, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 105, 105, 105, 100, 100, 100, 100, 100, 100, 100, 100, 100, 105, 114, 111, 112, 112, 113, 0, 101, 87, 92, 85, 93, 86, 0, 0, 0, 88, 94, 84, 81, 83, 80, 99, 0, 99, 99, 103, 104, 0, 0, 99, 99, 99, 99, 99, 99, 99, 18, 99, 99, 2, 99, 12, 99, 99, 99, 99, 99, 99, 0, 0, 0, 99, 99, 99, 99, 50, 99, 99, 99, 99, 99, 99, 48, 99, 99, 99, 54, 99, 99, 99, 99, 0, 0, 102, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 111, 112, 95, 0, 96, 0, 97, 0, 98, 99, 99, 104, 0, 0, 14, 99, 99, 99, 99, 99, 99, 99, 19, 20, 21, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 99, 99, 99, 99, 99, 99, 13, 0, 0, 0, 99, 99, 99, 99, 99, 99, 99, 38, 51, 99, 99, 99, 99, 99, 99, 55, 56, 57, 99, 99, 99, 99, 99, 99, 99, 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 89, 90, 91, 99, 99, 0, 0, 99, 99, 27, 99, 99, 99, 22, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 26, 16, 99, 0, 0, 0, 99, 99, 99, 99, 53, 99, 99, 99, 99, 99, 99, 99, 58, 99, 99, 99, 99, 99, 99, 52, 0, 100, 100, 100, 100, 53, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 16, 100, 52, 0, 99, 99, 0, 0, 99, 99, 99, 28, 17, 99, 25, 99, 31, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 0, 0, 0, 99, 62, 99, 99, 64, 67, 99, 99, 99, 99, 99, 99, 99, 99, 99, 63, 61, 99, 99, 99, 0, 100, 100, 100, 100, 17, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 99, 99, 0, 0, 0, 99, 99, 99, 99, 99, 99, 99, 99, 4, 99, 99, 99, 99, 99, 99, 33, 0, 0, 0, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 0, 100, 100, 100, 100, 100, 4, 100, 100, 100, 100, 100, 100, 100, 77, 100, 100, 100, 100, 100, 100, 0, 99, 99, 0, 0, 0, 99, 99, 99, 23, 99, 99, 99, 99, 99, 11, 99, 7, 99, 99, 109, 0, 0, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 59, 99, 99, 99, 69, 108, 100, 100, 100, 100, 100, 100, 11, 100, 7, 100, 100, 76, 100, 100, 100, 100, 100, 100, 110, 99, 75, 0, 0, 0, 10, 99, 99, 24, 99, 99, 9, 99, 99, 29, 99, 0, 0, 99, 46, 99, 99, 99, 40, 99, 99, 99, 99, 99, 60, 99, 99, 99, 10, 46, 100, 100, 9, 100, 100, 100, 40, 100, 100, 100, 100, 100, 100, 99, 37, 0, 0, 99, 6, 99, 3, 8, 99, 99, 0, 0, 99, 99, 43, 99, 99, 99, 99, 47, 99, 99, 42, 99, 100, 6, 8, 100, 43, 100, 100, 47, 100, 42, 100, 74, 0, 36, 99, 99, 99, 32, 0, 0, 0, 99, 99, 49, 99, 45, 99, 99, 68, 99, 100, 100, 45, 100, 100, 100, 0, 99, 99, 99, 0, 0, 0, 99, 65, 99, 99, 99, 99, 100, 100, 100, 100, 100, 35, 99, 99, 99, 0, 0, 0, 99, 99, 99, 99, 99, 100, 100, 100, 100, 100, 99, 30, 5, 0, 0, 73, 99, 99, 99, 99, 99, 100, 5, 100, 100, 100, 34, 0, 0, 99, 99, 99, 41, 99, 34, 100, 41, 100, 0, 72, 39, 99, 99, 70, 100, 70, 71, 99, 44, 44, 66, 0 } ; static const YY_CHAR yy_ec[128] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, 1, 6, 7, 1, 8, 9, 10, 11, 12, 13, 11, 14, 11, 15, 11, 16, 11, 17, 18, 19, 20, 21, 1, 1, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 1, 24, 1, 25, 1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 22, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 1, 1, 1, 1 } ; static const YY_CHAR yy_meta[51] = { 0, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 4, 4, 4, 4, 4, 4, 5, 1, 1, 3, 1, 6, 1, 1, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 } ; static const short int yy_base[729] = { 0, 0, 0, 50, 1319, 78, 1318, 126, 1317, 176, 0, 100, 108, 1321, 1325, 1316, 1299, 220, 99, 180, 1298, 214, 93, 1325, 1297, 1299, 215, 216, 1325, 1325, 1325, 1311, 1294, 228, 229, 193, 1293, 244, 219, 1325, 226, 1325, 1292, 1294, 223, 227, 221, 245, 250, 246, 247, 251, 235, 233, 252, 256, 253, 262, 1281, 255, 274, 273, 275, 277, 278, 279, 283, 290, 291, 288, 299, 306, 1280, 1304, 326, 0, 304, 1270, 1280, 270, 302, 1279, 304, 315, 1275, 1325, 0, 0, 0, 1325, 1299, 1325, 1325, 1325, 1325, 1325, 1325, 1285, 1284, 1283, 1325, 1325, 1325, 1325, 1325, 1325, 1282, 1281, 318, 332, 351, 340, 1258, 1252, 341, 342, 289, 351, 352, 354, 355, 361, 359, 367, 1278, 387, 1277, 363, 362, 368, 364, 369, 370, 1263, 1256, 1252, 376, 371, 383, 385, 1273, 388, 389, 390, 394, 391, 399, 407, 400, 404, 405, 432, 422, 409, 423, 415, 1259, 1284, 1325, 0, 1247, 1248, 1245, 402, 426, 1248, 1241, 1248, 1254, 1242, 1231, 1233, 1249, 1250, 1245, 0, 0, 1325, 1254, 1325, 1253, 1325, 1252, 1325, 433, 88, 463, 1233, 1231, 1252, 438, 439, 451, 442, 446, 445, 470, 1251, 1250, 1249, 454, 472, 473, 449, 475, 476, 477, 478, 479, 480, 1248, 481, 482, 484, 485, 488, 483, 1247, 1232, 1223, 1223, 489, 490, 498, 492, 491, 493, 503, 1243, 1242, 505, 512, 513, 514, 516, 520, 1241, 1240, 1239, 517, 523, 525, 521, 526, 527, 531, 1224, 1228, 1210, 1208, 1208, 1202, 1221, 1209, 1208, 1204, 1200, 1211, 1207, 1199, 1195, 1204, 1196, 1194, 1207, 1192, 1201, 1203, 1325, 1325, 1325, 529, 532, 1190, 1192, 535, 536, 1214, 537, 538, 544, 1213, 549, 540, 547, 551, 555, 558, 562, 560, 561, 565, 566, 571, 568, 1212, 1211, 575, 1193, 1185, 1198, 576, 577, 578, 584, 1207, 581, 586, 582, 589, 587, 592, 601, 1206, 607, 593, 594, 591, 602, 618, 1205, 1187, 600, 1176, 1170, 1188, 0, 1173, 1187, 1178, 1188, 1173, 1182, 1181, 1171, 1183, 1174, 613, 1177, 0, 1176, 0, 1171, 599, 623, 1160, 612, 626, 629, 630, 1186, 1185, 632, 635, 636, 1184, 640, 641, 642, 643, 644, 646, 645, 647, 648, 652, 1162, 1154, 1162, 653, 1180, 649, 655, 1179, 1178, 650, 664, 665, 668, 669, 671, 656, 679, 682, 1177, 684, 687, 688, 690, 1155, 1147, 1161, 1164, 1145, 0, 1154, 1138, 1146, 1145, 1154, 1141, 1142, 1143, 1136, 1151, 1150, 1138, 1134, 1130, 1128, 1128, 1134, 689, 691, 1132, 1132, 1124, 692, 699, 695, 694, 702, 696, 701, 697, 1151, 703, 705, 704, 713, 714, 722, 1150, 1136, 1139, 1125, 723, 706, 727, 730, 732, 734, 735, 736, 737, 738, 741, 743, 742, 744, 745, 748, 1133, 1126, 1119, 1122, 1129, 1119, 0, 1118, 1123, 1113, 1124, 1127, 1114, 1121, 0, 1106, 1112, 1122, 1107, 1112, 1103, 1114, 750, 752, 1103, 1110, 1105, 751, 753, 759, 1123, 768, 766, 769, 767, 772, 1122, 776, 1121, 779, 777, 1325, 1099, 1095, 775, 781, 782, 783, 778, 786, 784, 785, 787, 793, 796, 1118, 815, 801, 805, 813, 1325, 1098, 1094, 1088, 1083, 1092, 1087, 0, 1089, 0, 1085, 1096, 0, 1091, 1084, 1083, 1092, 1092, 1092, 1325, 806, 1102, 1094, 1083, 1086, 1098, 807, 814, 1097, 819, 820, 1096, 821, 822, 1095, 823, 1067, 1065, 825, 1092, 827, 826, 833, 1091, 830, 829, 834, 838, 835, 1090, 828, 839, 837, 0, 0, 1060, 1061, 0, 1060, 1076, 1058, 0, 1062, 1061, 1066, 1056, 1067, 1057, 840, 1325, 1057, 1070, 855, 1076, 857, 1075, 1074, 858, 861, 289, 1064, 863, 864, 1072, 865, 866, 867, 869, 1071, 870, 872, 1070, 875, 1056, 0, 0, 1050, 0, 1046, 1041, 0, 1043, 0, 1043, 1063, 1049, 1325, 878, 871, 873, 1061, 1038, 1046, 1037, 890, 877, 1057, 880, 1056, 881, 883, 1055, 895, 1043, 1040, 0, 1025, 1041, 1024, 1042, 897, 898, 900, 1021, 1032, 1019, 902, 1045, 904, 907, 909, 906, 1017, 1032, 1029, 1023, 1013, 1325, 912, 910, 913, 1025, 1012, 1017, 914, 915, 916, 918, 926, 991, 982, 985, 962, 965, 922, 972, 969, 940, 954, 1325, 930, 925, 928, 929, 942, 940, 0, 951, 933, 938, 958, 932, 948, 943, 944, 945, 954, 946, 0, 932, 0, 924, 589, 1325, 448, 948, 949, 443, 281, 0, 1325, 950, 259, 0, 106, 1325, 993, 1000, 1004, 1009, 1013, 1017, 1021, 1028, 1035, 1042, 1049 } ; static const short int yy_def[729] = { 0, 717, 1, 717, 3, 3, 5, 717, 7, 717, 9, 718, 718, 717, 717, 719, 717, 717, 717, 717, 717, 717, 717, 717, 717, 720, 720, 720, 717, 717, 717, 719, 717, 717, 721, 717, 717, 717, 717, 717, 717, 717, 717, 720, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 722, 717, 723, 723, 723, 723, 723, 723, 723, 723, 723, 717, 717, 724, 725, 725, 717, 719, 717, 717, 717, 717, 717, 717, 726, 727, 728, 717, 717, 717, 717, 717, 717, 720, 717, 720, 720, 717, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 121, 720, 720, 720, 720, 717, 722, 717, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 717, 724, 725, 717, 717, 717, 717, 717, 717, 717, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 717, 717, 717, 717, 720, 720, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 717, 720, 720, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 717, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 717, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 717, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 720, 717, 717, 720, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 720, 720, 720, 723, 723, 723, 723, 723, 723, 717, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 720, 723, 723, 723, 723, 723, 717, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 723, 723, 723, 723, 723, 720, 720, 720, 717, 717, 717, 720, 720, 720, 720, 720, 723, 723, 723, 723, 723, 720, 717, 717, 720, 720, 720, 720, 720, 723, 723, 723, 723, 717, 717, 720, 720, 720, 720, 723, 723, 717, 720, 720, 723, 720, 0, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717 } ; static const short int yy_nxt[1376] = { 0, 14, 14, 14, 15, 14, 16, 17, 18, 19, 20, 14, 14, 14, 14, 14, 14, 21, 14, 22, 23, 24, 25, 14, 14, 25, 25, 26, 25, 25, 27, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 28, 29, 30, 31, 28, 32, 33, 34, 35, 36, 37, 37, 37, 37, 37, 37, 38, 39, 40, 41, 42, 43, 44, 28, 43, 45, 46, 47, 43, 48, 49, 43, 43, 50, 43, 43, 51, 52, 53, 43, 43, 43, 54, 55, 43, 56, 43, 57, 43, 43, 59, 88, 89, 60, 107, 61, 95, 62, 63, 88, 89, 43, 103, 104, 64, 65, 66, 67, 96, 68, 69, 70, 107, 71, 272, 43, 28, 29, 30, 73, 28, 28, 28, 74, 28, 28, 37, 37, 37, 37, 37, 37, 28, 39, 28, 28, 28, 75, 28, 28, 75, 75, 75, 76, 75, 77, 78, 75, 75, 75, 75, 75, 75, 79, 75, 80, 75, 75, 81, 82, 75, 83, 75, 75, 75, 75, 14, 85, 85, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 86, 14, 14, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 93, 97, 98, 99, 101, 107, 107, 102, 93, 101, 95, 107, 102, 94, 97, 98, 99, 107, 108, 103, 104, 94, 96, 107, 108, 107, 111, 109, 110, 110, 110, 110, 110, 110, 112, 107, 107, 107, 114, 113, 107, 107, 107, 107, 115, 120, 107, 125, 126, 107, 123, 121, 107, 127, 124, 134, 131, 116, 122, 117, 118, 119, 129, 107, 107, 107, 135, 107, 107, 107, 128, 130, 138, 107, 132, 136, 141, 143, 107, 107, 107, 107, 164, 137, 142, 139, 109, 150, 165, 107, 144, 145, 140, 148, 149, 151, 107, 146, 715, 623, 191, 147, 153, 160, 624, 166, 152, 170, 107, 154, 110, 110, 110, 110, 110, 110, 161, 167, 172, 171, 168, 155, 107, 184, 186, 186, 186, 186, 186, 186, 173, 107, 107, 111, 185, 110, 110, 110, 110, 110, 110, 107, 107, 189, 107, 107, 196, 197, 198, 107, 199, 107, 107, 107, 107, 190, 194, 107, 107, 107, 107, 107, 213, 200, 195, 193, 107, 192, 203, 212, 216, 214, 201, 107, 204, 107, 202, 107, 107, 107, 107, 107, 215, 222, 107, 217, 205, 206, 207, 107, 107, 227, 208, 221, 107, 107, 223, 107, 224, 107, 226, 228, 229, 209, 210, 107, 225, 211, 230, 233, 231, 250, 107, 107, 245, 232, 234, 235, 236, 237, 251, 238, 242, 107, 244, 252, 253, 254, 107, 107, 243, 255, 107, 107, 239, 107, 107, 275, 107, 107, 271, 107, 256, 240, 107, 241, 257, 186, 186, 186, 186, 186, 186, 279, 277, 276, 272, 282, 281, 278, 107, 280, 107, 107, 285, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 284, 287, 107, 107, 107, 107, 107, 107, 283, 293, 286, 292, 107, 288, 289, 296, 301, 107, 290, 107, 295, 303, 291, 294, 297, 304, 107, 107, 107, 302, 107, 107, 313, 306, 107, 107, 305, 107, 308, 107, 107, 107, 307, 107, 314, 107, 107, 311, 316, 107, 107, 107, 107, 310, 107, 344, 312, 309, 107, 315, 317, 107, 320, 107, 343, 107, 350, 318, 319, 107, 347, 351, 107, 352, 107, 107, 107, 348, 356, 107, 107, 353, 107, 349, 360, 107, 354, 355, 358, 107, 107, 107, 107, 362, 359, 107, 107, 363, 107, 357, 107, 107, 361, 107, 364, 107, 107, 107, 107, 375, 712, 365, 373, 107, 376, 107, 107, 370, 369, 378, 372, 107, 374, 377, 379, 371, 380, 386, 384, 387, 381, 383, 107, 412, 385, 390, 405, 107, 406, 415, 107, 382, 407, 107, 107, 388, 107, 391, 413, 107, 107, 416, 418, 408, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 423, 107, 107, 417, 107, 107, 419, 424, 428, 420, 422, 437, 421, 107, 107, 426, 427, 107, 107, 429, 107, 438, 439, 425, 430, 431, 432, 436, 107, 443, 445, 107, 440, 107, 442, 441, 107, 107, 107, 107, 107, 107, 444, 107, 107, 107, 107, 474, 107, 483, 107, 107, 107, 107, 107, 107, 446, 481, 482, 447, 479, 448, 107, 107, 449, 475, 450, 451, 486, 480, 488, 107, 107, 484, 487, 490, 107, 485, 489, 107, 497, 107, 491, 107, 107, 107, 107, 107, 499, 508, 107, 107, 107, 107, 107, 496, 505, 107, 492, 107, 107, 107, 107, 498, 501, 502, 504, 507, 107, 500, 532, 510, 503, 506, 540, 107, 107, 107, 107, 537, 509, 107, 511, 533, 107, 107, 107, 107, 107, 538, 107, 107, 107, 107, 107, 107, 107, 543, 541, 539, 542, 546, 107, 547, 552, 107, 544, 545, 555, 550, 107, 557, 551, 554, 107, 107, 107, 553, 560, 558, 556, 561, 107, 107, 107, 559, 563, 562, 107, 107, 107, 107, 107, 564, 107, 107, 107, 107, 107, 107, 580, 589, 107, 107, 107, 584, 107, 107, 107, 107, 585, 593, 597, 590, 587, 586, 594, 588, 602, 596, 598, 603, 595, 600, 107, 599, 107, 107, 604, 601, 107, 616, 107, 107, 107, 107, 107, 619, 107, 107, 107, 107, 107, 622, 107, 621, 107, 107, 628, 107, 107, 620, 107, 626, 633, 644, 627, 630, 642, 107, 629, 632, 652, 631, 107, 634, 107, 107, 643, 107, 648, 107, 649, 107, 650, 107, 107, 651, 107, 107, 662, 107, 107, 107, 107, 107, 661, 107, 666, 668, 653, 107, 677, 660, 107, 107, 669, 107, 107, 107, 685, 667, 670, 676, 686, 684, 682, 683, 695, 678, 697, 107, 107, 107, 107, 107, 692, 107, 107, 107, 711, 696, 710, 107, 705, 698, 704, 107, 703, 702, 707, 706, 699, 701, 700, 708, 694, 693, 107, 713, 716, 107, 709, 691, 690, 714, 87, 87, 87, 87, 87, 87, 87, 90, 90, 90, 90, 90, 90, 90, 106, 106, 106, 106, 110, 110, 157, 157, 157, 157, 157, 157, 157, 159, 689, 159, 159, 175, 688, 175, 175, 176, 687, 176, 176, 176, 176, 176, 177, 177, 177, 177, 177, 681, 177, 179, 179, 179, 179, 179, 680, 179, 181, 181, 181, 181, 181, 679, 181, 675, 674, 673, 672, 671, 107, 665, 664, 663, 659, 658, 657, 656, 655, 654, 107, 107, 107, 647, 646, 645, 107, 641, 107, 640, 639, 638, 637, 636, 635, 107, 107, 107, 625, 107, 107, 107, 618, 617, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 107, 107, 107, 592, 591, 107, 107, 107, 107, 583, 582, 581, 107, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 107, 549, 548, 107, 107, 107, 536, 535, 534, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 495, 494, 493, 107, 107, 478, 477, 476, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 107, 107, 107, 107, 435, 434, 433, 107, 107, 107, 414, 411, 410, 409, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 389, 107, 107, 107, 368, 367, 366, 107, 107, 107, 107, 346, 345, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 107, 107, 107, 107, 107, 300, 299, 298, 107, 107, 107, 107, 107, 107, 274, 273, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 249, 248, 247, 158, 246, 107, 220, 219, 218, 107, 107, 188, 187, 183, 107, 182, 180, 178, 91, 174, 169, 163, 162, 158, 156, 133, 107, 105, 100, 92, 91, 107, 105, 100, 92, 91, 717, 84, 72, 58, 13, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717 } ; static const short int yy_chk[1376] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 11, 11, 5, 185, 5, 18, 5, 5, 12, 12, 5, 22, 22, 5, 5, 5, 5, 18, 5, 5, 5, 716, 5, 185, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 17, 19, 19, 19, 21, 26, 27, 21, 33, 38, 34, 46, 38, 17, 35, 35, 35, 45, 26, 40, 40, 33, 34, 53, 46, 52, 37, 27, 37, 37, 37, 37, 37, 37, 44, 47, 49, 50, 45, 44, 48, 51, 54, 56, 47, 49, 55, 52, 53, 714, 51, 50, 57, 54, 51, 59, 56, 47, 50, 48, 48, 48, 55, 61, 60, 62, 59, 63, 64, 65, 54, 55, 61, 66, 57, 60, 63, 64, 69, 116, 67, 68, 79, 60, 63, 62, 62, 69, 79, 70, 64, 65, 62, 67, 68, 69, 71, 65, 710, 591, 116, 66, 70, 76, 591, 80, 69, 82, 108, 71, 74, 74, 74, 74, 74, 74, 76, 80, 83, 82, 80, 71, 109, 108, 111, 111, 111, 111, 111, 111, 83, 114, 115, 110, 109, 110, 110, 110, 110, 110, 110, 117, 118, 114, 119, 120, 121, 121, 121, 122, 121, 121, 128, 127, 130, 115, 119, 123, 129, 131, 132, 137, 128, 121, 120, 118, 136, 117, 123, 127, 131, 129, 121, 138, 123, 139, 122, 125, 141, 142, 143, 145, 130, 137, 144, 132, 125, 125, 125, 146, 148, 143, 125, 136, 149, 150, 138, 147, 139, 153, 142, 144, 145, 125, 125, 155, 141, 125, 146, 149, 147, 163, 152, 154, 155, 148, 150, 151, 151, 151, 163, 151, 152, 184, 154, 164, 164, 164, 190, 191, 153, 164, 193, 709, 151, 195, 194, 190, 706, 203, 184, 192, 164, 151, 200, 151, 164, 186, 186, 186, 186, 186, 186, 194, 192, 191, 194, 200, 196, 193, 196, 195, 201, 202, 203, 204, 205, 206, 207, 208, 209, 211, 212, 216, 213, 214, 202, 205, 215, 221, 222, 225, 224, 226, 201, 212, 204, 211, 223, 206, 207, 215, 221, 227, 208, 230, 214, 223, 209, 213, 216, 224, 231, 232, 233, 222, 234, 239, 235, 226, 235, 242, 225, 240, 230, 241, 243, 244, 227, 271, 239, 245, 272, 233, 241, 275, 276, 278, 279, 232, 283, 272, 234, 231, 280, 240, 242, 284, 245, 282, 271, 285, 279, 243, 244, 286, 275, 280, 287, 282, 289, 290, 288, 276, 286, 291, 292, 283, 294, 278, 290, 293, 284, 285, 288, 297, 301, 302, 303, 292, 289, 306, 308, 293, 304, 287, 307, 310, 291, 309, 294, 317, 311, 315, 316, 308, 704, 297, 306, 343, 309, 312, 318, 302, 301, 311, 304, 314, 307, 310, 312, 303, 312, 317, 315, 318, 312, 314, 319, 343, 316, 322, 337, 344, 337, 346, 347, 312, 337, 348, 349, 319, 352, 322, 344, 353, 354, 346, 348, 337, 356, 357, 358, 359, 360, 362, 361, 363, 364, 371, 375, 356, 365, 369, 347, 372, 381, 349, 357, 361, 352, 354, 371, 353, 376, 377, 359, 360, 378, 379, 362, 380, 372, 375, 358, 363, 364, 365, 369, 382, 379, 381, 383, 376, 385, 378, 377, 386, 387, 412, 388, 413, 417, 380, 420, 419, 422, 424, 412, 418, 421, 423, 421, 426, 428, 427, 437, 382, 419, 420, 383, 417, 385, 429, 430, 386, 413, 387, 388, 424, 418, 427, 431, 436, 422, 426, 429, 438, 423, 428, 439, 437, 440, 430, 441, 442, 443, 444, 445, 439, 448, 446, 448, 447, 449, 450, 436, 445, 451, 431, 474, 479, 475, 480, 438, 441, 442, 444, 447, 481, 440, 474, 450, 443, 446, 483, 484, 486, 483, 485, 479, 449, 487, 451, 475, 496, 489, 492, 500, 491, 480, 497, 498, 499, 502, 503, 501, 504, 486, 484, 481, 485, 491, 505, 492, 498, 506, 487, 489, 501, 496, 509, 503, 497, 500, 510, 532, 538, 499, 506, 504, 502, 508, 511, 539, 508, 505, 510, 509, 541, 542, 544, 545, 547, 511, 550, 553, 552, 562, 557, 556, 532, 545, 554, 558, 560, 538, 564, 559, 563, 580, 539, 550, 556, 547, 542, 541, 552, 544, 562, 554, 557, 563, 553, 559, 584, 558, 586, 589, 564, 560, 590, 580, 593, 594, 596, 597, 598, 584, 599, 601, 620, 602, 621, 590, 604, 589, 627, 619, 596, 629, 631, 586, 632, 593, 602, 621, 594, 598, 619, 626, 597, 601, 632, 599, 634, 604, 642, 643, 620, 644, 626, 648, 627, 650, 629, 653, 651, 631, 652, 661, 644, 660, 662, 666, 667, 668, 643, 669, 648, 651, 634, 676, 661, 642, 683, 670, 652, 684, 685, 682, 669, 650, 653, 660, 670, 668, 666, 667, 682, 662, 684, 686, 695, 696, 697, 699, 676, 707, 708, 713, 703, 683, 701, 698, 694, 685, 693, 692, 691, 690, 696, 695, 686, 689, 687, 697, 680, 679, 678, 707, 713, 677, 699, 675, 674, 708, 718, 718, 718, 718, 718, 718, 718, 719, 719, 719, 719, 719, 719, 719, 720, 720, 720, 720, 721, 721, 722, 722, 722, 722, 722, 722, 722, 723, 673, 723, 723, 724, 672, 724, 724, 725, 671, 725, 725, 725, 725, 725, 726, 726, 726, 726, 726, 665, 726, 727, 727, 727, 727, 727, 664, 727, 728, 728, 728, 728, 728, 663, 728, 658, 657, 656, 655, 654, 649, 647, 646, 645, 641, 640, 639, 638, 636, 635, 633, 630, 628, 625, 624, 623, 622, 617, 616, 615, 613, 611, 610, 608, 605, 603, 600, 595, 592, 588, 587, 585, 583, 582, 579, 578, 577, 576, 575, 574, 572, 571, 570, 568, 567, 561, 555, 551, 549, 548, 546, 543, 540, 537, 536, 535, 534, 533, 530, 529, 528, 527, 526, 525, 523, 522, 520, 518, 517, 516, 515, 514, 513, 507, 495, 494, 490, 488, 482, 478, 477, 476, 473, 472, 471, 470, 469, 468, 467, 465, 464, 463, 462, 461, 460, 459, 457, 456, 455, 454, 453, 452, 435, 434, 433, 432, 425, 416, 415, 414, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 393, 392, 391, 390, 389, 384, 374, 373, 370, 368, 367, 366, 355, 351, 350, 345, 342, 340, 338, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 325, 324, 323, 321, 320, 313, 305, 300, 299, 298, 296, 295, 281, 277, 274, 273, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 238, 237, 236, 229, 228, 220, 219, 218, 217, 210, 199, 198, 197, 189, 188, 187, 182, 180, 178, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 162, 161, 160, 157, 156, 140, 135, 134, 133, 126, 124, 113, 112, 107, 106, 99, 98, 97, 90, 84, 81, 78, 77, 73, 72, 58, 43, 42, 36, 32, 31, 25, 24, 20, 16, 15, 13, 8, 6, 4, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717 } ; static yy_state_type yy_last_accepting_state; static YY_CHAR *yy_last_accepting_cpos; #if YY_CLex_DEBUG != 0 static const short int yy_rule_linenum[115] = { 0, 499, 514, 515, 516, 517, 518, 519, 520, 521, 522, 526, 531, 532, 533, 534, 535, 536, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 550, 559, 561, 562, 564, 565, 567, 574, 581, 588, 589, 590, 591, 593, 594, 595, 596, 597, 601, 606, 607, 608, 609, 610, 611, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 625, 634, 636, 637, 639, 640, 642, 649, 656, 663, 672, 687, 694, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 718, 721, 725, 729, 733, 739, 840, 859, 1171, 1203, 1210, 1217, 1222, 1226, 1232, 1244, 1256, 1268, 1280, 1291, 1312 } ; #endif /* the intent behind this definition is that it'll catch * any uses of REJECT which flex missed */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #ifndef YY_USE_CLASS static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); #else #define yy_get_previous_state() ((yy_state_type)(yy_get_previous_state_())) #define yy_try_NUL_trans(c) ((yy_state_type)(yy_try_NUL_trans_(c))) #endif #ifndef YY_USE_CLASS #ifdef YY_CLex_LEX_DEFINED YY_CLex_LEX_RETURN YY_CLex_LEX ( YY_CLex_LEX_PARAM ) YY_CLex_LEX_PARAM_DEF #else YY_DECL #endif #else YY_CLex_LEX_RETURN YY_CLex_CLASS::YY_CLex_LEX ( YY_CLex_LEX_PARAM) #endif { register yy_state_type yy_current_state; register YY_CLex_CHAR *yy_cp, *yy_bp; register int yy_act; /* % user's declarations go here */ /* % end of prolog */ if ( yy_init ) { { YY_USER_INIT; } if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yy___in ) yy___in = stdin; if ( ! yy___out ) yy___out = stdout; if ( yy_current_buffer ) YY_CLex_INIT_BUFFER( yy_current_buffer, yy___in ); else yy_current_buffer = YY_CLex_CREATE_BUFFER( yy___in, YY_BUF_SIZE ); YY_CLex_LOAD_BUFFER_STATE(); yy_init=0; } while ( 1 ) /* loops until end-of-file is reached */ { /* % yymore()-related code goes here */ yy_cp = yy_c_buf_p; /* support of yy___text */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of the * current run. */ yy_bp = yy_cp; /* % code to set up and find next match goes here */ yy_current_state = yy_start; if ( yy_bp[-1] == '\n' ) ++yy_current_state; yy_match: do { register YY_CHAR yy_c = yy_ec[*yy_cp]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = yy_def[yy_current_state]; if ( yy_current_state >= 718 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_current_state != 717 ); yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_find_action: /* % code to find the action number goes here */ yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; YY_USER_ACTION; do_action: /* this label is used only to access EOF actions */ #if YY_CLex_DEBUG != 0 if ( yy___flex_debug ) { if ( yy_act == 0 ) fprintf( stderr, "--scanner backtracking\n" ); else if ( yy_act < YY_END_OF_BUFFER -1 ) fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", yy_rule_linenum[yy_act], yy___text ); else if ( yy_act == YY_END_OF_BUFFER -1 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yy___text ); else if ( yy_act == YY_END_OF_BUFFER ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF\n" ); } #endif switch ( yy_act ) { /* % actions go here */ case 0: /* must backtrack */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: { int c; //for ";" char M_COMPUTE_ALL(); while((c=yyinput())!='\xd' && c!=EOF) { M_COMPUTE_ALL(); } //for "enter" char M_COMPUTE_ALL(); } YY_BREAK case 2: {M_COMPUTE_ALL_4_KW();return CParse::ME;} YY_BREAK case 3: {M_COMPUTE_ALL_4_KW();return CParse::MAINACTOR;} YY_BREAK case 4: {M_COMPUTE_ALL_4_KW();return CParse::NOBODY;} YY_BREAK case 5: {M_COMPUTE_ALL_4_KW();return CParse::NOSUPEROBJECT;} YY_BREAK case 6: {M_COMPUTE_ALL_4_KW();return CParse::EMPTYTEXT;} YY_BREAK case 7: {M_COMPUTE_ALL_4_KW();return CParse::NOWHERE;} YY_BREAK case 8: {M_COMPUTE_ALL_4_KW();return CParse::NOCOMPORT;} YY_BREAK case 9: {M_COMPUTE_ALL_4_KW();return CParse::NOACTION;} YY_BREAK case 10: { M_COMPUTE_ALL_4_KW(); return CParse::CAPSNULL; } YY_BREAK case 11: { M_COMPUTE_ALL_4_KW(); return CParse::NOGRAPH; } YY_BREAK case 12: {M_COMPUTE_ALL_4_COND();return CParse::OR;} YY_BREAK case 13: {M_COMPUTE_ALL_4_COND();return CParse::XOR;} YY_BREAK case 14: {M_COMPUTE_ALL_4_COND();return CParse::AND;} YY_BREAK case 15: {M_COMPUTE_ALL_4_COND();return CParse::NOT;} YY_BREAK case 16: {M_COMPUTE_ALL_4_BOOL(1);return CParse::BOOLEAN;} YY_BREAK case 17: {M_COMPUTE_ALL_4_BOOL(0);return CParse::BOOLEAN;} YY_BREAK case 18: {M_COMPUTE_ALL_4_KW();return CParse::IF;} YY_BREAK case 19: {M_COMPUTE_ALL_4_KW();return CParse::IF2;} YY_BREAK case 20: {M_COMPUTE_ALL_4_KW();return CParse::IF4;} YY_BREAK case 21: {M_COMPUTE_ALL_4_KW();return CParse::IF8;} YY_BREAK case 22: {M_COMPUTE_ALL_4_KW();return CParse::IF16;} YY_BREAK case 23: {M_COMPUTE_ALL_4_KW();return CParse::IFDEBUG;} YY_BREAK case 24: {M_COMPUTE_ALL_4_KW();return CParse::IFNOTU64;} YY_BREAK case 25: {M_COMPUTE_ALL_4_KW();return CParse::IFNOT;} YY_BREAK case 26: {M_COMPUTE_ALL_4_KW();return CParse::THEN;} YY_BREAK case 27: {M_COMPUTE_ALL_4_KW();return CParse::ELSE;} YY_BREAK case 28: {M_COMPUTE_ALL_4_KW();return CParse::ENDIF;} YY_BREAK case 29: { if(m_eTypeText!=ReflexText) { M_COMPUTE_ALL_4_KW(); return CParse::SCHEDULE; } else return CParse::SYNTAXERROR; } YY_BREAK case 30: {M_COMPUTE_ALL_4_KW();return CParse::ITRULES;} YY_BREAK case 31: {M_COMPUTE_ALL();return CParse::MACRO;} YY_BREAK case 32: {M_COMPUTE_ALL();return CParse::SUBROUTINE;} YY_BREAK case 33: {M_COMPUTE_ALL_4_KW();return CParse::VECTOR;} YY_BREAK case 34: {M_COMPUTE_ALL_4_KW();return CParse::CONSTVECTOR;} YY_BREAK case 35: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eStopEngine,(long)C_ACTION_ENGINE_STOP); return CParse::STOPENGINE; } YY_BREAK case 36: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eStopRule,(long)C_ACTION_ENGINE_STOP_RULE); return CParse::STOPRULE; } YY_BREAK case 37: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eNonStop,(long)C_ACTION_ENGINE_CONTINUE); return CParse::NONSTOP; } YY_BREAK case 38: {M_COMPUTE_ALL_4_KW();return CParse::ME;} YY_BREAK case 39: {M_COMPUTE_ALL_4_KW();return CParse::MAINACTOR;} YY_BREAK case 40: {M_COMPUTE_ALL_4_KW();return CParse::NOBODY;} YY_BREAK case 41: {M_COMPUTE_ALL_4_KW();return CParse::NOSUPEROBJECT;} YY_BREAK case 42: {M_COMPUTE_ALL_4_KW();return CParse::EMPTYTEXT;} YY_BREAK case 43: {M_COMPUTE_ALL_4_KW();return CParse::NOWHERE;} YY_BREAK case 44: {M_COMPUTE_ALL_4_KW();return CParse::NOCOMPORT;} YY_BREAK case 45: {M_COMPUTE_ALL_4_KW();return CParse::NOACTION;} YY_BREAK case 46: { M_COMPUTE_ALL_4_KW(); return CParse::CAPSNULL; } YY_BREAK case 47: { M_COMPUTE_ALL_4_KW(); return CParse::NOGRAPH; } YY_BREAK case 48: {M_COMPUTE_ALL_4_COND();return CParse::OR;} YY_BREAK case 49: {M_COMPUTE_ALL_4_COND();return CParse::XOR;} YY_BREAK case 50: {M_COMPUTE_ALL_4_COND();return CParse::AND;} YY_BREAK case 51: {M_COMPUTE_ALL_4_COND();return CParse::NOT;} YY_BREAK case 52: {M_COMPUTE_ALL_4_BOOL(1);return CParse::BOOLEAN;} YY_BREAK case 53: {M_COMPUTE_ALL_4_BOOL(0);return CParse::BOOLEAN;} YY_BREAK case 54: {M_COMPUTE_ALL_4_KW();return CParse::IF;} YY_BREAK case 55: {M_COMPUTE_ALL_4_KW();return CParse::IF2;} YY_BREAK case 56: {M_COMPUTE_ALL_4_KW();return CParse::IF4;} YY_BREAK case 57: {M_COMPUTE_ALL_4_KW();return CParse::IF8;} YY_BREAK case 58: {M_COMPUTE_ALL_4_KW();return CParse::IF16;} YY_BREAK case 59: {M_COMPUTE_ALL_4_KW();return CParse::IFDEBUG;} YY_BREAK case 60: {M_COMPUTE_ALL_4_KW();return CParse::IFNOTU64;} YY_BREAK case 61: {M_COMPUTE_ALL_4_KW();return CParse::IFNOT;} YY_BREAK case 62: {M_COMPUTE_ALL_4_KW();return CParse::THEN;} YY_BREAK case 63: {M_COMPUTE_ALL_4_KW();return CParse::ELSE;} YY_BREAK case 64: {M_COMPUTE_ALL_4_KW();return CParse::ENDIF;} YY_BREAK case 65: { if(m_eTypeText!=ReflexText) { M_COMPUTE_ALL_4_KW(); return CParse::SCHEDULE; } else return CParse::SYNTAXERROR; } YY_BREAK case 66: {M_COMPUTE_ALL_4_KW();return CParse::ITRULES;} YY_BREAK case 67: {M_COMPUTE_ALL();return CParse::MACRO;} YY_BREAK case 68: {M_COMPUTE_ALL();return CParse::SUBROUTINE;} YY_BREAK case 69: {M_COMPUTE_ALL_4_KW();return CParse::VECTOR;} YY_BREAK case 70: {M_COMPUTE_ALL_4_KW();return CParse::CONSTVECTOR;} YY_BREAK case 71: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eStopEngine,(long)C_ACTION_ENGINE_STOP); return CParse::STOPENGINE; } YY_BREAK case 72: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eStopRule,(long)C_ACTION_ENGINE_STOP_RULE); return CParse::STOPRULE; } YY_BREAK case 73: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eNonStop,(long)C_ACTION_ENGINE_CONTINUE); return CParse::NONSTOP; } YY_BREAK case 74: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eBeginMacro,0L); // BEGIN ROMTEAM Cristi Petrescu 98-08- // see fn_vPostProcessIA //m_bIsInMacro=TRUE; // END ROMTEAM Cristi Petrescu 98-08- return CParse::BEGINMACRO; } YY_BREAK case 75: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eEndMacro,0L); // BEGIN ROMTEAM Cristi Petrescu 98-08- // see fn_vPostProcessIA //m_lOldIndex=m_lOldMacroIndex; //m_lIndexWithoutSpaceAndTab=m_lOldMacroIndex; //m_lIndex=m_lOldMacroIndex; //m_bIsInMacro=FALSE; // END ROMTEAM Cristi Petrescu 98-08- return CParse::ENDMACRO; } YY_BREAK case 76: { //BEGIN ROMTEAM Cristi Petrescu 98-05- M_COMPUTE_ALL(); return CParse::DVQUALIFIER; //END ROMTEAM Cristi Petrescu 98-05- } YY_BREAK case 77: { //BEGIN ROMTEAM Cristi Petrescu 98-05- M_COMPUTE_ALL(); return CParse::DVQUALIFIER; //END ROMTEAM Cristi Petrescu 98-05- } YY_BREAK case 78: {M_COMPUTE_ALL_4_OPC();return CParse::OPCOND;} YY_BREAK case 79: {M_COMPUTE_ALL_4_OPC();return CParse::OPCOND;} YY_BREAK case 80: {M_COMPUTE_ALL_4_OPC();return CParse::OPCOND;} YY_BREAK case 81: {M_COMPUTE_ALL_4_OPC();return CParse::OPCOND;} YY_BREAK case 82: {M_COMPUTE_ALL_4_OPC();return CParse::OPCOND;} YY_BREAK case 83: {M_COMPUTE_ALL_4_OPC();return CParse::OPCOND;} YY_BREAK case 84: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 85: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 86: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 87: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 88: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 89: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 90: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 91: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH2PARMS;} YY_BREAK case 92: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH1PARM;} YY_BREAK case 93: {M_COMPUTE_ALL_4_OP();return CParse::OPWITH1PARM;} YY_BREAK case 94: {} YY_BREAK case 95: { unput(yytext[yyleng-1]); M_COMPUTE_ALL_4_OP(); return CParse::OPGETCOMPO;} YY_BREAK case 96: { unput(yytext[yyleng-1]); M_COMPUTE_ALL_4_OP(); return CParse::OPGETCOMPO;} YY_BREAK case 97: { unput(yytext[yyleng-1]); M_COMPUTE_ALL_4_OP(); return CParse::OPGETCOMPO;} YY_BREAK case 98: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ { l_id = fn_lGetProcedureIdFromEditorName(yytext); cs_params = fn_csGetProcedureParams(l_id); if (cs_params != "") iCount = 0; } YY_BREAK case 99: { //Stefan Dumitrean 20-05-98 M_COMPUTE_ALL(); //End Stefan Dumitrean // before all, check for #defines... //BEGIN ROMTEAM Cristi Petrescu 98-04- M_EXPAND_DEFINE(); //END ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 // M_COMPUTE_ALL(); //End Stefan Dumitrean if(fn_bIsProcedure(yytext,&(g_clParse.yylval))) { //ROMTEAM Optimisation (Ionut Grozea 24/04/98) l_id = fn_lGetProcedureIdFromEditorName(yytext); cs_params = fn_csGetProcedureParams(l_id); iCount = 0; //END ROMTEAM Optimisation (Ionut Grozea 24/04/98) return CParse::PROCEDURE; } //ROMTEAM Optimisation (Ionut Grozea 24/04/98) if (cs_params.GetLength()!=0 && iCount< cs_params.GetLength()) { switch(cs_params[iCount]) { case 'X': { iCount++; if(fn_bIsFunction(yytext,&(g_clParse.yylval))) return CParse::FUNCTION; if(fn_bIsDesignerVariable(yytext,&(g_clParse.yylval))) return CParse::DESVAR; break; } case 'A': iCount++; if(fn_bIsMetaAction(yytext,&(g_clParse.yylval))) return CParse::METAACTION; break; case 'L': iCount++; if(fn_bIsDesignerVariable(yytext,&(g_clParse.yylval))) return CParse::DESVAR; break; case 'V': iCount++; if(fn_bIsDesignerVariable(yytext,&(g_clParse.yylval))) return CParse::DESVAR; break; case 'P': iCount++; if(fn_bIsAType(yytext,&(g_clParse.yylval))) return CParse::DVTYPE; break; default: // iCount++; break; } } //END ROMTEAM Optimisation (Ionut Grozea 24/04/98) if(fn_bIsFunction(yytext,&(g_clParse.yylval))) return CParse::FUNCTION; if(fn_bIsCondition(yytext,&(g_clParse.yylval))) return CParse::CONDITION; //ANNECY CB // if(fn_bIsMetaAction(yytext,&(g_clParse.yylval))) // return CParse::METAACTION; //END if(fn_bIsAType(yytext,&(g_clParse.yylval))) return CParse::DVTYPE; if(fn_bIsField(yytext,&(g_clParse.yylval))) return CParse::FIELD; if(fn_bIsAConstantInt(yytext,&(g_clParse.yylval))) return CParse::CONSTANTINT; if(fn_bIsAConstantReal(yytext,&(g_clParse.yylval))) return CParse::CONSTANTREAL; //ANNECY CB if(fn_bIsMetaAction(yytext,&(g_clParse.yylval))) return CParse::METAACTION; //BEGIN ROMTEAM Cristi Petrescu 98-04- if (fn_bIsSubr (yytext, & (g_clParse.yylval))) return CParse::SUBRREF; //END ROMTEAM Cristi Petrescu 98-04- //END //YOU MUST CALL THIS FUNCTION AT THE END if(fn_bIsDesignerVariable(yytext,&(g_clParse.yylval))) return CParse::DESVAR; fn_vInitNode(&(g_clParse.yylval),m_lIndex,eString,yytext); return CParse::STRING; } YY_BREAK case 100: { //Stefan Dumitrean 20-05-98 M_COMPUTE_ALL(); //End Stefan Dumitrean // before all, check for #defines... //BEGIN ROMTEAM Cristi Petrescu 98-04- M_EXPAND_DEFINE (); //END ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 // M_COMPUTE_ALL(); //End Stefan Dumitrean if(fn_bIsAType(yytext,&(g_clParse.yylval))) return CParse::DVTYPE; fn_vInitNode(&(g_clParse.yylval),m_lIndex,eString,yytext); return CParse::STRING; } YY_BREAK case 101: { M_COMPUTE_ALL(); if(strcmp(yytext,"\"\"")==0) return CParse::STRING; //Skips first " and last " yytext[strlen(yytext)-1]=0; yytext++; //ROMTEAM Optimisation (Ionut Grozea 24/04/98) if (cs_params.GetLength()!=0 && iCount< cs_params.GetLength()) { switch(cs_params[iCount]) { case 'X': iCount++; if(fn_bIsFunction(yytext,&(g_clParse.yylval))) return CParse::FUNCTION; break; case 'A': iCount++; if(fn_bIsAnAction(yytext,&(g_clParse.yylval))) return CParse::ACTION; break; case '2': iCount++; if(fn_bIsMyIntelligenceBehaviour(yytext,&(g_clParse.yylval))) return CParse::MYBEHAV; break; case '1': iCount++; if(fn_bIsMyReflexBehaviour(yytext,&(g_clParse.yylval))) return CParse::MYREFLEX; break; case '6': iCount++; if(fn_bIsAKeyButton(yytext,&(g_clParse.yylval))) return CParse::KEYBUTTON; break; case 'P': iCount++; if(fn_bIsAPerso(yytext,&(g_clParse.yylval))) return CParse::PERSO; break; case '!': iCount++; if(fn_bIsAPerso(yytext,&(g_clParse.yylval))) return CParse::PERSO; break; case '4': { iCount++; if(fn_bIsAIntelligenceBehaviour(yytext,&(g_clParse.yylval))) return CParse::BEHAV; break; } case 'Z': { iCount++; long lZdd=fn_lIsAZdd(yytext,&(g_clParse.yylval)); if(lZdd==1) return CParse::ZDD; else if(lZdd>1) return CParse::SYNTAXERROR; break; } case 'E': { iCount++; long lZde=fn_lIsAZde(yytext,&(g_clParse.yylval)); if(lZde==1) return CParse::ZDE; else if(lZde>1) return CParse::SYNTAXERROR; break; } case 'U': { iCount++; long lZdm=fn_lIsAZdm(yytext,&(g_clParse.yylval)); if(lZdm==1) return CParse::ZDM; else if(lZdm>1) return CParse::SYNTAXERROR; break; } case 'W': iCount++; if(fn_bIsAWayPoint(yytext,&(g_clParse.yylval))) return CParse::WAYPOINT; break; case '3': iCount++; if(fn_bIsAReflexBehaviour(yytext,&(g_clParse.yylval))) return CParse::REFLEX; break; case 'M': iCount++; if(fn_bIsAChannel(yytext,&(g_clParse.yylval))) return CParse::CHANNEL; break; case 'R': iCount++; if(fn_bIsASector(yytext,&(g_clParse.yylval))) return CParse::SECTOR; break; case 'o': iCount++; if(fn_bIsALipSynchro(yytext,&(g_clParse.yylval))) return CParse::LIPSYNCHRO; break; case 'J': iCount++; if(fn_bIsAObjectTable(yytext,&(g_clParse.yylval))) return CParse::OBJECTTABLE; break; case 'G': iCount++; if(fn_bIsAFamily(yytext,&(g_clParse.yylval))) return CParse::FAMILY; break; case 'C': iCount++; if(fn_bIsAGameMaterial(yytext,&(g_clParse.yylval))) return CParse::GAMEMATERIAL; break; // case 'C': // iCount++; // if(fn_bIsALight(yytext,&(g_clParse.yylval))) // return CParse::LIGHT; // break; case '$': iCount++; if(fn_bIsAGraph(yytext,&(g_clParse.yylval))) return CParse::GRAPH; break; case '#': iCount++; if(fn_bIsACaps(yytext,&(g_clParse.yylval))) return CParse::CAPS; break; #if 0 case 'N': iCount++; if(fn_bIsAPower(yytext,&(g_clParse.yylval))) return CParse::POWER; break; #endif //0 car inutilise dans RM 2 case 'K': iCount++; if(fn_bIsAMaskType(yytext,&(g_clParse.yylval))) return CParse::MASKTYPE; break; case 'T': iCount++; if(fn_bIsAText(yytext,&(g_clParse.yylval))) return CParse::TEXT; break; case 'F': iCount++; if(fn_bIsASurface(yytext,&(g_clParse.yylval))) return CParse::SURFACE; break; case 'H': iCount++; if(fn_bIsAEnvironment(yytext,&(g_clParse.yylval))) return CParse::ENVIRONMENT; break; default: iCount++; break; } } //END ROMTEAM Optimisation (Ionut Grozea 24/04/98) if(fn_bIsAnAction(yytext,&(g_clParse.yylval))) return CParse::ACTION; //ANNECY CB if(fn_bIsMyIntelligenceBehaviour(yytext,&(g_clParse.yylval))) return CParse::MYBEHAV; //END if(fn_bIsMyReflexBehaviour(yytext,&(g_clParse.yylval))) return CParse::MYREFLEX; //ANNECY CB if(fn_bIsAKeyButton(yytext,&(g_clParse.yylval))) return CParse::KEYBUTTON; //END //ANNECY CB // if(fn_bIsMyIntelligenceBehaviour(yytext,&(g_clParse.yylval))) // return CParse::MYBEHAV; //END if(fn_bIsAPerso(yytext,&(g_clParse.yylval))) return CParse::PERSO; //ANNECY CB if(fn_bIsAIntelligenceBehaviour(yytext,&(g_clParse.yylval))) return CParse::BEHAV; //END //ANNECY CB // if(fn_bIsAReflexBehaviour(yytext,&(g_clParse.yylval))) // return CParse::REFLEX; //END //ANNECY CB // if(fn_bIsAIntelligenceBehaviour(yytext,&(g_clParse.yylval))) // return CParse::BEHAV; //END long lZdd=fn_lIsAZdd(yytext,&(g_clParse.yylval)); if(lZdd==1) return CParse::ZDD; else if(lZdd>1) return CParse::SYNTAXERROR; long lZde=fn_lIsAZde(yytext,&(g_clParse.yylval)); if(lZde==1) return CParse::ZDE; else if(lZde>1) return CParse::SYNTAXERROR; long lZdm=fn_lIsAZdm(yytext,&(g_clParse.yylval)); if(lZdm==1) return CParse::ZDM; else if(lZdm>1) return CParse::SYNTAXERROR; long lZdr=fn_lIsAZdm(yytext,&(g_clParse.yylval)); if(lZdr==1) return CParse::ZDR; else if(lZdr>1) return CParse::SYNTAXERROR; if(fn_bIsAWayPoint(yytext,&(g_clParse.yylval))) return CParse::WAYPOINT; //ANNECY CB if(fn_bIsAReflexBehaviour(yytext,&(g_clParse.yylval))) return CParse::REFLEX; //END if(fn_bIsAChannel(yytext,&(g_clParse.yylval))) return CParse::CHANNEL; //ANNECY CB // if(fn_bIsASurface(yytext,&(g_clParse.yylval))) // return CParse::SURFACE; // if(fn_bIsAEnvironment(yytext,&(g_clParse.yylval))) // return CParse::ENVIRONMENT; //END if(fn_bIsASector(yytext,&(g_clParse.yylval))) return CParse::SECTOR; if(fn_bIsASuperObject(yytext,&(g_clParse.yylval))) return CParse::SUPEROBJECT; if(fn_bIsALipSynchro(yytext,&(g_clParse.yylval))) return CParse::LIPSYNCHRO; if(fn_bIsAObjectTable(yytext,&(g_clParse.yylval))) return CParse::OBJECTTABLE; if(fn_bIsAFamily(yytext,&(g_clParse.yylval))) return CParse::FAMILY; if(fn_bIsAModel(yytext,&(g_clParse.yylval))) return CParse::MODEL; if(fn_bIsASoundEvent(yytext,&(g_clParse.yylval))) return CParse::SOUNDEVENT; if(fn_bIsAGameMaterial(yytext,&(g_clParse.yylval))) return CParse::GAMEMATERIAL; if(fn_bIsALight(yytext,&(g_clParse.yylval))) return CParse::LIGHT; if(fn_bIsACaps(yytext,&(g_clParse.yylval))) return CParse::CAPS; if(fn_bIsAGraph(yytext,&(g_clParse.yylval))) return CParse::GRAPH; //ANNECY CB // if(fn_bIsAKeyButton(yytext,&(g_clParse.yylval))) // return CParse::KEYBUTTON; //END if(fn_bIsAMaskType(yytext,&(g_clParse.yylval))) return CParse::MASKTYPE; #if 0 if(fn_bIsAPower(yytext,&(g_clParse.yylval))) return CParse::POWER; #endif //0 car inutilise dans RM 2 if(fn_bIsAText(yytext,&(g_clParse.yylval))) return CParse::TEXT; if(fn_bIsAParticleGenerator(yytext,&(g_clParse.yylval))) return CParse::PARTGEN; if(fn_bIsAState(yytext,&(g_clParse.yylval))) return CParse::STATE; fn_vInitNode(&(g_clParse.yylval),m_lIndex,eString,yytext); return CParse::STRING; } YY_BREAK case 102: { if(strcmp(yytext,"\"\"")==0) return CParse::STRING; M_COMPUTE_ALL(); //Skips first " and last " yytext[strlen(yytext)-1]=0; yytext++; if(fn_bIsAnAction(yytext,&(g_clParse.yylval))) return CParse::ACTION; if(fn_bIsAPerso(yytext,&(g_clParse.yylval))) return CParse::PERSO; if(fn_bIsAWayPoint(yytext,&(g_clParse.yylval))) return CParse::WAYPOINT; if(fn_bIsACaps(yytext,&(g_clParse.yylval))) return CParse::CAPS; if(fn_bIsAGraph(yytext,&(g_clParse.yylval))) return CParse::GRAPH; if(fn_bIsAText(yytext,&(g_clParse.yylval))) return CParse::TEXT; fn_vInitNode(&(g_clParse.yylval),m_lIndex,eString,yytext); return CParse::STRING; } YY_BREAK case 103: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eConstant,atol(yytext)); return CParse::INT; } YY_BREAK case 104: { M_COMPUTE_ALL(); fn_vInitNode(&(g_clParse.yylval),m_lIndex,eReal,atof(yytext)); return CParse::REAL; } YY_BREAK case 105: { M_COMPUTE_ALL(); return *yytext; } YY_BREAK case 106: { m_lIndex+=yyleng; } YY_BREAK case 107: { /*printf("!! %s\n",yytext);*/ return *yytext; } YY_BREAK case 108: { //BEGIN ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 M_COMPUTE_ALL(); //End Stefan Dumitrean // trick to remember the initial state m_eBegin = begin_french; //yy_start_old = yy_start; BEGIN (DEFINE); //END ROMTEAM Cristi Petrescu 98-04- } YY_BREAK case 109: { //BEGIN ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 M_COMPUTE_ALL(); //End Stefan Dumitrean // trick to remember the initial state m_eBegin = begin_english; //yy_start_old = yy_start; BEGIN (DEFINE); //END ROMTEAM Cristi Petrescu 98-04- } YY_BREAK case 110: { //BEGIN ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 M_COMPUTE_ALL(); //End Stefan Dumitrean // trick to remember the initial state m_eBegin = begin_dsgvar; //yy_start_old = yy_start; BEGIN (DEFINE); //END ROMTEAM Cristi Petrescu 98-04- } YY_BREAK case 111: { //BEGIN ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 M_COMPUTE_ALL(); //End Stefan Dumitrean // get the definiton name m_csDefineName = yytext; // and get the text, too BEGIN (DEFINE_TEXT); //END ROMTEAM Cristi Petrescu 98-04- } YY_BREAK case 112: { //BEGIN ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 M_COMPUTE_ALL(); //End Stefan Dumitrean // add the define into the table CString csDefineText = yytext; m_clDefineList . SetAt (m_csDefineName, csDefineText); //END ROMTEAM Cristi Petrescu 98-04- } YY_BREAK case 113: { //BEGIN ROMTEAM Cristi Petrescu 98-04- //Stefan Dumitrean 20-05-98 m_lIndex+=yyleng; //End Stefan Dumitrean // go back //yy_start = yy_start_old; switch (m_eBegin) { case begin_french: BEGIN (FRENCH); break; case begin_english: BEGIN (ENGLISH); break; case begin_dsgvar: BEGIN (DECL_DSG_VAR); break; } //END ROMTEAM Cristi Petrescu 98-04- } YY_BREAK case 114: { //Stefan Dumitrean 20-05-98 m_lIndex+=yyleng; //End Stefan Dumitrean } YY_BREAK case 115: ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(ENGLISH): case YY_STATE_EOF(FRENCH): case YY_STATE_EOF(DECL_DSG_VAR): case YY_STATE_EOF(DEFINE): case YY_STATE_EOF(DEFINE_TEXT): yyterminate(); case YY_END_OF_BUFFER: { /* amount of text matched not including the EOB char */ int yy_amount_of_matched_text = yy_cp - yy___text - 1; /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; /* note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the end- * of-buffer state). Contrast this with the test in yyinput(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* this was really a NUL */ { yy_state_type yy_next_state; yy_c_buf_p = yy___text + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* okay, we're now positioned to make the * NUL transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we * don't want to build jamming into it because * then it will run more slowly) */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yy___text + YY_MORE_ADJ; if ( yy_next_state ) { /* consume the NUL */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { /* % code to do backtracking for compressed tables and set up yy_cp goes here */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* note: because we've taken care in * yy_get_next_buffer() to have set up yy___text, * we can now set up yy_c_buf_p so that if some * total hoser (like flex itself) wants * to call the scanner after we return the * YY_NULL, it'll still work - another YY_NULL * will get returned. */ yy_c_buf_p = yy___text + YY_MORE_ADJ; yy_act = YY_STATE_EOF((yy_start - 1) / 2); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } } break; case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yy___text + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yy___text + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yy___text + YY_MORE_ADJ; goto yy_find_action; } break; } default: #if YY_CLex_DEBUG != 0 fprintf(stderr, "action # %d\n", yy_act ); #endif YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } } yyterminate();/* avoid the no return value error message on MS-C7/dos */ } /* yy_get_next_buffer - try to read in a new buffer * * synopsis * int yy_get_next_buffer(); * * returns a code representing an action * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ #ifndef YY_USE_CLASS static int yy_get_next_buffer() #else int YY_CLex_CLASS::yy_get_next_buffer() #endif { register YY_CLex_CHAR *dest = yy_current_buffer->yy_ch_buf; register YY_CLex_CHAR *source = yy___text - 1; /* copy prev. char, too */ register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); /* try to read more data */ /* first move last chars to start of buffer */ number_to_move = yy_c_buf_p - yy___text; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; else if ( num_to_read <= 0 ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); /* read in more data */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); } if ( yy_n_chars == 0 ) { if ( number_to_move - YY_MORE_ADJ == 1 ) { ret_val = EOB_ACT_END_OF_FILE; yy_current_buffer->yy_eof_status = EOF_DONE; } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_eof_status = EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; /* yy___text begins at the second character in yy_ch_buf; the first * character is the one which preceded it before reading in the latest * buffer; it needs to be kept around in case it's a newline, so * yy_get_previous_state() will have with '^' rules active */ yy___text = &yy_current_buffer->yy_ch_buf[1]; return ( ret_val ); } /* yy_get_previous_state - get the state just before the EOB char was reached * * synopsis * yy_state_type yy_get_previous_state(); */ #ifndef YY_USE_CLASS static yy_state_type yy_get_previous_state() #else long YY_CLex_CLASS::yy_get_previous_state_() #endif { register yy_state_type yy_current_state; register YY_CLex_CHAR *yy_cp; /* % code to get the start state into yy_current_state goes here */ register YY_CHAR *yy_bp = yy___text; yy_current_state = yy_start; if ( yy_bp[-1] == '\n' ) ++yy_current_state; for ( yy_cp = yy___text + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { /* % code to find the next state goes here */ register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = yy_def[yy_current_state]; if ( yy_current_state >= 718 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } #ifndef YY_USE_CLASS return ( yy_current_state ); #else return (long)( yy_current_state ); #endif } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) register yy_state_type yy_current_state; #endif #else long YY_CLex_CLASS::yy_try_NUL_trans_(long yy_current_state_) #endif { #ifndef YY_USE_CLASS #else yy_state_type yy_current_state=(yy_state_type)yy_current_state_; #endif register int yy_is_jam; /* % code to find the next state, and perhaps do backtracking, goes here */ register YY_CHAR *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = yy_def[yy_current_state]; if ( yy_current_state >= 718 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 717); #ifndef YY_USE_CLASS return ( yy_is_jam ? 0 : yy_current_state ); #else return (long)( yy_is_jam ? 0 : yy_current_state ); #endif } #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS static void yyunput( YY_CLex_CHAR c, register YY_CLex_CHAR *yy_bp ) #else static void yyunput( c, yy_bp ) YY_CLex_CHAR c; register YY_CLex_CHAR *yy_bp; #endif #else void YY_CLex_CLASS::yyunput( YY_CLex_CHAR c, YY_CLex_CHAR *yy_bp ) #endif { register YY_CLex_CHAR *yy_cp = yy_c_buf_p; /* undo effects of setting up yy___text */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */ register YY_CLex_CHAR *dest = &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; register YY_CLex_CHAR *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += dest - source; yy_bp += dest - source; yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) yy_cp[-2] = '\n'; *--yy_cp = c; /* note: the formal parameter *must* be called "yy_bp" for this * macro to now work correctly */ YY_DO_BEFORE_ACTION; /* set up yy___text again */ } #ifndef YY_USE_CLASS #ifdef __cplusplus static int yyinput() #else static int input() #endif #else int YY_CLex_CLASS::input() #endif { int c; YY_CLex_CHAR *yy_cp = yy_c_buf_p; *yy_cp = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* this was really a NUL */ *yy_c_buf_p = '\0'; else { /* need more input */ yy___text = yy_c_buf_p; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { if ( yywrap() ) { yy_c_buf_p = yy___text + YY_MORE_ADJ; return ( EOF ); } YY_NEW_FILE; #ifndef YY_USE_CLASS #ifdef __cplusplus return ( yyinput() ); #else return ( input() ); #endif #else return ( input() ); #endif } break; case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yy___text + YY_MORE_ADJ; break; case EOB_ACT_LAST_MATCH: #ifndef YY_USE_CLASS #ifdef __cplusplus YY_FATAL_ERROR( "unexpected last match in yyinput()" ); #else YY_FATAL_ERROR( "unexpected last match in input()" ); #endif #else YY_FATAL_ERROR( "unexpected last match in YY_CLex_CLASS::input()" ); #endif } } } c = *yy_c_buf_p; yy_hold_char = *++yy_c_buf_p; return ( c ); } #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS void YY_CLex_RESTART( FILE *input_file ) #else void YY_CLex_RESTART( input_file ) FILE *input_file; #endif #else void YY_CLex_CLASS::YY_CLex_RESTART ( FILE *input_file ) #endif { YY_CLex_INIT_BUFFER( yy_current_buffer, input_file ); YY_CLex_LOAD_BUFFER_STATE(); } #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS void YY_CLex_SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer ) #else void YY_CLex_SWITCH_TO_BUFFER( new_buffer ) YY_BUFFER_STATE new_buffer; #endif #else void YY_CLex_CLASS::YY_CLex_SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer ) #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* flush out information for old buffer */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; YY_CLex_LOAD_BUFFER_STATE(); /* we don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS void YY_CLex_LOAD_BUFFER_STATE( void ) #else void YY_CLex_LOAD_BUFFER_STATE() #endif #else void YY_CLex_CLASS::YY_CLex_LOAD_BUFFER_STATE( ) #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yy___text = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yy___in = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS YY_BUFFER_STATE YY_CLex_CREATE_BUFFER( FILE *file, int size ) #else YY_BUFFER_STATE YY_CLex_CREATE_BUFFER( file, size ) FILE *file; int size; #endif #else YY_BUFFER_STATE YY_CLex_CLASS::YY_CLex_CREATE_BUFFER( FILE *file, int size ) #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in YY_CLex_CREATE_BUFFER()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (YY_CLex_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in YY_CLex_CREATE_BUFFER()" ); YY_CLex_INIT_BUFFER( b, file ); return ( b ); } #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS void YY_CLex_DELETE_BUFFER( YY_BUFFER_STATE b ) #else void YY_CLex_DELETE_BUFFER( b ) YY_BUFFER_STATE b; #endif #else void YY_CLex_CLASS::YY_CLex_DELETE_BUFFER( YY_BUFFER_STATE b ) #endif { if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; free( (char *) b->yy_ch_buf ); free( (char *) b ); } #ifndef YY_USE_CLASS #ifdef YY_USE_PROTOS void YY_CLex_INIT_BUFFER( YY_BUFFER_STATE b, FILE *file ) #else void YY_CLex_INIT_BUFFER( b, file ) YY_BUFFER_STATE b; FILE *file; #endif #else void YY_CLex_CLASS::YY_CLex_INIT_BUFFER( YY_BUFFER_STATE b, FILE *file) #endif { b->yy_input_file = file; /* we put in the '\n' and start reading from [1] so that an * initial match-at-newline will be true. */ b->yy_ch_buf[0] = '\n'; b->yy_n_chars = 1; /* we always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[1]; b->yy_eof_status = EOF_NOT_SEEN; } //Some useful macros #define M_MAKECHAR(a) ((char *)(LPCTSTR(a))) //ANNECY CB #define CSTRING_EQ(cs, psz)\ {\ cs= psz;\ } //END //MetaAction /****************************************************************************/ //ANNECY CB BOOL fn_bIsMetaAction(CString &csString,stReturn *pstReturn) //BOOL fn_bIsMetaAction(CString csString,stReturn *pstReturn) //END { long lIndex=fn_lGetMetaActionIdFromEditorName(csString); if(M_ID_IS_VALID(lIndex)) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eMetaAction,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsMetaAction(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsMetaAction(gcsGlob,pstReturn); } //END //Condition /****************************************************************************/ //ANNECY CB BOOL fn_bIsCondition(CString &csString,stReturn *pstReturn) //BOOL fn_bIsCondition(CString csString,stReturn *pstReturn) //END { long lIndex=fn_lGetConditionIdFromEditorName(csString); if(M_ID_IS_VALID(lIndex)) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eCondition,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsCondition(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsCondition(gcsGlob,pstReturn); } //END //Designer Variable /****************************************************************************/ //ANNECY CB BOOL fn_bIsDesignerVariable(CString &csString,stReturn *pstReturn) //BOOL fn_bIsDesignerVariable(CString csString,stReturn *pstReturn) //END { //First looks in current dsg var list //ANNECY CB long lIndex = g_clDsgVarList.m_fn_bIsADesignerVariable(csString) - 1; if(lIndex >= 0) // if(g_clDsgVarList.m_fn_bIsADesignerVariable(csString)) { // long lIndex=g_clDsgVarList.m_fn_lGetIndexOfADesignerVariable(csString); //END fn_vInitNode(pstReturn,g_clLex.m_lIndex,eDsgVar,lIndex,g_pclCurrentModel); CPA_EdIR_IntermediateCode *pclIntermediateCode=pstReturn->clIntermediateCodeList.GetTail(); pclIntermediateCode->m_fn_vSetString(csString); return TRUE; } else { //Looks in all models CPA_List clModelsList; g_pclAIInterface->GetMainWorld()->fn_lFindObjects(&clModelsList,"",C_szActorModelTypeName,NO_CRITERIA); POSITION pos=clModelsList.GetHeadPosition(); BOOL bFound=FALSE; long lNoDsgVar=0; CPA_Actor *pclModel=NULL; while(pos!=NULL && !bFound) { CPA_Actor *pclActor=(CPA_Actor *)(clModelsList.GetNext(pos)); if(pclActor->fn_bIsAvailable()) { pclModel=pclActor; if(pclModel!=g_pclCurrentModel) { CPA_EdIR_Brain *pclBrain=((EdActors_EditorActorModel *)pclModel->m_fn_pclGetEditorActor())->m_pclBrain; CString csIn; if(!pclBrain->m_clListOfDeclarations.IsEmpty()) { //Gets Designer Variable MainBehaviour (first element in the list) CPA_EdIR_MainBehaviour *pclMainBehaviour=pclBrain->m_clListOfDeclarations.GetHead(); //Gets text declaraition if(pclMainBehaviour->m_pclBehaviour!=NULL) csIn=pclMainBehaviour->m_pclBehaviour->m_fn_csGetRules(); else csIn=pclMainBehaviour->m_csText; csIn=fn_csGetCodeWithoutComments(csIn); //Looks for dsg var in this text long lCurrentIndex=0; CString csWord=fn_csGetNextWord(csIn,lCurrentIndex); lNoDsgVar=0; while(!csWord.IsEmpty() && !bFound) { BOOL bPublic = TRUE; // skip private & public if (fn_bIsDsgVarQualifier(csWord)) { bPublic = csWord.CompareNoCase("private"); csWord=fn_csGetNextWord(csIn,lCurrentIndex); } //Gets Type tdeDsgVarTypeId eDsgVarTypeId=(tdeDsgVarTypeId)fn_lGetDsgVarTypeIdFromEditorName(csWord); //Gets Name csWord=fn_csGetNextWord(csIn,lCurrentIndex); if(csWord.CompareNoCase(csString)==0) bFound=TRUE; else { //Skips Value fn_csGetNextWord(csIn,lCurrentIndex); if(eDsgVarTypeId==eDsgVarType_Vector) { //Skips x,y,z components fn_csGetNextWord(csIn,lCurrentIndex); fn_csGetNextWord(csIn,lCurrentIndex); fn_csGetNextWord(csIn,lCurrentIndex); } //Skips type csWord=fn_csGetNextWord(csIn,lCurrentIndex); lNoDsgVar++; } } } } } } long lIndex=lNoDsgVar; if(bFound) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eDsgVar,lIndex,pclModel); CPA_EdIR_IntermediateCode *pclIntermediateCode=pstReturn->clIntermediateCodeList.GetTail(); pclIntermediateCode->m_fn_vSetString(csString); } return bFound; } } //ANNECY CB BOOL fn_bIsDesignerVariable(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsDesignerVariable(gcsGlob,pstReturn); } //END //ConstantInt /****************************************************************************/ //ANNECY CB BOOL fn_bIsAConstantInt(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAConstantInt(CString csString,stReturn *pstReturn) //END { CPA_EdIR_Frame *pclMainFrame=g_pclAIInterface->m_pclIRMainFrame; if(pclMainFrame!=NULL) { if(pclMainFrame->m_clConstantList.m_fn_bIsAConstant(csString)) { CString csValue=pclMainFrame->m_clConstantList.m_fn_csGetValueOfAConstant(csString); if(pclMainFrame->m_clConstantList.m_fn_csGetTypeOfAConstant(csString)==g_c_csInteger) { long lValue=atol(M_MAKECHAR(csValue)); fn_vInitNode(pstReturn,g_clLex.m_lIndex,eConstantInt,lValue); CPA_EdIR_IntermediateCode *pclIntermediateCode=pstReturn->clIntermediateCodeList.GetTail(); pclIntermediateCode->m_fn_vSetString(csString); return TRUE; } else return FALSE; } else return FALSE; } else return FALSE; } //ANNECY CB BOOL fn_bIsAConstantInt(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAConstantInt(gcsGlob,pstReturn); } //END //ConstantReal /****************************************************************************/ //ANNECY CB BOOL fn_bIsAConstantReal(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAConstantReal(CString csString,stReturn *pstReturn) //END { CPA_EdIR_Frame *pclMainFrame=g_pclAIInterface->m_pclIRMainFrame; if(pclMainFrame!=NULL) { if(pclMainFrame->m_clConstantList.m_fn_bIsAConstant(csString)) { CString csValue=pclMainFrame->m_clConstantList.m_fn_csGetValueOfAConstant(csString); if(pclMainFrame->m_clConstantList.m_fn_csGetTypeOfAConstant(csString)==g_c_csDecimal) { double dfValue=atof(M_MAKECHAR(csValue)); fn_vInitNode(pstReturn,g_clLex.m_lIndex,eConstantReal,dfValue); CPA_EdIR_IntermediateCode *pclIntermediateCode=pstReturn->clIntermediateCodeList.GetTail(); pclIntermediateCode->m_fn_vSetString(csString); return TRUE; } else return FALSE; } else return FALSE; } else return FALSE; } //ANNECY CB BOOL fn_bIsAConstantReal(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAConstantReal(gcsGlob,pstReturn); } //END //Type /****************************************************************************/ //ANNECY CB BOOL fn_bIsAType(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAType(CString csString,stReturn *pstReturn) //END { long lIndex=fn_lGetDsgVarTypeIdFromEditorName(csString); if(M_ID_IS_VALID(lIndex)) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eCreateDsgVar,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsAType(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAType(gcsGlob,pstReturn); } //END //Function /****************************************************************************/ //ANNECY CB BOOL fn_bIsFunction(CString &csString,stReturn *pstReturn) //BOOL fn_bIsFunction(CString csString,stReturn *pstReturn) //END { long lIndex=fn_lGetFunctionIdFromEditorName(csString); if(M_ID_IS_VALID(lIndex)) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eFunction,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsFunction(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsFunction(gcsGlob,pstReturn); } //END //Procedure /****************************************************************************/ //ANNECY CB BOOL fn_bIsProcedure(CString &csString,stReturn *pstReturn) //BOOL fn_bIsProcedure(CString csString,stReturn *pstReturn) //END { long lIndex=fn_lGetProcedureIdFromEditorName(csString); if(M_ID_IS_VALID(lIndex)) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eProcedure,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsProcedure(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsProcedure(gcsGlob,pstReturn); } //END //BEGIN ROMTEAM Cristi Petrescu 98-04- //Subr /****************************************************************************/ BOOL fn_bIsSubr(CString &csString,stReturn *pstReturn) { if (g_pclListOfSubrs -> m_fn_bIsInList (csString)) { CPA_EdIR_MainBehaviour *pclMainBehaviour = g_pclListOfSubrs -> m_fn_pclGetMainBehaviour(csString); //Keeps the editor pointer //Converts it to a engine pointer before engine start long lIndex = (long) pclMainBehaviour; fn_vInitNode (pstReturn, g_clLex . m_lIndex, eSubrRef, lIndex); return TRUE; } return FALSE; //return g_pclListOfSubrs -> m_fn_bIsInList (csString); } BOOL fn_bIsSubr(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsSubr(gcsGlob,pstReturn); } //END ROMTEAM Cristi Petrescu 98-04- //Field /****************************************************************************/ //ANNECY CB BOOL fn_bIsField(CString &csString,stReturn *pstReturn) //BOOL fn_bIsField(CString csString,stReturn *pstReturn) //END { long lIndex=fn_lGetFieldIdFromEditorName(csString); if(M_ID_IS_VALID(lIndex)) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eField,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsField(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsField(gcsGlob,pstReturn); } //END //Known editor object /****************************************************************************/ //ANNECY CB BOOL fn_bIsAKnownEditorObject(CString &csString,stReturn *pstReturn,char *csTypeName,tdeNodeType eNodeType) //BOOL fn_bIsAKnownEditorObject(CString csString,stReturn *pstReturn,CString csTypeName,tdeNodeType eNodeType) //END { CPA_BaseObject *pclBaseObject; pclBaseObject=g_pclAIInterface->GetMainWorld()->fn_p_oFindObject(M_MAKECHAR(csString),csTypeName); if(pclBaseObject!=NULL) { if(pclBaseObject->fn_bIsAvailable()==FALSE) pclBaseObject->GetEditor()->fn_bLoadBaseObject(pclBaseObject); long lIndex=long(pclBaseObject->GetData()); fn_vInitNode(pstReturn,g_clLex.m_lIndex,eNodeType,lIndex); } return (pclBaseObject!=NULL); } //Perso (and Always) /****************************************************************************/ //ANNECY CB BOOL fn_bIsAPerso(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAPerso(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szActorInstanceTypeName,ePerso); } //ANNECY CB BOOL fn_bIsAPerso(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAPerso(gcsGlob,pstReturn); } //END //For ZDD ZDM ZDE ZDR and WAY /****************************************************************************/ //ANNECY CB long fn_lIsAZdxOrAWay(CString &csString,long &lIndex,CString &csObjectType) //long fn_lIsAZdxOrAWay(CString csString,long &lIndex,CString &csObjectType) //END { stIndexOfNameInfo stInfo; stInfo.csNameOfObject=csString; CPA_DLLBase *pclActorDLL=(CPA_DLLBase*)(g_pclAIInterface->GetMainWorld()->GetObjectDLLWithName(C_szDLLActorName)); long lResultIndex=pclActorDLL->OnQueryAction(g_pclAIInterface,C_uiActor_GetIndexOfName,(long)&stInfo); csObjectType=stInfo.csObjectType; CPA_Actor *pclModel=stInfo.pclModel; switch (lResultIndex) { case C_wNoNameFound: return 0; case C_wMultipleNamesFound: AfxMessageBox("Conflict with "+csString+"\nTry to use ListName@ObjectName"); return 2; case C_wNoNameListFound: return 0; case C_wMultipleNameListsFound: AfxMessageBox("Conflict with "+csString+"\nTry to use FamilyName@ListName@ObjectName"); return 2; case C_wNoFamilyFound: return 0; case C_wMultipleFamiliesFound: AfxMessageBox("PB : FamilyName are not unique !!!"); return 2; default: lIndex=lResultIndex; return 1; } } //ZDD /****************************************************************************/ //ANNECY CB long fn_lIsAZdd(CString &csString,stReturn *pstReturn) //long fn_lIsAZdd(CString csString,stReturn *pstReturn) //END { CString csObjectType; long lIndex; long lResult=fn_lIsAZdxOrAWay(csString,lIndex,csObjectType); if(lResult!=1) return lResult; else if(csObjectType==C_szZDdNameListType) { lIndex++; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eZdd,lIndex); return 1; } else return 0; } //ANNECY CB long fn_lIsAZdd(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_lIsAZdd(gcsGlob,pstReturn); } //END //ZDE /****************************************************************************/ //ANNECY CB long fn_lIsAZde(CString &csString,stReturn *pstReturn) //long fn_lIsAZde(CString csString,stReturn *pstReturn) //END { CString csObjectType; long lIndex; long lResult=fn_lIsAZdxOrAWay(csString,lIndex,csObjectType); if(lResult!=1) return lResult; else if(csObjectType==C_szZDeNameListType) { lIndex++; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eZde,lIndex); return 1; } else return 0; } //ANNECY CB long fn_lIsAZde(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_lIsAZde(gcsGlob,pstReturn); } //END //ZDM /****************************************************************************/ //ANNECY CB long fn_lIsAZdm(CString &csString,stReturn *pstReturn) //long fn_lIsAZdm(CString csString,stReturn *pstReturn) //END { CString csObjectType; long lIndex; long lResult=fn_lIsAZdxOrAWay(csString,lIndex,csObjectType); if(lResult!=1) return lResult; else if(csObjectType==C_szZDmNameListType) { lIndex++; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eZdm,lIndex); return 1; } else return 0; } //ANNECY CB long fn_lIsAZdm(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_lIsAZdm(gcsGlob,pstReturn); } //END //ZDM /****************************************************************************/ //ANNECY CB long fn_lIsAZdr(CString &csString,stReturn *pstReturn) //long fn_lIsAZdr(CString csString,stReturn *pstReturn) //END { CString csObjectType; long lIndex; long lResult=fn_lIsAZdxOrAWay(csString,lIndex,csObjectType); if(lResult!=1) return lResult; else if(csObjectType==C_szZDrNameListType) { lIndex++; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eZdr,lIndex); return 1; } else return 0; } //ANNECY CB long fn_lIsAZdr(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_lIsAZdr(gcsGlob,pstReturn); } //END //*********************************************************************** void fn_vSplitName(CString csName,CString &csOwner,CString &csObject) { int iPos; // extract object iPos = csName.ReverseFind('@'); if (iPos != -1) { csObject = csName.Right(csName.GetLength()-iPos-1); csOwner = csName.Left(iPos); } else { csObject = csName; } } //Action /****************************************************************************/ //ANNECY CB BOOL fn_bIsAnAction(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAnAction(CString csString,stReturn *pstReturn) //END { //Looks if it is a action of the current family long lIndex=long(((EdActors_EditorActorModel *)g_pclCurrentModel->m_fn_pclGetEditorActor())->m_pclBrain->m_fn_pvGetStateHandle(csString)); if(lIndex!=NULL) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eAction,lIndex); return TRUE; } else { CPA_BaseObject *pclOwner=NO_CRITERIA; //Try to split action name CString csFamily; CString csAction; fn_vSplitName(csString,csFamily,csAction); if(!csFamily.IsEmpty()) pclOwner=g_pclAIInterface->GetMainWorld()->fn_p_oFindObject(M_MAKECHAR(csFamily),C_szFamilyTypeName); //Looks in other family CPA_List clObjectLists; long lNumActions=g_pclAIInterface->GetMainWorld()->fn_lFindObjects(&clObjectLists,M_MAKECHAR(csAction),C_szActionTypeName,pclOwner); CPA_BaseObject *pclBaseObject=NULL; if(lNumActions==1) { pclBaseObject=clObjectLists.GetHead(); if(pclBaseObject!=NULL) { if(pclBaseObject->fn_bIsAvailable()==FALSE) pclBaseObject->GetEditor()->fn_bLoadBaseObject(pclBaseObject); CPA_Action *pclAction=(CPA_Action *)pclBaseObject; if(pclAction->mfn_p_oGetDefaultState()!=NULL) { lIndex=long(pclAction->mfn_p_oGetDefaultState()->GetData()); } else { AfxMessageBox("The action \""+pclAction->GetName()+"\" has no Initial State !!!!"); return FALSE; } fn_vInitNode(pstReturn,g_clLex.m_lIndex,eAction,lIndex); } } else if(lNumActions>1) { AfxMessageBox("Conflict with "+csString+"\nTry to use FamilyName@ActionName"); } return (pclBaseObject!=NULL); } } //ANNECY CB BOOL fn_bIsAnAction(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAnAction(gcsGlob,pstReturn); } //END //WayPoint /****************************************************************************/ //ANNECY CB BOOL fn_bIsAWayPoint(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAWayPoint(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szWayPointTypeName,eWayPoint); } //ANNECY CB BOOL fn_bIsAWayPoint(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAWayPoint(gcsGlob,pstReturn); } //END //Channel /****************************************************************************/ //ANNECY CB BOOL fn_bIsAChannel(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAChannel(CString csString,stReturn *pstReturn) //END { CPA_DLLBase *pclFamilyDLL=(CPA_DLLBase*)(g_pclAIInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLFamilyName)); if(pclFamilyDLL!=NULL) { CString csFamilyName; CString csChannelName; fn_vSplitName(csString,csFamilyName,csChannelName); tdstChannelInfoSearch stChannelInfo; if(!csFamilyName.IsEmpty()) stChannelInfo.p_oFamily=(CPA_Family *)g_pclAIInterface->GetMainWorld()->fn_p_oFindObject(M_MAKECHAR(csFamilyName),C_szFamilyTypeName); else stChannelInfo.p_oFamily=NULL; stChannelInfo.szChannel=(char *)LPCTSTR(csChannelName); stChannelInfo.lIndexOfChannel=0; if(pclFamilyDLL->OnQueryAction(g_pclAIInterface,C_uiGetChannel,(LPARAM)&stChannelInfo)==1) { long lIndex=stChannelInfo.lIndexOfChannel; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eModule,lIndex); return TRUE; } else if(pclFamilyDLL->OnQueryAction(g_pclAIInterface,C_uiGetChannel,(LPARAM)&stChannelInfo)==2) { AfxMessageBox("Conflict with "+csString+"\nTry to use FamilyName@ObjectName"); } else return FALSE; } return FALSE; } //ANNECY CB BOOL fn_bIsAChannel(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAChannel(gcsGlob,pstReturn); } //END //Surface /****************************************************************************/ //ANNECY CB BOOL fn_bIsASurface(CString &csString,stReturn *pstReturn) //BOOL fn_bIsASurface(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szSurfaceTypeName,eSurface); } //ANNECY CB BOOL fn_bIsASurface(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsASurface(gcsGlob,pstReturn); } //END //Environment /****************************************************************************/ //ANNECY CB BOOL fn_bIsAEnvironment(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAEnvironment(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szEnvironmentTypeName,eEnvironment); } //ANNECY CB BOOL fn_bIsAEnvironment(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAEnvironment(gcsGlob,pstReturn); } //END //LipSynchro /****************************************************************************/ //ANNECY CB BOOL fn_bIsALipSynchro(CString &csString,stReturn *pstReturn) //BOOL fn_bIsALipSynchro(CString csString,stReturn *pstReturn) //END { CPA_DLLBase *pclTLSDLL=(CPA_DLLBase*)(g_pclAIInterface->GetMainWorld()->GetToolDLLWithName(C_szLipSyncDLLName)); if(pclTLSDLL!=NULL) { csString+=".SYN"; tdstLipSyn_Info stLipSyn_Info; stLipSyn_Info.pFamily=g_pclCurrentModel->m_pub_fn_pclGetFamily(); stLipSyn_Info.csName=csString; CPA_SaveObject *pclLipSynchro; pclLipSynchro=(CPA_SaveObject *)pclTLSDLL->OnQueryAction(g_pclAIInterface,C_uiLoadLipSynchro,(LPARAM)&stLipSyn_Info); if(pclLipSynchro!=NULL) { long lIndex=long(pclLipSynchro->GetData()); fn_vInitNode(pstReturn,g_clLex.m_lIndex,eLipSynchro,lIndex); } return (pclLipSynchro!=NULL); } else return FALSE; } //ANNECY CB BOOL fn_bIsALipSynchro(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsALipSynchro(gcsGlob,pstReturn); } //END //Sector /****************************************************************************/ //ANNECY CB BOOL fn_bIsASector(CString &csString,stReturn *pstReturn) //BOOL fn_bIsASector(CString csString,stReturn *pstReturn) //END { CPA_List *pclList; pclList=g_pclAIInterface->GetMainWorld()->GetInterface()->GetObjectListByType(C_szSectorTypeName); CPA_SuperObject *pclSector=NULL; BOOL bFound=FALSE; if(pclList!=NULL) { POSITION pos=pclList->GetHeadPosition(); while(pos!=NULL && !bFound) { pclSector=pclList->GetNext(pos); bFound=(pclSector->GetObject()->GetName().CompareNoCase(csString)==0); } if(bFound) { long lIndex=long(pclSector->GetData()); fn_vInitNode(pstReturn,g_clLex.m_lIndex,eSector,lIndex); } } return (bFound); } //ANNECY CB BOOL fn_bIsASector(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsASector(gcsGlob,pstReturn); } //END //SuperObject /****************************************************************************/ //ANNECY CB BOOL fn_bIsASuperObject(CString &csString,stReturn *pstReturn) //BOOL fn_bIsASuperObject(CString csString,stReturn *pstReturn) //END { //ANNECY VL 26/03/98{ //CPA_SuperObject *pclSuperObject=g_pclAIInterface->GetMainWorld()->GetInterface()->GetSuperObject("All Types",csString); CPA_SuperObject *pclSuperObject = (CPA_SuperObject *) g_pclAIInterface->GetMainWorld()->fn_p_oFindObject( csString, "SuperObject" ); //ENDANNECY VL} if(pclSuperObject!=NULL) { long lIndex=long(pclSuperObject->GetData()); fn_vInitNode(pstReturn,g_clLex.m_lIndex,eSuperObject,lIndex); } return (pclSuperObject!=NULL); } //ANNECY CB BOOL fn_bIsASuperObject(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsASuperObject(gcsGlob,pstReturn); } //END //ObjectTable /****************************************************************************/ //ANNECY CB BOOL fn_bIsAObjectTable(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAObjectTable(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szObjectTableTypeName,eObjectTable); } //ANNECY CB BOOL fn_bIsAObjectTable(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAObjectTable(gcsGlob,pstReturn); } //END //Family /****************************************************************************/ //ANNECY CB BOOL fn_bIsAFamily(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAFamily(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szFamilyTypeName,eFamily); } //ANNECY CB BOOL fn_bIsAFamily(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAFamily(gcsGlob,pstReturn); } //END //Model /****************************************************************************/ //ANNECY CB BOOL fn_bIsAModel(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAModel(CString csString,stReturn *pstReturn) //END { CPA_BaseObject *pclBaseObject; pclBaseObject=g_pclAIInterface->GetMainWorld()->fn_p_oFindObject(M_MAKECHAR(csString),C_szActorModelTypeName); if(pclBaseObject!=NULL) { if(pclBaseObject->fn_bIsAvailable()==FALSE) pclBaseObject->GetEditor()->fn_bLoadBaseObject(pclBaseObject); //Keeps the editor pointer //Converts it to a engine pointer before engine start fn_vInitNode(pstReturn,g_clLex.m_lIndex,eModel,(long)pclBaseObject); } return (pclBaseObject!=NULL); } //ANNECY CB BOOL fn_bIsAModel(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAModel(gcsGlob,pstReturn); } //END //SoundEvent /****************************************************************************/ //ANNECY CB BOOL fn_bIsASoundEvent(CString &csString,stReturn *pstReturn) //BOOL fn_bIsASoundEvent(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szSoundEventTypeName,eSoundEvent); } //ANNECY CB BOOL fn_bIsASoundEvent(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsASoundEvent(gcsGlob,pstReturn); } //END //GameMaterial /****************************************************************************/ //ANNECY CB BOOL fn_bIsAGameMaterial(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAGameMaterial(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szGameMaterialTypeName,eGameMaterial); } //ANNECY CB BOOL fn_bIsAGameMaterial(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAGameMaterial(gcsGlob,pstReturn); } //END //Light /****************************************************************************/ //ANNECY CB BOOL fn_bIsALight(CString &csString,stReturn *pstReturn) //BOOL fn_bIsALight(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szLightTypeName,eLight); } //ANNECY CB BOOL fn_bIsALight(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsALight(gcsGlob,pstReturn); } //END /****************************************************************************/ //ANNECY CB BOOL fn_bIsACaps(CString &csString, stReturn *pstReturn) //BOOL fn_bIsACaps(CString csString, stReturn *pstReturn) //END { long lStringLength = csString.GetLength(); if (lStringLength > 32) return FALSE; for (int i = 0 ; i < lStringLength ; i ++) { char cCharAt = csString.GetAt(i); if ( (cCharAt != '0') && (cCharAt != '1') ) return FALSE; } char* dummy; unsigned long ulData = strtoul(csString, &dummy, 2); fn_vInitNode(pstReturn, g_clLex.m_lIndex, eCaps, (long)ulData); return TRUE; } //ANNECY CB BOOL fn_bIsACaps(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsACaps(gcsGlob,pstReturn); } //END /****************************************************************************/ //ANNECY CB BOOL fn_bIsAGraph(CString &csString, stReturn *pstReturn) //BOOL fn_bIsAGraph(CString csString, stReturn *pstReturn) //END { WP_tdHandleOfGraph hGraph = WPG_fn_hGetGraph(csString.GetBuffer(255)); if (hGraph != NULL) { fn_vInitNode(pstReturn, g_clLex.m_lIndex, eGraph, (long)hGraph); } return (hGraph != NULL); } //ANNECY CB BOOL fn_bIsAGraph(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAGraph(gcsGlob,pstReturn); } //END // /****************************************************************************/ //ANNECY CB BOOL fn_bIsThisBehaviourIsUnique(CString &csString,CString &csBehaviourName,CPA_BaseObject **ppclModel) //BOOL fn_bIsThisBehaviourIsUnique(CString csString,CString &csBehaviourName,CPA_BaseObject **ppclModel) //END { //Checks for multiple name CString csModelName; fn_vSplitName(csString,csModelName,csBehaviourName); *ppclModel=NO_CRITERIA; if(!csModelName.IsEmpty()) { *ppclModel=g_pclAIInterface->GetMainWorld()->fn_p_oFindObject(M_MAKECHAR(csModelName),C_szActorModelTypeName); if(*ppclModel==NULL) return FALSE; } CPA_List clBehavioursList; long lNumberOfBehaviours; lNumberOfBehaviours=g_pclAIInterface->GetMainWorld()->fn_lFindObjects(&clBehavioursList,csBehaviourName,C_szIABehaviourTypeName,*ppclModel); if(lNumberOfBehaviours==0) return FALSE; if(lNumberOfBehaviours>1) { if(csModelName.IsEmpty()) AfxMessageBox("Conflict with "+csString+"\nTry to use ModelName@BehaviourName"); return FALSE; } if(*ppclModel==NO_CRITERIA) *ppclModel=NULL; return TRUE; } //Reflex Behaviour /****************************************************************************/ //ANNECY CB BOOL fn_bIsAReflexBehaviour(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAReflexBehaviour(CString csString,stReturn *pstReturn) //END { CPA_BaseObject *pclModel; //Checks for multiple name CString csBehaviourName; if(fn_bIsThisBehaviourIsUnique(csString,csBehaviourName,&pclModel)) { //Checks if it is a reflex behaviour if(pclModel!=NULL) { //The model is known CPA_Actor *pclActorModel=(CPA_Actor *)pclModel; CPA_EdIR_Brain *pclBrain=((EdActors_EditorActorModel *)pclActorModel->m_fn_pclGetEditorActor())->m_pclBrain; CPA_EdIR_MainBehaviourList *pclReflexList=&(pclBrain->m_clListOfReflexBehaviours); if(pclReflexList->m_fn_bIsInList(csBehaviourName)) { CPA_EdIR_MainBehaviour *pclMainBehaviour=pclReflexList->m_fn_pclGetMainBehaviour(csBehaviourName); //Keeps the editor pointer //Converts it to a engine pointer before engine start long lIndex=(long)pclMainBehaviour; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eRfxBehaviour,lIndex); return TRUE; } else return FALSE; } else { //Gets all models CPA_List clModelsList; g_pclAIInterface->GetMainWorld()->fn_lFindObjects(&clModelsList,"",C_szActorModelTypeName,NO_CRITERIA); POSITION pos=clModelsList.GetHeadPosition(); long lIndex=-1; while(pos!=NULL && lIndex==-1) { CPA_Actor *pclModel=(CPA_Actor *)(clModelsList.GetNext(pos)); CPA_EdIR_Brain *pclBrain=((EdActors_EditorActorModel *)pclModel->m_fn_pclGetEditorActor())->m_pclBrain; CPA_EdIR_MainBehaviourList *pclReflexList=&(pclBrain->m_clListOfReflexBehaviours); if(pclReflexList->m_fn_bIsInList(csBehaviourName)) { CPA_EdIR_MainBehaviour *pclMainBehaviour=pclReflexList->m_fn_pclGetMainBehaviour(csBehaviourName); //Keeps the editor pointer //Converts it to a engine pointer before engine start lIndex=(long)pclMainBehaviour; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eRfxBehaviour,lIndex); } } return (lIndex!=-1); } } else return FALSE; } //ANNECY CB BOOL fn_bIsAReflexBehaviour(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAReflexBehaviour(gcsGlob,pstReturn); } //END //Intelligence Behaviour /****************************************************************************/ //ANNECY CB BOOL fn_bIsAIntelligenceBehaviour(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAIntelligenceBehaviour(CString csString,stReturn *pstReturn) //END { CPA_BaseObject *pclModel; //Checks for multiple name CString csBehaviourName; if(fn_bIsThisBehaviourIsUnique(csString,csBehaviourName,&pclModel)) { //Checks if it is a reflex behaviour if(pclModel!=NULL) { //The model is known CPA_Actor *pclActorModel=(CPA_Actor *)pclModel; CPA_EdIR_Brain *pclBrain=((EdActors_EditorActorModel *)pclActorModel->m_fn_pclGetEditorActor())->m_pclBrain; CPA_EdIR_MainBehaviourList *pclIntelligenceList=&(pclBrain->m_clListOfIntelligenceBehaviours); if(pclIntelligenceList->m_fn_bIsInList(csBehaviourName)) { CPA_EdIR_MainBehaviour *pclMainBehaviour=pclIntelligenceList->m_fn_pclGetMainBehaviour(csBehaviourName); //Keeps the editor pointer //Converts it to a engine pointer before engine start long lIndex=(long)pclMainBehaviour; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eIABehaviour,lIndex); return TRUE; } else return FALSE; } else { //Gets all models CPA_List clModelsList; g_pclAIInterface->GetMainWorld()->fn_lFindObjects(&clModelsList,"",C_szActorModelTypeName,NO_CRITERIA); POSITION pos=clModelsList.GetHeadPosition(); long lIndex=-1; while(pos!=NULL && lIndex==-1) { CPA_Actor *pclModel=(CPA_Actor *)(clModelsList.GetNext(pos)); CPA_EdIR_Brain *pclBrain=((EdActors_EditorActorModel *)pclModel->m_fn_pclGetEditorActor())->m_pclBrain; CPA_EdIR_MainBehaviourList *pclIntelligenceList=&(pclBrain->m_clListOfIntelligenceBehaviours); if(pclIntelligenceList->m_fn_bIsInList(csBehaviourName)) { CPA_EdIR_MainBehaviour *pclMainBehaviour=pclIntelligenceList->m_fn_pclGetMainBehaviour(csBehaviourName); //Keeps the editor pointer //Converts it to a engine pointer before engine start lIndex=(long)pclMainBehaviour; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eIABehaviour,lIndex); } } return (lIndex!=-1); } } else return FALSE; } //ANNECY CB BOOL fn_bIsAIntelligenceBehaviour(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAIntelligenceBehaviour(gcsGlob,pstReturn); } //END //Reflex Behaviour (for me) /****************************************************************************/ //ANNECY CB BOOL fn_bIsMyReflexBehaviour(CString &csString,stReturn *pstReturn) //BOOL fn_bIsMyReflexBehaviour(CString csString,stReturn *pstReturn) //END { CPA_BaseObject *pclModel; //Checks for multiple name CString csBehaviourName; if(fn_bIsThisBehaviourIsUnique(csString,csBehaviourName,&pclModel)) { CPA_Actor *pclModel=g_pclCurrentModel; CPA_EdIR_Brain *pclBrain=((EdActors_EditorActorModel *)pclModel->m_fn_pclGetEditorActor())->m_pclBrain; CPA_EdIR_MainBehaviourList *pclReflexList=&(pclBrain->m_clListOfReflexBehaviours); if(pclReflexList->m_fn_bIsInList(csBehaviourName)) { CPA_EdIR_MainBehaviour *pclMainBehaviour=pclReflexList->m_fn_pclGetMainBehaviour(csBehaviourName); //Keeps the editor pointer //Converts it to a engine pointer before engine start long lIndex=(long)pclMainBehaviour; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eRfxBehaviour,lIndex); return TRUE; } else return FALSE; } else return FALSE; } //ANNECY CB BOOL fn_bIsMyReflexBehaviour(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsMyReflexBehaviour(gcsGlob,pstReturn); } //END //Intelligence Behaviour (for me) /****************************************************************************/ //ANNECY CB BOOL fn_bIsMyIntelligenceBehaviour(CString &csString,stReturn *pstReturn) //BOOL fn_bIsMyIntelligenceBehaviour(CString csString,stReturn *pstReturn) //END { CPA_BaseObject *pclModel; //Checks for multiple name CString csBehaviourName; if(fn_bIsThisBehaviourIsUnique(csString,csBehaviourName,&pclModel)) { CPA_Actor *pclModel=g_pclCurrentModel; CPA_EdIR_Brain *pclBrain=((EdActors_EditorActorModel *)pclModel->m_fn_pclGetEditorActor())->m_pclBrain; CPA_EdIR_MainBehaviourList *pclIntelligenceList=&(pclBrain->m_clListOfIntelligenceBehaviours); if(pclIntelligenceList->m_fn_bIsInList(csBehaviourName)) { CPA_EdIR_MainBehaviour *pclMainBehaviour=pclIntelligenceList->m_fn_pclGetMainBehaviour(csBehaviourName); //Keeps the editor pointer //Converts it to a engine pointer before engine start long lIndex=(long)pclMainBehaviour; fn_vInitNode(pstReturn,g_clLex.m_lIndex,eIABehaviour,lIndex); return TRUE; } else return FALSE; } else return FALSE; } //ANNECY CB BOOL fn_bIsMyIntelligenceBehaviour(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsMyIntelligenceBehaviour(gcsGlob,pstReturn); } //END //KeyButton /****************************************************************************/ //ANNECY CB BOOL fn_bIsAKeyButton(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAKeyButton(CString csString,stReturn *pstReturn) //END { long lIndex=(long)IPT_fn_hGetEntryActionHandle(M_MAKECHAR(csString)); if(IPT_fn_bIsAValidEntryActionHandle((IPT_tdxHandleToEntryElement)lIndex)) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eKeyButton,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsAKeyButton(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAKeyButton(gcsGlob,pstReturn); } //END //Mask Type /****************************************************************************/ //ANNECY CB BOOL fn_bIsAMaskType(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAMaskType(CString csString,stReturn *pstReturn) //END { CPA_BaseObject *pclMaskType; pclMaskType=g_pclAIInterface->GetMainWorld()->fn_p_oFindObject(M_MAKECHAR(csString),C_szMaterialColName); if(pclMaskType!=NULL) { if(pclMaskType->fn_bIsAvailable()==FALSE) pclMaskType->GetEditor()->fn_bLoadBaseObject(pclMaskType); long lIndex=(long)(*(unsigned char *)(pclMaskType->GetData())); fn_vInitNode(pstReturn,g_clLex.m_lIndex,eMaskType,lIndex); } return (pclMaskType!=NULL); } //ANNECY CB BOOL fn_bIsAMaskType(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAMaskType(gcsGlob,pstReturn); } //END #if 0 //Power /****************************************************************************/ //ANNECY CB BOOL fn_bIsAPower(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAPower(CString csString,stReturn *pstReturn) //END { long lIndex=fn_uwGetPowerValueFromString(M_MAKECHAR(csString)); if(lIndex!=INV_C_uwNotValid) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,ePower,lIndex); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsAPower(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAPower(gcsGlob,pstReturn); } //END #endif //0 car inutilise dans RM2 //Text /****************************************************************************/ //ANNECY CB BOOL fn_bIsAText(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAText(CString csString,stReturn *pstReturn) //END { FON_tdxHandleOfText hText = FON_fn_hGetTextHandleWithoutWarning(M_MAKECHAR(csString)); if ( hText != FON_C_xInvalidTextHandle ) { fn_vInitNode(pstReturn,g_clLex.m_lIndex,eText,hText); return TRUE; } else return FALSE; } //ANNECY CB BOOL fn_bIsAText(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAText(gcsGlob,pstReturn); } //END //ParticleGenerator /****************************************************************************/ //ANNECY CB BOOL fn_bIsAParticleGenerator(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAParticleGenerator(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szPartGenGeneratorName,eParticleGenerator); } //ANNECY CB BOOL fn_bIsAParticleGenerator(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAParticleGenerator(gcsGlob,pstReturn); } //END //State /****************************************************************************/ //ANNECY CB BOOL fn_bIsAState(CString &csString,stReturn *pstReturn) //BOOL fn_bIsAState(CString csString,stReturn *pstReturn) //END { return fn_bIsAKnownEditorObject(csString,pstReturn,C_szStateTypeName,eState); } //ANNECY CB BOOL fn_bIsAState(char *csString,stReturn *pstReturn) { CSTRING_EQ(gcsGlob, csString); return fn_bIsAState(gcsGlob,pstReturn); } //END /****************************************************************************/ void fn_vInitNode(stReturn *pstReturn,long lOffset,tdeNodeType eNodeType,long lIndex,CPA_Actor *pclModel) { pstReturn->clIntermediateCodeList=new CPA_EdIR_IntermediateCode(lOffset,eNodeType,lIndex,pclModel); } /****************************************************************************/ void fn_vInitNode(stReturn *pstReturn,long lOffset,tdeNodeType eNodeType,double dfValue) { pstReturn->clIntermediateCodeList=new CPA_EdIR_IntermediateCode(lOffset,eNodeType,dfValue); } /****************************************************************************/ void fn_vInitNode(stReturn *pstReturn,long lOffset,tdeNodeType eNodeType,CString csString) { pstReturn->clIntermediateCodeList=new CPA_EdIR_IntermediateCode(lOffset,eNodeType,csString); } /****************************************************************************/ CLex::~CLex() { if(yy_current_buffer) yy_delete_buffer(yy_current_buffer); } /****************************************************************************/ void CLex::yyinit(char *szStringToParse,tdeTypeText eTypeText) { m_lIndex=0; m_lOldIndex=0; m_lIndexWithoutSpaceAndTab=0; m_lOldMacroIndex=0; m_bIsInMacro=FALSE; //BEGIN ROMTEAM Cristi Petrescu 98-04- m_bIsInDefine = FALSE; m_clDefineList . RemoveAll (); m_clDefineContextStack . m_fn_vDestroyAndRemoveAllEntries (); //END ROMTEAM Cristi Petrescu 98-04- m_eTypeText=eTypeText; if(yy_current_buffer) yyrestart(NULL); m_pcIndex=szStringToParse; if(m_eTypeText==DsgVarText) BEGIN(DECL_DSG_VAR); else if(g_pclAIInterface->M_GetMainWorld()->GetInterface()->fn_csGetCurrentLanguage()=="French") BEGIN(FRENCH); else BEGIN(ENGLISH); } //BEGIN ROMTEAM Cristi Petrescu 98-04- void CPA_EdIR_DefineContextStack :: m_fn_vDestroyAndRemoveAllEntries (void) { POSITION pos=GetHeadPosition(); while(pos!=NULL) delete GetNext(pos); RemoveAll(); } void CLex :: m_fn_vEnterContext (char *szStringToParse) { // get the current context CPA_EdIR_DefineContext *pCurrentDefineContext = new CPA_EdIR_DefineContext (); pCurrentDefineContext -> m_pcIndex = m_pcIndex; pCurrentDefineContext -> m_bufLexContext = yy_current_buffer; // push the current context m_clDefineContextStack . AddTail (pCurrentDefineContext); // build the new state YY_BUFFER_STATE bufNewContext = yy_create_buffer (NULL, YY_BUF_SIZE); // and activate it m_pcIndex = szStringToParse; yy_switch_to_buffer (bufNewContext); } void CLex :: m_fn_vExitContext (void) { // cleanup the current state yy_delete_buffer (yy_current_buffer); // pop the old context CPA_EdIR_DefineContext *pOldDefineContext = m_clDefineContextStack . RemoveTail (); // activate it m_pcIndex = pOldDefineContext -> m_pcIndex; yy_switch_to_buffer (pOldDefineContext -> m_bufLexContext); // and clean delete pOldDefineContext; } //END ROMTEAM Cristi Petrescu 98-04- #endif //D_ED_IR_ACTIVE