CVersionInfo Dr. Detlef Meyer-EltzPParsergenerator and Interpreter1.7.3.0 Tetra.exe+Copyright 2002 - 09 Dr. Detlef Meyer-Eltz Tetra.exeTextTransformernormalEOLCTokenNEOL\r?\n HEX_NUMBERCTokenN HEX_NUMBER~Eine Pascal Hexadezimal-Zahl als ein Dollarzeichen gefolgt von bis zu acht Ziffern oder Buchstaben aus dem Bereich 'A' bis 'F'\$([[:xdigit:]]+)IDCTokenNIDBezeichner, der mit einem Zeichen des Alphabets oder dem Unterstrich beginnt, dem in beliebiger Anzahl alphanumerische Zeichen oder Unterstriche folgen knnen [a-zA-Z_]\w* IGNORABLECTokenN IGNORABLEn( \ \s \// spaces |//[^\n]*\n \// Zeilenkommentare |\(\*[^*]*\*+([^)*][^*]*\*+)*\) \// (*...*)-comment )+ PP_DEFINECTokenN PP_DEFINE \{\$DEFINEPP_ELSECTokenNPP_ELSE\{\$ELSE[^}]*\} PP_ELSEIFCTokenN PP_ELSEIF \{\$ELSEIFPP_ENDIFCTokenNPP_ENDIF\{\$ENDIF([^}])*\}PP_IFCTokenNPP_IF\{\$IFPP_IFDEFCTokenNPP_IFDEF \{\$IFDEFPP_IFENDCToken NPP_IFEND\{\$IFEND[^}]*\} PP_IFNDEFCTokent!N PP_IFNDEF \{\$IFNDEFPP_IFOPTCToken`"NPP_IFOPT \{\$IFOPT PP_NODEFINECTokenk PP_NODEFINE\{\$NODEFINE[^}]*\}PP_UNDEFCTokenMPP_UNDEF \{\$UNDEF SCALE_FACTORCTokenTT SCALE_FACTOR [Ee][+-]?\d+STRINGCToken0USTRINGXString, der mit Anfhrungszeichen (") beginnt und endet. Ein String kann weitere Anfhrungszeichen enthalten, wenn ihnen ein Backslash vorausgeht. Ein String kann sich nicht ber mehere Zeilen erstrecken. Der erste Unterausdruck enthlt die Zeichen zwischen den ueren Anfhrungszeichen. (Der Ausdruck ist gem J.E.F. Friedl LL(1)-optimiert.)'([^\r\n']|'')*'UNSIGNED_INTEGERCTokengUNSIGNED_INTEGER\d+ UNSIGNED_REALCTokenl UNSIGNED_REAL2\d+(\.\d+ \ ({SCALE_FACTOR})?| \ {SCALE_FACTOR})COMMENTCProduction_LINKmCOMMENTD( COMMENT_OLD_STYLE | COMMENT_TURBO | COMMENT_DELPHI ) $`COMMENT_DELPHICProduction_LINK2NCOMMENT_DELPHI* "//" SKIP? EOL | "//\r\n" | "//\n" $`\nrtCOMMENT_OLD_STYLECProduction_LINK4NCOMMENT_OLD_STYLE"(*" SKIP? "*)" $` COMMENT_TURBOCProduction_LINK COMMENT_TURBO"{" SKIP? "}" $` const_exprCProduction_LINK const_exprsimple_expr[xiIsDefined] ( {{int iIsDefined;}} ( "=" simple_expr[iIsDefined] {{xiIsDefined = xiIsDefined == iIsDefined; }} | ">" simple_expr[iIsDefined] {{xiIsDefined = xiIsDefined > iIsDefined; }} | ">=" simple_expr[iIsDefined] {{xiIsDefined = xiIsDefined >= iIsDefined; }} | "<" simple_expr[iIsDefined] {{xiIsDefined = xiIsDefined < iIsDefined; }} | "<=" simple_expr[iIsDefined] {{xiIsDefined = xiIsDefined <= iIsDefined; }} | "in" simple_expr[iIsDefined] // not evaluated, for parser test only // | "is" simple_expr | "<>" simple_expr[iIsDefined] {{xiIsDefined = xiIsDefined != iIsDefined; }} ) )* int& xiIsDefinedconstantCProduction_LINKconstant( HEX_NUMBER {{ xiIsDefined = hstoi(xState.str(1)); }} | UNSIGNED_INTEGER {{ xiIsDefined = xState.itg(); }} | UNSIGNED_REAL {{ xiIsDefined = xState.dbl(); }} ) int& xiIsDefined\t control_lineCProduction_LINKt  control_line" definition | undefinition \t definitionCProduction_LINK0 definitionPP_DEFINE ID {{ //if(xbIsDefined) m_NewDefines[State.str()] = "true"; }} SKIP? // e.g. Jedi: {$DEFINE BOUNDSCHANGED_DIRECTIVE override} "}" else_sectionCProduction_LINK$ else_section4PP_ELSE group[xiIsDefined]* if_end[xiIsDefined] int xiIsDefined\t elseif_beginCProduction_LINK elseif_begin/PP_ELSEIF const_expr[xiIsDefined] "}" int& xiIsDefined\t elseif_sectionCProduction_LINKelseif_section{{ int iIsDefined = xiIsDefined; }} elseif_begin[xiIsDefined] group[xiIsDefined && iIsDefined]* if_end[xiIsDefined && !iIsDefined] bool xiIsDefined\t groupCProduction_LINKgroupl if_section[xiIsDefined] | control_line //| include[xbPrint, xiLevel] | text[xiIsDefined] int xiIsDefined\t if_CProduction_LINKif_4 PP_IF const_expr[xiIsDefined] "}" int& xiIsDefined IGNORABLEif_beginCProduction_LINK|if_begin{{ out << " "; // otherwise tokens can be melted }} ( if_[xiIsDefined] | ifdef[xiIsDefined] | ifopt[xiIsDefined] | ifndef[xiIsDefined] ) int& xiIsDefinedif_endCProduction_LINKif_end} else_section[xbIsDefined] | elseif_section[xbIsDefined] | PP_IFEND {{ out << " "; }} | PP_ENDIF {{ out << " "; }} bool xbIsDefined\t if_sectionCProduction_LINK if_section{{ int iIsDefined = true; }} if_begin[iIsDefined] group[iIsDefined && xiIsDefined]* if_end[!iIsDefined && xiIsDefined] int xiIsDefined\t ifdefCProduction_LINK!ifdefPP_IFDEF ID {{ xiIsDefined = xiIsDefined && IsDefined(State, xState.str()); }} SKIP? // e.g. Jedi: {$IFDEF COMPILE_UNITS_SEPARATELY // gives better progress resolution } "}" int& xiIsDefinedifndefCProduction_LINK$ifndef_PP_IFNDEF ID {{ xiIsDefined = xiIsDefined && !IsDefined(xState, xState.str()); }} "}" int& xiIsDefinedifoptCProduction_LINK&ifopt3PP_IFOPT SKIP {{ xiIsDefined = false; }} "}" int& xiIsDefined IGNORABLE log_and_exprCProduction_LINK( log_and_exprprim_expr[xiIsDefined] ( {{int iIsDefined;}} ( "and" prim_expr[iIsDefined] {{xiIsDefined = xiIsDefined && iIsDefined; }} | "div" prim_expr[iIsDefined] {{xiIsDefined = xiIsDefined / iIsDefined; }} | "mod" prim_expr[iIsDefined] {{xiIsDefined = xiIsDefined % iIsDefined; }} | "shl" prim_expr[iIsDefined] {{xiIsDefined = xiIsDefined >> iIsDefined; }} | "shr" prim_expr[iIsDefined] {{xiIsDefined = xiIsDefined << iIsDefined; }} | "/" prim_expr[iIsDefined] {{xiIsDefined = xiIsDefined / iIsDefined; }} | "*" prim_expr[iIsDefined] {{xiIsDefined = xiIsDefined * iIsDefined; }} ) )* int& xiIsDefined\t PreprocDelphiCProduction_LINK/ PreprocDelphitodo: > Bei den Compiler-Direktiven mu das erste Zeichen des Kommentars ein $ > sein, alles andere wird als normaler Kommentar berlesen.  group[true]* prim_exprCProduction_LINKd* prim_expr" "not" prim_expr[xiIsDefined] {{xiIsDefined = ! xiIsDefined; }} | ( constant[xiIsDefined] | ID {{ xiIsDefined = GetDefineInt(xState.str()); }} ( "." ID )* // !!! Hack e.g. Declared( himXML.TStream ) ( "(" ID ")" )? // !!! Hack e.g. for sizeof( x ) | ( "DEFINED" | "Declared" ) ( "(" const_expr[xiIsDefined] ")" | ID {{ xiIsDefined = GetDefineInt(State.str()); }} ) ) | "(" const_expr[xiIsDefined] ")" | "[" ( ID ( "," ID )* )? "]" int& xiIsDefined\t simple_exprCProduction_LINKx simple_expr log_and_expr[xiIsDefined] ( {{int iIsDefined;}} ( "-" log_and_expr[iIsDefined] {{xiIsDefined = xiIsDefined - iIsDefined; }} | "or" log_and_expr[iIsDefined] {{xiIsDefined = xiIsDefined || iIsDefined; }} | "+" log_and_expr[iIsDefined] {{xiIsDefined = xiIsDefined + iIsDefined; }} | "xor" log_and_expr[iIsDefined] {{xiIsDefined = xiIsDefined ^ iIsDefined; }} ) )* int& xiIsDefined IGNORABLEtextCProduction_LINK6text( ( SKIP // | ID | STRING // | UNSIGNED_INTEGER // | UNSIGNED_REAL ) {{text_copy(xState, xbIsDefined); }} | COMMENT {{ if(xbIsDefined) out << xState.lp_copy(); }} )+ bool xbIsDefined undefinitionCProduction_LINKX8 undefinition5PP_UNDEF ID {{ Undefine(xState.str()); }} "}"  GetDefineIntCElementScripth GetDefineInt{{ if(m_Defines.containsKey(xs)) return 1; else if(m_IntDefines.containsKey(xs)) return m_IntDefines[xs]; else return 0; }} const str& xsint IsDefinedCElementScript V IsDefined~{{ if(m_Defines.containsKey(xs)) return true; if(m_NewDefines.containsKey(xs)) return true; return false; }} const str& xsbool m_DefinesCElementScriptd# m_Defines{- m_Defines["NO_STRICT"] = "true"; m_Defines["USEPACKAGES"] = "true"; m_Defines["MSWINDOWS"] = "true"; m_Defines["WIN32"] = "true"; m_Defines["VCL"] = "true"; // Jedi m_Defines["HTMLHELP12"] = "true"; // Jedi m_Defines["CPUI386"] = "true"; // free pascal -} mstrstr m_IntDefinesCElementScriptK m_IntDefinesN{- m_IntDefines["fpc_fullversion"] = 20203; // > 20202; free pascal -} mstrint m_NewDefinesCElementScriptlL m_NewDefinesmstrstr text_copyCElementScript