From 321d8a48fe4aa5bb33bbedcfcce73836de9da6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D0=BD=D0=B4=D0=B0=D1=80=D0=B5=D0=B2=20=D0=98?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD?= Date: Thu, 7 Jan 2016 22:01:36 +0100 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D1=8B=20?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D1=80=D1=8B=D0=B5=20=D0=BF=D0=B0=D1=80=D1=81?= =?UTF-8?q?=D0=B5=D1=80=D1=8B=20=D0=BD=D0=B0=20=D0=B1=D0=B0=D0=B7=D0=B5=20?= =?UTF-8?q?GoldParser=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=20=D0=B3=D0=BE=D0=B4=20=D0=B2=20=D0=BA=D0=BE=D0=BF=D0=B8=D1=80?= =?UTF-8?q?=D0=B0=D0=B9=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Grammars/Haskell/HaskellLang.resources | Bin 22093 -> 0 bytes Grammars/Haskell/Haskell_lrparser_rules.cs | 1898 --- Grammars/Haskell/bat.txt | 31 - Grammars/Haskell/compile_ALL.bat | 31 - Grammars/Haskell/haskell_parser.cgt | Bin 71805 -> 0 bytes Grammars/Haskell/haskell_parser.grm | 394 - Grammars/Haskell/haskell_parser.log | 61 - Grammars/Haskell/haskell_parser.pgt | 488 - Grammars/Haskell/haskell_parser.tmpl | 1923 --- .../определение_функции.txt | 445 - Parsers/BFParser/BFLang.resources | Bin 5577 -> 0 bytes Parsers/BFParser/BFParser.csproj | 108 - Parsers/BFParser/BFParserTools.cs | 21 - Parsers/BFParser/BF_lrparser.cs | 492 - Parsers/BFParser/Parser.cs | 154 - Parsers/BFParser/Properties/AssemblyInfo.cs | 35 - Parsers/HaskellParser/Errors.cs | 42 - Parsers/HaskellParser/HaskellLang.resources | Bin 22093 -> 0 bytes Parsers/HaskellParser/HaskellParser.csproj | 83 - Parsers/HaskellParser/HaskellParserTools.cs | 77 - Parsers/HaskellParser/Haskell_lrparser.cs | 100 - .../HaskellParser/Haskell_lrparser_rules.cs | 6511 --------- Parsers/HaskellParser/Parser.cs | 171 - .../HaskellParser/Properties/AssemblyInfo.cs | 35 - Parsers/KuMirParser/Errors.cs | 57 - Parsers/KuMirParser/KuMirLang.resources | Bin 19170 -> 0 bytes Parsers/KuMirParser/KuMirParser.csproj | 114 - Parsers/KuMirParser/KuMirParserTools.cs | 83 - Parsers/KuMirParser/KuMir_lrparser.cs | 107 - Parsers/KuMirParser/KuMir_lrparser_rules.cs | 2697 ---- Parsers/KuMirParser/Parser.cs | 161 - .../KuMirParser/Properties/AssemblyInfo.cs | 33 - Parsers/PL0Parser/Errors.cs | 45 - Parsers/PL0Parser/PL0Lang.resources | Bin 5067 -> 0 bytes Parsers/PL0Parser/PL0Parser.csproj | 114 - Parsers/PL0Parser/PL0ParserTools.cs | 82 - Parsers/PL0Parser/PL0_lrparser.cs | 101 - Parsers/PL0Parser/PL0_lrparser_rules.cs | 1060 -- Parsers/PL0Parser/Parser.cs | 178 - Parsers/PL0Parser/Properties/AssemblyInfo.cs | 35 - .../CodeFormatting/CommentBinder.cs | 1259 -- Parsers/PascalABCParser/Errors.cs | 88 - Parsers/PascalABCParser/Parser.cs | 151 - .../PascalABCParser/PascalABCLang.resources | Bin 222628 -> 0 bytes .../PascalABCParser/PascalABCParser.csproj | 123 - .../PascalABCParser/PascalABCParserTools.cs | 172 - .../PascalABCParser/Preprocessor/Parser.cs | 173 - .../PascalPreprocessorLang.resources | Bin 5350 -> 0 bytes .../PascalPreprocessor_lrparser.cs | 329 - .../Preprocessor/Preprocessor.cs | 63 - .../PascalABCParser/Preprocessor_2/Errors.cs | 165 - .../PABCPreprocessor2Lang.resources | Bin 5817 -> 0 bytes .../PABCPreprocessor2_lrparser.cs | 597 - .../PascalABCParser/Preprocessor_2/Parser.cs | 173 - .../Preprocessor_2/Preprocessor2.cs | 620 - .../Properties/AssemblyInfo.cs | 35 - Parsers/PascalABCParser/pascalabc_lrparser.cs | 422 - .../pascalabc_lrparser_rules.cs | 11164 ---------------- ReleaseGenerators/License.txt | 2 +- ReleaseGenerators/License_en.txt | 2 +- ReleaseGenerators/copyright.txt | 2 +- doc/License_en.txt | 2 +- doc/copyright.txt | 2 +- doc/license.txt | 2 +- 64 files changed, 6 insertions(+), 33507 deletions(-) delete mode 100644 Grammars/Haskell/HaskellLang.resources delete mode 100644 Grammars/Haskell/Haskell_lrparser_rules.cs delete mode 100644 Grammars/Haskell/bat.txt delete mode 100644 Grammars/Haskell/compile_ALL.bat delete mode 100644 Grammars/Haskell/haskell_parser.cgt delete mode 100644 Grammars/Haskell/haskell_parser.grm delete mode 100644 Grammars/Haskell/haskell_parser.log delete mode 100644 Grammars/Haskell/haskell_parser.pgt delete mode 100644 Grammars/Haskell/haskell_parser.tmpl delete mode 100644 Grammars/Haskell/определение_функции.txt delete mode 100644 Parsers/BFParser/BFLang.resources delete mode 100644 Parsers/BFParser/BFParser.csproj delete mode 100644 Parsers/BFParser/BFParserTools.cs delete mode 100644 Parsers/BFParser/BF_lrparser.cs delete mode 100644 Parsers/BFParser/Parser.cs delete mode 100644 Parsers/BFParser/Properties/AssemblyInfo.cs delete mode 100644 Parsers/HaskellParser/Errors.cs delete mode 100644 Parsers/HaskellParser/HaskellLang.resources delete mode 100644 Parsers/HaskellParser/HaskellParser.csproj delete mode 100644 Parsers/HaskellParser/HaskellParserTools.cs delete mode 100644 Parsers/HaskellParser/Haskell_lrparser.cs delete mode 100644 Parsers/HaskellParser/Haskell_lrparser_rules.cs delete mode 100644 Parsers/HaskellParser/Parser.cs delete mode 100644 Parsers/HaskellParser/Properties/AssemblyInfo.cs delete mode 100644 Parsers/KuMirParser/Errors.cs delete mode 100644 Parsers/KuMirParser/KuMirLang.resources delete mode 100644 Parsers/KuMirParser/KuMirParser.csproj delete mode 100644 Parsers/KuMirParser/KuMirParserTools.cs delete mode 100644 Parsers/KuMirParser/KuMir_lrparser.cs delete mode 100644 Parsers/KuMirParser/KuMir_lrparser_rules.cs delete mode 100644 Parsers/KuMirParser/Parser.cs delete mode 100644 Parsers/KuMirParser/Properties/AssemblyInfo.cs delete mode 100644 Parsers/PL0Parser/Errors.cs delete mode 100644 Parsers/PL0Parser/PL0Lang.resources delete mode 100644 Parsers/PL0Parser/PL0Parser.csproj delete mode 100644 Parsers/PL0Parser/PL0ParserTools.cs delete mode 100644 Parsers/PL0Parser/PL0_lrparser.cs delete mode 100644 Parsers/PL0Parser/PL0_lrparser_rules.cs delete mode 100644 Parsers/PL0Parser/Parser.cs delete mode 100644 Parsers/PL0Parser/Properties/AssemblyInfo.cs delete mode 100644 Parsers/PascalABCParser/CodeFormatting/CommentBinder.cs delete mode 100644 Parsers/PascalABCParser/Errors.cs delete mode 100644 Parsers/PascalABCParser/Parser.cs delete mode 100644 Parsers/PascalABCParser/PascalABCLang.resources delete mode 100644 Parsers/PascalABCParser/PascalABCParser.csproj delete mode 100644 Parsers/PascalABCParser/PascalABCParserTools.cs delete mode 100644 Parsers/PascalABCParser/Preprocessor/Parser.cs delete mode 100644 Parsers/PascalABCParser/Preprocessor/PascalPreprocessorLang.resources delete mode 100644 Parsers/PascalABCParser/Preprocessor/PascalPreprocessor_lrparser.cs delete mode 100644 Parsers/PascalABCParser/Preprocessor/Preprocessor.cs delete mode 100644 Parsers/PascalABCParser/Preprocessor_2/Errors.cs delete mode 100644 Parsers/PascalABCParser/Preprocessor_2/PABCPreprocessor2Lang.resources delete mode 100644 Parsers/PascalABCParser/Preprocessor_2/PABCPreprocessor2_lrparser.cs delete mode 100644 Parsers/PascalABCParser/Preprocessor_2/Parser.cs delete mode 100644 Parsers/PascalABCParser/Preprocessor_2/Preprocessor2.cs delete mode 100644 Parsers/PascalABCParser/Properties/AssemblyInfo.cs delete mode 100644 Parsers/PascalABCParser/pascalabc_lrparser.cs delete mode 100644 Parsers/PascalABCParser/pascalabc_lrparser_rules.cs diff --git a/Grammars/Haskell/HaskellLang.resources b/Grammars/Haskell/HaskellLang.resources deleted file mode 100644 index c9c568365b1810cad47249a18a01590090aaab30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22093 zcmd6P3qVZi`+sf`5~30bQSOzDC>n%ZBFpZ&gd;`ls6oi3=AcwoNkWq3vb5H65DiKv zl`eFZHD$`tz0@=_P0jUO{?CM6``z8|{rCT3^v-8abI$v`m*@FBmsjC)aatE09i1rn zw|(V)zulXCCa>7+$KA8bbF<&C?^bN~@Y=j<;s_rdnK)yQOI(wk?hR?KrMr`{=N5}kluTIciNA#rU#$k)jjkH?Pj%d8Xx z!(O+=tIKwI;o>)W7e^lYDc79M3ovJoa$;C%BV`(N3-+lvUibovGZkO3jJb|y z4^?y8IH%iJ$v71hYcd*9iFlHn7Sa^Y#-z_MhU2;+jh+@LBu%+Z!c(+{#fuQQP(BGuwGPX* zMk5lGtPKP9q`~dm1j<%SdXO>2i!kZRdGGp|irq@5ufnsfuSjnn8!zTXG$S=VjcU0P zPAVNJGH1)7&7z~=sf>;$hpPm*6WVr8YMLjbjIgz@k0fdZ`vSKz%B5(8fDIoOz`zoG zl&puoiObo%;~)XQ#T>80q-qQJZU-mzEp+`gTuzZk67_<8Pn?G(DL54xmK=@H;Ms|I zb`VnYPOxt)PW!-3BSq$TC4AWqzRYk^o$jGzKlrjYd|3*ka+Ip^@5+v4^BRzvJzE%M z54d&%K2xza6t$RV#Xf@f6l+6*knN;qZ7`Ncnlr2oG4N#(Joyevw!-gUqiT$4Q*44J zCkN0Q`Yv?RS7h!FqO6ifaw$^`y-U>?-tkg%$lG|f3!WVbV<^O=DbPp+N~NG|)Ed=m zOqz$;s#(d$GR3s1?I?I&KQsdF=#6KWz_7zwY{06NqBZF|k?u1UmhT>mDN|gGNhzd8 z0Sl5rY791xOg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lW4iySpxo&3G(9IDw9=8^!_g{@fms@M4NK=}n! z(}5NU{g^us7=7K*N6xTz^_-h+u3>dtWquhLdF6^V&pIIZ)l+-t)C9B3Zn`14BTE@M z$K)~tseOyrf7l@|kQ@4}Zg^2{ZAK39dhhW+?AMRQG@S=?pqlVwneq6rqZRE`2pMU60Wt1Hoh+{-Tuk=*idn=GfPo5OoAE zIw9_%QgC0F6k#69{{QE7f&U7D3{E>&Nd)ijzVoi+CHK2~Ts%3xvL~pk^>CKp%PHf! z_tVjUrwtSD!WsOg&}o`_dygZ?sO35`5=tv`Bi9U>ali44+NOp>=Jd{$#`Gt1yE;v& zP!C-@M3ne%&*t1B^&b5J;-`+r-P`me0N{K*3cR69{(JY)^cOxm`WSsb88 zj8`oPco3=N+g&cgRJ6yH=ql-^p*~NfBv8^O88!vWNs%WO$S=gCqNa);B$2%;k3 z%X`y1_IwhO5T*7BFHudJRD>|5Ar1d4WA*3fU8P2bN_Xn#dmT`L!+&CHEot;F&mbq@ z*-QHt_I}4t?)~oAwMmpVS80vL9a@1yz-M4_i?--+!H@oGj?K`Q+@drivm8<=?%-5h zJdq&f;_K&qMRuq5X5&xPv)^QoRhN=NMb|g?t}A_RT^|dpdE6J}I6{Va@7}H`(C9C# SBv;PpNSv=c2{h@V^Zx)sj#zmB diff --git a/Grammars/Haskell/Haskell_lrparser_rules.cs b/Grammars/Haskell/Haskell_lrparser_rules.cs deleted file mode 100644 index 7318136e0..000000000 --- a/Grammars/Haskell/Haskell_lrparser_rules.cs +++ /dev/null @@ -1,1898 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.HaskellParser.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.HaskellParser -{ -public partial class GPBParser_Haskell : GPBParser -{ - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//SymbolConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum SymbolConstants : int -{ - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTEND = 3, // (Comment End) - SYMBOL_COMMENTLINE = 4, // (Comment Line) - SYMBOL_COMMENTSTART = 5, // (Comment Start) - SYMBOL_TKAND = 6, // 'tkAnd' - SYMBOL_TKARROW = 7, // 'tkArrow' - SYMBOL_TKARROWGEN = 8, // 'tkArrowGen' - SYMBOL_TKASSIGN = 9, // 'tkAssign' - SYMBOL_TKBOOL = 10, // 'tkBool' - SYMBOL_TKBOTTOMMINUS = 11, // 'tkBottomMinus' - SYMBOL_TKCASE = 12, // 'tkCase' - SYMBOL_TKCHAR = 13, // 'tkChar' - SYMBOL_TKCOLON = 14, // 'tkColon' - SYMBOL_TKCOMMA = 15, // 'tkComma' - SYMBOL_TKDO = 16, // 'tkDo' - SYMBOL_TKDOT = 17, // 'tkDot' - SYMBOL_TKDOUBLE = 18, // 'tkDouble' - SYMBOL_TKELSE = 19, // 'tkElse' - SYMBOL_TKEQUAL = 20, // 'tkEqual' - SYMBOL_TKFIGURECLOSE = 21, // 'tkFigureClose' - SYMBOL_TKFIGUREOPEN = 22, // 'tkFigureOpen' - SYMBOL_TKIDENT = 23, // 'tkIdent' - SYMBOL_TKIF = 24, // 'tkIf' - SYMBOL_TKIMPORT = 25, // 'tkImport' - SYMBOL_TKIN = 26, // 'tkIn' - SYMBOL_TKINT = 27, // 'tkInt' - SYMBOL_TKLEFTSLASH = 28, // 'tkLeftSlash' - SYMBOL_TKLESS = 29, // 'tkLess' - SYMBOL_TKLESSEQ = 30, // 'tkLessEq' - SYMBOL_TKLET = 31, // 'tkLet' - SYMBOL_TKMAINIDENT = 32, // 'tkMainIdent' - SYMBOL_TKMAINIDENT1 = 33, // 'tkMainIdent1' - SYMBOL_TKMINUS = 34, // 'tkMinus' - SYMBOL_TKMODULE = 35, // 'tkModule' - SYMBOL_TKMORE = 36, // 'tkMore' - SYMBOL_TKMOREEQ = 37, // 'tkMoreEq' - SYMBOL_TKNOT = 38, // 'tkNot' - SYMBOL_TKNOTEQUAL = 39, // 'tkNotEqual' - SYMBOL_TKOF = 40, // 'tkOf' - SYMBOL_TKOR = 41, // 'tkOr' - SYMBOL_TKOTHERWISE = 42, // 'tkOtherwise' - SYMBOL_TKPLUS = 43, // 'tkPlus' - SYMBOL_TKQUOTE = 44, // 'tkQuote' - SYMBOL_TKREF = 45, // 'tkRef' - SYMBOL_TKRETURN = 46, // 'tkReturn' - SYMBOL_TKROUNDCLOSE = 47, // 'tkRoundClose' - SYMBOL_TKROUNDOPEN = 48, // 'tkRoundOpen' - SYMBOL_TKSEMICOLON = 49, // 'tkSemiColon' - SYMBOL_TKSLASH = 50, // 'tkSlash' - SYMBOL_TKSPLIT = 51, // 'tkSplit' - SYMBOL_TKSQUARECLOSE = 52, // 'tkSquareClose' - SYMBOL_TKSQUAREOPEN = 53, // 'tkSquareOpen' - SYMBOL_TKSTAR = 54, // 'tkStar' - SYMBOL_TKSTRING = 55, // 'tkString' - SYMBOL_TKTHEN = 56, // 'tkThen' - SYMBOL_TKWHERE = 57, // 'tkWhere' - SYMBOL_ADD_EXPR = 58, // - SYMBOL_ADDOP = 59, // - SYMBOL_BODY = 60, // - SYMBOL_BODY_FUNC = 61, // - SYMBOL_BODY_WHERE = 62, // - SYMBOL_CASE_VARIANT = 63, // - SYMBOL_CASE_VARIANTS = 64, // - SYMBOL_CONDITION = 65, // - SYMBOL_CONDITIONS = 66, // - SYMBOL_CONDITIONS_COMMA = 67, // - SYMBOL_CORTEG = 68, // - SYMBOL_DEF_VAR = 69, // - SYMBOL_DEF_VARS = 70, // - SYMBOL_EMPTY = 71, // - SYMBOL_EXPR = 72, // - SYMBOL_FUNC_CALL = 73, // - SYMBOL_FUNCS = 74, // - SYMBOL_FUNCS_VARIANTS = 75, // - SYMBOL_GENERATOR = 76, // - SYMBOL_GENERATORS = 77, // - SYMBOL_GUARD = 78, // - SYMBOL_GUARD_BODY = 79, // - SYMBOL_GUARD_BODY_LIST = 80, // - SYMBOL_IMPORT = 81, // - SYMBOL_IMPORTS = 82, // - SYMBOL_INFIX_EXPR = 83, // - SYMBOL_INIT = 84, // - SYMBOL_INITS = 85, // - SYMBOL_LAMBDA_FUNC = 86, // - SYMBOL_LIST = 87, // - SYMBOL_LIST_CONSTRUCTOR = 88, // - SYMBOL_LIST_ELEMENTS = 89, // - SYMBOL_LIST_PARAM = 90, // - SYMBOL_LIST_PARAM1 = 91, // - SYMBOL_MAIN_FUNC = 92, // - SYMBOL_MODULE = 93, // - SYMBOL_MULT_EXPR = 94, // - SYMBOL_MULTOP = 95, // - SYMBOL_NEGATE_EXPR = 96, // - SYMBOL_PARAM = 97, // - SYMBOL_PARAM_VALUE = 98, // - SYMBOL_PARAMS = 99, // - SYMBOL_PARAMS_VALUE = 100, // - SYMBOL_PARAMS_WHERE = 101, // - SYMBOL_PARAMS1 = 102, // - SYMBOL_REFERENCE = 103, // - SYMBOL_SIMPLE_EXPR = 104, // - SYMBOL_SIMPLE_TYPE_EXPR = 105, // - SYMBOL_STMT = 106, // - SYMBOL_STMTS = 107, // - SYMBOL_STMTS1 = 108, // - SYMBOL_VARIABLE = 109, // - SYMBOL_VARIABLE_EXPR = 110, // - SYMBOL_VARIANT = 111, // - SYMBOL_VARIANTS = 112, // - SYMBOL_WHERE_VAR = 113 // -}; - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//RuleConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum RuleConstants : int -{ - RULE_MODULE_TKMODULE_TKMAINIDENT_TKWHERE = 0, // ::= 'tkModule' 'tkMainIdent' 'tkWhere' - RULE_MODULE = 1, // ::= - RULE_MODULE_TKMODULE_TKIDENT_TKWHERE = 2, // ::= 'tkModule' 'tkIdent' 'tkWhere' - RULE_REFERENCE = 3, // ::= - RULE_REFERENCE_TKREF_TKSTRING = 4, // ::= 'tkRef' 'tkString' - RULE_IMPORTS = 5, // ::= - RULE_IMPORTS2 = 6, // ::= - RULE_IMPORTS3 = 7, // ::= - RULE_IMPORT_TKIMPORT_TKIDENT = 8, // ::= 'tkImport' 'tkIdent' - RULE_BODY = 9, // ::= - RULE_BODY2 = 10, // ::= - RULE_FUNCS = 11, // ::= - RULE_FUNCS_VARIANTS = 12, // ::= - RULE_VARIANTS = 13, // ::= - RULE_VARIANTS2 = 14, // ::= - RULE_VARIANT_TKIDENT = 15, // ::= 'tkIdent' - RULE_VARIANT_TKQUOTE_TKIDENT_TKQUOTE = 16, // ::= 'tkQuote' 'tkIdent' 'tkQuote' - RULE_LIST_PARAM1 = 17, // ::= - RULE_BODY_WHERE = 18, // ::= - RULE_WHERE_VAR = 19, // ::= - RULE_WHERE_VAR_TKWHERE = 20, // ::= 'tkWhere' - RULE_INITS = 21, // ::= - RULE_INITS_TKSEMICOLON = 22, // ::= 'tkSemiColon' - RULE_INIT_TKIDENT = 23, // ::= 'tkIdent' - RULE_PARAMS_WHERE = 24, // ::= - RULE_PARAMS_WHERE2 = 25, // ::= - RULE_PARAMS_WHERE3 = 26, // ::= - RULE_PARAMS = 27, // ::= - RULE_PARAMS2 = 28, // ::= - RULE_PARAMS3 = 29, // ::= - RULE_PARAM = 30, // ::= - RULE_LIST_PARAM_TKIDENT = 31, // ::= 'tkIdent' - RULE_LIST_PARAM = 32, // ::= - RULE_LIST_PARAM_TKSQUAREOPEN_TKSQUARECLOSE = 33, // ::= 'tkSquareOpen' 'tkSquareClose' - RULE_LIST_PARAM_TKBOTTOMMINUS = 34, // ::= 'tkBottomMinus' - RULE_LIST_PARAM_TKIDENT_TKCOLON = 35, // ::= 'tkIdent' 'tkColon' - RULE_LIST_PARAM_TKBOTTOMMINUS_TKCOLON = 36, // ::= 'tkBottomMinus' 'tkColon' - RULE_LIST_PARAM_TKROUNDOPEN_TKROUNDCLOSE = 37, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_GUARD = 38, // ::= - RULE_GUARD_TKSPLIT = 39, // ::= 'tkSplit' - RULE_GUARD_TKSPLIT_TKOTHERWISE = 40, // ::= 'tkSplit' 'tkOtherwise' - RULE_MAIN_FUNC_TKMAINIDENT1_TKASSIGN = 41, // ::= 'tkMainIdent1' 'tkAssign' - RULE_BODY_FUNC = 42, // ::= - RULE_STMTS = 43, // ::= - RULE_STMTS_TKSEMICOLON = 44, // ::= 'tkSemiColon' - RULE_STMTS1 = 45, // ::= - RULE_STMTS12 = 46, // ::= - RULE_EXPR_TKEQUAL = 47, // ::= 'tkEqual' - RULE_EXPR_TKNOTEQUAL = 48, // ::= 'tkNotEqual' - RULE_EXPR_TKMORE = 49, // ::= 'tkMore' - RULE_EXPR_TKLESS = 50, // ::= 'tkLess' - RULE_EXPR_TKMOREEQ = 51, // ::= 'tkMoreEq' - RULE_EXPR_TKLESSEQ = 52, // ::= 'tkLessEq' - RULE_EXPR = 53, // ::= - RULE_LIST_TKSQUAREOPEN_TKSQUARECLOSE = 54, // ::= 'tkSquareOpen' 'tkSquareClose' - RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE = 55, // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE2 = 56, // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - RULE_LIST = 57, // ::= - RULE_LIST_TKCOLON = 58, // ::= 'tkColon' - RULE_LIST_CONSTRUCTOR_TKSQUAREOPEN_TKSPLIT_TKSQUARECLOSE = 59, // ::= 'tkSquareOpen' 'tkSplit' 'tkSquareClose' - RULE_GENERATORS = 60, // ::= - RULE_GENERATORS_TKCOMMA = 61, // ::= 'tkComma' - RULE_GENERATOR_TKARROWGEN = 62, // ::= 'tkArrowGen' - RULE_CONDITIONS_COMMA = 63, // ::= - RULE_CONDITIONS_COMMA_TKCOMMA = 64, // ::= 'tkComma' - RULE_CONDITIONS = 65, // ::= - RULE_CONDITIONS_TKCOMMA = 66, // ::= 'tkComma' - RULE_CONDITION = 67, // ::= - RULE_CORTEG_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE = 68, // ::= 'tkRoundOpen' 'tkComma' 'tkRoundClose' - RULE_LIST_ELEMENTS = 69, // ::= - RULE_LIST_ELEMENTS2 = 70, // ::= - RULE_LIST_ELEMENTS_TKCOMMA = 71, // ::= 'tkComma' - RULE_ADD_EXPR_TKAND = 72, // ::= 'tkAnd' - RULE_ADD_EXPR = 73, // ::= - RULE_ADD_EXPR2 = 74, // ::= - RULE_MULT_EXPR_TKOR = 75, // ::= 'tkOr' - RULE_MULT_EXPR = 76, // ::= - RULE_MULT_EXPR2 = 77, // ::= - RULE_NEGATE_EXPR_TKMINUS = 78, // ::= 'tkMinus' - RULE_NEGATE_EXPR_TKNOT = 79, // ::= 'tkNot' - RULE_NEGATE_EXPR = 80, // ::= - RULE_SIMPLE_EXPR = 81, // ::= - RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE = 82, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_SIMPLE_EXPR2 = 83, // ::= - RULE_SIMPLE_EXPR3 = 84, // ::= - RULE_SIMPLE_EXPR_TKLET_TKIN = 85, // ::= 'tkLet' 'tkIn' - RULE_SIMPLE_EXPR4 = 86, // ::= - RULE_SIMPLE_EXPR5 = 87, // ::= - RULE_SIMPLE_EXPR6 = 88, // ::= - RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDCLOSE = 89, // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkRoundClose' 'tkRoundClose' - RULE_SIMPLE_TYPE_EXPR_TKINT = 90, // ::= 'tkInt' - RULE_SIMPLE_TYPE_EXPR_TKDOUBLE = 91, // ::= 'tkDouble' - RULE_SIMPLE_TYPE_EXPR_TKBOOL = 92, // ::= 'tkBool' - RULE_SIMPLE_TYPE_EXPR_TKCHAR = 93, // ::= 'tkChar' - RULE_SIMPLE_TYPE_EXPR_TKSTRING = 94, // ::= 'tkString' - RULE_VARIABLE_EXPR = 95, // ::= - RULE_DEF_VARS = 96, // ::= - RULE_DEF_VARS_TKSEMICOLON = 97, // ::= 'tkSemiColon' - RULE_DEF_VAR_TKIDENT = 98, // ::= 'tkIdent' - RULE_GUARD_BODY_LIST = 99, // ::= - RULE_GUARD_BODY_LIST2 = 100, // ::= - RULE_GUARD_BODY_TKASSIGN = 101, // ::= 'tkAssign' - RULE_VARIABLE_TKIDENT = 102, // ::= 'tkIdent' - RULE_VARIABLE_TKROUNDOPEN_TKIDENT_TKROUNDCLOSE = 103, // ::= 'tkRoundOpen' 'tkIdent' 'tkRoundClose' - RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE = 104, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE = 105, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE = 106, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE2 = 107, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDCLOSE = 108, // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundClose' - RULE_MULTOP_TKSTAR = 109, // ::= 'tkStar' - RULE_MULTOP_TKSLASH = 110, // ::= 'tkSlash' - RULE_ADDOP_TKPLUS = 111, // ::= 'tkPlus' - RULE_ADDOP_TKMINUS = 112, // ::= 'tkMinus' - RULE_STMT_TKIDENT_TKARROWGEN_TKIDENT = 113, // ::= 'tkIdent' 'tkArrowGen' 'tkIdent' - RULE_STMT_TKIF_TKTHEN_TKELSE = 114, // ::= 'tkIf' 'tkThen' 'tkElse' - RULE_STMT_TKCASE_TKROUNDOPEN_TKROUNDCLOSE_TKOF = 115, // ::= 'tkCase' 'tkRoundOpen' 'tkRoundClose' 'tkOf' - RULE_STMT_TKDO_TKFIGUREOPEN_TKSEMICOLON_TKFIGURECLOSE = 116, // ::= 'tkDo' 'tkFigureOpen' 'tkSemiColon' 'tkFigureClose' - RULE_STMT_TKDO = 117, // ::= 'tkDo' - RULE_STMT_TKRETURN = 118, // ::= 'tkReturn' - RULE_STMT = 119, // ::= - RULE_CASE_VARIANTS = 120, // ::= - RULE_CASE_VARIANTS_TKSPLIT = 121, // ::= 'tkSplit' - RULE_CASE_VARIANT_TKROUNDOPEN_TKROUNDCLOSE_TKARROW = 122, // ::= 'tkRoundOpen' 'tkRoundClose' 'tkArrow' - RULE_PARAMS1 = 123, // ::= - RULE_PARAMS1_TKCOMMA = 124, // ::= 'tkComma' - RULE_FUNC_CALL = 125, // ::= - RULE_PARAMS_VALUE = 126, // ::= - RULE_PARAMS_VALUE2 = 127, // ::= - RULE_PARAM_VALUE = 128, // ::= - RULE_LAMBDA_FUNC_TKLEFTSLASH_TKARROW = 129, // ::= 'tkLeftSlash' 'tkArrow' - RULE_EMPTY = 130 // ::= -}; - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -private Object CreateTerminalObject(int TokenSymbolIndex) -{ -switch (TokenSymbolIndex) -{ - case (int)SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - //TERMINAL:Whitespace - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMMENTEND : - //(Comment End) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment End' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTLINE : - //(Comment Line) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Line' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTSTART : - //(Comment Start) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Start' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKAND : - //'tkAnd' - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalAND); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKARROW : - //'tkArrow' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKARROWGEN : - //'tkArrowGen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKASSIGN : - //'tkAssign' -{ - if (token_where == 2 || token_where == 1) - { - token_where = 0; - //if (let_where_funcs_main.Count > 1) - //for (int i = 0; i let_where_funcs.Count; i++) - //if (let_funcs.Count > 0) - //let_funcs.RemoveAt(let_funcs.Count - 1); - let_where_funcs_main.Add(let_where_funcs.Clone()); - let_where_funcs.Clear(); - } - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - case (int)SymbolConstants.SYMBOL_TKBOOL : - //'tkBool' -{ - ident _ident = null; - string s = LRParser.TokenText; - if (s == "True" || s == "true") - s = "true"; - else - s = "false"; - _ident =new ident(s); - _ident.source_context = parsertools.GetTokenSourceContext(); - return _ident; - } - case (int)SymbolConstants.SYMBOL_TKBOTTOMMINUS : - //'tkBottomMinus' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCASE : - //'tkCase' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCHAR : - //'tkChar' -return parsertools.create_char_const(this); - case (int)SymbolConstants.SYMBOL_TKCOLON : - //'tkColon' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCOMMA : - //'tkComma' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDO : - //'tkDo' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDOT : - //'tkDot' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDOUBLE : - //'tkDouble' -return parsertools.create_double_const(this); - case (int)SymbolConstants.SYMBOL_TKELSE : - //'tkElse' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEQUAL : - //'tkEqual' - - { - op_type_node _op_type_node=new op_type_node(Operators.Equal); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKFIGURECLOSE : - //'tkFigureClose' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKFIGUREOPEN : - //'tkFigureOpen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKIDENT : - //'tkIdent' -return parsertools.create_ident(this); - case (int)SymbolConstants.SYMBOL_TKIF : - //'tkIf' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKIMPORT : - //'tkImport' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKIN : - //'tkIn' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKINT : - //'tkInt' -return parsertools.create_int_const(this); - case (int)SymbolConstants.SYMBOL_TKLEFTSLASH : - //'tkLeftSlash' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKLESS : - //'tkLess' - - { - op_type_node _op_type_node=new op_type_node(Operators.Less); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKLESSEQ : - //'tkLessEq' - - { - op_type_node _op_type_node=new op_type_node(Operators.LessEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKLET : - //'tkLet' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMAINIDENT : - //'tkMainIdent' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMAINIDENT1 : - //'tkMainIdent1' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMINUS : - //'tkMinus' - - { - op_type_node _op_type_node=new op_type_node(Operators.Minus); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMODULE : - //'tkModule' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMORE : - //'tkMore' - - { - op_type_node _op_type_node=new op_type_node(Operators.Greater); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMOREEQ : - //'tkMoreEq' - - { - op_type_node _op_type_node=new op_type_node(Operators.GreaterEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNOT : - //'tkNot' - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalNOT); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNOTEQUAL : - //'tkNotEqual' - - { - op_type_node _op_type_node=new op_type_node(Operators.NotEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKOF : - //'tkOf' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKOR : - //'tkOr' - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalOR); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKOTHERWISE : - //'tkOtherwise' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKPLUS : - //'tkPlus' - - { - op_type_node _op_type_node=new op_type_node(Operators.Plus); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKQUOTE : - //'tkQuote' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKREF : - //'tkRef' -return parsertools.create_directive_name(this); - case (int)SymbolConstants.SYMBOL_TKRETURN : - //'tkReturn' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKROUNDCLOSE : - //'tkRoundClose' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKROUNDOPEN : - //'tkRoundOpen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSEMICOLON : - //'tkSemiColon' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSLASH : - //'tkSlash' - - { - op_type_node _op_type_node=new op_type_node(Operators.IntegerDivision); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSPLIT : - //'tkSplit' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSQUARECLOSE : - //'tkSquareClose' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSQUAREOPEN : - //'tkSquareOpen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSTAR : - //'tkStar' - - { - op_type_node _op_type_node=new op_type_node(Operators.Multiplication); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSTRING : - //'tkString' -return parsertools.create_string_const(this); - case (int)SymbolConstants.SYMBOL_TKTHEN : - //'tkThen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKWHERE : - //'tkWhere' -{ - token_where = 1; - token_where_count++; - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - case (int)SymbolConstants.SYMBOL_ADD_EXPR : - // - //TERMINAL:add_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ADDOP : - // - //TERMINAL:addop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY : - // - //TERMINAL:body - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY_FUNC : - // - //TERMINAL:body_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY_WHERE : - // - //TERMINAL:body_where - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_VARIANT : - // - //TERMINAL:case_variant - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_VARIANTS : - // - //TERMINAL:case_variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITION : - // - //TERMINAL:condition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITIONS : - // - //TERMINAL:conditions - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITIONS_COMMA : - // - //TERMINAL:conditions_comma - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CORTEG : - // - //TERMINAL:corteg - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DEF_VAR : - // - //TERMINAL:def_var - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DEF_VARS : - // - //TERMINAL:def_vars - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EMPTY : - // - //TERMINAL:empty - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR : - // - //TERMINAL:expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_CALL : - // - //TERMINAL:func_call - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNCS : - // - //TERMINAL:funcs - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNCS_VARIANTS : - // - //TERMINAL:funcs_variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GENERATOR : - // - //TERMINAL:generator - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GENERATORS : - // - //TERMINAL:generators - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD : - // - //TERMINAL:guard - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD_BODY : - // - //TERMINAL:guard_body - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD_BODY_LIST : - // - //TERMINAL:guard_body_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPORT : - // - //TERMINAL:import - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPORTS : - // - //TERMINAL:imports - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INFIX_EXPR : - // - //TERMINAL:infix_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INIT : - // - //TERMINAL:init - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INITS : - // - //TERMINAL:inits - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LAMBDA_FUNC : - // - //TERMINAL:lambda_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST : - // - //TERMINAL:list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_CONSTRUCTOR : - // - //TERMINAL:list_constructor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_ELEMENTS : - // - //TERMINAL:list_elements - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_PARAM : - // - //TERMINAL:list_param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_PARAM1 : - // - //TERMINAL:list_param1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MAIN_FUNC : - // - //TERMINAL:main_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MODULE : - // - //TERMINAL:module - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULT_EXPR : - // - //TERMINAL:mult_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULTOP : - // - //TERMINAL:multop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NEGATE_EXPR : - // - //TERMINAL:negate_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM : - // - //TERMINAL:param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM_VALUE : - // - //TERMINAL:param_value - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS : - // - //TERMINAL:params - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS_VALUE : - // - //TERMINAL:params_value - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS_WHERE : - // - //TERMINAL:params_where - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS1 : - // - //TERMINAL:params1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_REFERENCE : - // - //TERMINAL:reference - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_EXPR : - // - //TERMINAL:simple_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE_EXPR : - // - //TERMINAL:simple_type_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMT : - // - //TERMINAL:stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMTS : - // - //TERMINAL:stmts - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMTS1 : - // - //TERMINAL:stmts1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLE : - // - //TERMINAL:variable - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLE_EXPR : - // - //TERMINAL:variable_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT : - // - //TERMINAL:variant - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANTS : - // - //TERMINAL:variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHERE_VAR : - // - //TERMINAL:where_var - return null; - //ENDTERMINAL -} -throw new SymbolException("Unknown symbol"); -} - - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateNonTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -public ArrayList param_value_list = new ArrayList(); -public ArrayList body_variant_list = new ArrayList(); -public ArrayList param_value_list_main = new ArrayList(); -public ArrayList body_variant_list_main = new ArrayList(); -public ArrayList guard_list = new ArrayList(); -public ArrayList guard_list_main = new ArrayList(); -public ArrayList where_list_var = new ArrayList(); -public ArrayList where_list_assign = new ArrayList(); -public ArrayList where_list_var_main = new ArrayList(); -public ArrayList where_list_assign_main = new ArrayList(); -public ArrayList func_name = new ArrayList(); -public ArrayList where_list_counts=new ArrayList(); -public ArrayList where_list_counts_main = new ArrayList(); -public int decls_counts = 0; -public bool where_flag = false; -public ArrayList list_param = new ArrayList(); -public ArrayList list_params = new ArrayList(); -public ArrayList list_params_temp = new ArrayList(); -public ArrayList list_params_main = new ArrayList(); -public ArrayList _function_lambda_definitions = new ArrayList(); -public ArrayList _function_lambda_definitions_after = new ArrayList(); -public int lambda_num = 0; -public ArrayList _functions = new ArrayList(); -public ArrayList list_method_calls = new ArrayList(); -public ArrayList list_method_calls_main = new ArrayList(); -public ArrayList list_return_funcs = new ArrayList(); -public ArrayList list_return_funcs_main = new ArrayList(); -public ArrayList list_params1 = new ArrayList(); -public ArrayList last_function_lambda_definitions = new ArrayList(); -public ArrayList last_list_method_calls = new ArrayList(); -public ArrayList last_list_method_calls_lambda = new ArrayList(); -public ArrayList let_fact_params = new ArrayList(); -public ArrayList let_funcs = new ArrayList(); -public ArrayList let_funcs_funcs = new ArrayList(); -public ArrayList let_func_last = new ArrayList(); -public ArrayList let_funcs1 = new ArrayList(); -public ArrayList let_flag = new ArrayList(); -public struct types_param_lampda -{ - public string name; - public ArrayList types; -} -public ArrayList list_method_calls_lambda = new ArrayList(); - -public Object CreateNonTerminalObject(int ReductionRuleIndex) -{ -switch (ReductionRuleIndex) -{ - case (int)RuleConstants.RULE_MODULE_TKMODULE_TKMAINIDENT_TKWHERE : - // ::= 'tkModule' 'tkMainIdent' 'tkWhere' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkModule tkMainIdent tkWhere "));}return null; - case (int)RuleConstants.RULE_MODULE : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_MODULE_TKMODULE_TKIDENT_TKWHERE : - // ::= 'tkModule' 'tkIdent' 'tkWhere' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkModule tkIdent tkWhere "));}return null; - case (int)RuleConstants.RULE_REFERENCE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_REFERENCE_TKREF_TKSTRING : - // ::= 'tkRef' 'tkString' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRef tkString"));}return null; - case (int)RuleConstants.RULE_IMPORTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_IMPORTS2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_IMPORTS3 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_IMPORT_TKIMPORT_TKIDENT : - // ::= 'tkImport' 'tkIdent' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkImport tkIdent"));}return null; - case (int)RuleConstants.RULE_BODY : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_BODY2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_FUNCS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_FUNCS_VARIANTS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_VARIANTS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_VARIANTS2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_VARIANT_TKIDENT : - // ::= 'tkIdent' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIdent "));}return null; - case (int)RuleConstants.RULE_VARIANT_TKQUOTE_TKIDENT_TKQUOTE : - // ::= 'tkQuote' 'tkIdent' 'tkQuote' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkQuote tkIdent tkQuote "));}return null; - case (int)RuleConstants.RULE_LIST_PARAM1 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_BODY_WHERE : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_WHERE_VAR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_WHERE_VAR_TKWHERE : - // ::= 'tkWhere' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkWhere "));}return null; - case (int)RuleConstants.RULE_INITS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_INITS_TKSEMICOLON : - // ::= 'tkSemiColon' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSemiColon "));}return null; - case (int)RuleConstants.RULE_INIT_TKIDENT : - // ::= 'tkIdent' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIdent "));}return null; - case (int)RuleConstants.RULE_PARAMS_WHERE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS_WHERE2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAMS_WHERE3 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAMS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAMS3 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_PARAM_TKIDENT : - // ::= 'tkIdent' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIdent "));}return null; - case (int)RuleConstants.RULE_LIST_PARAM : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_LIST_PARAM_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkSquareClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSquareOpen tkSquareClose"));}return null; - case (int)RuleConstants.RULE_LIST_PARAM_TKBOTTOMMINUS : - // ::= 'tkBottomMinus' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_PARAM_TKIDENT_TKCOLON : - // ::= 'tkIdent' 'tkColon' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIdent tkColon "));}return null; - case (int)RuleConstants.RULE_LIST_PARAM_TKBOTTOMMINUS_TKCOLON : - // ::= 'tkBottomMinus' 'tkColon' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkBottomMinus tkColon "));}return null; - case (int)RuleConstants.RULE_LIST_PARAM_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundClose"));}return null; - case (int)RuleConstants.RULE_GUARD : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD_TKSPLIT : - // ::= 'tkSplit' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSplit "));}return null; - case (int)RuleConstants.RULE_GUARD_TKSPLIT_TKOTHERWISE : - // ::= 'tkSplit' 'tkOtherwise' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSplit tkOtherwise"));}return null; - case (int)RuleConstants.RULE_MAIN_FUNC_TKMAINIDENT1_TKASSIGN : - // ::= 'tkMainIdent1' 'tkAssign' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkMainIdent1 tkAssign "));}return null; - case (int)RuleConstants.RULE_BODY_FUNC : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_STMTS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_STMTS_TKSEMICOLON : - // ::= 'tkSemiColon' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSemiColon "));}return null; - case (int)RuleConstants.RULE_STMTS1 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_STMTS12 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_EXPR_TKEQUAL : - // ::= 'tkEqual' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkEqual "));}return null; - case (int)RuleConstants.RULE_EXPR_TKNOTEQUAL : - // ::= 'tkNotEqual' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkNotEqual "));}return null; - case (int)RuleConstants.RULE_EXPR_TKMORE : - // ::= 'tkMore' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkMore "));}return null; - case (int)RuleConstants.RULE_EXPR_TKLESS : - // ::= 'tkLess' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkLess "));}return null; - case (int)RuleConstants.RULE_EXPR_TKMOREEQ : - // ::= 'tkMoreEq' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkMoreEq "));}return null; - case (int)RuleConstants.RULE_EXPR_TKLESSEQ : - // ::= 'tkLessEq' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkLessEq "));}return null; - case (int)RuleConstants.RULE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkSquareClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSquareOpen tkSquareClose"));}return null; - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSquareOpen tkDot tkDot tkSquareClose"));}return null; - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE2 : - // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSquareOpen tkDot tkDot tkSquareClose"));}return null; - case (int)RuleConstants.RULE_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_TKCOLON : - // ::= 'tkColon' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkColon "));}return null; - case (int)RuleConstants.RULE_LIST_CONSTRUCTOR_TKSQUAREOPEN_TKSPLIT_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkSplit' 'tkSquareClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSquareOpen tkSplit tkSquareClose"));}return null; - case (int)RuleConstants.RULE_GENERATORS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_GENERATORS_TKCOMMA : - // ::= 'tkComma' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkComma "));}return null; - case (int)RuleConstants.RULE_GENERATOR_TKARROWGEN : - // ::= 'tkArrowGen' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkArrowGen "));}return null; - case (int)RuleConstants.RULE_CONDITIONS_COMMA : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONDITIONS_COMMA_TKCOMMA : - // ::= 'tkComma' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkComma "));}return null; - case (int)RuleConstants.RULE_CONDITIONS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_CONDITIONS_TKCOMMA : - // ::= 'tkComma' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkComma "));}return null; - case (int)RuleConstants.RULE_CONDITION : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CORTEG_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkComma' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkComma tkRoundClose"));}return null; - case (int)RuleConstants.RULE_LIST_ELEMENTS : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_ELEMENTS2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_LIST_ELEMENTS_TKCOMMA : - // ::= 'tkComma' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkComma "));}return null; - case (int)RuleConstants.RULE_ADD_EXPR_TKAND : - // ::= 'tkAnd' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkAnd "));}return null; - case (int)RuleConstants.RULE_ADD_EXPR : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_ADD_EXPR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULT_EXPR_TKOR : - // ::= 'tkOr' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkOr "));}return null; - case (int)RuleConstants.RULE_MULT_EXPR : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_MULT_EXPR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NEGATE_EXPR_TKMINUS : - // ::= 'tkMinus' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkMinus "));}return null; - case (int)RuleConstants.RULE_NEGATE_EXPR_TKNOT : - // ::= 'tkNot' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkNot "));}return null; - case (int)RuleConstants.RULE_NEGATE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundClose"));}return null; - case (int)RuleConstants.RULE_SIMPLE_EXPR2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_SIMPLE_EXPR3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKLET_TKIN : - // ::= 'tkLet' 'tkIn' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkLet tkIn "));}return null; - case (int)RuleConstants.RULE_SIMPLE_EXPR4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR6 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkRoundClose' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundOpen tkRoundClose tkRoundClose"));}return null; - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKINT : - // ::= 'tkInt' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKDOUBLE : - // ::= 'tkDouble' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKBOOL : - // ::= 'tkBool' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKCHAR : - // ::= 'tkChar' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKSTRING : - // ::= 'tkString' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIABLE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_DEF_VARS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_DEF_VARS_TKSEMICOLON : - // ::= 'tkSemiColon' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSemiColon "));}return null; - case (int)RuleConstants.RULE_DEF_VAR_TKIDENT : - // ::= 'tkIdent' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIdent "));}return null; - case (int)RuleConstants.RULE_GUARD_BODY_LIST : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_GUARD_BODY_LIST2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_GUARD_BODY_TKASSIGN : - // ::= 'tkAssign' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkAssign "));}return null; - case (int)RuleConstants.RULE_VARIABLE_TKIDENT : - // ::= 'tkIdent' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKIDENT_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkIdent' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkIdent tkRoundClose"));}return null; - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundClose"));}return null; - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose"));}return null; - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose"));}return null; - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE2 : - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose"));}return null; - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose tkRoundClose"));}return null; - case (int)RuleConstants.RULE_MULTOP_TKSTAR : - // ::= 'tkStar' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULTOP_TKSLASH : - // ::= 'tkSlash' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKPLUS : - // ::= 'tkPlus' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKMINUS : - // ::= 'tkMinus' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_STMT_TKIDENT_TKARROWGEN_TKIDENT : - // ::= 'tkIdent' 'tkArrowGen' 'tkIdent' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIdent tkArrowGen tkIdent"));}return null; - case (int)RuleConstants.RULE_STMT_TKIF_TKTHEN_TKELSE : - // ::= 'tkIf' 'tkThen' 'tkElse' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIf tkThen tkElse "));}return null; - case (int)RuleConstants.RULE_STMT_TKCASE_TKROUNDOPEN_TKROUNDCLOSE_TKOF : - // ::= 'tkCase' 'tkRoundOpen' 'tkRoundClose' 'tkOf' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkCase tkRoundOpen tkRoundClose tkOf "));}return null; - case (int)RuleConstants.RULE_STMT_TKDO_TKFIGUREOPEN_TKSEMICOLON_TKFIGURECLOSE : - // ::= 'tkDo' 'tkFigureOpen' 'tkSemiColon' 'tkFigureClose' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkDo tkFigureOpen tkSemiColon tkFigureClose"));}return null; - case (int)RuleConstants.RULE_STMT_TKDO : - // ::= 'tkDo' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkDo "));}return null; - case (int)RuleConstants.RULE_STMT_TKRETURN : - // ::= 'tkReturn' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkReturn "));}return null; - case (int)RuleConstants.RULE_STMT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CASE_VARIANTS : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_CASE_VARIANTS_TKSPLIT : - // ::= 'tkSplit' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSplit "));}return null; - case (int)RuleConstants.RULE_CASE_VARIANT_TKROUNDOPEN_TKROUNDCLOSE_TKARROW : - // ::= 'tkRoundOpen' 'tkRoundClose' 'tkArrow' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundClose tkArrow "));}return null; - case (int)RuleConstants.RULE_PARAMS1 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAMS1_TKCOMMA : - // ::= 'tkComma' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkComma "));}return null; - case (int)RuleConstants.RULE_FUNC_CALL : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAMS_VALUE : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAMS_VALUE2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_PARAM_VALUE : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_LAMBDA_FUNC_TKLEFTSLASH_TKARROW : - // ::= 'tkLeftSlash' 'tkArrow' - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkLeftSlash tkArrow "));}return null; - case (int)RuleConstants.RULE_EMPTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL -} -throw new RuleException("Unknown rule"); -} - -public method_call _ob(object dt) - { - token_info _token_info = new token_info("."); - _token_info.source_context = parsertools.GetTokenSourceContext(); - /////////// - ident id = new ident("ob"); - dot_node _dot_node = new dot_node(null, (addressed_value)id); - parsertools.create_source_context(_dot_node, _token_info, id); - _dot_node.left = (addressed_value)dt; - parsertools.create_source_context(_dot_node, dt, _dot_node.right); - ///////////////////////// - expression_list el = new expression_list(); - el.expressions.Add(_dot_node); - method_call _method_call = new method_call(el); - parsertools.create_source_context(_method_call, null, null); - ///////////////////////// - ident id1 = new ident("boolean"); - ///////////////////////// - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)id1; - parsertools.create_source_context(_method_call, id1, _method_call); - } - return _method_call; - } -public procedure_definition lambda(function_lambda_definition _function_lambda_definition) -{ - SyntaxTree.procedure_definition _func_def = new PascalABCCompiler.SyntaxTree.procedure_definition(); - SyntaxTree.method_name _method_name1 = new SyntaxTree.method_name(null, new SyntaxTree.ident(_function_lambda_definition.lambda_name), null); - SyntaxTree.function_header _function_header1 = new SyntaxTree.function_header(); - - object rt1 = new object(); - _function_header1.name = _method_name1; - SyntaxTree.formal_parametres fps = new PascalABCCompiler.SyntaxTree.formal_parametres(); - _function_header1.parametres = _function_lambda_definition.formal_parametres;//fps; - SyntaxTree.named_type_reference _named_type_reference = new SyntaxTree.named_type_reference(); - SyntaxTree.ident idtype = new SyntaxTree.ident("datatype"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - - rt1 = _named_type_reference; - _function_header1.return_type = (SyntaxTree.type_definition)_named_type_reference; - - _function_header1.of_object = false; - _function_header1.class_keyword = false; - SyntaxTree.block _block1 = new SyntaxTree.block(null, null); - SyntaxTree.statement_list sl1 = new SyntaxTree.statement_list(); - sl1.subnodes.Add(_function_lambda_definition.proc_body); - _block1.program_code = sl1; - _func_def.proc_header = _function_header1; - _func_def.proc_body = (SyntaxTree.proc_block)_block1; - _function_lambda_definition.proc_definition = _func_def; - return _func_def; -} - -public procedure_definition find_function1(string name) -{ - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - return (procedure_definition)_functions[i]; - else - return null; -} - -public int find_count_params(string name) -{ - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parametres == null) - return 0; - else - return ((procedure_definition)_functions[i]).proc_header.parametres.params_list.Count; - } - else - return 0; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return 0; - else - return ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; - } - else - return 0; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return 0; - else - return ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; - } - } - else - return 0; - } -} -public int find_count_params_lambda(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parametres.params_list.Count; - else - return -1; -} - -public string find_name_params_lambda(string name, int ind) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - { - formal_parametres fp = ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parametres; - if (ind < fp.params_list.Count) - return fp.params_list[ind].idents.idents[0].name; - else - return ""; - } - else - return ""; -} - -public bool find_func_name(string name) -{ - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - return true; - else - return false; -} - -public function_lambda_definition find_func_lambda_name(string name) -{ - int i = 0; - while (i < _function_lambda_definitions.Count && ((function_lambda_definition)_function_lambda_definitions[i]).lambda_name != name) - i++; - if (i < _function_lambda_definitions.Count) - return (function_lambda_definition)_function_lambda_definitions[i]; - else - return null; -} - -public type_definition func_type(int count) -{ - //int count = mc.parametres.expressions.Count; - - formal_parametres _formal_parametres = new formal_parametres(); - for (int i = 0; i < count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = new ident("$a" + i.ToString()); - _ident_list.idents.Add(id); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - typed_parametres _typed_parametres = new typed_parametres(_ident_list, (type_definition)_named_type_reference1, parametr_kind.none, null); - _formal_parametres.params_list.Add(_typed_parametres); - } - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - function_header _function_header = new function_header(); - _function_header.parametres = _formal_parametres; - _function_header.return_type = (type_definition)_named_type_reference; - _function_header.of_object = false; - _function_header.class_keyword = false; - return (type_definition)_function_header; -} - -public var_statement var_st(string name, type_definition td) -{ - ident_list il = new ident_list(); - il.idents.Add(new ident(name)); - var_def_statement _var_def_statement = new var_def_statement(il, td, null, definition_attribute.None, false); - return new var_statement(_var_def_statement); -} - -public method_call find_method_call(string name, int k) -{ - int i = 0; - while (i < ((ArrayList)list_method_calls_main[k]).Count && - ((ident)((method_call)((ArrayList)list_method_calls_main[k])[i]).dereferencing_value).name != name) - i++; - if (i < ((ArrayList)list_method_calls_main[k]).Count) - return (method_call)((ArrayList)list_method_calls_main[k])[i]; - else - return null; -} - -public method_call find_method_call_lambda(string name) -{ - int i = 0; - while (i < list_method_calls_lambda.Count && - ((ident)((method_call)list_method_calls_lambda[i]).dereferencing_value).name != name) - i++; - if (i < list_method_calls_lambda.Count) - return (method_call)list_method_calls_lambda[i]; - else - return null; -} -public function_lambda_definition find_func_lambda_after(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && - ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return _function_lambda_definitions_after[i] as function_lambda_definition; - else - return null; -} -public ArrayList find_params(string name) -{ - ArrayList _params = new ArrayList(); - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parametres == null) - return _params; - else - { - for (int j = 0; j < ((procedure_definition)_functions[i]).proc_header.parametres.params_list.Count; j++) - _params.Add(((procedure_definition)_functions[i]).proc_header.parametres.params_list[j]); - return _params; - } - } - else - return _params; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)param_value_list[param_value_list.Count - 1]).expressions[j]); - return _params; - } - } - else - return _params; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions[j]); - return _params; - } - } - } - else - return _params; - } -} - - - -} -} diff --git a/Grammars/Haskell/bat.txt b/Grammars/Haskell/bat.txt deleted file mode 100644 index 1c18e5eed..000000000 --- a/Grammars/Haskell/bat.txt +++ /dev/null @@ -1,31 +0,0 @@ -cls -@echo off -echo [Haskell] GRM to CS,RES compiler. -echo. - -echo Delete old files... -del Haskell_lrparser_rules.cs -del haskell_parser.cgt -del HaskellLang.resources -del haskell_parser.tmpl -del haskell_parser.log - -echo Compile: GRM to CGT... -start /wait ..\..\Utils\gpbcmd\goldbuilder_main haskell_parser.grm haskell_parser.cgt -copy haskell_parser.log con -echo. - -echo Compile: CGT,PGT to TEMPLATE... -start /wait ..\..\Utils\gpbcmd\createskelprog_main haskell_parser.cgt haskell_parser.pgt haskell_parser.tmpl -echo. - -echo Compile: GRM,TEMPLATE to CS... -..\..\Utils\grmCommentCompiler\bin\Debug\grmCommentCompiler.exe haskell_parser.grm haskell_parser.tmpl Haskell_lrparser_rules.cs -echo. - -echo Compile: CGT to RES... -start /wait ..\..\Utils\ResXMaker\ResXMaker.exe haskell_parser.CGT HaskellLanguage HaskellLang.resources -echo. - -copy HaskellLang.resources ..\..\Parsers\HaskellParser\HaskellLang.resources -copy Haskell_lrparser_rules.cs ..\..\Parsers\HaskellParser\Haskell_lrparser_rules.cs \ No newline at end of file diff --git a/Grammars/Haskell/compile_ALL.bat b/Grammars/Haskell/compile_ALL.bat deleted file mode 100644 index 1c18e5eed..000000000 --- a/Grammars/Haskell/compile_ALL.bat +++ /dev/null @@ -1,31 +0,0 @@ -cls -@echo off -echo [Haskell] GRM to CS,RES compiler. -echo. - -echo Delete old files... -del Haskell_lrparser_rules.cs -del haskell_parser.cgt -del HaskellLang.resources -del haskell_parser.tmpl -del haskell_parser.log - -echo Compile: GRM to CGT... -start /wait ..\..\Utils\gpbcmd\goldbuilder_main haskell_parser.grm haskell_parser.cgt -copy haskell_parser.log con -echo. - -echo Compile: CGT,PGT to TEMPLATE... -start /wait ..\..\Utils\gpbcmd\createskelprog_main haskell_parser.cgt haskell_parser.pgt haskell_parser.tmpl -echo. - -echo Compile: GRM,TEMPLATE to CS... -..\..\Utils\grmCommentCompiler\bin\Debug\grmCommentCompiler.exe haskell_parser.grm haskell_parser.tmpl Haskell_lrparser_rules.cs -echo. - -echo Compile: CGT to RES... -start /wait ..\..\Utils\ResXMaker\ResXMaker.exe haskell_parser.CGT HaskellLanguage HaskellLang.resources -echo. - -copy HaskellLang.resources ..\..\Parsers\HaskellParser\HaskellLang.resources -copy Haskell_lrparser_rules.cs ..\..\Parsers\HaskellParser\Haskell_lrparser_rules.cs \ No newline at end of file diff --git a/Grammars/Haskell/haskell_parser.cgt b/Grammars/Haskell/haskell_parser.cgt deleted file mode 100644 index 8a67080586fd13c68025a071a4d2820f690e87b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 71805 zcmeI52i%@jeZNoemW_n1;viuYHVCp;UXllRA>;{!9TEs6NCszYi%ZatlP`|`FnfLI6k+zaNg*~GQD$IvtqQVj24&CtIFv0W%P`B z(@!aDMx#>l|KLUWJKnAAUiK(^mc4TGx8`Ci=9TfP{$QsvKC(Y}N*SNoA2elrY=7|7 zGUn;tVCOP^Nq?{lExWK>lxujg0?!7#nysTVVmZx{FDp!}4<(hJBxh@@i zd)j+PI`ZyvPx|8i^vVm%i^_}pTkcxMH}nU)mGPqfVD~bfeaiUy{$SrSKBhm|uZ$P=2m6=tas9yoWqd+^a9|mq z7{{DkPAR9B=atjS>E-$5jK2DyGCsRMczPM1(;qyejL+>4o>|5h_Xh`;@pOOiEd10p z>e*$yx<7bM8Q;<$JhzN*?GNJ2wf(_@GQO=pSXjpE`-4Nv7(?56hn4Y${^0O3zN<^A9OWH~Bh<(RUl z99xcy!%xV7dt@h`Sa<_M>oebi<)Db#x^YzU)G~d{KQ}gELo11TG-qL()^KH$yH{a2GXY*ancQV{9N<%&4-(hG{4Y%wE4y6mzrO0KGyt7^YP{r%_o~*ZGNr!_2xI4Pc^^U{8sbZ z&8M5sG{4jQZu5K1?>B$Y{9*G)%^x>^()?-jXU(5Cf6@G9^HKBHviT9ck@5Z|2F^Ee6i_9`LT0ntH(05 z9?Nj*!Z@zW2w%wuU&#kw$p=qfJ~)2+<%4aXT)S*=!uAVd?xeJ(8NLhR#2p>PraQ==60BdyK90J(<0J)%y*Y(!8a7RTnjF-7$n%r`_Xh#L{ z$ZnY&EnEkq`Y?-n9GkQvyu4UP(n@XbDlx+z%TSmLI<=M4cS@Xet*~GXvTNbOc zp}|hiXs7m!Y~@{)t2X5S)@ECSP0FeKWou~k)b^b0@Xb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nJyeKFBcwEvVfL*`<(O3fZNQV+68uAv+hcb0NnF+EIY!t58vJF4^G$>|4(V35BvKheel(Sd zGqi7)D2FYH7p77ZK$-y31dt|xGy$XuAWZ;i0?3#kO#o>ENE1Ms0MZ1ICV(^nqzNER z0BHh96F`~((gctufHVQ52_Q`XX#z+SK$-y31dt|xGy#;(&3J}10i+2aO#o>ENUb1E z0BHh96F`~((gY#ZWg{XFi>AZR|NBMVce07e+A6B0l3#$N>mB03in;1 zKFIEa9DtAm5OM%Qb}nS+LJmO4Zieh;$Zm%0X2<~u+2N1_5OM%QiU2tPAqODj0ECnX zasWaOK*#|YasUqNlM7Pm?Lz*Ke6uQf@(17rbx0hLSQb}eF|f1}OQdn7M}Mihsh+no z*WO&|n$Q-9oxiPQsu}H4GtYtDq?7#Adj3VZhn|P@Jf!C#JrC)5NY6uh9@6uWo`>{2 zq~{?$59xVG&qI11(({m>hx9z8=OH~0>3K-cLwX+4^N^m0^gN{JAw3W2c}UMgdLGjA zke-M1Jf!C#JrC)5NRvW(9@6uWo`>{2q~}9^2}8!+akfr_GEW_pXQV-)&Fu@ES#7xE z{-KCZrQusPczp+9Tjg~UF3p{(G*duk3dl?WnJFMM1!Sgx%oLEB0#Y@|OaYlGATtGI zrhv>8keLE9Q$S`4$V>s5DIhZiWTt@36p)z$GE+ci3dl?WnJFMM1!Sgx%oLEB0y0xT zW(vqm0huWvGX-R(fOIotrhv>8keLE9Q$S{lkOJZ*1$=QT6%bNDNC6=QgcJ}`Ku7^0 z1%wn3Qb0%nAq9jK5K=%$0U-s16cAECNC6=QgcJ}`Ku7^01%wn3Qb0%nAq9jK5K=%$ i0U-s16cAECNC6=QgcJ}`Ku7^01%wn3Qb0%nL;nw8&5U#a diff --git a/Grammars/Haskell/haskell_parser.grm b/Grammars/Haskell/haskell_parser.grm deleted file mode 100644 index d9005d2c9..000000000 --- a/Grammars/Haskell/haskell_parser.grm +++ /dev/null @@ -1,394 +0,0 @@ -!========================================================================= -! -! This is a version of programming language Haskell -! -!========================================================================= - - -"Name" = 'Haskell' -"Author" = 'Tasha' -"About" = 'A version of the Haskell language.' - -"Case Sensitive" = True -"Start Symbol" = - - - -!<%NAME%> %CODE% -!* -[TERMINALTEMPLATE] - { - %NAME% _%NAME%=new %NAME%(%PARAMS%); - _%NAME%.source_context=parsertools.GetTokenSourceContext(); - %CODE% - return _%NAME%; - } -*! - -!%NAME%<%PARAMS%> %CODE% -!%PARAMS%=$1,$2,... -!* -[NONTERMINALTEMPLATE0] - { - %NAME% _%NAME%=new %NAME%(%PARAMS%); - parsertools.create_source_context(_%NAME%,%LEFTTOKEN%,%RIGHTTOKEN%); - %CODE% - return _%NAME%; - } -*! - -!add to list -!* -[NONTERMINALTEMPLATE1] - { - %NAME% _%NAME%=(%NAME%)%CODE% - return _%NAME%; - } -*! - -!* -[NONTERMINALTEMPLATE2] - { - %NAME% _%NAME%; - %CODE% - return _%NAME%; - } -*! - - -!* -[NONTERMINALTEMPLATE3] - { - %NAME% _%NAME%=new %NAME%(%PARAMS%); - %CODE% - return _%NAME%; - } -*! - - -!for list: -! -! token -!* -[NONTERMINALTEMPLATE6] - //TemplateList for %NAME% (create) - { - %NAME% _%NAME%=new %NAME%(); - _%NAME%.source_context=((%CODE%)$1).source_context; - _%NAME%.%PARAMS%.Add((%CODE%)$1); - return _%NAME%; - } -*! -!* -[NONTERMINALTEMPLATE7] - //TemplateList for %NAME% (add) - { - %NAME% _%NAME%=(%NAME%)$1; - parsertools.create_source_context(_%NAME%,$$,$3); - _%NAME%.%PARAMS%.Add($3 as %CODE%); - return _%NAME%; - } -*! - -!* -[NONTERMINALTEMPLATE8] -{ - procedure_call pc = new procedure_call(); - expression_list expr = new expression_list(); - expr.expressions.Add((expression)$2); - method_call mc = new method_call(expr); - mc.dereferencing_value = new ident("%NAME%"); - pc.func_name = mc; - parsertools.create_source_context(mc.dereferencing_value,$2,$2); - parsertools.create_source_context(expr,$2,$2); - parsertools.create_source_context(mc,$1,$2); - parsertools.create_source_context(pc,$1,$2); - return pc; -} -*! - -{Chars} = {ANSI Printable} + {HT} + {Cyrillic} -{String Chars} = {ANSI Printable} + {HT} + {Cyrillic} - ["] - -Comment Start = '{-' -Comment End = '-}' -Comment Line = '--' - -tkIdent = {Letter}{Alphanumeric}* !*$$=parsertools.create_ident(this);*! -tkInt = {digit}+ !*$$=parsertools.create_int_const(this);*! -tkDouble = {Digit}+[.]{Digit}+ !*$$=parsertools.create_double_const(this);*! -tkChar = ''{Chars}'' !*$$=parsertools.create_char_const(this);*! -tkString = '"'{String Chars}* '"' !*$$=parsertools.create_string_const(this);*! -tkBool = (True) | (False) | (true) | (false) !*{ - ident _ident = null; - string s = LRParser.TokenText; - if (s == "True" || s == "true") - s = "true"; - else - s = "false"; - _ident =new ident(s); - _ident.source_context = parsertools.GetTokenSourceContext(); - return _ident; - }*! - - -tkModule = 'module' !**! -tkWhere = 'where' !*{ - token_where = 1; - token_where_count++; - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - }*! -tkDo = 'do' !**! -tkIf = 'if' !**! -tkThen = 'then' !**! -tkElse = 'else' !**! -tkCase = 'case' !**! -tkOf = 'of' !**! -tkLet = 'let' !**! -tkIn = 'in' !**! -tkReturn = 'return' !**! - -tkMinus = '-' !**! -tkPlus = '+' !**! -tkSlash = '/' !**! -tkStar = '*' !**! -tkSemiColon = ';' !**! -tkDot = '.' !**! -tkAssign = '=' !*{ - if (token_where == 2 || token_where == 1) - { - token_where = 0; - //if (let_where_funcs_main.Count > 1) - //for (int i = 0; i let_where_funcs.Count; i++) - //if (let_funcs.Count > 0) - //let_funcs.RemoveAt(let_funcs.Count - 1); - let_where_funcs_main.Add(let_where_funcs.Clone()); - let_where_funcs.Clear(); - } - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - }*! -tkRoundOpen = '(' !**! -tkRoundClose = ')' !**! -tkFigureOpen = '{' !**! -tkFigureClose = '}' !**! -tkSquareOpen = '[' !**! -tkSquareClose = ']' !**! -tkMainIdent = 'Main' !**! -tkMainIdent1 = 'main' !**! -tkArrow = '->' !**! -tkMore = '>' !**! -tkLess = '<' !**! -tkMoreEq = '>=' !**! -tkLessEq = '<=' !**! -tkEqual = '==' !**! -tkNotEqual = '/=' !**! -tkOr = 'or' !**! -tkAnd = 'and' !**! -tkNot = 'not' !**! -tkImport = 'import' !**! -tkRef = '#reference' !*$$=parsertools.create_directive_name(this);*! -tkSplit = '|' !**! -tkComma = ',' !**! -tkColon = ':' !**! -tkLeftSlash = '\' !**! -tkOtherwise = 'otherwise' !**! -tkArrowGen = '<-' !**! -tkQuote = '`' !**! -tkBottomMinus = '_' !**! - -::= tkModule tkMainIdent tkWhere - | - | tkModule tkIdent tkWhere - -::= - | tkRef tkString - -::= - | - | - -::= tkImport tkIdent - -::= - | - -::= - -::= - -::= - | - -::= tkIdent - | tkQuote tkIdent tkQuote - -::= - -::= - -::= - | tkWhere - -::= - | tkSemiColon - -::= tkIdent - -::= - | - | - -::= - | - | - -::= - - ::= tkIdent - | - | tkSquareOpen tkSquareClose - | tkBottomMinus - | tkIdent tkColon - | tkBottomMinus tkColon - | tkRoundOpen tkRoundClose - -::= - | tkSplit - | tkSplit tkOtherwise - -::= tkMainIdent1 tkAssign - -::= - -::= - | tkSemiColon - -::= - | - -::= tkEqual - | tkNotEqual - | tkMore - | tkLess - | tkMoreEq - | tkLessEq - | - -::= tkSquareOpen tkSquareClose - | tkSquareOpen tkDot tkDot tkSquareClose - | tkSquareOpen tkDot tkDot tkSquareClose - | - | tkColon - -::= tkSquareOpen tkSplit tkSquareClose - -::= - | tkComma - -::= tkArrowGen - -::= - | tkComma - -::= - | tkComma - -::= - -::= tkRoundOpen tkComma tkRoundClose - -::= - | - | tkComma - -::= tkAnd - | - | - -::= tkOr - | - | - -::= tkMinus - | tkNot - | - -::= - | tkRoundOpen tkRoundClose - | - | - | tkLet tkIn - | - | - | - | tkRoundOpen tkRoundOpen tkRoundClose tkRoundClose - -::=tkInt - | tkDouble - | tkBool - | tkChar - | tkString - -::= - -::= - | tkSemiColon - -::= tkIdent - -::= - | - -::= tkAssign - -::= tkIdent - | tkRoundOpen tkIdent tkRoundClose - | tkRoundOpen tkRoundClose - | tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose - -::= tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose - | tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose - | tkRoundOpen tkRoundOpen tkQuote tkIdent tkQuote tkRoundClose tkRoundClose - -::= tkStar - | tkSlash - -::= tkPlus - | tkMinus - -::= tkIdent tkArrowGen tkIdent - | tkIf tkThen tkElse - | tkCase tkRoundOpen tkRoundClose tkOf - | tkDo tkFigureOpen tkSemiColon tkFigureClose - | tkDo - | tkReturn - | - -::= - | tkSplit - -::= tkRoundOpen tkRoundClose tkArrow - -::= - | tkComma - -::= - -::= - | - -::= - -::= tkLeftSlash tkArrow - -::= ! for rule code call - - - - diff --git a/Grammars/Haskell/haskell_parser.log b/Grammars/Haskell/haskell_parser.log deleted file mode 100644 index 2f18e5a6e..000000000 --- a/Grammars/Haskell/haskell_parser.log +++ /dev/null @@ -1,61 +0,0 @@ -============================================================ -GOLD Parser Builder -Version 3.2.3 -============================================================ - - -======================================== -Log -======================================== - -Grammar Details Whitespace was implicitly defined -Grammar Details The grammar contains a total of 52 formal terminals. -Grammar Warning Unreachable rule: -Grammar Warning Unreachable rule: -Grammar Success The grammar was successfully analyzed -LALR States Details The temporary First and Nullable tables were successfully created -LALR States Warning 4 A Shift-Reduce Conflict was fixed -LALR States Warning 19 A Shift-Reduce Conflict was fixed -LALR States Warning 35 A Shift-Reduce Conflict was fixed -LALR States Warning 36 A Shift-Reduce Conflict was fixed -LALR States Warning 69 A Shift-Reduce Conflict was fixed -LALR States Warning 71 A Shift-Reduce Conflict was fixed -LALR States Warning 78 A Shift-Reduce Conflict was fixed -LALR States Warning 81 A Shift-Reduce Conflict was fixed -LALR States Warning 87 A Shift-Reduce Conflict was fixed -LALR States Warning 89 A Shift-Reduce Conflict was fixed -LALR States Warning 108 A Shift-Reduce Conflict was fixed -LALR States Warning 112 A Shift-Reduce Conflict was fixed -LALR States Warning 115 A Shift-Reduce Conflict was fixed -LALR States Warning 116 A Shift-Reduce Conflict was fixed -LALR States Warning 117 A Shift-Reduce Conflict was fixed -LALR States Warning 118 A Shift-Reduce Conflict was fixed -LALR States Warning 123 A Shift-Reduce Conflict was fixed -LALR States Warning 149 A Shift-Reduce Conflict was fixed -LALR States Warning 151 A Shift-Reduce Conflict was fixed -LALR States Warning 169 A Shift-Reduce Conflict was fixed -LALR States Warning 180 A Shift-Reduce Conflict was fixed -LALR States Warning 181 A Shift-Reduce Conflict was fixed -LALR States Warning 182 A Shift-Reduce Conflict was fixed -LALR States Warning 183 A Shift-Reduce Conflict was fixed -LALR States Warning 184 A Shift-Reduce Conflict was fixed -LALR States Warning 185 A Shift-Reduce Conflict was fixed -LALR States Warning 186 A Shift-Reduce Conflict was fixed -LALR States Warning 187 A Shift-Reduce Conflict was fixed -LALR States Warning 223 A Shift-Reduce Conflict was fixed -LALR States Warning 252 A Shift-Reduce Conflict was fixed -LALR States Warning 270 A Shift-Reduce Conflict was fixed -LALR States Details LALR computation took: 0 Hours 0 Minutes 3 Seconds -LALR States Success The LALR Table was succesfully created -LALR States Details Total actions: 968 Shifts, 3725 Reduces, 754 Gotos, 1 Accepts. -DFA States Details The terminal 'Whitespace' is variable length. -DFA States Details The terminal 'tkDouble' is variable length. -DFA States Details The terminal 'tkIdent' is variable length. -DFA States Details The terminal 'tkInt' is variable length. -DFA States Details The terminal 'tkString' is variable length. -DFA States Details The initial Nondeterministic Finite Automata has 338 states -DFA States Success The DFA State Table was successfully created -DFA States Details DFA computation took: 0 Hours 0 Minutes 1 Second -System Complete The grammar was successfully analyzed and the CGT file was created. - - diff --git a/Grammars/Haskell/haskell_parser.pgt b/Grammars/Haskell/haskell_parser.pgt deleted file mode 100644 index e406af89d..000000000 --- a/Grammars/Haskell/haskell_parser.pgt +++ /dev/null @@ -1,488 +0,0 @@ -##TEMPLATE-NAME 'PascalABC.NET' -##LANGUAGE 'Haskell' -##ENGINE-NAME 'PascalABCNET GOLD Parser Engine' -##AUTHOR 'Tasha' -##FILE-EXTENSION 'cs' -##NOTES -Haskell parser template. -Version 1.0 -##END-NOTES -##ID-CASE UPPERCASE -##ID-SEPARATOR '_' -##ID-SYMBOL-PREFIX 'Symbol' -##ID-RULE-PREFIX 'Rule' - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.HaskellParser.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.HaskellParser -{ -public partial class GPBParser_Haskell : GPBParser -{ - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//SymbolConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum SymbolConstants : int -{ -##SYMBOLS -##DELIMITER ',' - %ID.Padded% = %Value.Padded%%Delimiter% // %Description% -##END-SYMBOLS -}; - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//RuleConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum RuleConstants : int -{ -##RULES -##DELIMITER ',' - %ID.Padded% = %Value.Padded%%Delimiter% // %Description% -##END-RULES -}; - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -private Object CreateTerminalObject(int TokenSymbolIndex) -{ -switch (TokenSymbolIndex) -{ -##SYMBOLS - case (int)SymbolConstants.%ID% : - //%Description% - //TERMINAL:%Name% - return null; - //ENDTERMINAL -##END-SYMBOLS -} -throw new SymbolException("Unknown symbol"); -} - - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateNonTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -public ArrayList param_value_list = new ArrayList(); -public ArrayList body_variant_list = new ArrayList(); -public ArrayList param_value_list_main = new ArrayList(); -public ArrayList body_variant_list_main = new ArrayList(); -public ArrayList guard_list = new ArrayList(); -public ArrayList guard_list_main = new ArrayList(); -public ArrayList where_list_var = new ArrayList(); -public ArrayList where_list_assign = new ArrayList(); -public ArrayList where_list_var_main = new ArrayList(); -public ArrayList where_list_assign_main = new ArrayList(); -public ArrayList func_name = new ArrayList(); -public ArrayList where_list_counts=new ArrayList(); -public ArrayList where_list_counts_main = new ArrayList(); -public int decls_counts = 0; -public bool where_flag = false; -public ArrayList list_param = new ArrayList(); -public ArrayList list_params = new ArrayList(); -public ArrayList list_params_temp = new ArrayList(); -public ArrayList list_params_main = new ArrayList(); -public ArrayList _function_lambda_definitions = new ArrayList(); -public ArrayList _function_lambda_definitions_after = new ArrayList(); -public int lambda_num = 0; -public ArrayList _functions = new ArrayList(); -public ArrayList list_method_calls = new ArrayList(); -public ArrayList list_method_calls_main = new ArrayList(); -public ArrayList list_return_funcs = new ArrayList(); -public ArrayList list_return_funcs_main = new ArrayList(); -public ArrayList list_params1 = new ArrayList(); -public ArrayList last_function_lambda_definitions = new ArrayList(); -public ArrayList last_list_method_calls = new ArrayList(); -public ArrayList last_list_method_calls_lambda = new ArrayList(); -public ArrayList let_fact_params = new ArrayList(); -public ArrayList let_funcs = new ArrayList(); -public ArrayList let_funcs_funcs = new ArrayList(); -public ArrayList let_func_last = new ArrayList(); -public ArrayList let_funcs1 = new ArrayList(); -public ArrayList let_flag = new ArrayList(); -public struct types_param_lampda -{ - public string name; - public ArrayList types; -} -public ArrayList list_method_calls_lambda = new ArrayList(); - -public Object CreateNonTerminalObject(int ReductionRuleIndex) -{ -switch (ReductionRuleIndex) -{ -##RULES - case (int)RuleConstants.%ID% : - //%Description% - //NONTERMINAL:%Description% - return null; - //ENDNONTERMINAL -##END-RULES -} -throw new RuleException("Unknown rule"); -} - -public method_call _ob(object dt) - { - token_info _token_info = new token_info("."); - _token_info.source_context = parsertools.GetTokenSourceContext(); - /////////// - ident id = new ident("ob"); - dot_node _dot_node = new dot_node(null, (addressed_value)id); - parsertools.create_source_context(_dot_node, _token_info, id); - _dot_node.left = (addressed_value)dt; - parsertools.create_source_context(_dot_node, dt, _dot_node.right); - ///////////////////////// - expression_list el = new expression_list(); - el.expressions.Add(_dot_node); - method_call _method_call = new method_call(el); - parsertools.create_source_context(_method_call, null, null); - ///////////////////////// - ident id1 = new ident("boolean"); - ///////////////////////// - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)id1; - parsertools.create_source_context(_method_call, id1, _method_call); - } - return _method_call; - } -public procedure_definition lambda(function_lambda_definition _function_lambda_definition) -{ - SyntaxTree.procedure_definition _func_def = new PascalABCCompiler.SyntaxTree.procedure_definition(); - SyntaxTree.method_name _method_name1 = new SyntaxTree.method_name(null, new SyntaxTree.ident(_function_lambda_definition.lambda_name), null); - SyntaxTree.function_header _function_header1 = new SyntaxTree.function_header(); - - object rt1 = new object(); - _function_header1.name = _method_name1; - SyntaxTree.formal_parametres fps = new PascalABCCompiler.SyntaxTree.formal_parametres(); - _function_header1.parametres = _function_lambda_definition.formal_parametres;//fps; - SyntaxTree.named_type_reference _named_type_reference = new SyntaxTree.named_type_reference(); - SyntaxTree.ident idtype = new SyntaxTree.ident("datatype"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - - rt1 = _named_type_reference; - _function_header1.return_type = (SyntaxTree.type_definition)_named_type_reference; - - _function_header1.of_object = false; - _function_header1.class_keyword = false; - SyntaxTree.block _block1 = new SyntaxTree.block(null, null); - SyntaxTree.statement_list sl1 = new SyntaxTree.statement_list(); - sl1.subnodes.Add(_function_lambda_definition.proc_body); - _block1.program_code = sl1; - _func_def.proc_header = _function_header1; - _func_def.proc_body = (SyntaxTree.proc_block)_block1; - _function_lambda_definition.proc_definition = _func_def; - return _func_def; -} - -public procedure_definition find_function1(string name) -{ - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - return (procedure_definition)_functions[i]; - else - return null; -} - -public int find_count_params(string name) -{ - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parametres == null) - return 0; - else - return ((procedure_definition)_functions[i]).proc_header.parametres.params_list.Count; - } - else - return 0; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return 0; - else - return ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; - } - else - return 0; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return 0; - else - return ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; - } - } - else - return 0; - } -} -public int find_count_params_lambda(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parametres.params_list.Count; - else - return -1; -} - -public string find_name_params_lambda(string name, int ind) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - { - formal_parametres fp = ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parametres; - if (ind < fp.params_list.Count) - return fp.params_list[ind].idents.idents[0].name; - else - return ""; - } - else - return ""; -} - -public bool find_func_name(string name) -{ - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - return true; - else - return false; -} - -public function_lambda_definition find_func_lambda_name(string name) -{ - int i = 0; - while (i < _function_lambda_definitions.Count && ((function_lambda_definition)_function_lambda_definitions[i]).lambda_name != name) - i++; - if (i < _function_lambda_definitions.Count) - return (function_lambda_definition)_function_lambda_definitions[i]; - else - return null; -} - -public type_definition func_type(int count) -{ - //int count = mc.parametres.expressions.Count; - - formal_parametres _formal_parametres = new formal_parametres(); - for (int i = 0; i < count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = new ident("$a" + i.ToString()); - _ident_list.idents.Add(id); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - typed_parametres _typed_parametres = new typed_parametres(_ident_list, (type_definition)_named_type_reference1, parametr_kind.none, null); - _formal_parametres.params_list.Add(_typed_parametres); - } - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - function_header _function_header = new function_header(); - _function_header.parametres = _formal_parametres; - _function_header.return_type = (type_definition)_named_type_reference; - _function_header.of_object = false; - _function_header.class_keyword = false; - return (type_definition)_function_header; -} - -public var_statement var_st(string name, type_definition td) -{ - ident_list il = new ident_list(); - il.idents.Add(new ident(name)); - var_def_statement _var_def_statement = new var_def_statement(il, td, null, definition_attribute.None, false); - return new var_statement(_var_def_statement); -} - -public method_call find_method_call(string name, int k) -{ - int i = 0; - while (i < ((ArrayList)list_method_calls_main[k]).Count && - ((ident)((method_call)((ArrayList)list_method_calls_main[k])[i]).dereferencing_value).name != name) - i++; - if (i < ((ArrayList)list_method_calls_main[k]).Count) - return (method_call)((ArrayList)list_method_calls_main[k])[i]; - else - return null; -} - -public method_call find_method_call_lambda(string name) -{ - int i = 0; - while (i < list_method_calls_lambda.Count && - ((ident)((method_call)list_method_calls_lambda[i]).dereferencing_value).name != name) - i++; - if (i < list_method_calls_lambda.Count) - return (method_call)list_method_calls_lambda[i]; - else - return null; -} -public function_lambda_definition find_func_lambda_after(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && - ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return _function_lambda_definitions_after[i] as function_lambda_definition; - else - return null; -} -public ArrayList find_params(string name) -{ - ArrayList _params = new ArrayList(); - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parametres == null) - return _params; - else - { - for (int j = 0; j < ((procedure_definition)_functions[i]).proc_header.parametres.params_list.Count; j++) - _params.Add(((procedure_definition)_functions[i]).proc_header.parametres.params_list[j]); - return _params; - } - } - else - return _params; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)param_value_list[param_value_list.Count - 1]).expressions[j]); - return _params; - } - } - else - return _params; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions[j]); - return _params; - } - } - } - else - return _params; - } -} - - - -} -} diff --git a/Grammars/Haskell/haskell_parser.tmpl b/Grammars/Haskell/haskell_parser.tmpl deleted file mode 100644 index 73d9e9885..000000000 --- a/Grammars/Haskell/haskell_parser.tmpl +++ /dev/null @@ -1,1923 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.HaskellParser.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.HaskellParser -{ -public partial class GPBParser_Haskell : GPBParser -{ - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//SymbolConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum SymbolConstants : int -{ - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTEND = 3, // (Comment End) - SYMBOL_COMMENTLINE = 4, // (Comment Line) - SYMBOL_COMMENTSTART = 5, // (Comment Start) - SYMBOL_TKAND = 6, // 'tkAnd' - SYMBOL_TKARROW = 7, // 'tkArrow' - SYMBOL_TKARROWGEN = 8, // 'tkArrowGen' - SYMBOL_TKASSIGN = 9, // 'tkAssign' - SYMBOL_TKBOOL = 10, // 'tkBool' - SYMBOL_TKBOTTOMMINUS = 11, // 'tkBottomMinus' - SYMBOL_TKCASE = 12, // 'tkCase' - SYMBOL_TKCHAR = 13, // 'tkChar' - SYMBOL_TKCOLON = 14, // 'tkColon' - SYMBOL_TKCOMMA = 15, // 'tkComma' - SYMBOL_TKDO = 16, // 'tkDo' - SYMBOL_TKDOT = 17, // 'tkDot' - SYMBOL_TKDOUBLE = 18, // 'tkDouble' - SYMBOL_TKELSE = 19, // 'tkElse' - SYMBOL_TKEQUAL = 20, // 'tkEqual' - SYMBOL_TKFIGURECLOSE = 21, // 'tkFigureClose' - SYMBOL_TKFIGUREOPEN = 22, // 'tkFigureOpen' - SYMBOL_TKIDENT = 23, // 'tkIdent' - SYMBOL_TKIF = 24, // 'tkIf' - SYMBOL_TKIMPORT = 25, // 'tkImport' - SYMBOL_TKIN = 26, // 'tkIn' - SYMBOL_TKINT = 27, // 'tkInt' - SYMBOL_TKLEFTSLASH = 28, // 'tkLeftSlash' - SYMBOL_TKLESS = 29, // 'tkLess' - SYMBOL_TKLESSEQ = 30, // 'tkLessEq' - SYMBOL_TKLET = 31, // 'tkLet' - SYMBOL_TKMAINIDENT = 32, // 'tkMainIdent' - SYMBOL_TKMAINIDENT1 = 33, // 'tkMainIdent1' - SYMBOL_TKMINUS = 34, // 'tkMinus' - SYMBOL_TKMODULE = 35, // 'tkModule' - SYMBOL_TKMORE = 36, // 'tkMore' - SYMBOL_TKMOREEQ = 37, // 'tkMoreEq' - SYMBOL_TKNOT = 38, // 'tkNot' - SYMBOL_TKNOTEQUAL = 39, // 'tkNotEqual' - SYMBOL_TKOF = 40, // 'tkOf' - SYMBOL_TKOR = 41, // 'tkOr' - SYMBOL_TKOTHERWISE = 42, // 'tkOtherwise' - SYMBOL_TKPLUS = 43, // 'tkPlus' - SYMBOL_TKQUOTE = 44, // 'tkQuote' - SYMBOL_TKREF = 45, // 'tkRef' - SYMBOL_TKRETURN = 46, // 'tkReturn' - SYMBOL_TKROUNDCLOSE = 47, // 'tkRoundClose' - SYMBOL_TKROUNDOPEN = 48, // 'tkRoundOpen' - SYMBOL_TKSEMICOLON = 49, // 'tkSemiColon' - SYMBOL_TKSLASH = 50, // 'tkSlash' - SYMBOL_TKSPLIT = 51, // 'tkSplit' - SYMBOL_TKSQUARECLOSE = 52, // 'tkSquareClose' - SYMBOL_TKSQUAREOPEN = 53, // 'tkSquareOpen' - SYMBOL_TKSTAR = 54, // 'tkStar' - SYMBOL_TKSTRING = 55, // 'tkString' - SYMBOL_TKTHEN = 56, // 'tkThen' - SYMBOL_TKWHERE = 57, // 'tkWhere' - SYMBOL_ADD_EXPR = 58, // - SYMBOL_ADDOP = 59, // - SYMBOL_BODY = 60, // - SYMBOL_BODY_FUNC = 61, // - SYMBOL_BODY_WHERE = 62, // - SYMBOL_CASE_VARIANT = 63, // - SYMBOL_CASE_VARIANTS = 64, // - SYMBOL_CONDITION = 65, // - SYMBOL_CONDITIONS = 66, // - SYMBOL_CONDITIONS_COMMA = 67, // - SYMBOL_CORTEG = 68, // - SYMBOL_DEF_VAR = 69, // - SYMBOL_DEF_VARS = 70, // - SYMBOL_EMPTY = 71, // - SYMBOL_EXPR = 72, // - SYMBOL_FUNC_CALL = 73, // - SYMBOL_FUNCS = 74, // - SYMBOL_FUNCS_VARIANTS = 75, // - SYMBOL_GENERATOR = 76, // - SYMBOL_GENERATORS = 77, // - SYMBOL_GUARD = 78, // - SYMBOL_GUARD_BODY = 79, // - SYMBOL_GUARD_BODY_LIST = 80, // - SYMBOL_IMPORT = 81, // - SYMBOL_IMPORTS = 82, // - SYMBOL_INFIX_EXPR = 83, // - SYMBOL_INIT = 84, // - SYMBOL_INITS = 85, // - SYMBOL_LAMBDA_FUNC = 86, // - SYMBOL_LIST = 87, // - SYMBOL_LIST_CONSTRUCTOR = 88, // - SYMBOL_LIST_ELEMENTS = 89, // - SYMBOL_LIST_PARAM = 90, // - SYMBOL_LIST_PARAM1 = 91, // - SYMBOL_MAIN_FUNC = 92, // - SYMBOL_MODULE = 93, // - SYMBOL_MULT_EXPR = 94, // - SYMBOL_MULTOP = 95, // - SYMBOL_NEGATE_EXPR = 96, // - SYMBOL_PARAM = 97, // - SYMBOL_PARAM_VALUE = 98, // - SYMBOL_PARAMS = 99, // - SYMBOL_PARAMS_VALUE = 100, // - SYMBOL_PARAMS_WHERE = 101, // - SYMBOL_PARAMS1 = 102, // - SYMBOL_REFERENCE = 103, // - SYMBOL_SIMPLE_EXPR = 104, // - SYMBOL_SIMPLE_TYPE_EXPR = 105, // - SYMBOL_STMT = 106, // - SYMBOL_STMTS = 107, // - SYMBOL_STMTS1 = 108, // - SYMBOL_VARIABLE = 109, // - SYMBOL_VARIABLE_EXPR = 110, // - SYMBOL_VARIANT = 111, // - SYMBOL_VARIANTS = 112, // - SYMBOL_WHERE_VAR = 113 // -}; - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//RuleConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum RuleConstants : int -{ - RULE_MODULE_TKMODULE_TKMAINIDENT_TKWHERE = 0, // ::= 'tkModule' 'tkMainIdent' 'tkWhere' - RULE_MODULE = 1, // ::= - RULE_MODULE_TKMODULE_TKIDENT_TKWHERE = 2, // ::= 'tkModule' 'tkIdent' 'tkWhere' - RULE_REFERENCE = 3, // ::= - RULE_REFERENCE_TKREF_TKSTRING = 4, // ::= 'tkRef' 'tkString' - RULE_IMPORTS = 5, // ::= - RULE_IMPORTS2 = 6, // ::= - RULE_IMPORTS3 = 7, // ::= - RULE_IMPORT_TKIMPORT_TKIDENT = 8, // ::= 'tkImport' 'tkIdent' - RULE_BODY = 9, // ::= - RULE_BODY2 = 10, // ::= - RULE_FUNCS = 11, // ::= - RULE_FUNCS_VARIANTS = 12, // ::= - RULE_VARIANTS = 13, // ::= - RULE_VARIANTS2 = 14, // ::= - RULE_VARIANT_TKIDENT = 15, // ::= 'tkIdent' - RULE_VARIANT_TKQUOTE_TKIDENT_TKQUOTE = 16, // ::= 'tkQuote' 'tkIdent' 'tkQuote' - RULE_LIST_PARAM1 = 17, // ::= - RULE_BODY_WHERE = 18, // ::= - RULE_WHERE_VAR = 19, // ::= - RULE_WHERE_VAR_TKWHERE = 20, // ::= 'tkWhere' - RULE_INITS = 21, // ::= - RULE_INITS_TKSEMICOLON = 22, // ::= 'tkSemiColon' - RULE_INIT_TKIDENT = 23, // ::= 'tkIdent' - RULE_PARAMS_WHERE = 24, // ::= - RULE_PARAMS_WHERE2 = 25, // ::= - RULE_PARAMS_WHERE3 = 26, // ::= - RULE_PARAMS = 27, // ::= - RULE_PARAMS2 = 28, // ::= - RULE_PARAMS3 = 29, // ::= - RULE_PARAM = 30, // ::= - RULE_LIST_PARAM_TKIDENT = 31, // ::= 'tkIdent' - RULE_LIST_PARAM = 32, // ::= - RULE_LIST_PARAM_TKSQUAREOPEN_TKSQUARECLOSE = 33, // ::= 'tkSquareOpen' 'tkSquareClose' - RULE_LIST_PARAM_TKBOTTOMMINUS = 34, // ::= 'tkBottomMinus' - RULE_LIST_PARAM_TKIDENT_TKCOLON = 35, // ::= 'tkIdent' 'tkColon' - RULE_LIST_PARAM_TKBOTTOMMINUS_TKCOLON = 36, // ::= 'tkBottomMinus' 'tkColon' - RULE_LIST_PARAM_TKROUNDOPEN_TKROUNDCLOSE = 37, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_GUARD = 38, // ::= - RULE_GUARD_TKSPLIT = 39, // ::= 'tkSplit' - RULE_GUARD_TKSPLIT_TKOTHERWISE = 40, // ::= 'tkSplit' 'tkOtherwise' - RULE_MAIN_FUNC_TKMAINIDENT1_TKASSIGN = 41, // ::= 'tkMainIdent1' 'tkAssign' - RULE_BODY_FUNC = 42, // ::= - RULE_STMTS = 43, // ::= - RULE_STMTS_TKSEMICOLON = 44, // ::= 'tkSemiColon' - RULE_STMTS1 = 45, // ::= - RULE_STMTS12 = 46, // ::= - RULE_EXPR_TKEQUAL = 47, // ::= 'tkEqual' - RULE_EXPR_TKNOTEQUAL = 48, // ::= 'tkNotEqual' - RULE_EXPR_TKMORE = 49, // ::= 'tkMore' - RULE_EXPR_TKLESS = 50, // ::= 'tkLess' - RULE_EXPR_TKMOREEQ = 51, // ::= 'tkMoreEq' - RULE_EXPR_TKLESSEQ = 52, // ::= 'tkLessEq' - RULE_EXPR = 53, // ::= - RULE_LIST_TKSQUAREOPEN_TKSQUARECLOSE = 54, // ::= 'tkSquareOpen' 'tkSquareClose' - RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE = 55, // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE2 = 56, // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - RULE_LIST = 57, // ::= - RULE_LIST_TKCOLON = 58, // ::= 'tkColon' - RULE_LIST_CONSTRUCTOR_TKSQUAREOPEN_TKSPLIT_TKSQUARECLOSE = 59, // ::= 'tkSquareOpen' 'tkSplit' 'tkSquareClose' - RULE_GENERATORS = 60, // ::= - RULE_GENERATORS_TKCOMMA = 61, // ::= 'tkComma' - RULE_GENERATOR_TKARROWGEN = 62, // ::= 'tkArrowGen' - RULE_CONDITIONS_COMMA = 63, // ::= - RULE_CONDITIONS_COMMA_TKCOMMA = 64, // ::= 'tkComma' - RULE_CONDITIONS = 65, // ::= - RULE_CONDITIONS_TKCOMMA = 66, // ::= 'tkComma' - RULE_CONDITION = 67, // ::= - RULE_CORTEG_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE = 68, // ::= 'tkRoundOpen' 'tkComma' 'tkRoundClose' - RULE_LIST_ELEMENTS = 69, // ::= - RULE_LIST_ELEMENTS2 = 70, // ::= - RULE_LIST_ELEMENTS_TKCOMMA = 71, // ::= 'tkComma' - RULE_ADD_EXPR_TKAND = 72, // ::= 'tkAnd' - RULE_ADD_EXPR = 73, // ::= - RULE_ADD_EXPR2 = 74, // ::= - RULE_MULT_EXPR_TKOR = 75, // ::= 'tkOr' - RULE_MULT_EXPR = 76, // ::= - RULE_MULT_EXPR2 = 77, // ::= - RULE_NEGATE_EXPR_TKMINUS = 78, // ::= 'tkMinus' - RULE_NEGATE_EXPR_TKNOT = 79, // ::= 'tkNot' - RULE_NEGATE_EXPR = 80, // ::= - RULE_SIMPLE_EXPR = 81, // ::= - RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE = 82, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_SIMPLE_EXPR2 = 83, // ::= - RULE_SIMPLE_EXPR3 = 84, // ::= - RULE_SIMPLE_EXPR_TKLET_TKIN = 85, // ::= 'tkLet' 'tkIn' - RULE_SIMPLE_EXPR4 = 86, // ::= - RULE_SIMPLE_EXPR5 = 87, // ::= - RULE_SIMPLE_EXPR6 = 88, // ::= - RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDCLOSE = 89, // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkRoundClose' 'tkRoundClose' - RULE_SIMPLE_TYPE_EXPR_TKINT = 90, // ::= 'tkInt' - RULE_SIMPLE_TYPE_EXPR_TKDOUBLE = 91, // ::= 'tkDouble' - RULE_SIMPLE_TYPE_EXPR_TKBOOL = 92, // ::= 'tkBool' - RULE_SIMPLE_TYPE_EXPR_TKCHAR = 93, // ::= 'tkChar' - RULE_SIMPLE_TYPE_EXPR_TKSTRING = 94, // ::= 'tkString' - RULE_VARIABLE_EXPR = 95, // ::= - RULE_DEF_VARS = 96, // ::= - RULE_DEF_VARS_TKSEMICOLON = 97, // ::= 'tkSemiColon' - RULE_DEF_VAR_TKIDENT = 98, // ::= 'tkIdent' - RULE_GUARD_BODY_LIST = 99, // ::= - RULE_GUARD_BODY_LIST2 = 100, // ::= - RULE_GUARD_BODY_TKASSIGN = 101, // ::= 'tkAssign' - RULE_VARIABLE_TKIDENT = 102, // ::= 'tkIdent' - RULE_VARIABLE_TKROUNDOPEN_TKIDENT_TKROUNDCLOSE = 103, // ::= 'tkRoundOpen' 'tkIdent' 'tkRoundClose' - RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE = 104, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE = 105, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE = 106, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE2 = 107, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDCLOSE = 108, // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundClose' - RULE_MULTOP_TKSTAR = 109, // ::= 'tkStar' - RULE_MULTOP_TKSLASH = 110, // ::= 'tkSlash' - RULE_ADDOP_TKPLUS = 111, // ::= 'tkPlus' - RULE_ADDOP_TKMINUS = 112, // ::= 'tkMinus' - RULE_STMT_TKIDENT_TKARROWGEN_TKIDENT = 113, // ::= 'tkIdent' 'tkArrowGen' 'tkIdent' - RULE_STMT_TKIF_TKTHEN_TKELSE = 114, // ::= 'tkIf' 'tkThen' 'tkElse' - RULE_STMT_TKCASE_TKROUNDOPEN_TKROUNDCLOSE_TKOF = 115, // ::= 'tkCase' 'tkRoundOpen' 'tkRoundClose' 'tkOf' - RULE_STMT_TKDO_TKFIGUREOPEN_TKSEMICOLON_TKFIGURECLOSE = 116, // ::= 'tkDo' 'tkFigureOpen' 'tkSemiColon' 'tkFigureClose' - RULE_STMT_TKDO = 117, // ::= 'tkDo' - RULE_STMT_TKRETURN = 118, // ::= 'tkReturn' - RULE_STMT = 119, // ::= - RULE_CASE_VARIANTS = 120, // ::= - RULE_CASE_VARIANTS_TKSPLIT = 121, // ::= 'tkSplit' - RULE_CASE_VARIANT_TKROUNDOPEN_TKROUNDCLOSE_TKARROW = 122, // ::= 'tkRoundOpen' 'tkRoundClose' 'tkArrow' - RULE_PARAMS1 = 123, // ::= - RULE_PARAMS1_TKCOMMA = 124, // ::= 'tkComma' - RULE_FUNC_CALL = 125, // ::= - RULE_PARAMS_VALUE = 126, // ::= - RULE_PARAMS_VALUE2 = 127, // ::= - RULE_PARAM_VALUE = 128, // ::= - RULE_LAMBDA_FUNC_TKLEFTSLASH_TKARROW = 129, // ::= 'tkLeftSlash' 'tkArrow' - RULE_EMPTY = 130 // ::= -}; - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -private Object CreateTerminalObject(int TokenSymbolIndex) -{ -switch (TokenSymbolIndex) -{ - case (int)SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - //TERMINAL:Whitespace - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMMENTEND : - //(Comment End) - //TERMINAL:Comment End - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMMENTLINE : - //(Comment Line) - //TERMINAL:Comment Line - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMMENTSTART : - //(Comment Start) - //TERMINAL:Comment Start - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKAND : - //'tkAnd' - //TERMINAL:tkAnd - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKARROW : - //'tkArrow' - //TERMINAL:tkArrow - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKARROWGEN : - //'tkArrowGen' - //TERMINAL:tkArrowGen - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKASSIGN : - //'tkAssign' - //TERMINAL:tkAssign - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKBOOL : - //'tkBool' - //TERMINAL:tkBool - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKBOTTOMMINUS : - //'tkBottomMinus' - //TERMINAL:tkBottomMinus - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKCASE : - //'tkCase' - //TERMINAL:tkCase - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKCHAR : - //'tkChar' - //TERMINAL:tkChar - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKCOLON : - //'tkColon' - //TERMINAL:tkColon - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKCOMMA : - //'tkComma' - //TERMINAL:tkComma - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKDO : - //'tkDo' - //TERMINAL:tkDo - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKDOT : - //'tkDot' - //TERMINAL:tkDot - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKDOUBLE : - //'tkDouble' - //TERMINAL:tkDouble - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKELSE : - //'tkElse' - //TERMINAL:tkElse - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKEQUAL : - //'tkEqual' - //TERMINAL:tkEqual - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKFIGURECLOSE : - //'tkFigureClose' - //TERMINAL:tkFigureClose - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKFIGUREOPEN : - //'tkFigureOpen' - //TERMINAL:tkFigureOpen - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKIDENT : - //'tkIdent' - //TERMINAL:tkIdent - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKIF : - //'tkIf' - //TERMINAL:tkIf - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKIMPORT : - //'tkImport' - //TERMINAL:tkImport - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKIN : - //'tkIn' - //TERMINAL:tkIn - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKINT : - //'tkInt' - //TERMINAL:tkInt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKLEFTSLASH : - //'tkLeftSlash' - //TERMINAL:tkLeftSlash - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKLESS : - //'tkLess' - //TERMINAL:tkLess - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKLESSEQ : - //'tkLessEq' - //TERMINAL:tkLessEq - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKLET : - //'tkLet' - //TERMINAL:tkLet - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKMAINIDENT : - //'tkMainIdent' - //TERMINAL:tkMainIdent - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKMAINIDENT1 : - //'tkMainIdent1' - //TERMINAL:tkMainIdent1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKMINUS : - //'tkMinus' - //TERMINAL:tkMinus - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKMODULE : - //'tkModule' - //TERMINAL:tkModule - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKMORE : - //'tkMore' - //TERMINAL:tkMore - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKMOREEQ : - //'tkMoreEq' - //TERMINAL:tkMoreEq - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKNOT : - //'tkNot' - //TERMINAL:tkNot - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKNOTEQUAL : - //'tkNotEqual' - //TERMINAL:tkNotEqual - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKOF : - //'tkOf' - //TERMINAL:tkOf - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKOR : - //'tkOr' - //TERMINAL:tkOr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKOTHERWISE : - //'tkOtherwise' - //TERMINAL:tkOtherwise - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKPLUS : - //'tkPlus' - //TERMINAL:tkPlus - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKQUOTE : - //'tkQuote' - //TERMINAL:tkQuote - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKREF : - //'tkRef' - //TERMINAL:tkRef - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKRETURN : - //'tkReturn' - //TERMINAL:tkReturn - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKROUNDCLOSE : - //'tkRoundClose' - //TERMINAL:tkRoundClose - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKROUNDOPEN : - //'tkRoundOpen' - //TERMINAL:tkRoundOpen - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKSEMICOLON : - //'tkSemiColon' - //TERMINAL:tkSemiColon - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKSLASH : - //'tkSlash' - //TERMINAL:tkSlash - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKSPLIT : - //'tkSplit' - //TERMINAL:tkSplit - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKSQUARECLOSE : - //'tkSquareClose' - //TERMINAL:tkSquareClose - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKSQUAREOPEN : - //'tkSquareOpen' - //TERMINAL:tkSquareOpen - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKSTAR : - //'tkStar' - //TERMINAL:tkStar - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKSTRING : - //'tkString' - //TERMINAL:tkString - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKTHEN : - //'tkThen' - //TERMINAL:tkThen - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKWHERE : - //'tkWhere' - //TERMINAL:tkWhere - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ADD_EXPR : - // - //TERMINAL:add_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ADDOP : - // - //TERMINAL:addop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY : - // - //TERMINAL:body - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY_FUNC : - // - //TERMINAL:body_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY_WHERE : - // - //TERMINAL:body_where - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_VARIANT : - // - //TERMINAL:case_variant - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_VARIANTS : - // - //TERMINAL:case_variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITION : - // - //TERMINAL:condition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITIONS : - // - //TERMINAL:conditions - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITIONS_COMMA : - // - //TERMINAL:conditions_comma - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CORTEG : - // - //TERMINAL:corteg - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DEF_VAR : - // - //TERMINAL:def_var - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DEF_VARS : - // - //TERMINAL:def_vars - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EMPTY : - // - //TERMINAL:empty - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR : - // - //TERMINAL:expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_CALL : - // - //TERMINAL:func_call - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNCS : - // - //TERMINAL:funcs - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNCS_VARIANTS : - // - //TERMINAL:funcs_variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GENERATOR : - // - //TERMINAL:generator - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GENERATORS : - // - //TERMINAL:generators - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD : - // - //TERMINAL:guard - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD_BODY : - // - //TERMINAL:guard_body - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD_BODY_LIST : - // - //TERMINAL:guard_body_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPORT : - // - //TERMINAL:import - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPORTS : - // - //TERMINAL:imports - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INFIX_EXPR : - // - //TERMINAL:infix_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INIT : - // - //TERMINAL:init - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INITS : - // - //TERMINAL:inits - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LAMBDA_FUNC : - // - //TERMINAL:lambda_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST : - // - //TERMINAL:list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_CONSTRUCTOR : - // - //TERMINAL:list_constructor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_ELEMENTS : - // - //TERMINAL:list_elements - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_PARAM : - // - //TERMINAL:list_param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_PARAM1 : - // - //TERMINAL:list_param1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MAIN_FUNC : - // - //TERMINAL:main_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MODULE : - // - //TERMINAL:module - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULT_EXPR : - // - //TERMINAL:mult_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULTOP : - // - //TERMINAL:multop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NEGATE_EXPR : - // - //TERMINAL:negate_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM : - // - //TERMINAL:param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM_VALUE : - // - //TERMINAL:param_value - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS : - // - //TERMINAL:params - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS_VALUE : - // - //TERMINAL:params_value - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS_WHERE : - // - //TERMINAL:params_where - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS1 : - // - //TERMINAL:params1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_REFERENCE : - // - //TERMINAL:reference - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_EXPR : - // - //TERMINAL:simple_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE_EXPR : - // - //TERMINAL:simple_type_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMT : - // - //TERMINAL:stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMTS : - // - //TERMINAL:stmts - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMTS1 : - // - //TERMINAL:stmts1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLE : - // - //TERMINAL:variable - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLE_EXPR : - // - //TERMINAL:variable_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT : - // - //TERMINAL:variant - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANTS : - // - //TERMINAL:variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHERE_VAR : - // - //TERMINAL:where_var - return null; - //ENDTERMINAL -} -throw new SymbolException("Unknown symbol"); -} - - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateNonTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -public ArrayList param_value_list = new ArrayList(); -public ArrayList body_variant_list = new ArrayList(); -public ArrayList param_value_list_main = new ArrayList(); -public ArrayList body_variant_list_main = new ArrayList(); -public ArrayList guard_list = new ArrayList(); -public ArrayList guard_list_main = new ArrayList(); -public ArrayList where_list_var = new ArrayList(); -public ArrayList where_list_assign = new ArrayList(); -public ArrayList where_list_var_main = new ArrayList(); -public ArrayList where_list_assign_main = new ArrayList(); -public ArrayList func_name = new ArrayList(); -public ArrayList where_list_counts=new ArrayList(); -public ArrayList where_list_counts_main = new ArrayList(); -public int decls_counts = 0; -public bool where_flag = false; -public ArrayList list_param = new ArrayList(); -public ArrayList list_params = new ArrayList(); -public ArrayList list_params_temp = new ArrayList(); -public ArrayList list_params_main = new ArrayList(); -public ArrayList _function_lambda_definitions = new ArrayList(); -public ArrayList _function_lambda_definitions_after = new ArrayList(); -public int lambda_num = 0; -public ArrayList _functions = new ArrayList(); -public ArrayList list_method_calls = new ArrayList(); -public ArrayList list_method_calls_main = new ArrayList(); -public ArrayList list_return_funcs = new ArrayList(); -public ArrayList list_return_funcs_main = new ArrayList(); -public ArrayList list_params1 = new ArrayList(); -public ArrayList last_function_lambda_definitions = new ArrayList(); -public ArrayList last_list_method_calls = new ArrayList(); -public ArrayList last_list_method_calls_lambda = new ArrayList(); -public ArrayList let_fact_params = new ArrayList(); -public ArrayList let_funcs = new ArrayList(); -public ArrayList let_funcs_funcs = new ArrayList(); -public ArrayList let_func_last = new ArrayList(); -public ArrayList let_funcs1 = new ArrayList(); -public ArrayList let_flag = new ArrayList(); -public struct types_param_lampda -{ - public string name; - public ArrayList types; -} -public ArrayList list_method_calls_lambda = new ArrayList(); - -public Object CreateNonTerminalObject(int ReductionRuleIndex) -{ -switch (ReductionRuleIndex) -{ - case (int)RuleConstants.RULE_MODULE_TKMODULE_TKMAINIDENT_TKWHERE : - // ::= 'tkModule' 'tkMainIdent' 'tkWhere' - //NONTERMINAL: ::= 'tkModule' 'tkMainIdent' 'tkWhere' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MODULE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MODULE_TKMODULE_TKIDENT_TKWHERE : - // ::= 'tkModule' 'tkIdent' 'tkWhere' - //NONTERMINAL: ::= 'tkModule' 'tkIdent' 'tkWhere' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_REFERENCE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_REFERENCE_TKREF_TKSTRING : - // ::= 'tkRef' 'tkString' - //NONTERMINAL: ::= 'tkRef' 'tkString' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_IMPORTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_IMPORTS2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_IMPORTS3 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_IMPORT_TKIMPORT_TKIDENT : - // ::= 'tkImport' 'tkIdent' - //NONTERMINAL: ::= 'tkImport' 'tkIdent' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_BODY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_BODY2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_FUNCS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_FUNCS_VARIANTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIANTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIANTS2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIANT_TKIDENT : - // ::= 'tkIdent' - //NONTERMINAL: ::= 'tkIdent' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIANT_TKQUOTE_TKIDENT_TKQUOTE : - // ::= 'tkQuote' 'tkIdent' 'tkQuote' - //NONTERMINAL: ::= 'tkQuote' 'tkIdent' 'tkQuote' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM1 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_BODY_WHERE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_WHERE_VAR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_WHERE_VAR_TKWHERE : - // ::= 'tkWhere' - //NONTERMINAL: ::= 'tkWhere' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_INITS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_INITS_TKSEMICOLON : - // ::= 'tkSemiColon' - //NONTERMINAL: ::= 'tkSemiColon' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_INIT_TKIDENT : - // ::= 'tkIdent' - //NONTERMINAL: ::= 'tkIdent' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS_WHERE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS_WHERE2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS_WHERE3 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS3 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAM : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM_TKIDENT : - // ::= 'tkIdent' - //NONTERMINAL: ::= 'tkIdent' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkSquareClose' - //NONTERMINAL: ::= 'tkSquareOpen' 'tkSquareClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM_TKBOTTOMMINUS : - // ::= 'tkBottomMinus' - //NONTERMINAL: ::= 'tkBottomMinus' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM_TKIDENT_TKCOLON : - // ::= 'tkIdent' 'tkColon' - //NONTERMINAL: ::= 'tkIdent' 'tkColon' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM_TKBOTTOMMINUS_TKCOLON : - // ::= 'tkBottomMinus' 'tkColon' - //NONTERMINAL: ::= 'tkBottomMinus' 'tkColon' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_PARAM_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD_TKSPLIT : - // ::= 'tkSplit' - //NONTERMINAL: ::= 'tkSplit' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD_TKSPLIT_TKOTHERWISE : - // ::= 'tkSplit' 'tkOtherwise' - //NONTERMINAL: ::= 'tkSplit' 'tkOtherwise' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MAIN_FUNC_TKMAINIDENT1_TKASSIGN : - // ::= 'tkMainIdent1' 'tkAssign' - //NONTERMINAL: ::= 'tkMainIdent1' 'tkAssign' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_BODY_FUNC : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMTS_TKSEMICOLON : - // ::= 'tkSemiColon' - //NONTERMINAL: ::= 'tkSemiColon' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMTS1 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMTS12 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR_TKEQUAL : - // ::= 'tkEqual' - //NONTERMINAL: ::= 'tkEqual' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR_TKNOTEQUAL : - // ::= 'tkNotEqual' - //NONTERMINAL: ::= 'tkNotEqual' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR_TKMORE : - // ::= 'tkMore' - //NONTERMINAL: ::= 'tkMore' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR_TKLESS : - // ::= 'tkLess' - //NONTERMINAL: ::= 'tkLess' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR_TKMOREEQ : - // ::= 'tkMoreEq' - //NONTERMINAL: ::= 'tkMoreEq' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR_TKLESSEQ : - // ::= 'tkLessEq' - //NONTERMINAL: ::= 'tkLessEq' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkSquareClose' - //NONTERMINAL: ::= 'tkSquareOpen' 'tkSquareClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - //NONTERMINAL: ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE2 : - // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - //NONTERMINAL: ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_TKCOLON : - // ::= 'tkColon' - //NONTERMINAL: ::= 'tkColon' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_CONSTRUCTOR_TKSQUAREOPEN_TKSPLIT_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkSplit' 'tkSquareClose' - //NONTERMINAL: ::= 'tkSquareOpen' 'tkSplit' 'tkSquareClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GENERATORS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GENERATORS_TKCOMMA : - // ::= 'tkComma' - //NONTERMINAL: ::= 'tkComma' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GENERATOR_TKARROWGEN : - // ::= 'tkArrowGen' - //NONTERMINAL: ::= 'tkArrowGen' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONDITIONS_COMMA : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONDITIONS_COMMA_TKCOMMA : - // ::= 'tkComma' - //NONTERMINAL: ::= 'tkComma' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONDITIONS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONDITIONS_TKCOMMA : - // ::= 'tkComma' - //NONTERMINAL: ::= 'tkComma' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONDITION : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CORTEG_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkComma' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkComma' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_ELEMENTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_ELEMENTS2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIST_ELEMENTS_TKCOMMA : - // ::= 'tkComma' - //NONTERMINAL: ::= 'tkComma' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ADD_EXPR_TKAND : - // ::= 'tkAnd' - //NONTERMINAL: ::= 'tkAnd' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ADD_EXPR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ADD_EXPR2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MULT_EXPR_TKOR : - // ::= 'tkOr' - //NONTERMINAL: ::= 'tkOr' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MULT_EXPR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MULT_EXPR2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NEGATE_EXPR_TKMINUS : - // ::= 'tkMinus' - //NONTERMINAL: ::= 'tkMinus' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NEGATE_EXPR_TKNOT : - // ::= 'tkNot' - //NONTERMINAL: ::= 'tkNot' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NEGATE_EXPR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR3 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKLET_TKIN : - // ::= 'tkLet' 'tkIn' - //NONTERMINAL: ::= 'tkLet' 'tkIn' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR4 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR5 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR6 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkRoundClose' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkRoundOpen' 'tkRoundClose' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKINT : - // ::= 'tkInt' - //NONTERMINAL: ::= 'tkInt' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKDOUBLE : - // ::= 'tkDouble' - //NONTERMINAL: ::= 'tkDouble' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKBOOL : - // ::= 'tkBool' - //NONTERMINAL: ::= 'tkBool' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKCHAR : - // ::= 'tkChar' - //NONTERMINAL: ::= 'tkChar' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKSTRING : - // ::= 'tkString' - //NONTERMINAL: ::= 'tkString' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIABLE_EXPR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_DEF_VARS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_DEF_VARS_TKSEMICOLON : - // ::= 'tkSemiColon' - //NONTERMINAL: ::= 'tkSemiColon' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_DEF_VAR_TKIDENT : - // ::= 'tkIdent' - //NONTERMINAL: ::= 'tkIdent' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD_BODY_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD_BODY_LIST2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD_BODY_TKASSIGN : - // ::= 'tkAssign' - //NONTERMINAL: ::= 'tkAssign' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIABLE_TKIDENT : - // ::= 'tkIdent' - //NONTERMINAL: ::= 'tkIdent' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKIDENT_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkIdent' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkIdent' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE2 : - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundClose' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MULTOP_TKSTAR : - // ::= 'tkStar' - //NONTERMINAL: ::= 'tkStar' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MULTOP_TKSLASH : - // ::= 'tkSlash' - //NONTERMINAL: ::= 'tkSlash' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ADDOP_TKPLUS : - // ::= 'tkPlus' - //NONTERMINAL: ::= 'tkPlus' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ADDOP_TKMINUS : - // ::= 'tkMinus' - //NONTERMINAL: ::= 'tkMinus' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMT_TKIDENT_TKARROWGEN_TKIDENT : - // ::= 'tkIdent' 'tkArrowGen' 'tkIdent' - //NONTERMINAL: ::= 'tkIdent' 'tkArrowGen' 'tkIdent' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMT_TKIF_TKTHEN_TKELSE : - // ::= 'tkIf' 'tkThen' 'tkElse' - //NONTERMINAL: ::= 'tkIf' 'tkThen' 'tkElse' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMT_TKCASE_TKROUNDOPEN_TKROUNDCLOSE_TKOF : - // ::= 'tkCase' 'tkRoundOpen' 'tkRoundClose' 'tkOf' - //NONTERMINAL: ::= 'tkCase' 'tkRoundOpen' 'tkRoundClose' 'tkOf' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMT_TKDO_TKFIGUREOPEN_TKSEMICOLON_TKFIGURECLOSE : - // ::= 'tkDo' 'tkFigureOpen' 'tkSemiColon' 'tkFigureClose' - //NONTERMINAL: ::= 'tkDo' 'tkFigureOpen' 'tkSemiColon' 'tkFigureClose' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMT_TKDO : - // ::= 'tkDo' - //NONTERMINAL: ::= 'tkDo' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMT_TKRETURN : - // ::= 'tkReturn' - //NONTERMINAL: ::= 'tkReturn' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_STMT : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CASE_VARIANTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CASE_VARIANTS_TKSPLIT : - // ::= 'tkSplit' - //NONTERMINAL: ::= 'tkSplit' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CASE_VARIANT_TKROUNDOPEN_TKROUNDCLOSE_TKARROW : - // ::= 'tkRoundOpen' 'tkRoundClose' 'tkArrow' - //NONTERMINAL: ::= 'tkRoundOpen' 'tkRoundClose' 'tkArrow' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS1 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS1_TKCOMMA : - // ::= 'tkComma' - //NONTERMINAL: ::= 'tkComma' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_FUNC_CALL : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS_VALUE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS_VALUE2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAM_VALUE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LAMBDA_FUNC_TKLEFTSLASH_TKARROW : - // ::= 'tkLeftSlash' 'tkArrow' - //NONTERMINAL: ::= 'tkLeftSlash' 'tkArrow' - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EMPTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL -} -throw new RuleException("Unknown rule"); -} - -public method_call _ob(object dt) - { - token_info _token_info = new token_info("."); - _token_info.source_context = parsertools.GetTokenSourceContext(); - /////////// - ident id = new ident("ob"); - dot_node _dot_node = new dot_node(null, (addressed_value)id); - parsertools.create_source_context(_dot_node, _token_info, id); - _dot_node.left = (addressed_value)dt; - parsertools.create_source_context(_dot_node, dt, _dot_node.right); - ///////////////////////// - expression_list el = new expression_list(); - el.expressions.Add(_dot_node); - method_call _method_call = new method_call(el); - parsertools.create_source_context(_method_call, null, null); - ///////////////////////// - ident id1 = new ident("boolean"); - ///////////////////////// - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)id1; - parsertools.create_source_context(_method_call, id1, _method_call); - } - return _method_call; - } -public procedure_definition lambda(function_lambda_definition _function_lambda_definition) -{ - SyntaxTree.procedure_definition _func_def = new PascalABCCompiler.SyntaxTree.procedure_definition(); - SyntaxTree.method_name _method_name1 = new SyntaxTree.method_name(null, new SyntaxTree.ident(_function_lambda_definition.lambda_name), null); - SyntaxTree.function_header _function_header1 = new SyntaxTree.function_header(); - - object rt1 = new object(); - _function_header1.name = _method_name1; - SyntaxTree.formal_parametres fps = new PascalABCCompiler.SyntaxTree.formal_parametres(); - _function_header1.parametres = _function_lambda_definition.formal_parametres;//fps; - SyntaxTree.named_type_reference _named_type_reference = new SyntaxTree.named_type_reference(); - SyntaxTree.ident idtype = new SyntaxTree.ident("datatype"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - - rt1 = _named_type_reference; - _function_header1.return_type = (SyntaxTree.type_definition)_named_type_reference; - - _function_header1.of_object = false; - _function_header1.class_keyword = false; - SyntaxTree.block _block1 = new SyntaxTree.block(null, null); - SyntaxTree.statement_list sl1 = new SyntaxTree.statement_list(); - sl1.subnodes.Add(_function_lambda_definition.proc_body); - _block1.program_code = sl1; - _func_def.proc_header = _function_header1; - _func_def.proc_body = (SyntaxTree.proc_block)_block1; - _function_lambda_definition.proc_definition = _func_def; - return _func_def; -} - -public procedure_definition find_function1(string name) -{ - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - return (procedure_definition)_functions[i]; - else - return null; -} - -public int find_count_params(string name) -{ - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parametres == null) - return 0; - else - return ((procedure_definition)_functions[i]).proc_header.parametres.params_list.Count; - } - else - return 0; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return 0; - else - return ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; - } - else - return 0; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return 0; - else - return ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; - } - } - else - return 0; - } -} -public int find_count_params_lambda(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parametres.params_list.Count; - else - return -1; -} - -public string find_name_params_lambda(string name, int ind) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - { - formal_parametres fp = ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parametres; - if (ind < fp.params_list.Count) - return fp.params_list[ind].idents.idents[0].name; - else - return ""; - } - else - return ""; -} - -public bool find_func_name(string name) -{ - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - return true; - else - return false; -} - -public function_lambda_definition find_func_lambda_name(string name) -{ - int i = 0; - while (i < _function_lambda_definitions.Count && ((function_lambda_definition)_function_lambda_definitions[i]).lambda_name != name) - i++; - if (i < _function_lambda_definitions.Count) - return (function_lambda_definition)_function_lambda_definitions[i]; - else - return null; -} - -public type_definition func_type(int count) -{ - //int count = mc.parametres.expressions.Count; - - formal_parametres _formal_parametres = new formal_parametres(); - for (int i = 0; i < count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = new ident("$a" + i.ToString()); - _ident_list.idents.Add(id); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - typed_parametres _typed_parametres = new typed_parametres(_ident_list, (type_definition)_named_type_reference1, parametr_kind.none, null); - _formal_parametres.params_list.Add(_typed_parametres); - } - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - function_header _function_header = new function_header(); - _function_header.parametres = _formal_parametres; - _function_header.return_type = (type_definition)_named_type_reference; - _function_header.of_object = false; - _function_header.class_keyword = false; - return (type_definition)_function_header; -} - -public var_statement var_st(string name, type_definition td) -{ - ident_list il = new ident_list(); - il.idents.Add(new ident(name)); - var_def_statement _var_def_statement = new var_def_statement(il, td, null, definition_attribute.None, false); - return new var_statement(_var_def_statement); -} - -public method_call find_method_call(string name, int k) -{ - int i = 0; - while (i < ((ArrayList)list_method_calls_main[k]).Count && - ((ident)((method_call)((ArrayList)list_method_calls_main[k])[i]).dereferencing_value).name != name) - i++; - if (i < ((ArrayList)list_method_calls_main[k]).Count) - return (method_call)((ArrayList)list_method_calls_main[k])[i]; - else - return null; -} - -public method_call find_method_call_lambda(string name) -{ - int i = 0; - while (i < list_method_calls_lambda.Count && - ((ident)((method_call)list_method_calls_lambda[i]).dereferencing_value).name != name) - i++; - if (i < list_method_calls_lambda.Count) - return (method_call)list_method_calls_lambda[i]; - else - return null; -} -public function_lambda_definition find_func_lambda_after(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && - ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return _function_lambda_definitions_after[i] as function_lambda_definition; - else - return null; -} -public ArrayList find_params(string name) -{ - ArrayList _params = new ArrayList(); - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parametres == null) - return _params; - else - { - for (int j = 0; j < ((procedure_definition)_functions[i]).proc_header.parametres.params_list.Count; j++) - _params.Add(((procedure_definition)_functions[i]).proc_header.parametres.params_list[j]); - return _params; - } - } - else - return _params; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)param_value_list[param_value_list.Count - 1]).expressions[j]); - return _params; - } - } - else - return _params; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions[j]); - return _params; - } - } - } - else - return _params; - } -} - - - -} -} diff --git a/Grammars/Haskell/определение_функции.txt b/Grammars/Haskell/определение_функции.txt deleted file mode 100644 index e1ed8ddac..000000000 --- a/Grammars/Haskell/определение_функции.txt +++ /dev/null @@ -1,445 +0,0 @@ -{ - //////////////////////////head - method_name _method_name = new method_name(null, (ident)LRParser.GetReductionSyntaxNode(0), null); - parsertools.create_source_context(_method_name, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - - function_header _function_header = new function_header(); - - object rt = LRParser.GetReductionSyntaxNode(2); - _function_header.name = _method_name; - if (_function_header.name.meth_name is template_type_name) - { - _function_header.template_args = (_function_header.name.meth_name as template_type_name).template_args; - ident id = new ident(_function_header.name.meth_name.name); - parsertools.create_source_context(id, _function_header.name.meth_name, _function_header.name.meth_name); - _function_header.name.meth_name = id; - } - if (LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - _function_header.parametres=(formal_parametres)LRParser.GetReductionSyntaxNode(1); - } - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("integer"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - rt=_named_type_reference; - _function_header.return_type=(type_definition)_named_type_reference; - - _function_header.of_object = false; - _function_header.class_keyword = false; - token_info _token_info = new token_info("function"); - _token_info.source_context = parsertools.GetTokenSourceContext(); - parsertools.create_source_context(_function_header, _token_info, rt); - //////////////////////////////////////block - block _block = new block(null, null); - - statement_list sl = null; - if (LRParser.GetReductionSyntaxNode(3) is statement_list) - sl = LRParser.GetReductionSyntaxNode(3) as statement_list; - else - { - sl = new statement_list(); - sl.subnodes.Add(LRParser.GetReductionSyntaxNode(3) as statement); - if (!(LRParser.GetReductionSyntaxNode(3) is empty_statement)) - parsertools.assign_source_context(sl, LRParser.GetReductionSyntaxNode(3)); - } - _block.program_code = sl; - ////////////////// - procedure_definition _procedure_definition = new procedure_definition(_function_header, null); - rt = _function_header; - if (_block != null) - { - rt = _block; - if (_block is proc_block) - _procedure_definition.proc_body = (proc_block)_block; - } - parsertools.create_source_context(_procedure_definition, _function_header, rt); - - return _procedure_definition; - } -///////////////////////////////////////////////////////////////////////////////// - -{ - //////////////////////////head - method_name _method_name = new method_name(null, func_name, null); - parsertools.create_source_context(_method_name, func_name, func_name); - - function_header _function_header = new function_header(); - - object rt = new object(); - _function_header.name = _method_name; - if (_function_header.name.meth_name is template_type_name) - { - _function_header.template_args = (_function_header.name.meth_name as template_type_name).template_args; - ident id = new ident(_function_header.name.meth_name.name); - parsertools.create_source_context(id, _function_header.name.meth_name, _function_header.name.meth_name); - _function_header.name.meth_name = id; - } - ////////////////////////////////params - formal_parametres _formal_parametres = new formal_parametres(); - expression_list f = (expression_list)param_value_list[param_value_list.Count-1]; - for (int i = 0; i < f.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - _ident_list.source_context = ((ident)f.expressions[i]).source_context; - _ident_list.idents.Add((ident)f.expressions[i]); - - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("integer"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - typed_parametres _typed_parametres = new typed_parametres(_ident_list, (type_definition)_named_type_reference1, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference1); - - _formal_parametres.params_list.Add(_typed_parametres); - } - _function_header.parametres = _formal_parametres; - //////////////////////////type - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("integer"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - rt=_named_type_reference; - _function_header.return_type=(type_definition)_named_type_reference; - - _function_header.of_object = false; - _function_header.class_keyword = false; - token_info _token_info = new token_info("function"); - _token_info.source_context = parsertools.GetTokenSourceContext(); - parsertools.create_source_context(_function_header, _token_info, rt); - //////////////////////////////////////block - statement_list stmt_l = new statement_list(); - for (int i=0;i= 0; i--) - { - expression_list pv = (expression_list)param_value_list[i]; - statement body_part = (statement)body_variant_list[i]; - - if_node _if_node = new if_node(null, body_part, last_if); - parsertools.create_source_context(_if_node, null, parsertools.sc_not_null(body_part, last_if)); - - ident id_true = new ident("true"); - expression last_expr = id_true as expression; - for (int j = 0; j < pv.expressions.Count; j++) - { - typed_parametres tp = (typed_parametres)_function_header.parametres.params_list[j]; - if (!(pv.expressions[j] is ident))//vstavka if (vyhod iz rekursii) - { - op_type_node _op_type_node = new op_type_node(Operators.Equal); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - bin_expr _bin_expr = new bin_expr(tp.idents.idents[0] as expression, (expression)pv.expressions[j], _op_type_node.type); - parsertools.create_source_context(_bin_expr, tp.idents.idents[0], pv.expressions[j]); - - op_type_node _op_type_node1 = new op_type_node(Operators.LogicalAND); - _op_type_node1.source_context = parsertools.GetTokenSourceContext(); - bin_expr _bin_expr1 = new bin_expr(_bin_expr, last_expr, _op_type_node1.type); - parsertools.create_source_context(_bin_expr1, _bin_expr, last_expr); - last_expr = _bin_expr1; - } - } - _if_node.condition = last_expr; - parsertools.create_source_context(_if_node, null, _if_node); - last_if = _if_node; - } - stmt_l.subnodes.Add(last_if); - - block _block = new block(null, null); - statement_list sl = null; - if (stmt_l is statement_list) - sl = stmt_l as statement_list; - else - { - sl = new statement_list(); - sl.subnodes.Add(stmt_l as statement); - if (!(stmt_l is empty_statement)) - parsertools.assign_source_context(sl, stmt_l); - } - _block.program_code = sl; - ////////////////// - procedure_definition _procedure_definition = new procedure_definition(_function_header, null); - rt = _function_header; - if (_block != null) - { - rt = _block; - if (_block is proc_block) - _procedure_definition.proc_body = (proc_block)_block; - } - parsertools.create_source_context(_procedure_definition, _function_header, rt); - param_value_list.Clear(); - body_variant_list.Clear(); - return _procedure_definition; - } -///////////////////////////////////////////////////////////////////// -{ - //////////////////////////head - /*ident_list il = new ident_list(); - il.idents.Add(new ident("T")); - template_type_name _template_type_name = new template_type_name(il); - _template_type_name.name = func_name.name; - parsertools.create_source_context(_template_type_name, func_name, il);*/ - - - method_name _method_name = new method_name(null, func_name, null); - parsertools.create_source_context(_method_name, func_name, func_name); - - function_header _function_header = new function_header(); - - object rt = new object(); - _function_header.name = _method_name; - if (_function_header.name.meth_name is template_type_name) - { - _function_header.template_args = (_function_header.name.meth_name as template_type_name).template_args; - ident id = new ident(_function_header.name.meth_name.name); - parsertools.create_source_context(id, _function_header.name.meth_name, _function_header.name.meth_name); - _function_header.name.meth_name = id; - } - ////////////////////////////////params - formal_parametres _formal_parametres = new formal_parametres(); - expression_list f = (expression_list)param_value_list[param_value_list.Count - 1]; - if (f != null) - { - for (int i = 0; i < f.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - if (f.expressions[i] is ident) - { - _ident_list.source_context = ((ident)f.expressions[i]).source_context; - _ident_list.idents.Add((ident)f.expressions[i]); - } - else - { - int i1=0; - expression_list el = (expression_list)param_value_list[0]; - while (i1 < param_value_list.Count && !(el.expressions[i] is ident)) - { - i1++; - el = (expression_list)param_value_list[i1]; - } - if (i1 < param_value_list.Count) - { - _ident_list.source_context = (el.expressions[i]).source_context; - _ident_list.idents.Add(el.expressions[i] as ident); - } - } - - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("integer"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - typed_parametres _typed_parametres = new typed_parametres(_ident_list, (type_definition)_named_type_reference1, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference1); - - _formal_parametres.params_list.Add(_typed_parametres); - } - _function_header.parametres = _formal_parametres; - } - //////////////////////////type - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("integer"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - rt = _named_type_reference; - _function_header.return_type = (type_definition)_named_type_reference; - - _function_header.of_object = false; - _function_header.class_keyword = false; - token_info _token_info = new token_info("function"); - _token_info.source_context = parsertools.GetTokenSourceContext(); - parsertools.create_source_context(_function_header, _token_info, rt); - //////////////////////////////////////block - statement_list stmt_l = new statement_list(); - - statement last_if = (statement)body_variant_list[body_variant_list.Count - 1]; - for (int i = param_value_list.Count - 2; i >= 0; i--) - { - expression_list pv = (expression_list)param_value_list[i]; - statement body_part = (statement)body_variant_list[i]; - - if_node _if_node = new if_node(null, body_part, last_if); - parsertools.create_source_context(_if_node, null, parsertools.sc_not_null(body_part, last_if)); - - ident id_true = new ident("true"); - expression last_expr = id_true as expression; - for (int j = 0; j < pv.expressions.Count; j++) - { - typed_parametres tp = (typed_parametres)_function_header.parametres.params_list[j]; - if (!(pv.expressions[j] is ident))//vstavka if (vyhod iz rekursii) - { - op_type_node _op_type_node = new op_type_node(Operators.Equal); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - bin_expr _bin_expr = new bin_expr(tp.idents.idents[0] as expression, (expression)pv.expressions[j], _op_type_node.type); - parsertools.create_source_context(_bin_expr, tp.idents.idents[0], pv.expressions[j]); - - op_type_node _op_type_node1 = new op_type_node(Operators.LogicalAND); - _op_type_node1.source_context = parsertools.GetTokenSourceContext(); - bin_expr _bin_expr1 = new bin_expr(_bin_expr, last_expr, _op_type_node1.type); - parsertools.create_source_context(_bin_expr1, _bin_expr, last_expr); - last_expr = _bin_expr1; - } - } - _if_node.condition = last_expr; - ////ââîä íîâûõ ïåðåìåííûõ - /*for (int j = 0; j < pv.expressions.Count; j++) - { - if (pv.expressions[j] is ident && ((ident)pv.expressions[j]).name!=_function_header.parametres.params_list[j].idents.idents[0].name) - { - ident_list il = new ident_list(); - il.idents.Add(new ident(((ident)pv.expressions[j]).name)); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("integer"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - var_def_statement _var_def_statement = new var_def_statement(il, (type_definition)_named_type_reference1, null, definition_attribute.None, false); - parsertools.create_source_context(_var_def_statement, il, _named_type_reference1); - var_statement _var_statement = new var_statement(_var_def_statement); - parsertools.create_source_context(_var_statement, null, _var_def_statement); - ((statement_list)_if_node.then_body).subnodes.Insert(0, _var_statement);//obyavlenie peremennoy - - op_type_node _op_type_node2 = new op_type_node(Operators.Assignment); - _op_type_node2.source_context = parsertools.GetTokenSourceContext(); - assign _assign = new assign(il.idents[0] as addressed_value, _function_header.parametres.params_list[j].idents.idents[0] as expression, _op_type_node2.type); - parsertools.create_source_context(_assign, il.idents[0], _function_header.parametres.params_list[j].idents.idents[0]); - ((statement_list)_if_node.then_body).subnodes.Insert(1, _assign); - } - }*/ - //// - parsertools.create_source_context(_if_node, null, _if_node); - last_if = _if_node; - } - stmt_l.subnodes.Add(last_if); - - block _block = new block(null, null); - statement_list sl = null; - if (stmt_l is statement_list) - sl = stmt_l as statement_list; - else - { - sl = new statement_list(); - sl.subnodes.Add(stmt_l as statement); - if (!(stmt_l is empty_statement)) - parsertools.assign_source_context(sl, stmt_l); - } - _block.program_code = sl; - ////////////////// - procedure_definition _procedure_definition = new procedure_definition(_function_header, null); - rt = _function_header; - if (_block != null) - { - rt = _block; - if (_block is proc_block) - _procedure_definition.proc_body = (proc_block)_block; - } - parsertools.create_source_context(_procedure_definition, _function_header, rt); - param_value_list.Clear(); - body_variant_list.Clear(); - return _procedure_definition; - } \ No newline at end of file diff --git a/Parsers/BFParser/BFLang.resources b/Parsers/BFParser/BFLang.resources deleted file mode 100644 index 9ba3d827d86075e9085813dbd9ddc7aa6432fb7f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5577 zcmaKwe|%Hry~nGt!G?&6*Sf)|` zJpS{ASHEWezU+>x@oRkFx*%S)o{S3}};RlN9+} zG9AlSHHr(${v!C)tev#!pwL@Hn{bv~)~IIXhdvZ~Tu|#EeN2soqI^p3_Sn z&3tY&SLGLn9dCV;-X#<-%KNj>8+gBU`q3fB>H1Q7{_43Cj%DZG(x0YHXPhy|TRP5u z#;M`PgS07~jz|wYJU5jkj^`F}-n+FDIRz8X5(j}~mUtFGRTp}*)huy9eoU-pL$X>8 zsIr;|#ANjppvme?U|3c^1h}l00VA?H2pFnfLgrTszZ{kLlEloa_|itM0GZc@!svRWxt*P=fr z^d``lDfCWQ-JMUWe>6U>$)BoOmln3vPR)6fHobDs%A4;HZ*E_ha(wWI;X>NfAoQZG z<5HxGRM%oOEm9A5(|8oXG)@4R#uNb4@Buii7{D}o0Zd~efNAUiFpcFv zTvodPT~=oUQCU3*V6_{7gsesZQ&z``)mLX!1;CdJz}E`EcOL-X0RTP+0G|TDmjS@H z7l5w_fUgIDZ!Q2|0{~wI0AC7#Z;V(?;M)qoX9M7C2H=|pz!w1ED+S;S0`R2+@YMkD z6$0?d0DRd1eDwf)ZUDXn0N(_$+Jw&oz*hjk*ABp!3BV@-@Hqka!T@|00KQrPK0&M& zMjYC(&|9cYG8HLuAE`D6W%ViAWEu|bve0X)Sw=g+vy3n{xSEAsA3ZB2-DWpol3vjD zhPj8fNpVH%2BL~~7)U4@r)|z5Mf*nDq2=JU70u9dXhe$cMG65(Nhw-{)CVBNrDzY* zAb_Mx(YZ*y08&(njuXACPhLX2EG{SeGJOAq3Nn9E+J#MBBVV5I?8Uwto4H z;cB97XNA(Bd`5STh~5g?W=I=MIT@2T4krcds zGqgz2nEbHrdRxz_HFKEZY7@O-tVfojnw-2KZ;U9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={WAOq`eMk(?woe!yvcp5&f%3U9qL?#*|dFIB#}`}>!J`tHTs>X&V4``vA)AEck) zq#slLFb;0V!97eImFn@FVYfv0mcRVOW9i4#Yc#Osx0~BKjAp}73X z{bJdcC!eK%8?9YqL9g7h&vrO%=~nfz&jvGA|8ULsPV-N?X1(`LJv*jN-KSO$*7RSv zhBtL#VtHim*wvHkGd}$G#wpXsruBZ;`v0D9MDySF<6YM}(~gMt{Pp>z?WcC1*6aT= z_BB`bKWFi;0Z;Yn&%f$fas7K$tow#Y{YUfO+tb0s$r!MMq~Zfk+Ncj^e?;|N`pgID rlJs>?9$R^zB}W+|98`*NLu=W(fi-UzeN8VcDFVm diff --git a/Parsers/BFParser/BFParser.csproj b/Parsers/BFParser/BFParser.csproj deleted file mode 100644 index 41bda4808..000000000 --- a/Parsers/BFParser/BFParser.csproj +++ /dev/null @@ -1,108 +0,0 @@ - - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {35F1E213-0BEA-4C12-B004-129EA088CD75} - Library - Properties - BFParser - BFParser - - - 4.0 - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - ..\..\bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - ..\..\bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\bin\SyntaxTree.dll - - - - - - - - - - - - - - - - - {44A01F9E-DCE7-470C-AAE5-C3DE0CCBEE3B} - Errors - - - {AF2EFD7B-69DD-4B43-AF65-B59B29349C23} - ParserTools - - - - - False - КлиентÑ�кий профиль .NET Framework 3.5 SP1 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - УÑ�тановщик Windows 3.1 - true - - - - - \ No newline at end of file diff --git a/Parsers/BFParser/BFParserTools.cs b/Parsers/BFParser/BFParserTools.cs deleted file mode 100644 index 6d4bb9af5..000000000 --- a/Parsers/BFParser/BFParserTools.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Text; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.ParserTools; -using GoldParser; - - -namespace PascalABCCompiler.BFParser -{ - public class BF_parsertools:parser_tools - { - public override string symbol_to_string(Symbol symbol) - { - return null; - } - public override int symbol_priority(Symbol symbol) - { - return 0; - } - } -} diff --git a/Parsers/BFParser/BF_lrparser.cs b/Parsers/BFParser/BF_lrparser.cs deleted file mode 100644 index 79ea7c1ed..000000000 --- a/Parsers/BFParser/BF_lrparser.cs +++ /dev/null @@ -1,492 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.BFParser -{ - - public class GPBParser_BF:GPBParser - { - private Stack NodesStack; - private int operation_value=0; - private object left_node,right_node; - - public GPBParser_BF(Stream stream) - :base(stream) - { - parsertools = new BF_parsertools(); - } - - public object Parse(string source) - { - NodesStack = new Stack(); - LRParser = new Parser(new StringReader(source), LanguageGrammar); - parsertools.parser = LRParser; - LRParser.TrimReductions = false; - while (true) - { - switch (LRParser.Parse()) - { - case ParseMessage.LexicalError: - errors.Add(new TokenReadError(this)); - LRParser.PopInputToken(); - if (errors.Count > max_errors) - return null; - break; - - case ParseMessage.SyntaxError: - prev_node = LRParser.TokenSyntaxNode; - Error er = new UnexpectedToken(this,parsertools.symbol_collection_to_string(this.LRParser.GetExpectedTokens())); - Symbol sym = LRParser.PopInputToken(); - if (sym.SymbolType == SymbolType.End && errors.Count > 0) - return null; - errors.Add(er); - if (errors.Count > max_errors) - return null; - break; - case ParseMessage.Reduction: - LRParser.TokenSyntaxNode = CreateNonTerminalObject(); - break; - - case ParseMessage.Accept: - return LRParser.TokenSyntaxNode; - - case ParseMessage.TokenRead: - LRParser.TokenSyntaxNode = CreateTerminalObject(); - break; - - case ParseMessage.InternalError: - errors.Add(new CompilerInternalError("PascalABCParser", new Exception("ParseMessage.InternalError"))); - return null; - - case ParseMessage.NotLoadedError: - errors.Add(new CompilerInternalError("PascalABCParser", new Exception("ParseMessage.NotLoadedError"))); - return null; - - case ParseMessage.CommentError: - errors.Add(new UnexpectedToken(this,"(EOF)")); - return null; - - /*case ParseMessage.CommentBlockRead: - break; - - case ParseMessage.CommentLineRead: - break;*/ - } - } - - } - - public enum SymbolConstants : int - { - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_TKDEC = 3, // 'tkDec' - SYMBOL_TKDECVALUE = 4, // 'tkDecValue' - SYMBOL_TKINC = 5, // 'tkInc' - SYMBOL_TKINCVALUE = 6, // 'tkIncValue' - SYMBOL_TKJMPPAST = 7, // 'tkJMPPast' - SYMBOL_TKJMPRET = 8, // 'tkJMPRet' - SYMBOL_TKREAD = 9, // 'tkRead' - SYMBOL_TKWRITE = 10, // 'tkWrite' - SYMBOL_BF = 11, // - SYMBOL_BF_EMPTY_INSTRUCTION = 12, // - SYMBOL_BF_INSTRUCTION = 13, // - SYMBOL_BF_INSTRUCTIONS = 14, // - SYMBOL_BF_INSTRUCTIONS_LIST = 15, // - SYMBOL_CHANGE_POS = 16, // - SYMBOL_CHANGE_POS_LIST = 17, // - SYMBOL_CHANGE_VALUE = 18, // - SYMBOL_CHANGE_VALUE_LIST = 19 // - }; - - public enum RuleConstants : int - { - RULE_BF = 0, // ::= - RULE_BF_EMPTY_INSTRUCTION = 1, // ::= - RULE_BF_INSTRUCTIONS = 2, // ::= - RULE_BF_INSTRUCTIONS2 = 3, // ::= - RULE_BF_INSTRUCTIONS_LIST = 4, // ::= - RULE_BF_INSTRUCTIONS_LIST2 = 5, // ::= - RULE_CHANGE_POS_LIST = 6, // ::= - RULE_CHANGE_POS_LIST2 = 7, // ::= - RULE_CHANGE_VALUE_LIST = 8, // ::= - RULE_CHANGE_VALUE_LIST2 = 9, // ::= - RULE_CHANGE_POS_TKINC = 10, // ::= 'tkInc' - RULE_CHANGE_POS_TKDEC = 11, // ::= 'tkDec' - RULE_CHANGE_VALUE_TKINCVALUE = 12, // ::= 'tkIncValue' - RULE_CHANGE_VALUE_TKDECVALUE = 13, // ::= 'tkDecValue' - RULE_BF_INSTRUCTION_TKJMPPAST_TKJMPRET = 14, // ::= 'tkJMPPast' 'tkJMPRet' - RULE_BF_INSTRUCTION = 15, // ::= - RULE_BF_INSTRUCTION2 = 16, // ::= - RULE_BF_INSTRUCTION_TKWRITE = 17, // ::= 'tkWrite' - RULE_BF_INSTRUCTION_TKREAD = 18 // ::= 'tkRead' - }; - - private Object CreateTerminalObject() - { - switch ((SymbolConstants) LRParser.TokenSymbol.Index) - { - case SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Whitespace' return NULL! \n\r");*/return null; - - case SymbolConstants.SYMBOL_TKDEC : - //'tkDec' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKDECVALUE : - //'tkDecValue' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKINC : - //'tkInc' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKINCVALUE : - //'tkIncValue' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKJMPPAST : - //'tkJMPPast' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKJMPRET : - //'tkJMPRet' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKREAD : - //'tkRead' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKWRITE : - //'tkWrite' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_BF : - // - //TERMINAL:BF - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_BF_EMPTY_INSTRUCTION : - // - //TERMINAL:bf_empty_instruction - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_BF_INSTRUCTION : - // - //TERMINAL:bf_instruction - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_BF_INSTRUCTIONS : - // - //TERMINAL:bf_instructions - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_BF_INSTRUCTIONS_LIST : - // - //TERMINAL:bf_instructions_list - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_CHANGE_POS : - // - //TERMINAL:change_pos - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_CHANGE_POS_LIST : - // - //TERMINAL:change_pos_list - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_CHANGE_VALUE : - // - //TERMINAL:change_value - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_CHANGE_VALUE_LIST : - // - //TERMINAL:change_value_list - return null; - //ENDTERMINAL - - } - throw new SymbolException("Unknown symbol"); - } - - public Object CreateNonTerminalObject() - { - switch ((RuleConstants) LRParser.ReductionRule.Index) - { - case RuleConstants.RULE_BF : - // ::= - - { - program_module _program_module=new program_module(); - - _program_module.Language = LanguageId.PascalABCNET; - ident BFSystem=new ident("BFSystem"); - unit_or_namespace unit=new unit_or_namespace(); - unit.name = new ident_list(); - unit.name.idents.Add(BFSystem); - uses_list used_units=new uses_list(); - used_units.units.Add(unit); - block program_block=new block(null,(statement_list)LRParser.GetReductionSyntaxNode(0)); - _program_module.used_units=used_units; - _program_module.program_block=program_block; - used_units.source_context=unit.source_context=BFSystem.source_context=new SourceContext(1,1,1,1,1,1); - parsertools.create_source_context(program_block,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_program_module,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - operation_value=0; - - return _program_module; - } - - - case RuleConstants.RULE_BF_EMPTY_INSTRUCTION : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - - case RuleConstants.RULE_BF_INSTRUCTIONS : - // ::= -return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_BF_INSTRUCTIONS2 : - // ::= - - { - statement_list _statement_list=new statement_list(); - _statement_list.subnodes.Add(new empty_statement()); - return _statement_list; - } - - - case RuleConstants.RULE_BF_INSTRUCTIONS_LIST : - // ::= - - //TemplateList for statement_list (create) - { - statement_list _statement_list=new statement_list(); - _statement_list.source_context=((statement)LRParser.GetReductionSyntaxNode(0)).source_context; - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(0)); - return _statement_list; - } - - - case RuleConstants.RULE_BF_INSTRUCTIONS_LIST2 : - // ::= - - //TemplateList for statement_list (add) - { - statement_list _statement_list=(statement_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_statement_list,_statement_list,LRParser.GetReductionSyntaxNode(1)); - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(1)); - return _statement_list; - } - - - case RuleConstants.RULE_CHANGE_POS_LIST : - // ::= - left_node=right_node=LRParser.GetReductionSyntaxNode(0); return null; - - case RuleConstants.RULE_CHANGE_POS_LIST2 : - // ::= - right_node=LRParser.GetReductionSyntaxNode(1); return null; - - case RuleConstants.RULE_CHANGE_VALUE_LIST : - // ::= - left_node=right_node=LRParser.GetReductionSyntaxNode(0); return null; - - case RuleConstants.RULE_CHANGE_VALUE_LIST2 : - // ::= - right_node=LRParser.GetReductionSyntaxNode(1); return null; - - case RuleConstants.RULE_CHANGE_POS_TKINC : - // ::= 'tkInc' - operation_value++; return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_CHANGE_POS_TKDEC : - // ::= 'tkDec' - operation_value--; return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_CHANGE_VALUE_TKINCVALUE : - // ::= 'tkIncValue' - operation_value++; return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_CHANGE_VALUE_TKDECVALUE : - // ::= 'tkDecValue' - operation_value--; return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_BF_INSTRUCTION_TKJMPPAST_TKJMPRET : - // ::= 'tkJMPPast' 'tkJMPRet' - - { - indexer indx=new indexer(new expression_list()); - indx.indexes.expressions.Add(new ident("BFCaretPos")); - indx.dereferencing_value=new ident("BFField"); - bin_expr be=new bin_expr(indx,new int32_const(0),Operators.NotEqual); - while_node wn=new while_node(); - wn.expr=be; - wn.statements=(statement_list)LRParser.GetReductionSyntaxNode(1); - parsertools.create_source_context(wn,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - be.right.source_context=indx.dereferencing_value.source_context=indx.source_context=indx.indexes.expressions[0].source_context=be.source_context=wn.source_context; - return wn; - } - - - case RuleConstants.RULE_BF_INSTRUCTION : - // ::= - - { - if (operation_value!=0) - { - ident caret=new ident("BFCaretPos"); - int32_const caret_n=new int32_const(operation_value); - operation_value=0; - bin_expr expr=new bin_expr(caret,caret_n,Operators.Plus); - assign _assign=new assign(caret,expr,Operators.Assignment); - parsertools.create_source_context(caret,left_node,right_node); - caret_n.source_context=expr.source_context=_assign.source_context=caret.source_context; - return _assign; - } - syntax_tree_node tn=new empty_statement(); - parsertools.create_source_context(tn,left_node,right_node); - return tn; - } - - - case RuleConstants.RULE_BF_INSTRUCTION2 : - // ::= - - { - if (operation_value!=0) - { - indexer indx=new indexer(new expression_list()); - indx.indexes.expressions.Add(new ident("BFCaretPos")); - indx.dereferencing_value=new ident("BFField"); - bin_expr be=new bin_expr(indx,new int32_const(operation_value),Operators.Plus); - assign assg=new assign(indx,be,Operators.Assignment); - operation_value=0; - parsertools.create_source_context(assg,left_node,right_node); - indx.dereferencing_value.source_context=indx.source_context=indx.indexes.expressions[0].source_context=be.right.source_context=be.source_context=assg.source_context; - return assg; - } - syntax_tree_node tn=new empty_statement(); - parsertools.create_source_context(tn,left_node,right_node); - return tn; - } - - - case RuleConstants.RULE_BF_INSTRUCTION_TKWRITE : - // ::= 'tkWrite' - - { - ident _ident=new ident("WriteCaretValue"); - procedure_call _procedure_call=new procedure_call(_ident); - parsertools.create_source_context(_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_procedure_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _procedure_call; - } - - - case RuleConstants.RULE_BF_INSTRUCTION_TKREAD : - // ::= 'tkRead' - - { - ident _ident=new ident("ReadCaretValue"); - procedure_call _procedure_call=new procedure_call(_ident); - parsertools.create_source_context(_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_procedure_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _procedure_call; - } - - - } - throw new RuleException("Unknown rule"); - } - } -} diff --git a/Parsers/BFParser/Parser.cs b/Parsers/BFParser/Parser.cs deleted file mode 100644 index 3f5e65214..000000000 --- a/Parsers/BFParser/Parser.cs +++ /dev/null @@ -1,154 +0,0 @@ -using System; -using System.IO; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Parsers; -using System.Resources; -using System.Reflection; -using System.Collections.Generic; -using PascalABCCompiler.Errors; - - - -namespace PascalABCCompiler.BFParser -{ - - public class BFLanguageParser: IParser - { - private GPBParser_BF parser; - - public BFLanguageParser() - { - filesExtensions = new string[1]; - filesExtensions[0] = ".bf"; - parser = null; - } - - string[] filesExtensions; - public string[] FilesExtensions - { - get - { - return filesExtensions; - } - } - - public ILanguageInformation LanguageInformation { - get { - return null; - } - } - - public bool CaseSensitive - { - get - { - return parser.LanguageGrammar.CaseSensitive; - } - } - - public Keyword[] Keywords - { - get - { - return new Keyword[0]; - } - } - - - public List CompilerDirectives - { - get - { - return new List(); - } - } - - List errors = new List(); - public List Errors - { - get - { - return errors; - } - set - { - errors = value; - } - } - - SourceFilesProviderDelegate sourceFilesProvider = null; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - public string Name - { - get - { - return "BF"; - } - } - public string Version - { - get - { - return "1.1"; - } - } - public string Copyright - { - get - { - return "(c) Òêà÷óê À.Â. 2006"; - } - } - public void Reset() - { - parser = new GPBParser_BF(CGTResourceExtractor.Extract(new ResourceManager("BFParser.BFLang", Assembly.GetExecutingAssembly()), "BFLanguage")); - //parser.Parse("+[.,]"); - parser.max_errors = 5; - } - - public syntax_tree_node BuildTree(string FileName, string Text,string[] SearchPatchs, ParseMode ParseMode) - { - if (parser == null) - Reset(); - parser.errors = Errors; - parser.current_file_name = FileName; - switch (ParseMode) - { - case ParseMode.Expression: - case ParseMode.Statement: - return null; - } - syntax_tree_node cu = (syntax_tree_node)parser.Parse(Text); - if (cu != null && cu is compilation_unit) - (cu as compilation_unit).file_name = FileName; - return cu; - } - - public override string ToString() - { - return "BF Language Parser v1.1"; - } - public IPreprocessor Preprocessor - { - get - { - return null; - } - } - - } - - -} diff --git a/Parsers/BFParser/Properties/AssemblyInfo.cs b/Parsers/BFParser/Properties/AssemblyInfo.cs deleted file mode 100644 index d81824dcf..000000000 --- a/Parsers/BFParser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("BF Language Parser")] -[assembly: AssemblyDescription("BF Language Parser for PascalABC.NET")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("PascalABCNETCompiler Team")] -[assembly: AssemblyProduct("BFParser")] -[assembly: AssemblyCopyright("Copyright © DarkStar 2006, 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("92be8996-4d69-46fa-a243-85b2a459a603")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/Parsers/HaskellParser/Errors.cs b/Parsers/HaskellParser/Errors.cs deleted file mode 100644 index 6bcd5dc1a..000000000 --- a/Parsers/HaskellParser/Errors.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.HaskellParser; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.Errors; -using System.Collections.Generic; - -namespace PascalABCCompiler.HaskellParser.Errors -{ - public class UnexpectedToken : SyntaxError - { - private string _message; - public UnexpectedToken(PascalABCCompiler.ParserTools.GPBParser parser) - : base("", parser.current_file_name, parser.parsertools.GetTokenSourceContext(parser.LRParser), (syntax_tree_node)parser.prev_node) - { - List Symbols = parser.parsertools.GetPrioritySymbols(parser.LRParser.GetExpectedTokens()); - if (Symbols.Count == 1) - { - string OneSybmolText = "ONE_" + Symbols[0].Name.ToUpper(); - string LocOneSybmolText = StringResources.Get(OneSybmolText); - if (LocOneSybmolText != OneSybmolText) - { - _message = string.Format(LocOneSybmolText); - return; - } - } - _message = string.Format(StringResources.Get("EXPECTED{0}"), PascalABCCompiler.FormatTools.ObjectsToString(parser.parsertools.SymbolsToStrings(Symbols.ToArray()), ",")); - } - public UnexpectedToken(string _file_name, string expected, SourceContext _source_context, syntax_tree_node _node) - : base("", _file_name, _source_context, _node) - { - _message = string.Format(StringResources.Get("EXPECTED{0}"), expected); - } - public override string Message - { - get - { - return _message; - } - } - } -} diff --git a/Parsers/HaskellParser/HaskellLang.resources b/Parsers/HaskellParser/HaskellLang.resources deleted file mode 100644 index c9c568365b1810cad47249a18a01590090aaab30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22093 zcmd6P3qVZi`+sf`5~30bQSOzDC>n%ZBFpZ&gd;`ls6oi3=AcwoNkWq3vb5H65DiKv zl`eFZHD$`tz0@=_P0jUO{?CM6``z8|{rCT3^v-8abI$v`m*@FBmsjC)aatE09i1rn zw|(V)zulXCCa>7+$KA8bbF<&C?^bN~@Y=j<;s_rdnK)yQOI(wk?hR?KrMr`{=N5}kluTIciNA#rU#$k)jjkH?Pj%d8Xx z!(O+=tIKwI;o>)W7e^lYDc79M3ovJoa$;C%BV`(N3-+lvUibovGZkO3jJb|y z4^?y8IH%iJ$v71hYcd*9iFlHn7Sa^Y#-z_MhU2;+jh+@LBu%+Z!c(+{#fuQQP(BGuwGPX* zMk5lGtPKP9q`~dm1j<%SdXO>2i!kZRdGGp|irq@5ufnsfuSjnn8!zTXG$S=VjcU0P zPAVNJGH1)7&7z~=sf>;$hpPm*6WVr8YMLjbjIgz@k0fdZ`vSKz%B5(8fDIoOz`zoG zl&puoiObo%;~)XQ#T>80q-qQJZU-mzEp+`gTuzZk67_<8Pn?G(DL54xmK=@H;Ms|I zb`VnYPOxt)PW!-3BSq$TC4AWqzRYk^o$jGzKlrjYd|3*ka+Ip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3yBKAr_8gDDy@B1C767pM9K#w;~`%i`jk-nRJ8v;t^D>{#&Cqs8U@ASN>m1E*>ENI z1s)H1z?PXx2;?v-4q4%qg)2D9$$CrPpc;cNPj4CtlRtSNBw6?YP!556M*%Sw!Y+ra`e z_wOG(NKIs#;E0LIx^pT4$>MIR$A)@QYw;}?Sg{5JO7zU3YCFW>%c>7rq(*r9?2VOB zJ19a{;^bzqPC+@z)@sr5-U!`>)WlW4iySpxo&3G(9IDw9=8^!_g{@fms@M4NK=}n! z(}5NU{g^us7=7K*N6xTz^_-h+u3>dtWquhLdF6^V&pIIZ)l+-t)C9B3Zn`14BTE@M z$K)~tseOyrf7l@|kQ@4}Zg^2{ZAK39dhhW+?AMRQG@S=?pqlVwneq6rqZRE`2pMU60Wt1Hoh+{-Tuk=*idn=GfPo5OoAE zIw9_%QgC0F6k#69{{QE7f&U7D3{E>&Nd)ijzVoi+CHK2~Ts%3xvL~pk^>CKp%PHf! z_tVjUrwtSD!WsOg&}o`_dygZ?sO35`5=tv`Bi9U>ali44+NOp>=Jd{$#`Gt1yE;v& zP!C-@M3ne%&*t1B^&b5J;-`+r-P`me0N{K*3cR69{(JY)^cOxm`WSsb88 zj8`oPco3=N+g&cgRJ6yH=ql-^p*~NfBv8^O88!vWNs%WO$S=gCqNa);B$2%;k3 z%X`y1_IwhO5T*7BFHudJRD>|5Ar1d4WA*3fU8P2bN_Xn#dmT`L!+&CHEot;F&mbq@ z*-QHt_I}4t?)~oAwMmpVS80vL9a@1yz-M4_i?--+!H@oGj?K`Q+@drivm8<=?%-5h zJdq&f;_K&qMRuq5X5&xPv)^QoRhN=NMb|g?t}A_RT^|dpdE6J}I6{Va@7}H`(C9C# SBv;PpNSv=c2{h@V^Zx)sj#zmB diff --git a/Parsers/HaskellParser/HaskellParser.csproj b/Parsers/HaskellParser/HaskellParser.csproj deleted file mode 100644 index e884f43a2..000000000 --- a/Parsers/HaskellParser/HaskellParser.csproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {760E7113-85AE-430F-A3E5-84A20F294356} - Library - Properties - HaskellParser - HaskellParser - - - 4.0 - - - v4.0 - - - - true - full - false - ..\..\bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - ..\..\bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - - - - - - - - - - - - - {44A01F9E-DCE7-470C-AAE5-C3DE0CCBEE3B} - Errors - - - {2DE2842F-0912-4251-BC0F-480854C44A13} - Localization - - - {AF2EFD7B-69DD-4B43-AF65-B59B29349C23} - ParserTools - - - {C2CAC65A-B2AE-4CCC-B067-E6B8E75DF73A} - SyntaxTree - - - - - - - - \ No newline at end of file diff --git a/Parsers/HaskellParser/HaskellParserTools.cs b/Parsers/HaskellParser/HaskellParserTools.cs deleted file mode 100644 index b0600d718..000000000 --- a/Parsers/HaskellParser/HaskellParserTools.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Text; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.HaskellParser -{ - public static class StringResources - { - private static string prefix = "HaskellPARSER_"; - public static string Get(string Id) - { - string ret = PascalABCCompiler.StringResources.Get(prefix + Id); - if (ret == prefix + Id) - return Id; - else - return ret; - } - } - - public class Haskell_parsertools : parser_tools - { - public override string symbol_to_string(Symbol symbol) - { - /*switch (symbol.Index) - { - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKMINUS: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKSLASH: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKSTAR: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKGREATER: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKGREATEREQUAL: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKLOWER: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKLOWEREQUAL: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKNOTEQUAL: - return StringResources.Get("OPERATOR"); - }*/ - string res = StringResources.Get(symbol.Name.ToUpper()); - if (res.IndexOf("TK") == 0) - return res.Remove(0, 2).ToLower(); - return res; - } - - public override int symbol_priority(Symbol symbol) - { - /*switch (symbol.Index) - { - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKEND: - return 8; - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKBEGIN: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKNUMBER: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKROUNDCLOSE: - return 9; - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKIDENT: - return 10; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKASSIGN: - return 25; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKEQUAL: - return 25; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKSEMICOLON: - return 30; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_EXPRESSION: - return 100; - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_STATEMENT: - return 110; - - }*/ - if (symbol.SymbolType == SymbolType.Terminal) - return 1; - return 0; - } - } -} diff --git a/Parsers/HaskellParser/Haskell_lrparser.cs b/Parsers/HaskellParser/Haskell_lrparser.cs deleted file mode 100644 index d6c411bc4..000000000 --- a/Parsers/HaskellParser/Haskell_lrparser.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.HaskellParser.Errors; -using PascalABCCompiler.ParserTools; - -namespace PascalABCCompiler.HaskellParser -{ - public partial class GPBParser_Haskell : GPBParser - { - private Stack NodesStack; - private SyntaxError error; - - Stream GrammarStream; - - public GPBParser_Haskell(Stream stream) - : base(stream) - { - GrammarStream = stream; - parsertools = new Haskell_parsertools(); - } - - public object Parse(string source) - { - NodesStack = new Stack(); - LRParser = new GoldParser.Parser(new StringReader(source), LanguageGrammar); - parsertools.parser = LRParser; - LRParser.TrimReductions = true; - try - { - while (true) - { - switch (LRParser.Parse()) - { - case GoldParser.ParseMessage.LexicalError: - errors.Add(new TokenReadError(this)); - LRParser.PopInputToken(); - if (errors.Count >= max_errors) - return null; - break; - - //sdes nugno vesti chtoto vrode steka poslednix oshibok. podumat - case GoldParser.ParseMessage.SyntaxError: - GoldParser.Symbol sym = LRParser.PopInputToken(); - error = new HaskellParser.Errors.UnexpectedToken(this); - //error = new UnexpectedToken(this, parsertools.symbol_collection_to_string(this.LRParser.GetExpectedTokens())); - if (sym.SymbolType == GoldParser.SymbolType.End && errors.Count > 0) - return null; - errors.Add(error); - if (errors.Count >= max_errors) - return null; - break; - case GoldParser.ParseMessage.Reduction: - LRParser.TokenSyntaxNode = CreateNonTerminalObject(LRParser.ReductionRule.Index); - if ((LRParser.TokenSyntaxNode as syntax_tree_node) != null) - prev_node = LRParser.TokenSyntaxNode; - break; - - case GoldParser.ParseMessage.Accept: - return LRParser.TokenSyntaxNode; - - case GoldParser.ParseMessage.TokenRead: - LRParser.TokenSyntaxNode = CreateTerminalObject(LRParser.TokenSymbol.Index); - break; - - case GoldParser.ParseMessage.InternalError: - errors.Add(new CompilerInternalError("HaskellParser", new Exception("ParseMessage.InternalError"))); - return null; - - case GoldParser.ParseMessage.NotLoadedError: - errors.Add(new CompilerInternalError("HaskellParser", new Exception("ParseMessage.NotLoadedError"))); - return null; - - case GoldParser.ParseMessage.CommentError: - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "(EOF)")); - return null; - - /*case ParseMessage.CommentBlockRead: - break; - - case ParseMessage.CommentLineRead: - break;*/ - } - } - } - catch (Exception e) - { - Error_Clear(); - if (errors.Count > 0) - return null; - else - throw; - } - - } - } -} diff --git a/Parsers/HaskellParser/Haskell_lrparser_rules.cs b/Parsers/HaskellParser/Haskell_lrparser_rules.cs deleted file mode 100644 index 3732c6f86..000000000 --- a/Parsers/HaskellParser/Haskell_lrparser_rules.cs +++ /dev/null @@ -1,6511 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using System.Collections.Generic; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.HaskellParser.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; -using PascalABCCompiler; - -namespace PascalABCCompiler.HaskellParser -{ -public partial class GPBParser_Haskell : GPBParser -{ - - - - - - - - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - //SymbolConstants - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - - public enum SymbolConstants : int - { - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTEND = 3, // (Comment End) - SYMBOL_COMMENTLINE = 4, // (Comment Line) - SYMBOL_COMMENTSTART = 5, // (Comment Start) - SYMBOL_TKAND = 6, // 'tkAnd' - SYMBOL_TKARROW = 7, // 'tkArrow' - SYMBOL_TKARROWGEN = 8, // 'tkArrowGen' - SYMBOL_TKASSIGN = 9, // 'tkAssign' - SYMBOL_TKBOOL = 10, // 'tkBool' - SYMBOL_TKBOTTOMMINUS = 11, // 'tkBottomMinus' - SYMBOL_TKCASE = 12, // 'tkCase' - SYMBOL_TKCHAR = 13, // 'tkChar' - SYMBOL_TKCOLON = 14, // 'tkColon' - SYMBOL_TKCOMMA = 15, // 'tkComma' - SYMBOL_TKDO = 16, // 'tkDo' - SYMBOL_TKDOT = 17, // 'tkDot' - SYMBOL_TKDOUBLE = 18, // 'tkDouble' - SYMBOL_TKELSE = 19, // 'tkElse' - SYMBOL_TKEQUAL = 20, // 'tkEqual' - SYMBOL_TKFIGURECLOSE = 21, // 'tkFigureClose' - SYMBOL_TKFIGUREOPEN = 22, // 'tkFigureOpen' - SYMBOL_TKIDENT = 23, // 'tkIdent' - SYMBOL_TKIF = 24, // 'tkIf' - SYMBOL_TKIMPORT = 25, // 'tkImport' - SYMBOL_TKIN = 26, // 'tkIn' - SYMBOL_TKINT = 27, // 'tkInt' - SYMBOL_TKLEFTSLASH = 28, // 'tkLeftSlash' - SYMBOL_TKLESS = 29, // 'tkLess' - SYMBOL_TKLESSEQ = 30, // 'tkLessEq' - SYMBOL_TKLET = 31, // 'tkLet' - SYMBOL_TKMAINIDENT = 32, // 'tkMainIdent' - SYMBOL_TKMAINIDENT1 = 33, // 'tkMainIdent1' - SYMBOL_TKMINUS = 34, // 'tkMinus' - SYMBOL_TKMODULE = 35, // 'tkModule' - SYMBOL_TKMORE = 36, // 'tkMore' - SYMBOL_TKMOREEQ = 37, // 'tkMoreEq' - SYMBOL_TKNOT = 38, // 'tkNot' - SYMBOL_TKNOTEQUAL = 39, // 'tkNotEqual' - SYMBOL_TKOF = 40, // 'tkOf' - SYMBOL_TKOR = 41, // 'tkOr' - SYMBOL_TKOTHERWISE = 42, // 'tkOtherwise' - SYMBOL_TKPLUS = 43, // 'tkPlus' - SYMBOL_TKQUOTE = 44, // 'tkQuote' - SYMBOL_TKREF = 45, // 'tkRef' - SYMBOL_TKRETURN = 46, // 'tkReturn' - SYMBOL_TKROUNDCLOSE = 47, // 'tkRoundClose' - SYMBOL_TKROUNDOPEN = 48, // 'tkRoundOpen' - SYMBOL_TKSEMICOLON = 49, // 'tkSemiColon' - SYMBOL_TKSLASH = 50, // 'tkSlash' - SYMBOL_TKSPLIT = 51, // 'tkSplit' - SYMBOL_TKSQUARECLOSE = 52, // 'tkSquareClose' - SYMBOL_TKSQUAREOPEN = 53, // 'tkSquareOpen' - SYMBOL_TKSTAR = 54, // 'tkStar' - SYMBOL_TKSTRING = 55, // 'tkString' - SYMBOL_TKTHEN = 56, // 'tkThen' - SYMBOL_TKWHERE = 57, // 'tkWhere' - SYMBOL_ADD_EXPR = 58, // - SYMBOL_ADDOP = 59, // - SYMBOL_BODY = 60, // - SYMBOL_BODY_FUNC = 61, // - SYMBOL_BODY_WHERE = 62, // - SYMBOL_CASE_VARIANT = 63, // - SYMBOL_CASE_VARIANTS = 64, // - SYMBOL_CONDITION = 65, // - SYMBOL_CONDITIONS = 66, // - SYMBOL_CONDITIONS_COMMA = 67, // - SYMBOL_CORTEG = 68, // - SYMBOL_DEF_VAR = 69, // - SYMBOL_DEF_VARS = 70, // - SYMBOL_EMPTY = 71, // - SYMBOL_EXPR = 72, // - SYMBOL_FUNC_CALL = 73, // - SYMBOL_FUNCS = 74, // - SYMBOL_FUNCS_VARIANTS = 75, // - SYMBOL_GENERATOR = 76, // - SYMBOL_GENERATORS = 77, // - SYMBOL_GUARD = 78, // - SYMBOL_GUARD_BODY = 79, // - SYMBOL_GUARD_BODY_LIST = 80, // - SYMBOL_IMPORT = 81, // - SYMBOL_IMPORTS = 82, // - SYMBOL_INFIX_EXPR = 83, // - SYMBOL_INIT = 84, // - SYMBOL_INITS = 85, // - SYMBOL_LAMBDA_FUNC = 86, // - SYMBOL_LIST = 87, // - SYMBOL_LIST_CONSTRUCTOR = 88, // - SYMBOL_LIST_ELEMENTS = 89, // - SYMBOL_LIST_PARAM = 90, // - SYMBOL_LIST_PARAM1 = 91, // - SYMBOL_MAIN_FUNC = 92, // - SYMBOL_MODULE = 93, // - SYMBOL_MULT_EXPR = 94, // - SYMBOL_MULTOP = 95, // - SYMBOL_NEGATE_EXPR = 96, // - SYMBOL_PARAM = 97, // - SYMBOL_PARAM_VALUE = 98, // - SYMBOL_PARAMS = 99, // - SYMBOL_PARAMS_VALUE = 100, // - SYMBOL_PARAMS_WHERE = 101, // - SYMBOL_PARAMS1 = 102, // - SYMBOL_REFERENCE = 103, // - SYMBOL_SIMPLE_EXPR = 104, // - SYMBOL_SIMPLE_TYPE_EXPR = 105, // - SYMBOL_STMT = 106, // - SYMBOL_STMTS = 107, // - SYMBOL_STMTS1 = 108, // - SYMBOL_VARIABLE = 109, // - SYMBOL_VARIABLE_EXPR = 110, // - SYMBOL_VARIANT = 111, // - SYMBOL_VARIANTS = 112, // - SYMBOL_WHERE_VAR = 113 // - }; - - - - - - - - - - - - - - - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - //RuleConstants - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - - public enum RuleConstants : int - { - RULE_MODULE_TKMODULE_TKMAINIDENT_TKWHERE = 0, // ::= 'tkModule' 'tkMainIdent' 'tkWhere' - RULE_MODULE = 1, // ::= - RULE_MODULE_TKMODULE_TKIDENT_TKWHERE = 2, // ::= 'tkModule' 'tkIdent' 'tkWhere' - RULE_REFERENCE = 3, // ::= - RULE_REFERENCE_TKREF_TKSTRING = 4, // ::= 'tkRef' 'tkString' - RULE_IMPORTS = 5, // ::= - RULE_IMPORTS2 = 6, // ::= - RULE_IMPORTS3 = 7, // ::= - RULE_IMPORT_TKIMPORT_TKIDENT = 8, // ::= 'tkImport' 'tkIdent' - RULE_BODY = 9, // ::= - RULE_BODY2 = 10, // ::= - RULE_FUNCS = 11, // ::= - RULE_FUNCS_VARIANTS = 12, // ::= - RULE_VARIANTS = 13, // ::= - RULE_VARIANTS2 = 14, // ::= - RULE_VARIANT_TKIDENT = 15, // ::= 'tkIdent' - RULE_VARIANT_TKQUOTE_TKIDENT_TKQUOTE = 16, // ::= 'tkQuote' 'tkIdent' 'tkQuote' - RULE_LIST_PARAM1 = 17, // ::= - RULE_BODY_WHERE = 18, // ::= - RULE_WHERE_VAR = 19, // ::= - RULE_WHERE_VAR_TKWHERE = 20, // ::= 'tkWhere' - RULE_INITS = 21, // ::= - RULE_INITS_TKSEMICOLON = 22, // ::= 'tkSemiColon' - RULE_INIT_TKIDENT = 23, // ::= 'tkIdent' - RULE_PARAMS_WHERE = 24, // ::= - RULE_PARAMS_WHERE2 = 25, // ::= - RULE_PARAMS_WHERE3 = 26, // ::= - RULE_PARAMS = 27, // ::= - RULE_PARAMS2 = 28, // ::= - RULE_PARAMS3 = 29, // ::= - RULE_PARAM = 30, // ::= - RULE_LIST_PARAM_TKIDENT = 31, // ::= 'tkIdent' - RULE_LIST_PARAM = 32, // ::= - RULE_LIST_PARAM_TKSQUAREOPEN_TKSQUARECLOSE = 33, // ::= 'tkSquareOpen' 'tkSquareClose' - RULE_LIST_PARAM_TKBOTTOMMINUS = 34, // ::= 'tkBottomMinus' - RULE_LIST_PARAM_TKIDENT_TKCOLON = 35, // ::= 'tkIdent' 'tkColon' - RULE_LIST_PARAM_TKBOTTOMMINUS_TKCOLON = 36, // ::= 'tkBottomMinus' 'tkColon' - RULE_LIST_PARAM_TKROUNDOPEN_TKROUNDCLOSE = 37, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_GUARD = 38, // ::= - RULE_GUARD_TKSPLIT = 39, // ::= 'tkSplit' - RULE_GUARD_TKSPLIT_TKOTHERWISE = 40, // ::= 'tkSplit' 'tkOtherwise' - RULE_MAIN_FUNC_TKMAINIDENT1_TKASSIGN = 41, // ::= 'tkMainIdent1' 'tkAssign' - RULE_BODY_FUNC = 42, // ::= - RULE_STMTS = 43, // ::= - RULE_STMTS_TKSEMICOLON = 44, // ::= 'tkSemiColon' - RULE_STMTS1 = 45, // ::= - RULE_STMTS12 = 46, // ::= - RULE_EXPR_TKEQUAL = 47, // ::= 'tkEqual' - RULE_EXPR_TKNOTEQUAL = 48, // ::= 'tkNotEqual' - RULE_EXPR_TKMORE = 49, // ::= 'tkMore' - RULE_EXPR_TKLESS = 50, // ::= 'tkLess' - RULE_EXPR_TKMOREEQ = 51, // ::= 'tkMoreEq' - RULE_EXPR_TKLESSEQ = 52, // ::= 'tkLessEq' - RULE_EXPR = 53, // ::= - RULE_LIST_TKSQUAREOPEN_TKSQUARECLOSE = 54, // ::= 'tkSquareOpen' 'tkSquareClose' - RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE = 55, // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE2 = 56, // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' - RULE_LIST = 57, // ::= - RULE_LIST_TKCOLON = 58, // ::= 'tkColon' - RULE_LIST_CONSTRUCTOR_TKSQUAREOPEN_TKSPLIT_TKSQUARECLOSE = 59, // ::= 'tkSquareOpen' 'tkSplit' 'tkSquareClose' - RULE_GENERATORS = 60, // ::= - RULE_GENERATORS_TKCOMMA = 61, // ::= 'tkComma' - RULE_GENERATOR_TKARROWGEN = 62, // ::= 'tkArrowGen' - RULE_CONDITIONS_COMMA = 63, // ::= - RULE_CONDITIONS_COMMA_TKCOMMA = 64, // ::= 'tkComma' - RULE_CONDITIONS = 65, // ::= - RULE_CONDITIONS_TKCOMMA = 66, // ::= 'tkComma' - RULE_CONDITION = 67, // ::= - RULE_CORTEG_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE = 68, // ::= 'tkRoundOpen' 'tkComma' 'tkRoundClose' - RULE_LIST_ELEMENTS = 69, // ::= - RULE_LIST_ELEMENTS2 = 70, // ::= - RULE_LIST_ELEMENTS_TKCOMMA = 71, // ::= 'tkComma' - RULE_ADD_EXPR_TKAND = 72, // ::= 'tkAnd' - RULE_ADD_EXPR = 73, // ::= - RULE_ADD_EXPR2 = 74, // ::= - RULE_MULT_EXPR_TKOR = 75, // ::= 'tkOr' - RULE_MULT_EXPR = 76, // ::= - RULE_MULT_EXPR2 = 77, // ::= - RULE_NEGATE_EXPR_TKMINUS = 78, // ::= 'tkMinus' - RULE_NEGATE_EXPR_TKNOT = 79, // ::= 'tkNot' - RULE_NEGATE_EXPR = 80, // ::= - RULE_SIMPLE_EXPR = 81, // ::= - RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE = 82, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_SIMPLE_EXPR2 = 83, // ::= - RULE_SIMPLE_EXPR3 = 84, // ::= - RULE_SIMPLE_EXPR_TKLET_TKIN = 85, // ::= 'tkLet' 'tkIn' - RULE_SIMPLE_EXPR4 = 86, // ::= - RULE_SIMPLE_EXPR5 = 87, // ::= - RULE_SIMPLE_EXPR6 = 88, // ::= - RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDCLOSE = 89, // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkRoundClose' 'tkRoundClose' - RULE_SIMPLE_TYPE_EXPR_TKINT = 90, // ::= 'tkInt' - RULE_SIMPLE_TYPE_EXPR_TKDOUBLE = 91, // ::= 'tkDouble' - RULE_SIMPLE_TYPE_EXPR_TKBOOL = 92, // ::= 'tkBool' - RULE_SIMPLE_TYPE_EXPR_TKCHAR = 93, // ::= 'tkChar' - RULE_SIMPLE_TYPE_EXPR_TKSTRING = 94, // ::= 'tkString' - RULE_VARIABLE_EXPR = 95, // ::= - RULE_DEF_VARS = 96, // ::= - RULE_DEF_VARS_TKSEMICOLON = 97, // ::= 'tkSemiColon' - RULE_DEF_VAR_TKIDENT = 98, // ::= 'tkIdent' - RULE_GUARD_BODY_LIST = 99, // ::= - RULE_GUARD_BODY_LIST2 = 100, // ::= - RULE_GUARD_BODY_TKASSIGN = 101, // ::= 'tkAssign' - RULE_VARIABLE_TKIDENT = 102, // ::= 'tkIdent' - RULE_VARIABLE_TKROUNDOPEN_TKIDENT_TKROUNDCLOSE = 103, // ::= 'tkRoundOpen' 'tkIdent' 'tkRoundClose' - RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE = 104, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE = 105, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE = 106, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE2 = 107, // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - RULE_INFIX_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDCLOSE = 108, // ::= 'tkRoundOpen' 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundClose' - RULE_MULTOP_TKSTAR = 109, // ::= 'tkStar' - RULE_MULTOP_TKSLASH = 110, // ::= 'tkSlash' - RULE_ADDOP_TKPLUS = 111, // ::= 'tkPlus' - RULE_ADDOP_TKMINUS = 112, // ::= 'tkMinus' - RULE_STMT_TKIDENT_TKARROWGEN_TKIDENT = 113, // ::= 'tkIdent' 'tkArrowGen' 'tkIdent' - RULE_STMT_TKIF_TKTHEN_TKELSE = 114, // ::= 'tkIf' 'tkThen' 'tkElse' - RULE_STMT_TKCASE_TKROUNDOPEN_TKROUNDCLOSE_TKOF = 115, // ::= 'tkCase' 'tkRoundOpen' 'tkRoundClose' 'tkOf' - RULE_STMT_TKDO_TKFIGUREOPEN_TKSEMICOLON_TKFIGURECLOSE = 116, // ::= 'tkDo' 'tkFigureOpen' 'tkSemiColon' 'tkFigureClose' - RULE_STMT_TKDO = 117, // ::= 'tkDo' - RULE_STMT_TKRETURN = 118, // ::= 'tkReturn' - RULE_STMT = 119, // ::= - RULE_CASE_VARIANTS = 120, // ::= - RULE_CASE_VARIANTS_TKSPLIT = 121, // ::= 'tkSplit' - RULE_CASE_VARIANT_TKROUNDOPEN_TKROUNDCLOSE_TKARROW = 122, // ::= 'tkRoundOpen' 'tkRoundClose' 'tkArrow' - RULE_PARAMS1 = 123, // ::= - RULE_PARAMS1_TKCOMMA = 124, // ::= 'tkComma' - RULE_FUNC_CALL = 125, // ::= - RULE_PARAMS_VALUE = 126, // ::= - RULE_PARAMS_VALUE2 = 127, // ::= - RULE_PARAM_VALUE = 128, // ::= - RULE_LAMBDA_FUNC_TKLEFTSLASH_TKARROW = 129, // ::= 'tkLeftSlash' 'tkArrow' - RULE_EMPTY = 130 // ::= - }; - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -private Object CreateTerminalObject(int TokenSymbolIndex) -{ -switch (TokenSymbolIndex) -{ - case (int)SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - //TERMINAL:Whitespace - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMMENTEND : - //(Comment End) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment End' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTLINE : - //(Comment Line) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Line' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTSTART : - //(Comment Start) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Start' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKAND : - //'tkAnd' - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalAND); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKARROW : - //'tkArrow' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKARROWGEN: - //'tkArrowGen' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKASSIGN : - //'tkAssign' - - { - if (token_where == 2 || token_where == 1) - { - token_where = 0; - lambda_stack.Add(new ArrayList()); - //let_stack.Add(new ArrayList()); - let_where_funcs_main.Add(let_where_funcs.Clone()); - let_where_funcs.Clear(); - } - else - if (token_let == 1) - lambda_stack.Add(new ArrayList()); - if (token_let == 1) - let_stack.Add(new ArrayList()); - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKBOOL : - //'tkBool' -{ - ident _ident = null; - string s = LRParser.TokenText; - if (s == "True" || s == "true") - s = "true"; - else - s = "false"; - _ident =new ident(s); - _ident.source_context = parsertools.GetTokenSourceContext(); - return _ident; - } - case (int)SymbolConstants.SYMBOL_TKBOTTOMMINUS: - //'tkBottomMinus' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - case (int)SymbolConstants.SYMBOL_TKCASE : - //'tkCase' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCHAR : - //'tkChar' -return parsertools.create_char_const(this); - case (int)SymbolConstants.SYMBOL_TKCOLON : - //'tkColon' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCOMMA : - //'tkComma' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDO : - //'tkDo' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDOT : - //'tkDot' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDOUBLE : - //'tkDouble' -return parsertools.create_double_const(this); - case (int)SymbolConstants.SYMBOL_TKELSE : - //'tkElse' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEQUAL : - //'tkEqual' - - { - op_type_node _op_type_node=new op_type_node(Operators.Equal); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKFIGURECLOSE : - //'tkFigureClose' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKFIGUREOPEN : - //'tkFigureOpen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - /*case (int)SymbolConstants.SYMBOL_TKGETCHAR: - //'tkGetChar' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - }*/ - - case (int)SymbolConstants.SYMBOL_TKIDENT : - //'tkIdent' -return parsertools.create_ident(this); - case (int)SymbolConstants.SYMBOL_TKIF : - //'tkIf' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKIMPORT : - //'tkImport' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKIN : - //'tkIn' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKINT : - //'tkInt' -return parsertools.create_int_const(this); - case (int)SymbolConstants.SYMBOL_TKLEFTSLASH : - //'tkLeftSlash' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - lambda_stack.Add(new ArrayList()); - let_stack.Add(new ArrayList()); - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKLESS : - //'tkLess' - - { - op_type_node _op_type_node=new op_type_node(Operators.Less); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKLESSEQ : - //'tkLessEq' - - { - op_type_node _op_type_node=new op_type_node(Operators.LessEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKLET : - //'tkLet' - - { - token_let = 1; - lambda_stack.Add(new ArrayList()); - //let_where_list_params.Clear(); - ///// - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMAINIDENT : - //'tkMainIdent' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMAINIDENT1 : - //'tkMainIdent1' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMINUS : - //'tkMinus' - - { - op_type_node _op_type_node=new op_type_node(Operators.Minus); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMODULE : - //'tkModule' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKMORE : - //'tkMore' - - { - op_type_node _op_type_node=new op_type_node(Operators.Greater); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMOREEQ : - //'tkMoreEq' - - { - op_type_node _op_type_node=new op_type_node(Operators.GreaterEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNOT : - //'tkNot' - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalNOT); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNOTEQUAL: - //'tkNotEqual' - { - op_type_node _op_type_node = new op_type_node(Operators.NotEqual); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKOF : - //'tkOf' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKOR : - //'tkOr' - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalOR); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKOTHERWISE: - //'tkOtherwise' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKPLUS : - //'tkPlus' - - { - op_type_node _op_type_node=new op_type_node(Operators.Plus); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - /*case (int)SymbolConstants.SYMBOL_TKPRINT : - //'tkPrint' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - }*/ - - case (int)SymbolConstants.SYMBOL_TKQUOTE: - //'tkQuote' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKREF : - //'tkRef' -return parsertools.create_directive_name(this); - case (int)SymbolConstants.SYMBOL_TKRETURN : - //'tkReturn' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKROUNDCLOSE : - //'tkRoundClose' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKROUNDOPEN : - //'tkRoundOpen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSEMICOLON : - //'tkSemiColon' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSLASH : - //'tkSlash' - - { - op_type_node _op_type_node=new op_type_node(Operators.IntegerDivision); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSPLIT : - //'tkSplit' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSQUARECLOSE : - //'tkSquareClose' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSQUAREOPEN : - //'tkSquareOpen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSTAR : - //'tkStar' - - { - op_type_node _op_type_node=new op_type_node(Operators.Multiplication); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSTRING : - //'tkString' -return parsertools.create_string_const(this); - case (int)SymbolConstants.SYMBOL_TKTHEN : - //'tkThen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKWHERE : - //'tkWhere' - - { - //let_where_list_params.Clear(); - token_where = 1; - token_where_count++; - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_ADD_EXPR : - // - //TERMINAL:add_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ADDOP : - // - //TERMINAL:addop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY : - // - //TERMINAL:body - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY_FUNC : - // - //TERMINAL:body_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BODY_WHERE: - // - //TERMINAL:body_where - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_VARIANT : - // - //TERMINAL:case_variant - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_VARIANTS : - // - //TERMINAL:case_variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITION: - // - //TERMINAL:condition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITIONS: - // - //TERMINAL:conditions - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONDITIONS_COMMA: - // - //TERMINAL:conditions_comma - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CORTEG: - // - //TERMINAL:corteg - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DEF_VAR : - // - //TERMINAL:def_var - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DEF_VARS : - // - //TERMINAL:def_vars - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EMPTY : - // - //TERMINAL:empty - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR : - // - //TERMINAL:expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_CALL : - // - //TERMINAL:func_call - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNCS : - // - //TERMINAL:funcs - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNCS_VARIANTS : - // - //TERMINAL:funcs_variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GENERATOR: - // - //TERMINAL:generator - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GENERATORS: - // - //TERMINAL:generators - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD : - // - //TERMINAL:guard - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD_BODY: - // - //TERMINAL:guard_body - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GUARD_BODY_LIST: - // - //TERMINAL:guard_body_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPORT : - // - //TERMINAL:import - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPORTS : - // - //TERMINAL:imports - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INFIX_EXPR: - // - //TERMINAL:infix_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INIT: - // - //TERMINAL:init - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INITS : - // - //TERMINAL:inits - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LAMBDA_FUNC : - // - //TERMINAL:lambda_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST : - // - //TERMINAL:list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_CONSTRUCTOR: - // - //TERMINAL:list_constructor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_ELEMENTS : - // - //TERMINAL:list_elements - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIST_PARAM : - // - //TERMINAL:list_param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MAIN_FUNC : - // - //TERMINAL:main_func - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MODULE : - // - //TERMINAL:module - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULT_EXPR : - // - //TERMINAL:mult_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULTOP : - // - //TERMINAL:multop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NEGATE_EXPR : - // - //TERMINAL:negate_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM : - // - //TERMINAL:param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM_VALUE : - // - //TERMINAL:param_value - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS : - // - //TERMINAL:params - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS1: - // - //TERMINAL:params - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAMS_VALUE : - // - //TERMINAL:params_value - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_REFERENCE : - // - //TERMINAL:reference - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_EXPR : - // - //TERMINAL:simple_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE_EXPR: - // - //TERMINAL:simple_type_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMT : - // - //TERMINAL:stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMTS: - // - //TERMINAL:stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMTS1 : - // - //TERMINAL:stmts - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLE : - // - //TERMINAL:variable - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLE_EXPR : - // - //TERMINAL:variable_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT : - // - //TERMINAL:variant - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANTS : - // - //TERMINAL:variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHERE_VAR : - // - //TERMINAL:where_var - return null; - //ENDTERMINAL -} -throw new SymbolException("Unknown symbol"); -} - - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateNonTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -public ArrayList param_value_list = new ArrayList(); -public ArrayList body_variant_list = new ArrayList(); -public ArrayList param_value_list_main = new ArrayList(); -public ArrayList body_variant_list_main = new ArrayList(); -public ArrayList guard_list = new ArrayList(); -public ArrayList guard_list_main = new ArrayList(); -public ArrayList func_name = new ArrayList(); -public int decls_counts = 0; -public bool where_flag = false; -public ArrayList list_param = new ArrayList(); -public ArrayList list_params = new ArrayList(); -public ArrayList list_params_temp = new ArrayList(); -public ArrayList list_params_main = new ArrayList(); -public ArrayList _function_lambda_definitions = new ArrayList(); -public ArrayList _function_lambda_definitions_after = new ArrayList(); -public int lambda_num = 0; -public ArrayList _functions = new ArrayList(); -public ArrayList list_method_calls = new ArrayList(); -public ArrayList list_method_calls_main = new ArrayList(); -public ArrayList list_return_funcs = new ArrayList(); -public ArrayList list_return_funcs_main = new ArrayList(); -public ArrayList list_params1 = new ArrayList(); -public ArrayList last_function_lambda_definitions = new ArrayList(); -public ArrayList last_list_method_calls = new ArrayList(); -public ArrayList last_list_method_calls_lambda = new ArrayList(); -public ArrayList let_fact_params = new ArrayList(); -public ArrayList let_funcs = new ArrayList(); -public ArrayList let_funcs_funcs = new ArrayList(); -public ArrayList let_func_last = new ArrayList(); -public ArrayList let_funcs1 = new ArrayList(); -public ArrayList let_flag = new ArrayList(); -public ArrayList where_funcs = new ArrayList(); -public ArrayList let_where_funcs = new ArrayList(); -public ArrayList let_where_funcs_main = new ArrayList(); -public ArrayList let_where_list_params = new ArrayList(); -int token_where = 0; -int token_where_count = 0; -public ArrayList last_where_funcs = new ArrayList(); -public struct types_param_lampda -{ - public string name; - public ArrayList types; -} -public ArrayList list_method_calls_lambda = new ArrayList(); -///////////////////////////// -public ArrayList lambda_funcs = new ArrayList(); -public ArrayList lambda_funcs_funcs = new ArrayList(); -///////////////////////////// -public ArrayList _function_lambda_definitions_main = new ArrayList(); -int token_let = 0; -public ArrayList let_stack = new ArrayList(); -public ArrayList lambda_stack = new ArrayList(); -int token_where1 = 0; -int bottom_num = 0; -int rec_num = 0; - -public Object CreateNonTerminalObject(int ReductionRuleIndex) -{ -switch (ReductionRuleIndex) -{ - case (int)RuleConstants.RULE_MODULE_TKMODULE_TKMAINIDENT_TKWHERE : - // ::= 'tkModule' 'tkMainIdent' 'tkWhere' -{ -ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(new ident("LibForHaskell")); - unit_or_namespace _unit_or_namespace = new unit_or_namespace(_ident_list); - uses_list ul = (uses_list)LRParser.GetReductionSyntaxNode(4); - if (ul == null) - ul = new uses_list(); - ul.units.Insert(0, _unit_or_namespace); - //////////////// - declarations _defs = new declarations(); - for (int i = 0; i < _function_lambda_definitions.Count; i++) - _defs.defs.Add((declaration)lambda((function_lambda_definition)_function_lambda_definitions[i])); - for (int i = 0; i < _functions.Count; i++) - { - _defs.defs.Add((declaration)_functions[i]); - int k = 1; - while (k < _function_lambda_definitions_after.Count) - { - int j = k; - while (j < _function_lambda_definitions_after.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != (string)_function_lambda_definitions_after[j]) - j += 2; - if (j < _function_lambda_definitions_after.Count) - { - _defs.defs.Add((declaration)lambda((function_lambda_definition)_function_lambda_definitions_after[j - 1])); - _function_lambda_definitions_after.RemoveAt(j); - _function_lambda_definitions_after.RemoveAt(j - 1); - } - k = j; - } - } - int kk = 1; - while (kk < _function_lambda_definitions_after.Count) - { - int j = 0; - while (j < _defs.defs.Count && ((procedure_definition)_defs.defs[j]).proc_header.name.meth_name.name != (string)_function_lambda_definitions_after[kk]) - j++; - if (j < _defs.defs.Count) - { - _defs.defs.Insert(j+1, (declaration)lambda((function_lambda_definition)_function_lambda_definitions_after[kk - 1])); - _function_lambda_definitions_after.RemoveAt(kk); - _function_lambda_definitions_after.RemoveAt(kk - 1); - } - else - kk += 2; - } - - //for (int i = 0; i < _function_lambda_definitions.Count; i++) - //_defs.defs.Add(lambda((function_lambda_definition)_function_lambda_definitions[i])); - for (int i = 0; i < let_where_funcs.Count; i++) - _defs.defs.Add((procedure_definition)let_where_funcs[i]); - - block _block = new block(_defs, ((block)LRParser.GetReductionSyntaxNode(5)).program_code); - /////////////////////////////////////// - program_module _program_module = new program_module(null, ul, _block, null); - - _program_module.Language = LanguageId.PascalABCNET; - parsertools.create_source_context(_program_module, parsertools.sc_not_null(null, ul, null, LRParser.GetReductionSyntaxNode(5)), LRParser.GetReductionSyntaxNode(5)); - - _functions.Clear(); - _function_lambda_definitions.Clear(); - func_name.Clear(); - lambda_num = 0; - list_method_calls.Clear(); - list_method_calls_main.Clear(); - list_return_funcs.Clear(); - list_return_funcs_main.Clear(); - list_params1.Clear(); - list_method_calls_lambda.Clear(); - last_list_method_calls.Clear(); - last_list_method_calls_lambda.Clear(); - last_function_lambda_definitions.Clear(); - let_funcs1.Clear(); - let_funcs_funcs.Clear(); - let_func_last.Clear(); - let_flag.Clear(); - token_where_count = 0; - let_where_funcs_main.Clear(); - let_where_funcs.Clear(); - token_where = 0; - last_where_funcs.Clear(); - let_where_list_params.Clear(); - _function_lambda_definitions_main.Clear(); - let_stack.Clear(); - token_let = 0; - lambda_stack.Clear(); - - return _program_module; - } - case (int)RuleConstants.RULE_MODULE : - // ::= -{ - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(new ident("LibForHaskell")); - unit_or_namespace _unit_or_namespace = new unit_or_namespace(_ident_list); - uses_list ul = (uses_list)LRParser.GetReductionSyntaxNode(1); - if (ul == null) - ul = new uses_list(); - ul.units.Insert(0, _unit_or_namespace); - //////////////// - declarations _defs = new declarations(); - for (int i = 0; i < _function_lambda_definitions.Count; i++) - _defs.defs.Add((declaration)lambda((function_lambda_definition)_function_lambda_definitions[i])); - for (int i = 0; i < _functions.Count; i++) - { - _defs.defs.Add((declaration)_functions[i]); - int k = 1; - while (k < _function_lambda_definitions_after.Count) - { - int j = k; - while (j < _function_lambda_definitions_after.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != (string)_function_lambda_definitions_after[j]) - j += 2; - if (j < _function_lambda_definitions_after.Count) - { - _defs.defs.Add((declaration)lambda((function_lambda_definition)_function_lambda_definitions_after[j - 1])); - _function_lambda_definitions_after.RemoveAt(j); - _function_lambda_definitions_after.RemoveAt(j - 1); - } - k = j - 1; - } - } - int kk = 1; - while (kk < _function_lambda_definitions_after.Count) - { - int j = 0; - while (j < _defs.defs.Count && ((procedure_definition)_defs.defs[j]).proc_header.name.meth_name.name != (string)_function_lambda_definitions_after[kk]) - j++; - if (j < _defs.defs.Count) - { - _defs.defs.Insert(j + 1, (declaration)lambda((function_lambda_definition)_function_lambda_definitions_after[kk - 1])); - _function_lambda_definitions_after.RemoveAt(kk); - _function_lambda_definitions_after.RemoveAt(kk - 1); - } - else - kk += 2; - } - block _block = new block(_defs, ((block)LRParser.GetReductionSyntaxNode(2)).program_code); - /////////////////////////////// - program_module _program_module = new program_module(null, ul, (block)LRParser.GetReductionSyntaxNode(2), null); - - _program_module.Language = LanguageId.PascalABCNET; - parsertools.create_source_context(_program_module, parsertools.sc_not_null(null, ul, null, LRParser.GetReductionSyntaxNode(2)), LRParser.GetReductionSyntaxNode(2)); - - _functions.Clear(); - _function_lambda_definitions.Clear(); - func_name.Clear(); - lambda_num = 0; - list_method_calls.Clear(); - list_method_calls_main.Clear(); - list_return_funcs.Clear(); - list_return_funcs_main.Clear(); - list_params1.Clear(); - list_method_calls_lambda.Clear(); - last_list_method_calls.Clear(); - last_list_method_calls_lambda.Clear(); - last_function_lambda_definitions.Clear(); - let_funcs1.Clear(); - let_funcs_funcs.Clear(); - let_func_last.Clear(); - let_flag.Clear(); - let_where_funcs.Clear(); - token_where_count = 0; - let_where_funcs_main.Clear(); - let_where_funcs.Clear(); - token_where = 0; - last_where_funcs.Clear(); - let_where_list_params.Clear(); - _function_lambda_definitions_main.Clear(); - let_stack.Clear(); - lambda_stack.Clear(); - token_let = 0; - - return _program_module; - } - case (int)RuleConstants.RULE_MODULE_TKMODULE_TKIDENT_TKWHERE: -// ::= 'tkModule' 'tkIdent' 'tkWhere' -{ - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(new ident("LibForHaskell")); - unit_or_namespace _unit_or_namespace = new unit_or_namespace(_ident_list); - uses_list ul = (uses_list)LRParser.GetReductionSyntaxNode(4); - if (ul == null) - ul = new uses_list(); - ul.units.Insert(0, _unit_or_namespace); - //////////////// - declarations _defs = new declarations(); - for (int i = 0; i < _function_lambda_definitions.Count; i++) - _defs.defs.Add((declaration)lambda((function_lambda_definition)_function_lambda_definitions[i])); - for (int i = 0; i < _functions.Count; i++) - { - _defs.defs.Add((declaration)_functions[i]); - int k = 1; - while (k < _function_lambda_definitions_after.Count) - { - int j = k; - while (j < _function_lambda_definitions_after.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != (string)_function_lambda_definitions_after[j]) - j += 2; - if (j < _function_lambda_definitions_after.Count) - { - _defs.defs.Add((declaration)lambda((function_lambda_definition)_function_lambda_definitions_after[j - 1])); - _function_lambda_definitions_after.RemoveAt(j); - _function_lambda_definitions_after.RemoveAt(j - 1); - } - k = j; - } - } - int kk = 1; - while (kk < _function_lambda_definitions_after.Count) - { - int j = 0; - while (j < _defs.defs.Count && ((procedure_definition)_defs.defs[j]).proc_header.name.meth_name.name != (string)_function_lambda_definitions_after[kk]) - j++; - if (j < _defs.defs.Count) - { - _defs.defs.Insert(j + 1, (declaration)lambda((function_lambda_definition)_function_lambda_definitions_after[kk - 1])); - _function_lambda_definitions_after.RemoveAt(kk); - _function_lambda_definitions_after.RemoveAt(kk - 1); - } - else - kk += 2; - } - - //for (int i = 0; i < _function_lambda_definitions.Count; i++) - //_defs.defs.Add(lambda((function_lambda_definition)_function_lambda_definitions[i])); - for (int i = 0; i < let_where_funcs.Count; i++) - _defs.defs.Add((procedure_definition)let_where_funcs[i]); - - //////////////////////////interface - interface_node _interface_node = new interface_node(); - _interface_node.uses_modules = ul; - _interface_node.using_namespaces = null; - _interface_node.interface_definitions = LRParser.GetReductionSyntaxNode(5) as declarations; - ///////////////////////////unit_heading - unit_name _unit_name = new unit_name((ident)LRParser.GetReductionSyntaxNode(1), UnitHeaderKeyword.Unit); - initfinal_part _initfinal_part=new initfinal_part(); - unit_module _unit_module = new unit_module(_unit_name, _interface_node, null, _initfinal_part.initialization_sect, _initfinal_part.finalization_sect); - _unit_module.Language = LanguageId.PascalABCNET; - - _functions.Clear(); - _function_lambda_definitions.Clear(); - func_name.Clear(); - lambda_num = 0; - list_method_calls.Clear(); - list_method_calls_main.Clear(); - list_return_funcs.Clear(); - list_return_funcs_main.Clear(); - list_params1.Clear(); - list_method_calls_lambda.Clear(); - last_list_method_calls.Clear(); - last_list_method_calls_lambda.Clear(); - last_function_lambda_definitions.Clear(); - let_funcs1.Clear(); - let_funcs_funcs.Clear(); - let_func_last.Clear(); - let_flag.Clear(); - token_where_count = 0; - let_where_funcs_main.Clear(); - let_where_funcs.Clear(); - token_where = 0; - last_where_funcs.Clear(); - let_where_list_params.Clear(); - _function_lambda_definitions_main.Clear(); - let_stack.Clear(); - token_let = 0; - lambda_stack.Clear(); - - return _unit_module; -} - case (int)RuleConstants.RULE_REFERENCE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_REFERENCE_TKREF_TKSTRING : - // ::= 'tkRef' 'tkString' -{ - token_info t1 = new token_info(); - t1.text = ((ident)LRParser.GetReductionSyntaxNode(0)).name; - t1.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - token_info t2 = new token_info(); - t2.text = ((string_const)LRParser.GetReductionSyntaxNode(1)).Value; - t2.source_context = ((string_const)LRParser.GetReductionSyntaxNode(1)).source_context; - compiler_directive cd = new compiler_directive(t1, t2); - parsertools.create_source_context(cd, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - CompilerDirectives.Add(cd); - return null; - } - case (int)RuleConstants.RULE_IMPORTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_IMPORTS2 : - // ::= -{ - uses_list _uses_list = new uses_list(); - - _uses_list.units.Add((unit_or_namespace)LRParser.GetReductionSyntaxNode(0)); - - return _uses_list; - } - case (int)RuleConstants.RULE_IMPORTS3: -// ::= -{ - uses_list _uses_list = (uses_list)LRParser.GetReductionSyntaxNode(0); - _uses_list.units.Add((unit_or_namespace)LRParser.GetReductionSyntaxNode(2)); - - return _uses_list; - } - case (int)RuleConstants.RULE_IMPORT_TKIMPORT_TKIDENT : - // ::= 'tkImport' 'tkIdent' -{ - ident_list _ident_list = new ident_list(); - _ident_list.source_context = ((ident)LRParser.GetReductionSyntaxNode(1)).source_context; - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(1)); - - unit_or_namespace _unit_or_namespace = new unit_or_namespace(_ident_list); - parsertools.create_source_context(_unit_or_namespace,_ident_list, _ident_list); - - return _unit_or_namespace; - } - case (int)RuleConstants.RULE_BODY : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_BODY2 : - // ::= - - { - token_info _token_info = new token_info(";"); - - _token_info.source_context = parsertools.GetTokenSourceContext(); - - block _block = new block((declarations)LRParser.GetReductionSyntaxNode(0), ((block)LRParser.GetReductionSyntaxNode(1)).program_code); - - parsertools.create_source_context(_block, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), ((block)LRParser.GetReductionSyntaxNode(1)).program_code), _token_info); - return _block; - } - - case (int)RuleConstants.RULE_FUNCS : - // ::= -{ - declarations _declarations = new declarations(); - ArrayList funcs = (ArrayList)LRParser.GetReductionSyntaxNode(0); - for (int i = 0;i < funcs.Count;i++) - { - _declarations.defs.Add((declaration)funcs[i]); - parsertools.create_source_context(_declarations, parsertools.sc_not_null(_declarations, (declaration)funcs[i]), (declaration)funcs[i]); - } - - param_value_list.Clear(); - param_value_list_main.Clear(); - body_variant_list.Clear(); - body_variant_list_main.Clear(); - guard_list.Clear(); - guard_list_main.Clear(); - list_params_main.Clear(); - list_params.Clear(); - list_param.Clear(); - list_params_temp.Clear(); - where_flag = false; - decls_counts = 0; - let_where_funcs.Clear(); - return _declarations; - } - case (int)RuleConstants.RULE_FUNCS_VARIANTS : - // ::= -{ -param_value_list_main.Add(param_value_list.Clone()); - body_variant_list_main.Add(body_variant_list.Clone()); - list_method_calls_main.Add(list_method_calls.Clone()); - guard_list_main.Add(guard_list.Clone()); - list_params_main.Add(list_params.Clone()); - list_params.Clear(); - - ArrayList funcs = new ArrayList(); - - for (int k = 0; k < func_name.Count; k++) - { - //////////////////////////head - - method_name _method_name = new method_name(null, (ident)func_name[k], null); - parsertools.create_source_context(_method_name, func_name[k], func_name[k]); - - function_header _function_header = new function_header(); - - object rt = new object(); - _function_header.name = _method_name; - if (_function_header.name.meth_name is template_type_name) - { - _function_header.template_args = (_function_header.name.meth_name as template_type_name).template_args; - ident id = new ident(_function_header.name.meth_name.name); - parsertools.create_source_context(id, _function_header.name.meth_name, _function_header.name.meth_name); - _function_header.name.meth_name = id; - } - ////////////////////////////////params - formal_parameters _formal_parametres = new formal_parameters(); - expression_list f = null; - if (((ArrayList)param_value_list_main[k])[0] != null) - { - f = (expression_list)((ArrayList)param_value_list_main[k])[((ArrayList)param_value_list_main[k]).Count - 1]; - string s = ""; - for (int i = 0; i < ((ArrayList)param_value_list_main[k]).Count; i++) - { - for (int j = 0; j < ((expression_list)((ArrayList)param_value_list_main[k])[i]).expressions.Count; j++) - if (((expression_list)((ArrayList)param_value_list_main[k])[i]).expressions[j] is ident) - s += ((ident)((expression_list)((ArrayList)param_value_list_main[k])[i]).expressions[j]).name; - } - for (int i = 0; i < ((expression_list)((ArrayList)param_value_list_main[k])[((ArrayList)param_value_list_main[k]).Count - 1]).expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = new ident(s + i.ToString()); - _ident_list.source_context = id.source_context; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference1 = new named_type_reference(); - - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference1, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference1); - - _formal_parametres.params_list.Add(_typed_parametres); - } - _function_header.parameters = _formal_parametres; - } - //////////////////////////type - { - named_type_reference _named_type_reference11 = new named_type_reference(); - ident idtype11 = new ident("datatype"); - _named_type_reference11.source_context = idtype11.source_context; - _named_type_reference11.names.Add(idtype11); - - rt = _named_type_reference11; - _function_header.return_type = (type_definition)_named_type_reference11; - } - - _function_header.of_object = false; - _function_header.class_keyword = false; - token_info _token_info = new token_info("function"); - _token_info.source_context = parsertools.GetTokenSourceContext(); - parsertools.create_source_context(_function_header, _token_info, rt); - - //////////////////////////////////////block - statement_list stmt_l = new statement_list(); - - statement last_if = null; - ArrayList vars = new ArrayList(); - if (((ArrayList)param_value_list_main[k])[0] != null) - { - bool flag = false; - for (int i = ((ArrayList)body_variant_list_main[k]).Count - 1; i >= 0; i--) - { - expression_list pv = (expression_list)((ArrayList)param_value_list_main[k])[i]; - statement body_part = (statement)((ArrayList)body_variant_list_main[k])[i]; - expression guard = null; - if (i < ((ArrayList)guard_list_main[k]).Count) - guard = (expression)((ArrayList)guard_list_main[k])[i]; - - if_node _if_node = new if_node(null, body_part, last_if); - parsertools.create_source_context(_if_node, null, parsertools.sc_not_null(body_part, last_if)); - - /////////// - named_type_reference _named_type_reference111 = new named_type_reference(); - - ident idtype111 = new ident("datatype"); - _named_type_reference111.source_context = idtype111.source_context; - _named_type_reference111.names.Add(idtype111); - - expression_list el = new expression_list(); - el.expressions.Add(new ident("true") as expression); - literal lt; - string text = "boolean"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - ///// - named_type_reference ntr = _named_type_reference111; - new_expr newexpr = new new_expr(ntr, el, false, null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference111)); - /////////// - expression last_expr = newexpr as expression; - if (guard != null) - last_expr = guard; - for (int j = 0; j < _function_header.parameters.params_list.Count; j++) - { - typed_parameters tp = (typed_parameters)_function_header.parameters.params_list[j]; - if (j < pv.expressions.Count && !(pv.expressions[j] is ident))//vstavka if (vyhod iz rekursii) - { - op_type_node _op_type_node = new op_type_node(Operators.Equal); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - bin_expr _bin_expr = new bin_expr(tp.idents.idents[0] as expression, (expression)pv.expressions[j], _op_type_node.type); - parsertools.create_source_context(_bin_expr, tp.idents.idents[0], pv.expressions[j]); - - op_type_node _op_type_node1 = new op_type_node(Operators.LogicalAND); - _op_type_node1.source_context = parsertools.GetTokenSourceContext(); - bin_expr _bin_expr1 = new bin_expr(_bin_expr, last_expr, _op_type_node1.type); - parsertools.create_source_context(_bin_expr1, _bin_expr, last_expr); - last_expr = _bin_expr1; - } - } - _if_node.condition = _ob(last_expr); - ////novye peremennye - statement_list _ass = new statement_list(); - for (int j = 0; j < _function_header.parameters.params_list.Count; j++) - { - if (j < pv.expressions.Count && pv.expressions[j] is ident && ((ident)pv.expressions[j]).name != _function_header.parameters.params_list[j].idents.idents[0].name) - { - ident_list il = new ident_list(); - il.idents.Add(new ident(((ident)pv.expressions[j]).name)); - method_call mc = find_method_call(((ident)pv.expressions[j]).name, k); - if (mc == null) - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - var_def_statement _var_def_statement = new var_def_statement(il, (type_definition)_named_type_reference1, null, definition_attribute.None, false); - parsertools.create_source_context(_var_def_statement, il, _named_type_reference1); - var_statement _var_statement = new var_statement(_var_def_statement); - parsertools.create_source_context(_var_statement, null, _var_def_statement); - //((statement_list)_if_node.then_body).subnodes.Insert(0, _var_statement);//obyavlenie peremennoy - int ii = ((ArrayList)body_variant_list_main[k]).Count - 1; - int jj = 0; - bool b = false; - expression_list exl = (expression_list)((ArrayList)param_value_list_main[k])[ii]; - while (ii > i && !b) - { - jj = 0; - while (jj < exl.expressions.Count && (!(exl.expressions[jj] is ident) || ((ident)exl.expressions[jj]).name != ((ident)pv.expressions[j]).name)) - jj++; - if (jj < exl.expressions.Count) - b = true; - ii--; - if (ii > i) - exl = (expression_list)((ArrayList)param_value_list_main[k])[ii]; - } - if (!b) - { - int kk = 0; - while (kk < vars.Count && il.idents[0].name != ((var_statement)vars[kk]).var_def.vars.idents[0].name) - kk++; - if (kk >= vars.Count) - vars.Add(_var_statement); - } - } - else - { - bool b = false; - int ii = ((ArrayList)body_variant_list_main[k]).Count - 1; - int jj = 0; - expression_list exl = (expression_list)((ArrayList)param_value_list_main[k])[ii]; - while (ii > i && !b) - { - jj = 0; - while (jj < exl.expressions.Count && (!(exl.expressions[jj] is ident) || ((ident)exl.expressions[jj]).name != ((ident)pv.expressions[j]).name)) - jj++; - if (jj < exl.expressions.Count) - b = true; - ii--; - if (ii > i) - exl = (expression_list)((ArrayList)param_value_list_main[k])[ii]; - } - if (!b) - { - _function_header.parameters.params_list[j].vars_type = func_type(mc.parameters.expressions.Count); - stmt_l.subnodes.Add(var_st(((ident)pv.expressions[j]).name, func_type(mc.parameters.expressions.Count))); - } - } - - op_type_node _op_type_node2 = new op_type_node(Operators.Assignment); - _op_type_node2.source_context = parsertools.GetTokenSourceContext(); - assign _assign = new assign(il.idents[0] as addressed_value, _function_header.parameters.params_list[j].idents.idents[0] as expression, _op_type_node2.type); - parsertools.create_source_context(_assign, il.idents[0], _function_header.parameters.params_list[j].idents.idents[0]); - _ass.subnodes.Add(_assign); - } - } - - ///////////////////////////////////////list_param - if (((ArrayList)list_params_main[k]).Count != 0 && i < ((ArrayList)list_params_main[k]).Count) - { - for (int ll = 0; ll < ((ArrayList)((ArrayList)list_params_main[k])[i]).Count; ll++) - { - //if (i == ((ArrayList)body_variant_list_main[k]).Count - 1) - for (int l = 0; l < ((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll]).Count; l++) - { - ident_list il1 = new ident_list(); - il1.idents.Add(new ident(((ident)((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll])[l]).name)); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - - var_def_statement _var_def_statement = new var_def_statement(il1, (type_definition)_named_type_reference1, null, definition_attribute.None, false); - parsertools.create_source_context(_var_def_statement, il1, _named_type_reference1); - var_statement _var_statement = new var_statement(_var_def_statement); - //stmt_l.subnodes.Add(_var_statement); - int j = 0; - while (j < vars.Count && il1.idents[0].name != ((var_statement)vars[j]).var_def.vars.idents[0].name) - j++; - if (j >= vars.Count) - vars.Add(_var_statement); - } - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - dot_node _dot_node = new dot_node(null, (addressed_value)(new ident("head"))); - ident id = new ident(); - for (int i1 = 0; i1 < ((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll]).Count; i1++) - id.name += ((ident)((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll])[i1]).name; - if (id.name != null) - { - _dot_node.left = (addressed_value)(id); - object o = null; - method_call _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - assign _assign1 = new assign(((ident)((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll])[((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll]).Count - 1]) as addressed_value, _method_call as expression, _op_type_node.type); - _ass.subnodes.Add(_assign1); - - /// - for (int i1 = ((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll]).Count - 2; i1 > 0; i1--) - { - _dot_node = new dot_node((addressed_value)id, (addressed_value)(new ident("tail"))); - for (int j1 = 0; j1 < ((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll]).Count - 2 - i1; j1++) - { - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("tail"))); - } - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("head"))); - - _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - _assign1 = new assign(((ident)((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll])[i1]) as addressed_value, _method_call as expression, _op_type_node.type); - _ass.subnodes.Add(_assign1); - } - - _dot_node = new dot_node((addressed_value)id, (addressed_value)(new ident("tail"))); - - for (int j1 = 0; j1 < ((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll]).Count - 2; j1++) - { - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("tail"))); - } - _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - _assign1 = new assign(((ident)((ArrayList)((ArrayList)((ArrayList)list_params_main[k])[i])[ll])[0]) as addressed_value, _method_call as expression, _op_type_node.type); - _ass.subnodes.Add(_assign1); - } - } - } - /////////////////////////////////////////////////////////////////////// - parsertools.create_source_context(_if_node, null, _if_node); - last_if = new statement_list(); - for (int ii = 0; ii < _ass.subnodes.Count; ii++) - ((statement_list)last_if).subnodes.Add((assign)_ass.subnodes[ii]); - - ((statement_list)last_if).subnodes.Add(_if_node); - } - stmt_l.subnodes.Add(last_if); - } - else - { - stmt_l.subnodes.Add((statement)((ArrayList)body_variant_list_main[k])[0]); - } - - ////////////////// - - block _block = new block(null, null); - _block.defs = new declarations(); - for (int l = 0; l < vars.Count; l++) - _block.defs.defs.Add(vars[l] as var_statement); - - statement_list sl = null; - if (stmt_l is statement_list) - sl = stmt_l as statement_list; - else - { - sl = new statement_list(); - sl.subnodes.Add(stmt_l as statement); - if (!(stmt_l is empty_statement)) - parsertools.assign_source_context(sl, stmt_l); - } - _block.program_code = sl; - ////////////////// - ArrayList lamdas = find_lambda_funcs_main(_function_header.name.meth_name.name); - for (int l = 0; l < lamdas.Count; l++) - _block.defs.defs.Add(lambda((function_lambda_definition)lamdas[l])); - ////////////////// - int r = 0; - while (r < let_funcs_funcs.Count && ((string)((ArrayList)let_funcs_funcs[r])[0]) != _function_header.name.meth_name.name) - r++; - if (r < let_funcs_funcs.Count) - { - if (_block.defs == null) - _block.defs = new declarations(); - for (int l = 0; l < ((ArrayList)((ArrayList)let_funcs_funcs[r])[1]).Count; l++) - _block.defs.defs.Add(((ArrayList)((ArrayList)let_funcs_funcs[r])[1])[l] as procedure_definition); - } - let_funcs.Clear(); - ////////////////// - procedure_definition _procedure_definition = new procedure_definition(_function_header, null); - rt = _function_header; - if (_block != null) - { - rt = _block; - if (_block is proc_block) - _procedure_definition.proc_body = (proc_block)_block; - } - parsertools.create_source_context(_procedure_definition, _function_header, rt); - funcs.Add(_procedure_definition); - _functions.Add(_procedure_definition); - } - return funcs;} - case (int)RuleConstants.RULE_VARIANTS : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANTS2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANT_TKIDENT: -// ::= 'tkIdent' -{ - ArrayList body_list = (ArrayList)LRParser.GetReductionSyntaxNode(2); - for (int g_ind = 0; g_ind < body_list.Count; g_ind++) - { - ///////////////////////////////////body - statement_list st = null; - - statement_list body_1 = (statement_list)((ArrayList)body_list[g_ind])[1]; - - if (LRParser.GetReductionSyntaxNode(3) != null) - { - ArrayList ar = (ArrayList)LRParser.GetReductionSyntaxNode(3); - for (int ii = 0; ii < ar.Count; ii++) - where_funcs.Add(ar[ii]); - - statement_list _statement_list = body_1; - //////////////////////////////////////////////for guard - formal_parameters _formal_parametres = null; - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = null; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = null; - _procedure_definition.lambda_name = "__lam_where__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, null, null, null, "lambda_where" + lambda_num); - _procedure_definition.proc_body = _statement_list; - procedure_definition pr = lambda(_procedure_definition); - //_function_lambda_definitions.Add(_procedure_definition);//////////////// - ((block)pr.proc_body).defs = new declarations(); - int start = 0; - int k = where_funcs.Count - 1; - while (k > 0 && ((procedure_definition)where_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - k--; - int kk = 0; - while (k > 0 && kk < ar.Count - 1 && !((procedure_definition)where_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - { - k--; - kk++; - } - start = k; - int i = start; - int n = where_funcs.Count; - if (start >= 0) - while (i < n) - { - ((block)pr.proc_body).defs.defs.Add((procedure_definition)where_funcs[start]); - where_funcs.RemoveAt(start); - i++; - } - /////////////////////////////////lambda - if (lambda_stack.Count > 0 && ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count == 0) - lambda_stack.RemoveAt(lambda_stack.Count - 1); - if (lambda_stack.Count > 0) - { - if (((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count > 0) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[ii]); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - _function_lambda_definitions.RemoveAt(_function_lambda_definitions.Count - 1); - } - //lambda_stack.RemoveAt(lambda_stack.Count - 1); - } - ////////////////////////////////// - where_funcs.Add(pr); - //if (let_flag.Count > 0) - //let_func_last.Add(pr); - expression_list el = new expression_list(); - //where_fact_params.Clear(); - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), new ident(_procedure_definition.lambda_name), Operators.Assignment); - - statement_list _statement_list1 = new statement_list(); - _statement_list1.subnodes.Add(_assign); - st = _statement_list1; - } - else - { - //////////////////////////////////////////////for guard - st = body_1; - } - ///////////////////////////////////\body - - - ////////////////////////////////////////////////////for let & where - let_where_funcs.Clear(); - while (let_where_funcs_main.Count > 1) - let_where_funcs_main.RemoveAt(let_where_funcs_main.Count - 1); - list_params1.Clear(); - let_flag.Clear(); - int iiii = 0; - while (iiii < func_name.Count && ((ident)func_name[iiii]).name != ((ident)LRParser.GetReductionSyntaxNode(0)).name) - iiii++; - if (iiii == func_name.Count && let_funcs_funcs.Count == 0 || (let_funcs_funcs.Count > 0 && ((string)((ArrayList)let_funcs_funcs[let_funcs_funcs.Count - 1])[0]) != ((ident)LRParser.GetReductionSyntaxNode(0)).name)) - { - ArrayList ar = new ArrayList(); - ar.Add(((ident)LRParser.GetReductionSyntaxNode(0)).name); - if (where_funcs.Count > 0) - { - for (int i = 0; i < let_funcs.Count; i++) - ((block)((procedure_definition)where_funcs[0]).proc_body).defs.defs.Add((procedure_definition)let_funcs[i]); - ar.Add(where_funcs.Clone()); - } - else - ar.Add(let_funcs.Clone()); - let_funcs_funcs.Add(ar); - let_funcs.Clear(); - where_funcs.Clear(); - let_func_last.Clear(); - } - else - { - int r = 0; - while (r < let_funcs_funcs.Count && ((string)((ArrayList)let_funcs_funcs[r])[0]) != - ((ident)LRParser.GetReductionSyntaxNode(0)).name) - r++; - if (r < let_funcs_funcs.Count) - { - if (where_funcs.Count > 0) - { - for (int i = 0; i < let_funcs.Count; i++) - ((block)((procedure_definition)where_funcs[0]).proc_body).defs.defs.Add((procedure_definition)let_funcs[i]); - for (int i = 0; i < where_funcs.Count; i++) - ((ArrayList)((ArrayList)let_funcs_funcs[r])[1]).Add(where_funcs[i]); - } - else - for (int i = 0; i < let_funcs.Count; i++) - ((ArrayList)((ArrayList)let_funcs_funcs[r])[1]).Add(let_funcs[i]); - let_funcs.Clear(); - where_funcs.Clear(); - let_func_last.Clear(); - } - } - - if (iiii == func_name.Count) - { - ///////////////////////////////////////////////////// - ArrayList ar_lambda = new ArrayList(); - ar_lambda.Add(((ident)LRParser.GetReductionSyntaxNode(0)).name); - ar_lambda.Add(_function_lambda_definitions.Clone()); - _function_lambda_definitions_main.Add(ar_lambda.Clone()); - _function_lambda_definitions.Clear(); - ///////////////////////////////////////////////////// - } - else - { - ////////////////////////////////// - ArrayList ar_lambda = (ArrayList)_function_lambda_definitions.Clone(); - for (int i = 0; i < ar_lambda.Count; i++) - ((ArrayList)((ArrayList)_function_lambda_definitions_main[_function_lambda_definitions_main.Count - 1])[1]).Add(ar_lambda[i]); - _function_lambda_definitions.Clear(); - ////////////////////////////////// - } - //////////////////////////////////////////////////// - - if (st/* LRParser.GetReductionSyntaxNode(2)*/ != null) - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != ((ident)LRParser.GetReductionSyntaxNode(0)).name) - i++; - if (i == func_name.Count) - { - func_name.Add((ident)LRParser.GetReductionSyntaxNode(0)); - list_return_funcs_main.Add(list_return_funcs.Clone()); - list_return_funcs.Clear(); - if (list_method_calls_main.Count > 0) - for (int iii = 0; iii < ((ArrayList)list_method_calls_main[list_method_calls_main.Count - 1]).Count; iii++) - if (list_method_calls.Count > 0) - list_method_calls.RemoveAt(0); - list_method_calls_main.Add(list_method_calls.Clone()); - if (param_value_list.Count != 0) - { - param_value_list_main.Add(param_value_list.Clone()); - body_variant_list_main.Add(body_variant_list.Clone()); - guard_list_main.Add(guard_list.Clone()); - list_params_main.Add(list_params.Clone()); - } - param_value_list.Clear(); - body_variant_list.Clear(); - guard_list.Clear(); - list_params.Clear(); - param_value_list.Add(LRParser.GetReductionSyntaxNode(1)); - ////////////////Dobavlyaem formalnye parametry - //statement_list st = (statement_list)LRParser.GetReductionSyntaxNode(4); - if (st.subnodes[0] is assign) - { - if (((assign)st.subnodes[0]).from is function_lambda_call) - { - function_lambda_call flc = (function_lambda_call)(((assign)st.subnodes[0]).from); - function_lambda_definition fld = ((function_lambda_call)(((assign)st.subnodes[0]).from)).f_lambda_def; - for (int ind = flc.parameters.expressions.Count; ind < fld.parameters.expressions.Count; ind++) - { - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(fld.parameters.expressions[ind]); - } - } - if (((assign)st.subnodes[0]).from is method_call) - { - method_call mc = (method_call)(((assign)st.subnodes[0]).from); - int jjj = 0; - int ind_null = -1; - while (jjj < mc.parameters.expressions.Count) - if (mc.parameters.expressions[jjj] is new_expr && ((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0] is string_const && - ((string_const)((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0]).Value == "$null") - { - ind_null = jjj; - jjj = mc.parameters.expressions.Count; - } - else - jjj++; - if (ind_null >= 0) - for (int ind = ind_null; ind < mc.parameters.expressions.Count; ind++) - { - //int j = 0; - //while () - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.Insert(ind, new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.RemoveAt(ind + 1); - } - } - } - //////////////// - body_variant_list.Add(st); - //guard_list.Add(LRParser.GetReductionSyntaxNode(2)); - guard_list.Add(((ArrayList)body_list[g_ind])[0]); - if (list_params_temp.Count != 0) - { - list_params.Add(list_params_temp.Clone()); - list_params_temp.Clear(); - } - } - else - { - ArrayList ar = (ArrayList)list_method_calls.Clone(); - for (int iii = 0; iii < list_method_calls.Count; iii++) - ((ArrayList)list_method_calls_main[list_method_calls_main.Count - 1]).Add(ar[iii]); - param_value_list.Add(LRParser.GetReductionSyntaxNode(1)); - ////////////////Dobavlyaem formalnye parametry - //statement_list st = (statement_list)LRParser.GetReductionSyntaxNode(4); - if (st.subnodes[0] is assign) - { - if (((assign)st.subnodes[0]).from is function_lambda_call) - { - function_lambda_call flc = (function_lambda_call)(((assign)st.subnodes[0]).from); - function_lambda_definition fld = ((function_lambda_call)(((assign)st.subnodes[0]).from)).f_lambda_def; - for (int ind = flc.parameters.expressions.Count; ind < fld.parameters.expressions.Count; ind++) - { - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(fld.parameters.expressions[ind]); - } - } - if (((assign)st.subnodes[0]).from is method_call) - { - method_call mc = (method_call)(((assign)st.subnodes[0]).from); - int jjj = 0; - int ind_null = -1; - while (jjj < mc.parameters.expressions.Count) - if (mc.parameters.expressions[jjj] is new_expr && ((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0] is string_const && - ((string_const)((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0]).Value == "$null") - { - ind_null = jjj; - jjj = mc.parameters.expressions.Count; - } - else - jjj++; - if (ind_null >= 0) - for (int ind = ind_null; ind < mc.parameters.expressions.Count; ind++) - { - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.Insert(ind, new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.RemoveAt(ind + 1); - } - } - } - //////////////// - body_variant_list.Add(st); - //guard_list.Add(LRParser.GetReductionSyntaxNode(2)); - guard_list.Add(((ArrayList)body_list[g_ind])[0]); - if (list_params_temp.Count != 0) - { - list_params.Add(list_params_temp.Clone()); - list_params_temp.Clear(); - } - } - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != ((ident)LRParser.GetReductionSyntaxNode(0)).name) - i++; - if (i == func_name.Count) - { - func_name.Add((ident)LRParser.GetReductionSyntaxNode(0)); - } - } - list_params1.Clear(); - //int kk = last_list_method_calls.Count; - //kk = last_function_lambda_definitions.Count; - for (int i = 0; i < last_function_lambda_definitions.Count; i++) - { - for (int j = 0; j < ((function_lambda_definition)last_function_lambda_definitions[i]).formal_parameters.params_list.Count; j++) - { - string name_param = ((function_lambda_definition)last_function_lambda_definitions[i]).formal_parameters.params_list[j].idents.idents[0].name; - int k = 0; - while (k < last_list_method_calls.Count && ((ident)((method_call)last_list_method_calls[k]).dereferencing_value).name != name_param) - k++; - if (k < last_list_method_calls.Count) - { - function_lambda_definition fld = find_func_lambda_after(((function_lambda_definition)last_function_lambda_definitions[i]).lambda_name); - fld.formal_parameters.params_list[j].vars_type = func_type(((method_call)last_list_method_calls[k]).parameters.expressions.Count); - } - } - } - last_list_method_calls.Clear(); - last_function_lambda_definitions.Clear(); - } - return null; -} - case (int)RuleConstants.RULE_VARIANT_TKQUOTE_TKIDENT_TKQUOTE: -// ::= 'tkQuote' 'tkIdent' 'tkQuote' -{ - ArrayList body_list = (ArrayList)LRParser.GetReductionSyntaxNode(5); - for (int g_ind = 0; g_ind < body_list.Count; g_ind++) - { - ///////////////////////////////////body - statement_list st = null; - - statement_list body_1 = (statement_list)((ArrayList)body_list[g_ind])[1]; - - if (LRParser.GetReductionSyntaxNode(6) != null) - { - ArrayList ar = (ArrayList)LRParser.GetReductionSyntaxNode(6); - for (int ii = 0; ii < ar.Count; ii++) - where_funcs.Add(ar[ii]); - - statement_list _statement_list = body_1; - //////////////////////////////////////////////for guard - formal_parameters _formal_parametres = null; - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = null; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = null; - _procedure_definition.lambda_name = "__lam_where__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, null, null, null, "lambda_where" + lambda_num); - _procedure_definition.proc_body = _statement_list; - procedure_definition pr = lambda(_procedure_definition); - //_function_lambda_definitions.Add(_procedure_definition);//////////////// - ((block)pr.proc_body).defs = new declarations(); - int start = 0; - int k = where_funcs.Count - 1; - while (k > 0 && ((procedure_definition)where_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - k--; - int kk = 0; - while (k > 0 && kk < ar.Count - 1 && !((procedure_definition)where_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - { - k--; - kk++; - } - start = k; - int i = start; - int n = where_funcs.Count; - if (start >= 0) - while (i < n) - { - ((block)pr.proc_body).defs.defs.Add((procedure_definition)where_funcs[start]); - where_funcs.RemoveAt(start); - i++; - } - /////////////////////////////////lambda - if (lambda_stack.Count > 0 && ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count == 0) - lambda_stack.RemoveAt(lambda_stack.Count - 1); - if (lambda_stack.Count > 0) - { - if (((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count > 0) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[ii]); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - _function_lambda_definitions.RemoveAt(_function_lambda_definitions.Count - 1); - } - //lambda_stack.RemoveAt(lambda_stack.Count - 1); - } - ////////////////////////////////// - where_funcs.Add(pr); - //if (let_flag.Count > 0) - //let_func_last.Add(pr); - expression_list el = new expression_list(); - //where_fact_params.Clear(); - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), new ident(_procedure_definition.lambda_name), Operators.Assignment); - - statement_list _statement_list1 = new statement_list(); - _statement_list1.subnodes.Add(_assign); - st = _statement_list1; - } - else - { - //////////////////////////////////////////////for guard - st = body_1; - } - ///////////////////////////////////\body - - ident _ident = (ident)LRParser.GetReductionSyntaxNode(2); - expression_list _ex_l1 = (expression_list)LRParser.GetReductionSyntaxNode(0); - expression_list _ex_l2 = (expression_list)LRParser.GetReductionSyntaxNode(4); - for (int i = 0; i < _ex_l2.expressions.Count; i++) - _ex_l1.expressions.Add(_ex_l2.expressions[i]); - - ////////////////////////////////////////////////////for let & where - let_where_funcs.Clear(); - while (let_where_funcs_main.Count > 1) - let_where_funcs_main.RemoveAt(let_where_funcs_main.Count - 1); - list_params1.Clear(); - let_flag.Clear(); - int iiii = 0; - while (iiii < func_name.Count && ((ident)func_name[iiii]).name != _ident.name) - iiii++; - if (iiii == func_name.Count && let_funcs_funcs.Count == 0 || (let_funcs_funcs.Count > 0 && ((string)((ArrayList)let_funcs_funcs[let_funcs_funcs.Count - 1])[0]) != _ident.name)) - { - ArrayList ar = new ArrayList(); - ar.Add(_ident.name); - if (where_funcs.Count > 0) - { - for (int i = 0; i < let_funcs.Count; i++) - ((block)((procedure_definition)where_funcs[0]).proc_body).defs.defs.Add((procedure_definition)let_funcs[i]); - ar.Add(where_funcs.Clone()); - } - else - ar.Add(let_funcs.Clone()); - let_funcs_funcs.Add(ar); - let_funcs.Clear(); - where_funcs.Clear(); - let_func_last.Clear(); - } - else - { - int r = 0; - while (r < let_funcs_funcs.Count && ((string)((ArrayList)let_funcs_funcs[r])[0]) != - _ident.name) - r++; - if (r < let_funcs_funcs.Count) - { - if (where_funcs.Count > 0) - { - for (int i = 0; i < let_funcs.Count; i++) - ((block)((procedure_definition)where_funcs[0]).proc_body).defs.defs.Add((procedure_definition)let_funcs[i]); - for (int i = 0; i < where_funcs.Count; i++) - ((ArrayList)((ArrayList)let_funcs_funcs[r])[1]).Add(where_funcs[i]); - } - else - for (int i = 0; i < let_funcs.Count; i++) - ((ArrayList)((ArrayList)let_funcs_funcs[r])[1]).Add(let_funcs[i]); - let_funcs.Clear(); - where_funcs.Clear(); - let_func_last.Clear(); - } - } - - if (iiii == func_name.Count) - { - ///////////////////////////////////////////////////// - ArrayList ar_lambda = new ArrayList(); - ar_lambda.Add(_ident.name); - ar_lambda.Add(_function_lambda_definitions.Clone()); - _function_lambda_definitions_main.Add(ar_lambda.Clone()); - _function_lambda_definitions.Clear(); - ///////////////////////////////////////////////////// - } - else - { - ////////////////////////////////// - ArrayList ar_lambda = (ArrayList)_function_lambda_definitions.Clone(); - for (int i = 0; i < ar_lambda.Count; i++) - ((ArrayList)((ArrayList)_function_lambda_definitions_main[_function_lambda_definitions_main.Count - 1])[1]).Add(ar_lambda[i]); - _function_lambda_definitions.Clear(); - ////////////////////////////////// - } - //////////////////////////////////////////////////// - - if (st/*LRParser.GetReductionSyntaxNode(7)*/ != null) - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != _ident.name) - i++; - if (i == func_name.Count) - { - func_name.Add(_ident); - list_return_funcs_main.Add(list_return_funcs.Clone()); - list_return_funcs.Clear(); - if (list_method_calls_main.Count > 0) - for (int iii = 0; iii < ((ArrayList)list_method_calls_main[list_method_calls_main.Count - 1]).Count; iii++) - if (list_method_calls.Count > 0) - list_method_calls.RemoveAt(0); - list_method_calls_main.Add(list_method_calls.Clone()); - if (param_value_list.Count != 0) - { - param_value_list_main.Add(param_value_list.Clone()); - body_variant_list_main.Add(body_variant_list.Clone()); - guard_list_main.Add(guard_list.Clone()); - list_params_main.Add(list_params.Clone()); - } - param_value_list.Clear(); - body_variant_list.Clear(); - guard_list.Clear(); - list_params.Clear(); - param_value_list.Add(_ex_l1); - ////////////////Dobavlyaem formalnye parametry - //statement_list st = (statement_list)LRParser.GetReductionSyntaxNode(7); - if (st.subnodes[0] is assign) - { - if (((assign)st.subnodes[0]).from is function_lambda_call) - { - function_lambda_call flc = (function_lambda_call)(((assign)st.subnodes[0]).from); - function_lambda_definition fld = ((function_lambda_call)(((assign)st.subnodes[0]).from)).f_lambda_def; - for (int ind = flc.parameters.expressions.Count; ind < fld.parameters.expressions.Count; ind++) - { - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(fld.parameters.expressions[ind]); - } - } - if (((assign)st.subnodes[0]).from is method_call) - { - method_call mc = (method_call)(((assign)st.subnodes[0]).from); - int jjj = 0; - int ind_null = -1; - while (jjj < mc.parameters.expressions.Count) - if (mc.parameters.expressions[jjj] is new_expr && ((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0] is string_const && - ((string_const)((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0]).Value == "$null") - { - ind_null = jjj; - jjj = mc.parameters.expressions.Count; - } - else - jjj++; - if (ind_null >= 0) - for (int ind = ind_null; ind < mc.parameters.expressions.Count; ind++) - { - //int j = 0; - //while () - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.Insert(ind, new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.RemoveAt(ind + 1); - } - } - } - //////////////// - body_variant_list.Add(st); - //guard_list.Add(LRParser.GetReductionSyntaxNode(5)); - guard_list.Add(((ArrayList)body_list[g_ind])[0]); - if (list_params_temp.Count != 0) - { - list_params.Add(list_params_temp.Clone()); - list_params_temp.Clear(); - } - } - else - { - ArrayList ar = (ArrayList)list_method_calls.Clone(); - for (int iii = 0; iii < list_method_calls.Count; iii++) - ((ArrayList)list_method_calls_main[list_method_calls_main.Count - 1]).Add(ar[iii]); - param_value_list.Add(_ex_l1); - ////////////////Dobavlyaem formalnye parametry - //statement_list st = (statement_list)LRParser.GetReductionSyntaxNode(7); - if (st.subnodes[0] is assign) - { - if (((assign)st.subnodes[0]).from is function_lambda_call) - { - function_lambda_call flc = (function_lambda_call)(((assign)st.subnodes[0]).from); - function_lambda_definition fld = ((function_lambda_call)(((assign)st.subnodes[0]).from)).f_lambda_def; - for (int ind = flc.parameters.expressions.Count; ind < fld.parameters.expressions.Count; ind++) - { - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(fld.parameters.expressions[ind]); - } - } - if (((assign)st.subnodes[0]).from is method_call) - { - method_call mc = (method_call)(((assign)st.subnodes[0]).from); - int jjj = 0; - int ind_null = -1; - while (jjj < mc.parameters.expressions.Count) - if (mc.parameters.expressions[jjj] is new_expr && ((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0] is string_const && - ((string_const)((new_expr)mc.parameters.expressions[jjj]).params_list.expressions[0]).Value == "$null") - { - ind_null = jjj; - jjj = mc.parameters.expressions.Count; - } - else - jjj++; - if (ind_null >= 0) - for (int ind = ind_null; ind < mc.parameters.expressions.Count; ind++) - { - if (param_value_list.Count == 0) - param_value_list.Add(new expression_list()); - if (param_value_list[param_value_list.Count - 1] == null) - param_value_list[param_value_list.Count - 1] = new expression_list(); - ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Add(new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.Insert(ind, new ident("$param" + ind)); - ((method_call)(((assign)st.subnodes[0]).from)).parameters.expressions.RemoveAt(ind + 1); - } - } - } - //////////////// - body_variant_list.Add(st); - //guard_list.Add(LRParser.GetReductionSyntaxNode(5)); - guard_list.Add(((ArrayList)body_list[g_ind])[0]); - if (list_params_temp.Count != 0) - { - list_params.Add(list_params_temp.Clone()); - list_params_temp.Clear(); - } - } - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != _ident.name) - i++; - if (i == func_name.Count) - { - func_name.Add(_ident); - } - } - list_params1.Clear(); - //int kk = last_list_method_calls.Count; - //kk = last_function_lambda_definitions.Count; - for (int i = 0; i < last_function_lambda_definitions.Count; i++) - { - for (int j = 0; j < ((function_lambda_definition)last_function_lambda_definitions[i]).formal_parameters.params_list.Count; j++) - { - string name_param = ((function_lambda_definition)last_function_lambda_definitions[i]).formal_parameters.params_list[j].idents.idents[0].name; - int k = 0; - while (k < last_list_method_calls.Count && ((ident)((method_call)last_list_method_calls[k]).dereferencing_value).name != name_param) - k++; - if (k < last_list_method_calls.Count) - { - function_lambda_definition fld = find_func_lambda_after(((function_lambda_definition)last_function_lambda_definitions[i]).lambda_name); - fld.formal_parameters.params_list[j].vars_type = func_type(((method_call)last_list_method_calls[k]).parameters.expressions.Count); - } - } - } - last_list_method_calls.Clear(); - last_function_lambda_definitions.Clear(); - } - return null; -} - case (int)RuleConstants.RULE_LIST_PARAM1: -// ::= -{ - bool b = false; - if (list_param.Count == 1) - { - list_params_temp.Add(new ArrayList()); - let_where_list_params.Add(new ArrayList());// - if (list_param[0] is new_expr && ((string_const)((new_expr)list_param[0]).params_list.expressions[1]).Value == "empty") - b = true; - list_param.Clear(); - } - else - { - list_params_temp.Add(list_param.Clone()); - let_where_list_params.Add(list_param.Clone());// - } - expression_list _expression_list = new expression_list(); - if (list_param.Count == 0) - { - if (b) - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(new int32_const(0)); - literal lt; - string text = "empty_list"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - _expression_list.expressions.Add(newexpr); - } - else - { - _expression_list.source_context = ((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - } - } - else - { - ident id = new ident(); - for (int i = 0; i < list_param.Count; i++) - { - if (list_param[i] is ident) - id.name += ((ident)list_param[i]).name; - else - { - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "èäåíòèôèêàòîð")); - return null; - } - } - _expression_list.source_context = ((expression)id).source_context; - _expression_list.expressions.Add((expression)id); - list_param.Clear(); - } - list_params1.Clear(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - list_params1.Add(_expression_list.expressions[i]); - last_list_method_calls_lambda.Clear(); - return _expression_list; -} - case (int)RuleConstants.RULE_BODY_WHERE: - // ::= -{ - //guard_list.Add(LRParser.GetReductionSyntaxNode(0)); - if (LRParser.GetReductionSyntaxNode(1) != null) - { - ArrayList ar = (ArrayList)LRParser.GetReductionSyntaxNode(1); - for (int ii = 0; ii < ar.Count; ii++) - where_funcs.Add(ar[ii]); - - statement_list _statement_list = (statement_list)LRParser.GetReductionSyntaxNode(0); - //////////////////////////////////////////////for guard - formal_parameters _formal_parametres = null; - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = null; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = null; - _procedure_definition.lambda_name = "__lam_where__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, null, null, null, "lambda_where" + lambda_num); - _procedure_definition.proc_body = _statement_list; - procedure_definition pr = lambda(_procedure_definition); - //_function_lambda_definitions.Add(_procedure_definition);//////////////// - ((block)pr.proc_body).defs = new declarations(); - int start = 0; - int k = where_funcs.Count - 1; - while (k > 0 && ((procedure_definition)where_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - k--; - int kk = 0; - while (k > 0 && kk < ar.Count - 1 && !((procedure_definition)where_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - { - k--; - kk++; - } - start = k; - int i = start; - int n = where_funcs.Count; - if (start >= 0) - while (i < n) - { - ((block)pr.proc_body).defs.defs.Add((procedure_definition)where_funcs[start]); - where_funcs.RemoveAt(start); - i++; - } - /////////////////////////////////lambda - if (lambda_stack.Count > 0 && ((ArrayList)lambda_stack[lambda_stack.Count-1]).Count==0) - lambda_stack.RemoveAt(lambda_stack.Count - 1); - if (lambda_stack.Count > 0) - { - if (((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count > 0) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[ii]); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - _function_lambda_definitions.RemoveAt(_function_lambda_definitions.Count - 1); - } - //lambda_stack.RemoveAt(lambda_stack.Count - 1); - } - ////////////////////////////////// - where_funcs.Add(pr); - //if (let_flag.Count > 0) - //let_func_last.Add(pr); - expression_list el = new expression_list(); - //where_fact_params.Clear(); - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), new ident(_procedure_definition.lambda_name), Operators.Assignment); - - statement_list _statement_list1 = new statement_list(); - _statement_list1.subnodes.Add(_assign); - return _statement_list1; - } - else - { - //////////////////////////////////////////////for guard - statement_list _statement_list = (statement_list)LRParser.GetReductionSyntaxNode(0); - return _statement_list; - } -} - case (int)RuleConstants.RULE_WHERE_VAR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_WHERE_VAR_TKWHERE: - // ::= 'tkWhere' - { - token_where_count--; - //let_where_funcs_main.RemoveAt(let_where_funcs_main.Count-1); - let_where_funcs.Clear(); - return LRParser.GetReductionSyntaxNode(1); - } - case (int)RuleConstants.RULE_INITS: -// ::= -{ - ArrayList ar = new ArrayList(); - ar.Add(LRParser.GetReductionSyntaxNode(0)); - return ar; -} - case (int)RuleConstants.RULE_INITS_TKSEMICOLON: -// ::= 'tkSemiColon' -{ - ArrayList ar = (ArrayList)LRParser.GetReductionSyntaxNode(0); - ar.Add(LRParser.GetReductionSyntaxNode(2)); - return ar; -} - case (int)RuleConstants.RULE_INIT_TKIDENT: -// ::= 'tkIdent' -{ - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(1); - /*statement_list _statement_list = (statement_list)LRParser.GetReductionSyntaxNode(4);*/ - statement_list _statement_list = new statement_list(); - ArrayList ar_main = (ArrayList)LRParser.GetReductionSyntaxNode(2); - ////////////////////////////for list - statement_list stmt_l = new statement_list(); - int start = let_where_list_params.Count; - if (_expression_list !=null) - start = let_where_list_params.Count - _expression_list.expressions.Count; - int i_ex = 0; - for (int ll = start; ll < let_where_list_params.Count; ll++) - { - for (int l = 0; l < ((ArrayList)let_where_list_params[ll]).Count; l++) - { - ident_list il1 = new ident_list(); - il1.idents.Add(new ident(((ident)((ArrayList)let_where_list_params[ll])[l]).name)); - named_type_reference _n_t_r = new named_type_reference(); - ident it = new ident("datatype"); - _n_t_r.names.Add(it); - - var_def_statement _var_def_statement = new var_def_statement(il1, (type_definition)_n_t_r, null, definition_attribute.None, false); - var_statement _var_statement = new var_statement(_var_def_statement); - stmt_l.subnodes.Add(_var_statement); - } - if (((ArrayList)let_where_list_params[ll]).Count > 0) - { - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - dot_node _dot_node = new dot_node(null, (addressed_value)(new ident("head"))); - ident id = _expression_list.expressions[i_ex] as ident; - /*for (int i1 = 0; i1 < ((ArrayList)let_where_list_params[ll]).Count; i1++) - id.name += ((ident)((ArrayList)let_where_list_params[ll])[i1]).name;*/ - if (id.name != null) - { - _dot_node.left = (addressed_value)(id); - object o = null; - method_call _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - assign _assign1 = new assign(((ident)((ArrayList)let_where_list_params[ll])[((ArrayList)let_where_list_params[ll]).Count - 1]) as addressed_value, _method_call as expression, _op_type_node.type); - stmt_l.subnodes.Add(_assign1); - - /// - for (int i1 = ((ArrayList)let_where_list_params[ll]).Count - 2; i1 > 0; i1--) - { - _dot_node = new dot_node((addressed_value)id, (addressed_value)(new ident("tail"))); - for (int j1 = 0; j1 < ((ArrayList)let_where_list_params[ll]).Count - 2 - i1; j1++) - { - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("tail"))); - } - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("head"))); - - _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - _assign1 = new assign(((ident)((ArrayList)let_where_list_params[ll])[i1]) as addressed_value, _method_call as expression, _op_type_node.type); - stmt_l.subnodes.Add(_assign1); - } - - _dot_node = new dot_node((addressed_value)id, (addressed_value)(new ident("tail"))); - - for (int j1 = 0; j1 < ((ArrayList)let_where_list_params[ll]).Count - 2; j1++) - { - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("tail"))); - } - _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - _assign1 = new assign(((ident)((ArrayList)let_where_list_params[ll])[0]) as addressed_value, _method_call as expression, _op_type_node.type); - stmt_l.subnodes.Add(_assign1); - } - } - i_ex++; - } - for (int ll = 0; ll < let_where_list_params.Count - start; ll++) - list_params_temp.RemoveAt(list_params_temp.Count - 1); - for (int i = stmt_l.subnodes.Count - 1; i >= 0; i--) - _statement_list.subnodes.Insert(0, stmt_l.subnodes[i]); - if (_expression_list != null) - for (int i = 0; i < _expression_list.expressions.Count; i++) - let_where_list_params.RemoveAt(let_where_list_params.Count - 1); - //////////////////////////// - formal_parameters _formal_parametres = null; - ident_list i_l = new ident_list(); - if (_expression_list != null) - { - for (int i = 0; i < _expression_list.expressions.Count; i++) - i_l.idents.Add((ident)_expression_list.expressions[i]); - ///////////////////////////// - _formal_parametres = new formal_parameters(); - for (int i = 0; i < i_l.idents.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_expression_list.expressions[i]; - _ident_list.idents.Add(id); - string name_param = id.name; - typed_parameters _typed_parametres = null; - int k = 0; - while (k < last_list_method_calls_lambda.Count && ((ident)((method_call)last_list_method_calls_lambda[k]).dereferencing_value).name != name_param) - k++; - if (k < last_list_method_calls_lambda.Count) - _typed_parametres = new typed_parameters(_ident_list, func_type(((method_call)last_list_method_calls_lambda[k]).parameters.expressions.Count), parametr_kind.none, null); - else - { - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - } - _formal_parametres.params_list.Add(_typed_parametres); - } - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _expression_list; - _procedure_definition.lambda_name = ((ident)LRParser.GetReductionSyntaxNode(0)).name; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _expression_list, ((ident)LRParser.GetReductionSyntaxNode(0)).name); - object rt = _expression_list; - ////////////////////////////////////////for guard - for (int i = 0; i < ar_main.Count; i++) - if (((ArrayList)ar_main[i])[0] != null) - { - if_node _if_node = new if_node(); - _if_node.condition = _ob((expression)((ArrayList)ar_main[i])[0]); - _if_node.then_body = new statement_list(); - _if_node.then_body = (statement)((ArrayList)ar_main[i])[1]; - procedure_call _exit = new procedure_call(new ident("exit") as addressed_value); - ((statement_list)_if_node.then_body).subnodes.Add(_exit); - _statement_list.subnodes.Add(_if_node); - } - else - { - _statement_list.subnodes.Add((statement)((ArrayList)ar_main[i])[1]); - procedure_call _exit = new procedure_call(new ident("exit") as addressed_value); - _statement_list.subnodes.Add(_exit); - } - ////////////////////////////////////////// - _procedure_definition.proc_body = _statement_list; - parsertools.create_source_context(_procedure_definition, _expression_list, rt); - procedure_definition pr = lambda(_procedure_definition); - /////////////////////////// - /////////////////////////// - if (LRParser.GetReductionSyntaxNode(3) != null) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < ((ArrayList)LRParser.GetReductionSyntaxNode(3)).Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)LRParser.GetReductionSyntaxNode(3))[i]); - } - if (let_where_funcs.Count > 0) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < let_where_funcs.Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)let_where_funcs[i]); - if (let_where_funcs_main.Count+1 > token_where_count) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < last_where_funcs.Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)last_where_funcs[i]); - for (int i = 0; i < last_where_funcs.Count; i++) - if (let_funcs.Count > 0) - let_funcs.RemoveAt(let_funcs.Count - 1); - last_where_funcs.Clear(); - } - let_where_funcs.Clear(); - let_func_last.Clear(); - let_flag.Clear(); - } - else - if (let_where_funcs_main.Count > 2 && let_where_funcs_main.Count>token_where_count) - { - ArrayList ar = new ArrayList(); - ar = (let_where_funcs_main[let_where_funcs_main.Count - 1] as ArrayList).Clone() as ArrayList; - - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < ar.Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)ar[i]); - let_where_funcs.Clear(); - let_func_last.Clear(); - let_flag.Clear(); - let_where_funcs_main.RemoveAt(let_where_funcs_main.Count-1); - for (int i = 0; i < ar.Count; i++) - if (let_funcs.Count > 0) - let_funcs.RemoveAt(let_funcs.Count - 1); - } - ///////////////////////////lambda - if (lambda_stack.Count > 0) - { - if (((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count > 0) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[i]); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - _function_lambda_definitions.RemoveAt(_function_lambda_definitions.Count - 1); - } - int number = ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; - for (int i = 0; i < number;i++ ) - lambda_stack.RemoveAt(lambda_stack.Count - 1); - } - /////////////////////////// - return pr; -} - case (int)RuleConstants.RULE_PARAMS_WHERE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS_WHERE2 : - // ::= -{ - bool b = false; - if (list_param.Count == 1) - { - list_params_temp.Add(new ArrayList()); - let_where_list_params.Add(new ArrayList());// - if (list_param[0] is new_expr && ((string_const)((new_expr)list_param[0]).params_list.expressions[1]).Value == "empty") - b = true; - list_param.Clear(); - } - else - { - list_params_temp.Add(list_param.Clone()); - let_where_list_params.Add(list_param.Clone());// - } - expression_list _expression_list = new expression_list(); - if (list_param.Count == 0) - { - if (b) - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(new int32_const(0)); - literal lt; - string text = "empty_list"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - _expression_list.expressions.Add(newexpr); - } - else - { - _expression_list.source_context = ((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - } - } - else - { - ident id = new ident(); - for (int i = 0; i < list_param.Count; i++) - { - if (list_param[i] is ident) - id.name += ((ident)list_param[i]).name; - else - { - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "èäåíòèôèêàòîð")); - return null; - } - } - _expression_list.source_context = ((expression)id).source_context; - _expression_list.expressions.Add((expression)id); - list_param.Clear(); - } - list_params1.Clear(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - list_params1.Add(_expression_list.expressions[i]); - last_list_method_calls_lambda.Clear(); - return _expression_list; - } - case (int)RuleConstants.RULE_PARAMS_WHERE3 : - // ::= - - { - bool b = false; - if (list_param.Count == 1) - { - list_params_temp.Add(new ArrayList()); - let_where_list_params.Add(new ArrayList());// - if (list_param[0] is new_expr && ((string_const)((new_expr)list_param[0]).params_list.expressions[1]).Value == "empty") - b = true; - list_param.Clear(); - } - else - { - list_params_temp.Add(list_param.Clone()); - let_where_list_params.Add(list_param.Clone()); - } - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(0); - if (list_param.Count == 0) - { - if (!b) - { - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(1) as expression); - } - else - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(new int32_const(0)); - literal lt; - string text = "empty_list"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - _expression_list.expressions.Add(newexpr); - } - } - else - { - ident id = new ident(); - for (int i = 0; i < list_param.Count; i++) - { - if (list_param[i] is ident) - id.name += ((ident)list_param[i]).name; - else - { - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "èäåíòèôèêàòîð")); - return null; - } - } - _expression_list.expressions.Add((expression)id); - list_param.Clear(); - } - list_params1.Clear(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - list_params1.Add(_expression_list.expressions[i]); - last_list_method_calls_lambda.Clear(); - return _expression_list; - } - case (int)RuleConstants.RULE_PARAMS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PARAMS2 : - // ::= -{ - //let_flag.Add(1); - bool b = false; - if (list_param.Count == 1) - { - list_params_temp.Add(new ArrayList()); - let_where_list_params.Add(new ArrayList());// - if (list_param[0] is new_expr && ((string_const)((new_expr)list_param[0]).params_list.expressions[1]).Value == "empty") - b = true; - list_param.Clear(); - } - else - { - list_params_temp.Add(list_param.Clone()); - let_where_list_params.Add(list_param.Clone());// - } - expression_list _expression_list = new expression_list(); - if (list_param.Count == 0) - { - if (b) - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(new int32_const(0)); - literal lt; - string text = "empty_list"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - _expression_list.expressions.Add(newexpr); - } - else - { - _expression_list.source_context = ((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - } - } - else - { - ident id = new ident(); - for (int i = 0; i < list_param.Count; i++) - { - if (list_param[i] is ident) - id.name += ((ident)list_param[i]).name; - else - { - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "èäåíòèôèêàòîð")); - return null; - } - } - _expression_list.source_context = ((expression)id).source_context; - _expression_list.expressions.Add((expression)id); - list_param.Clear(); - } - list_params1.Clear(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - list_params1.Add(_expression_list.expressions[i]); - last_list_method_calls_lambda.Clear(); - return _expression_list; - } - case (int)RuleConstants.RULE_PARAMS3 : - // ::= - - { - bool b = false; - if (list_param.Count == 1) - { - list_params_temp.Add(new ArrayList()); - let_where_list_params.Add(new ArrayList());// - if (list_param[0] is new_expr && ((string_const)((new_expr)list_param[0]).params_list.expressions[1]).Value == "empty") - b = true; - list_param.Clear(); - } - else - { - list_params_temp.Add(list_param.Clone()); - let_where_list_params.Add(list_param.Clone());// - } - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(0); - if (list_param.Count == 0) - { - if (!b) - { - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(1) as expression); - } - else - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(new int32_const(0)); - literal lt; - string text = "empty_list"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - _expression_list.expressions.Add(newexpr); - } - } - else - { - ident id = new ident(); - for (int i = 0; i < list_param.Count; i++) - { - if (list_param[i] is ident) - id.name += ((ident)list_param[i]).name; - else - { - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "èäåíòèôèêàòîð")); - return null; - } - } - _expression_list.expressions.Add((expression)id); - list_param.Clear(); - } - list_params1.Clear(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - list_params1.Add(_expression_list.expressions[i]); - last_list_method_calls_lambda.Clear(); - return _expression_list; - } - - case (int)RuleConstants.RULE_PARAM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_PARAM_TKIDENT: -// ::= 'tkIdent' -{ - list_param.Add(LRParser.GetReductionSyntaxNode(0)); - return LRParser.GetReductionSyntaxNode(0); -} - case (int)RuleConstants.RULE_LIST_PARAM : - // ::= -{ - list_param.Add(LRParser.GetReductionSyntaxNode(0)); - return LRParser.GetReductionSyntaxNode(0); -} - case (int)RuleConstants.RULE_LIST_PARAM_TKSQUAREOPEN_TKSQUARECLOSE: -// ::= 'tkSquareOpen' 'tkSquareClose' -{ - ArrayList list_elements = new ArrayList();//(ArrayList)LRParser.GetReductionSyntaxNode(1); - //////////////////////////////////////////////////////////proverka na type - if (list_elements != null) - { - ArrayList types = new ArrayList(); - for (int i = 0; i < list_elements.Count; i++) - { - string tp = ""; - if (list_elements[i] is new_expr) - { - tp = ((string_const)((new_expr)list_elements[i]).params_list.expressions[1]).Value; - if (!types.Contains(tp)) - types.Add(tp); - } - } - if ((types.Count == 2 && !(types.Contains("integer") && types.Contains("real"))) || types.Count > 2) - { - //errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "îäèíàêîâûé òèï ýëåìåíòîâ ñïèñêà")); - errors.Add(new PascalABCCompiler.Errors.Error("ýëåìåíòû ñïèñêà èìåþò ðàçíûé òèï")); - return null; - } - } - ////////////////////////////////////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype_list"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - if (list_elements == null) - list_elements = new ArrayList(); - int32_const n = new int32_const(list_elements.Count); - el.expressions.Add(n); - if (list_elements.Count > 0) - { - el.expressions.Add(new string_const("list")); - } - else - el.expressions.Add(new string_const("empty")); - for (int i = 0; i < list_elements.Count; i++) - el.expressions.Add(list_elements[i] as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - list_param.Add(newexpr); - return newexpr; -} - case (int)RuleConstants.RULE_LIST_PARAM_TKBOTTOMMINUS: -// ::= 'tkBottomMinus' -{ - ident _ident = new ident("$$$" + bottom_num); - list_param.Add(_ident); - bottom_num++; - return _ident; -} - case (int)RuleConstants.RULE_LIST_PARAM_TKIDENT_TKCOLON: -// ::= 'tkIdent' 'tkColon' -{ - list_param.Add(LRParser.GetReductionSyntaxNode(0)); - return LRParser.GetReductionSyntaxNode(0); - } - case (int)RuleConstants.RULE_LIST_PARAM_TKBOTTOMMINUS_TKCOLON: -// ::= 'tkBottomMinus' 'tkColon' -{ - ident _ident = new ident("$$$" + bottom_num); - list_param.Add(_ident); - bottom_num++; - return _ident; -} - case (int)RuleConstants.RULE_LIST_PARAM_TKROUNDOPEN_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkRoundClose' -{ - return LRParser.GetReductionSyntaxNode(1); -} - case (int)RuleConstants.RULE_GUARD : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_GUARD_TKSPLIT : - // ::= 'tkSplit' - return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_GUARD_TKSPLIT_TKOTHERWISE: - // ::= 'tkSplit' 'tkOtherwise' - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - ///// - expression_list el = new expression_list(); - el.expressions.Add(new ident("true") as expression); - literal lt; - string text = "boolean"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - ///// - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_MAIN_FUNC_TKMAINIDENT1_TKASSIGN : - // ::= 'tkMainIdent1' 'tkAssign' - { - block _block=new block(null, null); - - statement_list sl=null; - if (LRParser.GetReductionSyntaxNode(2) is statement_list) - { - sl = LRParser.GetReductionSyntaxNode(2) as statement_list; - /////////////////////// - ident_list il = new ident_list(); - il.idents.Add(new ident("result")); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - var_def_statement _var_def_statement = new var_def_statement(il, (type_definition)_named_type_reference1, null, definition_attribute.None, false); - parsertools.create_source_context(_var_def_statement, il, _named_type_reference1); - var_statement _var_statement = new var_statement(_var_def_statement); - parsertools.create_source_context(_var_statement, null, _var_def_statement); - sl.subnodes.Insert(0,_var_statement); - ///////////////////////// - } - else - { - sl = new statement_list(); - /////////////////////// - ident_list il = new ident_list(); - il.idents.Add(new ident("result")); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - var_def_statement _var_def_statement = new var_def_statement(il, (type_definition)_named_type_reference1, null, definition_attribute.None, false); - parsertools.create_source_context(_var_def_statement, il, _named_type_reference1); - var_statement _var_statement = new var_statement(_var_def_statement); - parsertools.create_source_context(_var_statement, null, _var_def_statement); - sl.subnodes.Add(_var_statement); - ///////////////////////// - sl.subnodes.Add(LRParser.GetReductionSyntaxNode(2) as statement); - if (!(LRParser.GetReductionSyntaxNode(2) is empty_statement)) - parsertools.assign_source_context(sl, LRParser.GetReductionSyntaxNode(2)); - } - _block.program_code=sl; - - return _block; - } - - case (int)RuleConstants.RULE_BODY_FUNC : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_STMTS : - // ::= - - { - statement_list _statement_list=new statement_list(); - - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_statement_list,LRParser.GetReductionSyntaxNode(0)); - return _statement_list; - } - - case (int)RuleConstants.RULE_STMTS_TKSEMICOLON : - // ::= 'tkSemiColon' - - { - statement_list _statement_list; - _statement_list=(statement_list)LRParser.GetReductionSyntaxNode(0); - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_statement_list,_statement_list,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - return _statement_list; - } - case (int)RuleConstants.RULE_STMTS1: - // ::= - { - statement_list _statement_list = new statement_list(); - - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_statement_list, LRParser.GetReductionSyntaxNode(0)); - return _statement_list; - } - case (int)RuleConstants.RULE_STMTS12: - // ::= - { - statement_list _statement_list; - _statement_list = (statement_list)LRParser.GetReductionSyntaxNode(0); - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_statement_list, _statement_list, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), - LRParser.GetReductionSyntaxNode(1))); - return _statement_list; - } - case (int)RuleConstants.RULE_EXPR_TKEQUAL : - // ::= 'tkEqual' - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPR_TKNOTEQUAL: - // ::= 'tkNotEqual' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPR_TKMORE : - // ::= 'tkMore' - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPR_TKLESS : - // ::= 'tkLess' - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPR_TKMOREEQ : - // ::= 'tkMoreEq' - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPR_TKLESSEQ : - // ::= 'tkLessEq' - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkSquareClose' -{ - ArrayList list_elements = (ArrayList)LRParser.GetReductionSyntaxNode(1); - //////////////////////////////////////////////////////////proverka na type - if (list_elements != null) - { - ArrayList types = new ArrayList(); - for (int i = 0; i < list_elements.Count; i++) - { - string tp = ""; - if (list_elements[i] is new_expr) - { - tp = ((string_const)((new_expr)list_elements[i]).params_list.expressions[1]).Value; - if (!types.Contains(tp)) - types.Add(tp); - } - } - if ((types.Count == 2 && !(types.Contains("integer") && types.Contains("real"))) || types.Count > 2) - { - //errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "îäèíàêîâûé òèï ýëåìåíòîâ ñïèñêà")); - errors.Add(new PascalABCCompiler.Errors.Error("ýëåìåíòû ñïèñêà èìåþò ðàçíûé òèï")); - return null; - } - } - ////////////////////////////////////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype_list"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - if (list_elements == null) - list_elements = new ArrayList(); - int32_const n = new int32_const(list_elements.Count); - el.expressions.Add(n); - if (list_elements.Count > 0) - { - el.expressions.Add(new string_const("list")); - } - else - el.expressions.Add(new string_const("empty")); - for (int i = 0; i < list_elements.Count;i++ ) - el.expressions.Add(list_elements[i] as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE : - // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' -{ArrayList list_elements = (ArrayList)LRParser.GetReductionSyntaxNode(1); -//////////////////////////////////////////////////////////proverka na type -ArrayList types = new ArrayList(); -for (int i = 0; i < list_elements.Count; i++) -{ - if (list_elements[i] is new_expr) - { - string tp = ((string_const)((new_expr)list_elements[i]).params_list.expressions[1]).Value; - if (!types.Contains(tp)) - types.Add(tp); - } -} -if (LRParser.GetReductionSyntaxNode(4) is new_expr) -{ - new_expr ex_last = (new_expr)LRParser.GetReductionSyntaxNode(4); - string tp_last = ((string_const)ex_last.params_list.expressions[1]).Value; - if (!types.Contains(tp_last)) - types.Add(tp_last); -} -if ((types.Count == 2 && !(types.Contains("integer") && types.Contains("real"))) || types.Count > 2) -{ - //errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "îäèíàêîâûé òèï ýëåìåíòîâ ñïèñêà")); - errors.Add(new PascalABCCompiler.Errors.Error("ýëåìåíòû ñïèñêà èìåþò ðàçíûé òèï")); - return null; -} -if (list_elements.Count > 2) -{ - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, ".")); - return null; -} -////////////////////////////////////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype_list"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(list_elements[0] as expression); - if (list_elements.Count>1) - el.expressions.Add(list_elements[1] as expression); - el.expressions.Add(LRParser.GetReductionSyntaxNode(4) as expression); - el.expressions.Add(new string_const("list")); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_LIST_TKSQUAREOPEN_TKDOT_TKDOT_TKSQUARECLOSE2 : - // ::= 'tkSquareOpen' 'tkDot' 'tkDot' 'tkSquareClose' -{ArrayList list_elements = (ArrayList)LRParser.GetReductionSyntaxNode(1); -//////////////////////////////////////////////////////////proverka na type -ArrayList types = new ArrayList(); -for (int i = 0; i < list_elements.Count; i++) -{ - if (list_elements[i] is new_expr) - { - string tp = ((string_const)((new_expr)list_elements[i]).params_list.expressions[1]).Value; - if (!types.Contains(tp)) - types.Add(tp); - } -} -if (types.Count == 2 && !(types.Contains("integer") && types.Contains("real"))) -{ - //errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "îäèíàêîâûé òèï ýëåìåíòîâ ñïèñêà")); - errors.Add(new PascalABCCompiler.Errors.Error("ýëåìåíòû ñïèñêà èìåþò ðàçíûé òèï")); - return null; -} -if (list_elements.Count > 2) -{ - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, ".")); - return null; -} -////////////////////////////////////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype_list"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(list_elements[0] as expression); - el.expressions.Add(list_elements[1] as expression); - named_type_reference _named_type_reference11 = new named_type_reference(); - ident idtype11 = new ident("datatype"); - _named_type_reference11.names.Add(idtype11); - expression_list ell = new expression_list(); - new_expr ee = list_elements[0] as new_expr; - ell.expressions.Add(ee.params_list.expressions[0]); - literal lt; - string text = "nil"; - lt = new string_const(text); - ell.expressions.Add(lt as expression); - named_type_reference ntrr = _named_type_reference11; - new_expr newexprr = new new_expr(ntrr, ell, false, null); - el.expressions.Add(newexprr); - el.expressions.Add(new string_const("list")); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr;} - case (int)RuleConstants.RULE_LIST: - // ::= - return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIST_TKCOLON : - // ::= 'tkColon' -{expression_list el = new expression_list(); - el.expressions.Add(LRParser.GetReductionSyntaxNode(3) as expression); - dot_node _dot_node = new dot_node(null, new ident("colon")); - _dot_node.left = (addressed_value)LRParser.GetReductionSyntaxNode(0); - method_call _method_call = new method_call(el); - _method_call.dereferencing_value = (addressed_value)_dot_node; - return _method_call;} - case (int)RuleConstants.RULE_LIST_CONSTRUCTOR_TKSQUAREOPEN_TKSPLIT_TKSQUARECLOSE: -// ::= 'tkSquareOpen' 'tkSplit' 'tkSquareClose' -{ - ArrayList generators=(ArrayList)LRParser.GetReductionSyntaxNode(3); - ArrayList conditions = (ArrayList)LRParser.GetReductionSyntaxNode(4); - ////////////////////////////////////////////////////////////////////////// - statement_list body = new statement_list(); - rec_num = 0; - for (int i = 0; i < generators.Count; i++) - { - ident id = null; - if (((ArrayList)generators[i])[0] is new_expr) - { - constructor_rec_var(body, ((ArrayList)generators[i])[0] as new_expr); - } - else - { - id = (ident)((ArrayList)generators[i])[0]; - ident_list _ident_list1 = new ident_list(); - _ident_list1.idents.Add(id); - string name_param2 = id.name; - typed_parameters _typed_parametres2 = null; - named_type_reference _named_type_reference3 = new named_type_reference(); - ident idtype3 = new ident("datatype"); - _named_type_reference3.names.Add(idtype3); - var_def_statement _var_def_statement2 = new var_def_statement(_ident_list1, (type_definition)_named_type_reference3, null, definition_attribute.None, false); - var_statement _var_statement2 = new var_statement(_var_def_statement2); - body.subnodes.Add(_var_statement2); - } - } - ///////////////////////////////////////////////////////////////////////result - named_type_reference _named_type_reference2 = new named_type_reference(); - ident idtype2 = new ident("datatype_list"); - _named_type_reference2.names.Add(idtype2); - expression_list el2 = new expression_list(); - int32_const n = new int32_const(0); - el2.expressions.Add(n); - el2.expressions.Add(new string_const("list")); - named_type_reference ntr = _named_type_reference2; - new_expr newexpr = new new_expr(ntr, el2, false, null); - assign _result = new assign(); - _result.operator_type = Operators.Assignment; - _result.to = new ident("result"); - _result.from = newexpr; - body.subnodes.Add(_result); - //////////////////////////////////////////////////////////////////////if - if_node _if_node = new if_node(); - if (conditions != null) - { - expression b_e = (expression)conditions[conditions.Count - 1]; - for (int i = conditions.Count - 2; i >= 0; i--) - { - bin_expr b_e1 = new bin_expr(); - b_e1.operation_type = Operators.LogicalAND; - b_e1.left = (expression)conditions[i]; - b_e1.right = b_e; - b_e = b_e1; - } - _if_node.condition = _ob(b_e); - } - //////////////////////////////////////////////////////////////////////assign - statement_list stmt_list=new statement_list(); - rec_num = 0; - for (int i = 0; i < generators.Count; i++) - { - if (((ArrayList)generators[i])[0] is new_expr) - { - constructor_rec_ass(stmt_list, ((ArrayList)generators[i])[0] as new_expr, _index((expression)((ArrayList)generators[i])[1], new ident("$i" + i))); - } - else - { - assign _assign = new assign(); - _assign.operator_type = Operators.Assignment; - _assign.to = (ident)((ArrayList)generators[i])[0]; - _assign.from = _index((expression)((ArrayList)generators[i])[1], new ident("$i" + i)); - stmt_list.subnodes.Add(_assign); - } - } - if (conditions != null) - { - _if_node.then_body = _add(new ident("result"), (expression)LRParser.GetReductionSyntaxNode(1)); - stmt_list.subnodes.Add(_if_node); - } - else - stmt_list.subnodes.Add(_add(new ident("result"), (expression)LRParser.GetReductionSyntaxNode(1))); - //////////////////////////////////////////////////////////////////////for - statement _for_stmt = stmt_list; - for (int i = generators.Count - 1; i >= 0; i--) - { - for_node _for_node = new for_node(); - _for_node.cycle_type = for_cycle_type.to; - _for_node.loop_variable = new ident("$i"+i); - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("integer"); - _named_type_reference.names.Add(idtype); - _for_node.type_name = (type_definition)_named_type_reference; - _for_node.initial_value = new int32_const(0); - _for_node.finish_value = _count((expression)((ArrayList)generators[i])[1]); - _for_node.increment_value = new int32_const(1); - _for_node.statements = _for_stmt; - _for_stmt = _for_node; - } - body.subnodes.Add(_for_stmt); - ///////////////////////////////////////////////////////////////////////////////////////////////////////lambda - formal_parameters _formal_parametres = null; - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = null; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = null; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, null, null, null, "lambda" + lambda_num); - _procedure_definition.proc_body = body; - procedure_definition pr = lambda(_procedure_definition); - //_function_lambda_definitions.Add(_procedure_definition);//////////////// - let_funcs.Add(pr); - let_where_funcs.Add(pr); - if (let_flag.Count > 0) - let_func_last.Add(pr); - expression_list el = new expression_list(); - let_fact_params.Clear(); - return new ident(_procedure_definition.lambda_name); -} - case (int)RuleConstants.RULE_GENERATORS: - // ::= - { - ArrayList ar = new ArrayList(); - ar.Add(LRParser.GetReductionSyntaxNode(0)); - return ar; - } - case (int)RuleConstants.RULE_GENERATORS_TKCOMMA: - // ::= 'tkComma' - { - ArrayList ar = (ArrayList)LRParser.GetReductionSyntaxNode(0); - ar.Add(LRParser.GetReductionSyntaxNode(2)); - return ar; - } - case (int)RuleConstants.RULE_GENERATOR_TKARROWGEN: - // ::= 'tkArrowGen' - { - ArrayList ar = new ArrayList(); - ar.Add(LRParser.GetReductionSyntaxNode(0)); - ar.Add(LRParser.GetReductionSyntaxNode(2)); - return ar; - } - case (int)RuleConstants.RULE_CONDITIONS_COMMA: - // ::= - { - return null; - } - case (int)RuleConstants.RULE_CONDITIONS_COMMA_TKCOMMA: - // ::= 'tkComma' - { - return LRParser.GetReductionSyntaxNode(1); - } - case (int)RuleConstants.RULE_CONDITIONS: - // ::= - { - ArrayList ar = new ArrayList(); - ar.Add(LRParser.GetReductionSyntaxNode(0)); - return ar; - } - case (int)RuleConstants.RULE_CONDITIONS_TKCOMMA: - // ::= 'tkComma' - { - ArrayList ar = (ArrayList)LRParser.GetReductionSyntaxNode(0); - ar.Add(LRParser.GetReductionSyntaxNode(2)); - return ar; - } - case (int)RuleConstants.RULE_CONDITION: - // ::= - return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CORTEG_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkComma' 'tkRoundClose' - { - //new_expr first_el = (new_expr)LRParser.GetReductionSyntaxNode(1); - ArrayList list_elements = (ArrayList)LRParser.GetReductionSyntaxNode(3); - list_elements.Insert(0, LRParser.GetReductionSyntaxNode(1)); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype_list"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - if (list_elements == null) - list_elements = new ArrayList(); - int32_const n = new int32_const(list_elements.Count); - el.expressions.Add(n); - if (list_elements.Count > 0) - { - el.expressions.Add(new string_const("corteg")); - } - else - el.expressions.Add(new string_const("empty")); - for (int i = 0; i < list_elements.Count; i++) - el.expressions.Add(list_elements[i] as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_LIST_ELEMENTS : - // ::= -return null; - case (int)RuleConstants.RULE_LIST_ELEMENTS2 : - // ::= -{ - ArrayList list_elements = new ArrayList(); - list_elements.Add(LRParser.GetReductionSyntaxNode(0)); - return list_elements; - } - case (int)RuleConstants.RULE_LIST_ELEMENTS_TKCOMMA : - // ::= 'tkComma' -{ - ((ArrayList)LRParser.GetReductionSyntaxNode(0)).Add(LRParser.GetReductionSyntaxNode(2)); - return LRParser.GetReductionSyntaxNode(0); - } - case (int)RuleConstants.RULE_ADD_EXPR_TKAND : - // ::= 'tkAnd' - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_ADD_EXPR : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_ADD_EXPR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULT_EXPR_TKOR : - // ::= 'tkOr' - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_MULT_EXPR : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_MULT_EXPR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NEGATE_EXPR_TKMINUS : - // ::= 'tkMinus' - - { - un_expr _un_expr=new un_expr(LRParser.GetReductionSyntaxNode(1) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_NEGATE_EXPR_TKNOT : - // ::= 'tkNot' - - { - un_expr _un_expr=new un_expr(LRParser.GetReductionSyntaxNode(1) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_NEGATE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR: -// ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKINT: -// ::= 'tkInt' - -{ - named_type_reference _named_type_reference1 = new named_type_reference(); - - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - ///// - expression_list el = new expression_list(); - el.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - literal lt; - string text = "integer"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - ///// - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false,null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKDOUBLE: -// ::= 'tkDouble' -{ - named_type_reference _named_type_reference1 = new named_type_reference(); - - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - ///// - expression_list el = new expression_list(); - el.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - literal lt; - string text = "real"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - ///// - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false,null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKBOOL: -// ::= 'tkBool' -{ - named_type_reference _named_type_reference1 = new named_type_reference(); - - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - ///// - expression_list el = new expression_list(); - el.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - literal lt; - string text = "boolean"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - ///// - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false,null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKCHAR: -// ::= 'tkChar' -{ - named_type_reference _named_type_reference1 = new named_type_reference(); - - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - ///// - expression_list el = new expression_list(); - el.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - literal lt; - string text = "char"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - ///// - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false,null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_SIMPLE_TYPE_EXPR_TKSTRING: -// ::= 'tkString' -{ - named_type_reference _named_type_reference1 = new named_type_reference(); - - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - - ///// - expression_list el = new expression_list(); - el.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - literal lt; - string text = "string"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - ///// - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false,null); - parsertools.create_source_context(newexpr, new ident("new"), parsertools.sc_not_null(el, _named_type_reference1)); - return newexpr; - } - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_SIMPLE_EXPR2: -// ::= -{ - if (LRParser.GetReductionSyntaxNode(0) is ArrayList) - { - ////////////////////////////////////////////////////////ident_params - ArrayList arr = (ArrayList)LRParser.GetReductionSyntaxNode(0); - ident _ident = (ident)arr[0]; - expression_list el = new expression_list(); - for (int ii = 1; ii < arr.Count; ii++) - el.expressions.Add((expression)arr[ii]); - //////////////////////////////////////////////////////// - //expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(_ident.name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = el; - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _params_el; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(_ident.name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = new method_call(el); - - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - parsertools.create_source_context(_method_call, _ident, _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - - } - } - else - return LRParser.GetReductionSyntaxNode(0); -} - case (int)RuleConstants.RULE_SIMPLE_EXPR3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKLET_TKIN : - // ::= 'tkLet' 'tkIn' -{////////////////////////// - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(1); - statement_list _statement_list = (statement_list)LRParser.GetReductionSyntaxNode(3); - ////////////////////////// - formal_parameters _formal_parametres = null; - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = null; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _expression_list; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, null, null, _expression_list, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - parsertools.create_source_context(_procedure_definition, _expression_list, rt); - procedure_definition pr = lambda(_procedure_definition); - //_function_lambda_definitions.Add(_procedure_definition);//////////////// - ((block)pr.proc_body).defs = new declarations(); - int start=0; - int k = let_funcs.Count-1; - while (k>0 && ((procedure_definition)let_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - k--; - int kk = 0; - while (k > 0 && kk < _expression_list.expressions.Count-1 && !((procedure_definition)let_funcs[k]).proc_header.name.meth_name.name.Contains("__lambda__")) - { - k--; - kk++; - } - start = k; - int i = start; - int n = let_funcs.Count; - while (i < n) - { - if (let_where_funcs.Count > 0) - if (start - (let_funcs.Count - let_where_funcs.Count) >= 0) - let_where_funcs.RemoveAt(start - (let_funcs.Count - let_where_funcs.Count)); - else - let_where_funcs.RemoveAt(let_where_funcs.Count - 1); - ((block)pr.proc_body).defs.defs.Add((procedure_definition)let_funcs[start]); - let_funcs.RemoveAt(start); - i++; - } - ///////////////////////////lambda - if (((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count > 0) - { - if (((block)pr.proc_body).defs==null) - ((block)pr.proc_body).defs = new declarations(); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[ii]); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - _function_lambda_definitions.RemoveAt(_function_lambda_definitions.Count-1); - } - lambda_stack.RemoveAt(lambda_stack.Count - 1); - //lambda_stack.RemoveAt(lambda_stack.Count - 1); - /*if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int ii = 0; ii < _function_lambda_definitions.Count; ii++) - ((block)pr.proc_body).defs.defs.Add(lambda((function_lambda_definition)_function_lambda_definitions[ii])); - _function_lambda_definitions.Clear();*/ - /////////////////////////// - let_funcs.Add(pr); - let_where_funcs.Add(pr); - if (let_flag.Count>0) - let_func_last.Add(pr); - expression_list el = new expression_list(); - let_fact_params.Clear(); - ///////////////////// - if (let_stack.Count > 0) - ((ArrayList)let_stack[let_stack.Count - 1]).Add(pr); - /*else - { - let_funcs.Add(pr); - let_where_funcs.Add(pr); - }*/ - ///////////////////// - return new ident(_procedure_definition.lambda_name); -} - case (int)RuleConstants.RULE_SIMPLE_EXPR4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR5: - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR6 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - //case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' 'tkRoundOpen' 'tkRoundClose' - case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkRoundOpen' 'tkRoundClose' 'tkRoundClose' -{ - function_lambda_definition fld = find_func_lambda_name(((ident)LRParser.GetReductionSyntaxNode(2)).name); - //function_lambda_definition fld = find_lambda_funcs(((ident)LRParser.GetReductionSyntaxNode(1)).name); - //lambda_funcs.RemoveAt(lambda_funcs.Count-1); - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(4); - function_lambda_definition _lambda_definition = fld; - function_lambda_call _lambda_call = new function_lambda_call(_lambda_definition, _expression_list); - return _lambda_call; - } - /*case (int)RuleConstants.RULE_SIMPLE_EXPR_TKROUNDOPEN_TKROUNDCLOSE2 : - // ::= 'tkRoundOpen' 'tkRoundClose' -{ - if (LRParser.GetReductionSyntaxNode(0) is function_lambda_call) - { - expression_list _expression_list = new expression_list(); - expression_list el_new = (expression_list)LRParser.GetReductionSyntaxNode(2); - function_lambda_call _lambda_definition_call = (function_lambda_call)LRParser.GetReductionSyntaxNode(0); - function_lambda_definition fld = _lambda_definition_call.f_lambda_def; - for (int i = 0; i < _lambda_definition_call.parameters.expressions.Count; i++) - _expression_list.expressions.Add(_lambda_definition_call.parameters.expressions[i]); - for (int i = 0; i < el_new.expressions.Count; i++) - _expression_list.expressions.Add(el_new.expressions[i]); - function_lambda_call _lambda_call = new function_lambda_call(fld, _expression_list); - return _lambda_call; - } - else - return null;}*/ - case (int)RuleConstants.RULE_VARIABLE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_DEF_VARS : - // ::= -{ - expression_list el=new expression_list(); - el.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - return el; - } - case (int)RuleConstants.RULE_DEF_VARS_TKSEMICOLON : - // ::= 'tkSemiColon' -{ - expression_list el=(expression_list)LRParser.GetReductionSyntaxNode(0); - el.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return el; - - } - case (int)RuleConstants.RULE_DEF_VAR_TKIDENT: -// ::= 'tkIdent' -{ - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(1); - /*statement_list _statement_list = (statement_list)LRParser.GetReductionSyntaxNode(4);*/ - statement_list _statement_list = new statement_list(); - ArrayList ar_main = (ArrayList)LRParser.GetReductionSyntaxNode(2); - ////////////////////////////for list - statement_list stmt_l = new statement_list(); - int start = let_where_list_params.Count; - if (_expression_list != null) - start = let_where_list_params.Count - _expression_list.expressions.Count; - int i_ex = 0; - for (int ll = start; ll < let_where_list_params.Count; ll++) - { - for (int l = 0; l < ((ArrayList)let_where_list_params[ll]).Count; l++) - { - ident_list il1 = new ident_list(); - il1.idents.Add(new ident(((ident)((ArrayList)let_where_list_params[ll])[l]).name)); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - - var_def_statement _var_def_statement = new var_def_statement(il1, (type_definition)_named_type_reference1, null, definition_attribute.None, false); - var_statement _var_statement = new var_statement(_var_def_statement); - stmt_l.subnodes.Add(_var_statement); - } - if (((ArrayList)let_where_list_params[ll]).Count > 0) - { - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - dot_node _dot_node = new dot_node(null, (addressed_value)(new ident("head"))); - ident id = _expression_list.expressions[i_ex] as ident; - /*for (int i1 = 0; i1 < ((ArrayList)let_where_list_params[ll]).Count; i1++) - id.name += ((ident)((ArrayList)let_where_list_params[ll])[i1]).name;*/ - if (id.name != null) - { - _dot_node.left = (addressed_value)(id); - object o = null; - method_call _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - assign _assign1 = new assign(((ident)((ArrayList)let_where_list_params[ll])[((ArrayList)let_where_list_params[ll]).Count - 1]) as addressed_value, _method_call as expression, _op_type_node.type); - stmt_l.subnodes.Add(_assign1); - - /// - for (int i1 = ((ArrayList)let_where_list_params[ll]).Count - 2; i1 > 0; i1--) - { - _dot_node = new dot_node((addressed_value)id, (addressed_value)(new ident("tail"))); - for (int j1 = 0; j1 < ((ArrayList)let_where_list_params[ll]).Count - 2 - i1; j1++) - { - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("tail"))); - } - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("head"))); - - _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - _assign1 = new assign(((ident)((ArrayList)let_where_list_params[ll])[i1]) as addressed_value, _method_call as expression, _op_type_node.type); - stmt_l.subnodes.Add(_assign1); - } - - _dot_node = new dot_node((addressed_value)id, (addressed_value)(new ident("tail"))); - - for (int j1 = 0; j1 < ((ArrayList)let_where_list_params[ll]).Count - 2; j1++) - { - _dot_node = new dot_node(_dot_node, (addressed_value)(new ident("tail"))); - } - _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - _assign1 = new assign(((ident)((ArrayList)let_where_list_params[ll])[0]) as addressed_value, _method_call as expression, _op_type_node.type); - stmt_l.subnodes.Add(_assign1); - } - } - i_ex++; - } - for (int ll = 0; ll < let_where_list_params.Count - start; ll++) - list_params_temp.RemoveAt(list_params_temp.Count - 1); - for (int i = stmt_l.subnodes.Count - 1; i >= 0; i--) - _statement_list.subnodes.Insert(0, stmt_l.subnodes[i]); - if (_expression_list != null) - for (int i = 0; i < _expression_list.expressions.Count; i++) - let_where_list_params.RemoveAt(let_where_list_params.Count - 1); - //////////////////////////// - formal_parameters _formal_parametres = null; - ident_list i_l = new ident_list(); - if (_expression_list != null) - { - for (int i = 0; i < _expression_list.expressions.Count; i++) - i_l.idents.Add((ident)_expression_list.expressions[i]); - ///////////////////////////// - _formal_parametres = new formal_parameters(); - for (int i = 0; i < i_l.idents.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_expression_list.expressions[i]; - _ident_list.idents.Add(id); - string name_param = id.name; - typed_parameters _typed_parametres = null; - int k = 0; - while (k < last_list_method_calls_lambda.Count && ((ident)((method_call)last_list_method_calls_lambda[k]).dereferencing_value).name != name_param) - k++; - if (k < last_list_method_calls_lambda.Count) - _typed_parametres = new typed_parameters(_ident_list, func_type(((method_call)last_list_method_calls_lambda[k]).parameters.expressions.Count), parametr_kind.none, null); - else - { - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - } - _formal_parametres.params_list.Add(_typed_parametres); - } - } - ////////////////////////// - named_type_reference _n_t_r = new named_type_reference(); - ident it = new ident("datatype"); - _n_t_r.names.Add(it); - ///////////////////////////// - //lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_n_t_r; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _expression_list; - _procedure_definition.lambda_name = ((ident)LRParser.GetReductionSyntaxNode(0)).name; - //new function_lambda_definition(_formal_parametres, (type_definition)_n_t_r, i_l, null, _expression_list, ((ident)LRParser.GetReductionSyntaxNode(0)).name); - object rt = _expression_list; - ////////////////////////////////////////////////for guard - for (int i = 0; i < ar_main.Count;i++ ) - if (((ArrayList)ar_main[i])[0] != null) - { - if_node _if_node = new if_node(); - _if_node.condition = _ob((expression)((ArrayList)ar_main[i])[0]); - _if_node.then_body = new statement_list(); - _if_node.then_body = (statement)((ArrayList)ar_main[i])[1]; - procedure_call _exit = new procedure_call(new ident("exit") as addressed_value); - ((statement_list)_if_node.then_body).subnodes.Add(_exit); - _statement_list.subnodes.Add(_if_node); - } - else - { - _statement_list.subnodes.Add((statement)((ArrayList)ar_main[i])[1]); - procedure_call _exit = new procedure_call(new ident("exit") as addressed_value); - _statement_list.subnodes.Add(_exit); - } - //////////////////////////////////////////////// - _procedure_definition.proc_body = _statement_list; - parsertools.create_source_context(_procedure_definition, _expression_list, rt); - procedure_definition pr = lambda(_procedure_definition); - /////////////////////////// - /*if (let_func_last.Count > 0) - { - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < let_func_last.Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)let_func_last[i]); - for (int i = 0; i < let_func_last.Count; i++) - if (let_where_funcs.Count > 0) - let_where_funcs.RemoveAt(let_where_funcs.Count - 1); - for (int i = 0; i < let_func_last.Count; i++) - let_funcs.RemoveAt(let_funcs.Count - 1); - let_func_last.Clear(); - let_flag.RemoveAt(let_flag.Count - 1); - } - else - if ((let_flag.Count > 0 && _expression_list != null) || let_funcs.Count == 0) - let_flag.Clear();*/ - if (((ArrayList)let_stack[let_stack.Count - 1]).Count > 0) - { - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < ((ArrayList)let_stack[let_stack.Count - 1]).Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)let_stack[let_stack.Count - 1])[i]); - for (int i = 0; i < ((ArrayList)let_stack[let_stack.Count - 1]).Count; i++) - if (let_where_funcs.Count > 0) - let_where_funcs.RemoveAt(let_where_funcs.Count - 1); - for (int i = 0; i < ((ArrayList)let_stack[let_stack.Count - 1]).Count; i++) - if (let_funcs.Count > 0) - let_funcs.RemoveAt(let_funcs.Count - 1); - let_func_last.Clear(); - if (let_flag.Count>0) - let_flag.RemoveAt(let_flag.Count - 1); - } - let_stack.RemoveAt(let_stack.Count - 1); - /////////////////////////////////////////////////////////////////// - if (LRParser.GetReductionSyntaxNode(3) != null) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int j = 0; j < ((ArrayList)LRParser.GetReductionSyntaxNode(3)).Count; j++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)LRParser.GetReductionSyntaxNode(3))[j]); - ArrayList ar = ((ArrayList)let_where_funcs_main[let_where_funcs_main.Count - 1]).Clone() as ArrayList; - for (int j = 0; j < ar.Count; j++) - last_where_funcs.Add(ar[j]); - let_where_funcs_main.RemoveAt(let_where_funcs_main.Count - 1); - } - ///////////////////////////lambda - if (((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count > 0) - { - if (((block)pr.proc_body).defs == null) - ((block)pr.proc_body).defs = new declarations(); - for (int i = 0; i < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; i++) - ((block)pr.proc_body).defs.defs.Add((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[i]); - for (int ii = 0; ii < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; ii++) - _function_lambda_definitions.RemoveAt(_function_lambda_definitions.Count - 1); - } - lambda_stack.RemoveAt(lambda_stack.Count - 1); - /////////////////////////// - let_funcs.Add(pr); - let_where_funcs.Add(pr); - //let_funcs1.Add(_procedure_definition); - //_function_lambda_definitions.Add(_procedure_definition);//////////////// - let_fact_params.Add(_procedure_definition.lambda_name); - return new ident(((ident)LRParser.GetReductionSyntaxNode(0)).name); -} - case (int)RuleConstants.RULE_GUARD_BODY_LIST: - // ::= - { - ArrayList ar = (ArrayList)LRParser.GetReductionSyntaxNode(0); - ArrayList ar_main = new ArrayList(); - ar_main.Add(ar); - return ar_main; - } - case (int)RuleConstants.RULE_GUARD_BODY_LIST2: - // ::= - { - ArrayList ar_main = (ArrayList)LRParser.GetReductionSyntaxNode(0); - ar_main.Add(LRParser.GetReductionSyntaxNode(1)); - return ar_main; - } - case (int)RuleConstants.RULE_GUARD_BODY_TKASSIGN: - // ::= 'tkAssign' - { - ArrayList ar = new ArrayList(); - ar.Add(LRParser.GetReductionSyntaxNode(0)); - ar.Add(LRParser.GetReductionSyntaxNode(2)); - return ar; - } - case (int)RuleConstants.RULE_VARIABLE_TKIDENT: -// ::= 'tkIdent' -{ - if (token_where==1) - token_where = 2; - if (((ident)LRParser.GetReductionSyntaxNode(0)).name=="pi") - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - expression_list ell = new expression_list(); - ell.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - ell.expressions.Add(new string_const("real") as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, ell, false, null); - return newexpr; - } - else - return LRParser.GetReductionSyntaxNode(0); -} - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKIDENT_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkIdent' 'tkRoundClose' -{ - expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(((ident)LRParser.GetReductionSyntaxNode(1)).name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(2); - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(1); - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _params_el; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(((ident)LRParser.GetReductionSyntaxNode(1)).name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = null; - string name = ((ident)LRParser.GetReductionSyntaxNode(1)).name; - if (name == "cos" || name == "sin" || name == "tan") - { - bin_expr b_e = new bin_expr(); - b_e.operation_type = Operators.Plus; - b_e.left = el.expressions[0]; - named_type_reference _named_type_reference2 = new named_type_reference(); - ident idtype2 = new ident("datatype"); - _named_type_reference2.names.Add(idtype2); - expression_list ell2 = new expression_list(); - ell2.expressions.Add(new double_const(0.0)); - ell2.expressions.Add(new string_const("real") as expression); - named_type_reference ntr2 = _named_type_reference2; - b_e.right = new new_expr(ntr2, ell2, false, null); - ////////////////////////////////// - dot_node d_n = new dot_node(); - d_n.left = (addressed_value)b_e; - d_n.right = new ident("ob"); - expression_list el1 = new expression_list(); - el1.expressions.Add(d_n); - method_call m_c = new method_call(el1); - m_c.dereferencing_value = new ident("real"); - /////////////////////////////////// - expression_list el2 = new expression_list(); - el2.expressions.Add(m_c); - _method_call = new method_call(el2); - _method_call.dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(1); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - expression_list ell = new expression_list(); - ell.expressions.Add(_method_call as expression); - ell.expressions.Add(new string_const("real") as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, ell, false, null); - return newexpr; - } - else - { - _method_call = new method_call(el); - - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(1); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(1), _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - } - - } - } - //case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkRoundClose' 'tkRoundOpen' 'tkRoundClose' - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkRoundClose' -{ - if (LRParser.GetReductionSyntaxNode(1) is ident) - { - expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - int n = el.expressions.Count; - int fld_params_count = find_count_params_lambda(((ident)LRParser.GetReductionSyntaxNode(1)).name); - if (_function_lambda_definitions_after.Count > 0) - { - function_lambda_definition fld = (function_lambda_definition)_function_lambda_definitions_after[_function_lambda_definitions_after.Count - 2]; - for (int i = 0; i < fld.formal_parameters.params_list.Count; i++) - if (!fld.formal_parameters.params_list[i].idents.idents[0].name.Contains("$")) - n++; - } - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(2); - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(1); - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _params_el; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(((ident)LRParser.GetReductionSyntaxNode(1)).name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - for (int i = list_params1.Count - 1; i >= 0; i--) - if (list_params1[i] is ident) - { - el.expressions.Insert(0, (new ident(((ident)list_params1[i]).name))); - } - - method_call _method_call = new method_call(el); - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(1); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - } - } - else - { - if (LRParser.GetReductionSyntaxNode(1) is method_call) - { - method_call mc = LRParser.GetReductionSyntaxNode(1) as method_call; - expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - expression_list _expression_list = new expression_list(); - for (int i = 0; i < mc.parameters.expressions.Count; i++) - _expression_list.expressions.Add(mc.parameters.expressions[i]); - for (int i = 0; i < el.expressions.Count; i++) - _expression_list.expressions.Add(el.expressions[i]); - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)(new ident(((ident)mc.dereferencing_value).name)); - list_method_calls.RemoveAt(list_method_calls.Count - 1); - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.RemoveAt(last_list_method_calls_lambda.Count - 1); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - } - else - return null; - } -} - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE: -// ::= 'tkRoundtkOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' -{ - expression_list el = LRParser.GetReductionSyntaxNode(4) as expression_list; - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(((ident)LRParser.GetReductionSyntaxNode(2)).name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(4); - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Insert(0,new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(2); - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _params_el; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(((ident)LRParser.GetReductionSyntaxNode(2)).name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = null; - string name = ((ident)LRParser.GetReductionSyntaxNode(2)).name; - _method_call = new method_call(el); - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(2); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(2), _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - } -} - //case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundOpen' 'tkRoundClose' - /*case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE2: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' -{ - ////////////////////////////////////////////////////////ident_params - ident _ident = (ident)LRParser.GetReductionSyntaxNode(2); - expression_list el = new expression_list(); - el.expressions.Add(((expression_list)LRParser.GetReductionSyntaxNode(6)).expressions[0]); - el.expressions.Add(((expression_list)LRParser.GetReductionSyntaxNode(4)).expressions[0]); - //////////////////////////////////////////////////////// - //expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(_ident.name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = el; - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _params_el; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(_ident.name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = new method_call(el); - - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - parsertools.create_source_context(_method_call, _ident, _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - - } -}*/ - /*case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' -{ - expression_list el = LRParser.GetReductionSyntaxNode(1) as expression_list; - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(((ident)LRParser.GetReductionSyntaxNode(3)).name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(1); - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(3); - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(((ident)LRParser.GetReductionSyntaxNode(3)).name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = null; - string name = ((ident)LRParser.GetReductionSyntaxNode(3)).name; - _method_call = new method_call(el); - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(3); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(3), _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - } -} - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundOpen' 'tkRoundClose' -{ - ////////////////////////////////////////////////////////ident_params - ident _ident = (ident)LRParser.GetReductionSyntaxNode(3); - expression_list el = new expression_list(); - el.expressions.Add(((expression_list)LRParser.GetReductionSyntaxNode(1)).expressions[0]); - el.expressions.Add(((expression_list)LRParser.GetReductionSyntaxNode(7)).expressions[0]); - //////////////////////////////////////////////////////// - //expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(_ident.name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = el; - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(_ident.name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = new method_call(el); - - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - parsertools.create_source_context(_method_call, _ident, _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - - } -}*/ - /*case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE: - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - return null; - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE: - // ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundOpen' 'tkRoundClose' - return null;*/ - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' -{ - ArrayList ar = new ArrayList(); - ar.Add(LRParser.GetReductionSyntaxNode(3)); - ar.Add(LRParser.GetReductionSyntaxNode(1)); - ar.Add(LRParser.GetReductionSyntaxNode(5)); - return ar; -} - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE2: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' -{ - expression_list el = new expression_list(); - el.expressions.Add((expression)LRParser.GetReductionSyntaxNode(1)); - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(((ident)LRParser.GetReductionSyntaxNode(3)).name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = new expression_list(); - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(1)); - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(3); - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _params_el; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(((ident)LRParser.GetReductionSyntaxNode(3)).name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = null; - string name = ((ident)LRParser.GetReductionSyntaxNode(3)).name; - _method_call = new method_call(el); - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(3); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(3), _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - } -} - //case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundOpen' 'tkRoundClose' - //case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE3: -// ::= 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' - case (int)RuleConstants.RULE_INFIX_EXPR_TKROUNDOPEN_TKROUNDOPEN_TKQUOTE_TKIDENT_TKQUOTE_TKROUNDCLOSE_TKROUNDCLOSE: -// ::= 'tkRoundOpen' 'tkRoundOpen' 'tkQuote' 'tkIdent' 'tkQuote' 'tkRoundClose' 'tkRoundClose' -{ - ////////////////////////////////////////////////////////ident_params - ident _ident = (ident)LRParser.GetReductionSyntaxNode(4); - expression_list el = new expression_list(); - el.expressions.Add((expression)LRParser.GetReductionSyntaxNode(2)); - el.expressions.Add(((expression_list)LRParser.GetReductionSyntaxNode(7)).expressions[0]); - //////////////////////////////////////////////////////// - //expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - ////////////////////////////for curring - int n = el.expressions.Count; - int fld_params_count = find_count_params(_ident.name); - //////////////////////////// - if (fld_params_count - n > 0) - { - expression_list _expression_list = el; - expression_list _params = new expression_list(); - expression_list _params_el = new expression_list(); - for (int i = 0; i < list_params1.Count; i++) - if (list_params1[i] is ident) - { - _params.expressions.Add(new ident(((ident)list_params1[i]).name)); - _params_el.expressions.Add(new ident(((ident)list_params1[i]).name)); - } - for (int i = 1; i <= fld_params_count - n; i++) - _expression_list.expressions.Add(new ident("$$" + i)); - for (int i = 1; i <= fld_params_count - n; i++) - { - _params.expressions.Add(new ident("$$" + i)); - _params_el.expressions.Add(new ident("$$" + i)); - } - method_call _method_call = new method_call(_expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - assign _assign = new assign((addressed_value)new ident("result"), _method_call as expression, _op_type_node.type); - - statement_list _statement_list = new statement_list(); - _statement_list.subnodes.Add(_assign); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 1; i <= fld_params_count - n; i++) - i_l.idents.Add(new ident("$$" + i)); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _params.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_params.expressions[i]; - _ident_list.idents.Add(id); - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _params_el; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres, (type_definition)_named_type_reference1, i_l, null, _params_el, "lambda" + lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - _function_lambda_definitions_after.Add(_procedure_definition); - _function_lambda_definitions_after.Add(_ident.name);//////////////// - last_function_lambda_definitions.Add(_procedure_definition); - return new ident(_procedure_definition.lambda_name); - } - else - { - method_call _method_call = new method_call(el); - - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)_ident; - parsertools.create_source_context(_method_call, _ident, _method_call); - } - list_method_calls.Add(_method_call); - last_list_method_calls.Add(_method_call); - last_list_method_calls_lambda.Add(_method_call); - return _method_call; - - } -} - case (int)RuleConstants.RULE_MULTOP_TKSTAR: - // ::= 'tkStar' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULTOP_TKSLASH : - // ::= 'tkSlash' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKPLUS : - // ::= 'tkPlus' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKMINUS : - // ::= 'tkMinus' -return LRParser.GetReductionSyntaxNode(0); - /*case (int)RuleConstants.RULE_STMT_TKPRINT : - // ::= 'tkPrint' -{ - if (!(LRParser.GetReductionSyntaxNode(1) is function_lambda_call)) - { - dot_node _dot_node = new dot_node(null, (addressed_value)(new ident("print"))); - _dot_node.left = (addressed_value)LRParser.GetReductionSyntaxNode(1); - object o = null; - method_call _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - procedure_call _procedure_call = new procedure_call(_method_call as addressed_value); - return _procedure_call; - } - else - { - function_lambda_call flc = LRParser.GetReductionSyntaxNode(1) as function_lambda_call; - method_call _method_call1 = new SyntaxTree.method_call(flc.parameters); - ((dereference)_method_call1).dereferencing_value = (addressed_value)(new ident(flc.f_lambda_def.lambda_name)); - - dot_node _dot_node = new dot_node(null, (addressed_value)(new ident("print"))); - _dot_node.left = (addressed_value)_method_call1; - object o = null; - method_call _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node; - procedure_call _procedure_call = new procedure_call(_method_call as addressed_value); - return _procedure_call; - } -}*/ - case (int)RuleConstants.RULE_STMT_TKIDENT_TKARROWGEN_TKIDENT: -// ::= 'tkIdent' 'tkArrowGen' 'tkIdent' -{ - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ident_list il = new ident_list(); - il.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - //////////////////////////////////////// - named_type_reference _named_type_reference2 = new named_type_reference(); - _named_type_reference2.names.Add(new SyntaxTree.ident("datatype")); - expression_list ell = new expression_list(); - //////////////////////////////////////// - dot_node _dot_node = new dot_node(null, (addressed_value)LRParser.GetReductionSyntaxNode(2)/*(new ident("getChar"))*/); - /////***************** - named_type_reference _named_type_reference3 = new named_type_reference(); - _named_type_reference3.names.Add(new SyntaxTree.ident("datatype")); - expression_list ell3 = new expression_list(); - ell3.expressions.Add(new string_const("$null")); - ell3.expressions.Add(new string_const("string") as expression); - named_type_reference ntr3 = _named_type_reference2; - new_expr ne3= new new_expr(ntr3, ell3, false, null); - /////***************** - _dot_node.left = (addressed_value)ne3; - object o = null; - method_call _method_call = new method_call(o as expression_list); - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)_dot_node;//LRParser.GetReductionSyntaxNode(2); - ///////////////////////////////// - /*ell.expressions.Add(_method_call); - ell.expressions.Add(new string_const("string") as expression); - named_type_reference ntr = _named_type_reference2; - new_expr ne = new new_expr(ntr, ell, false, null);*/ - //////////////////////////////////////// - var_def_statement _var_def_statement = new var_def_statement(il, (type_definition)_named_type_reference1, _method_call, definition_attribute.None, false); - var_statement _var_statement = new var_statement(_var_def_statement); - - return _var_statement; -} - case (int)RuleConstants.RULE_STMT_TKIF_TKTHEN_TKELSE: - // ::= 'tkIf' 'tkThen' 'tkElse' -{ - if_node _if_node = new if_node(null, (statement)LRParser.GetReductionSyntaxNode(3), (statement)LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(4), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(5), LRParser.GetReductionSyntaxNode(4))); - - _if_node.condition = _ob((expression)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), _if_node); - statement_list sl = new statement_list(); - sl.subnodes.Add(_if_node); - return sl; - } - case (int)RuleConstants.RULE_STMT_TKCASE_TKROUNDOPEN_TKROUNDCLOSE_TKOF : - // ::= 'tkCase' 'tkRoundOpen' 'tkRoundClose' 'tkOf' -return null; - case (int)RuleConstants.RULE_STMT_TKDO_TKFIGUREOPEN_TKSEMICOLON_TKFIGURECLOSE : - // ::= 'tkDo' 'tkFigureOpen' 'tkSemiColon' 'tkFigureClose' -return LRParser.GetReductionSyntaxNode(2); - case (int)RuleConstants.RULE_STMT_TKDO: -// ::= 'tkDo' -{ - return LRParser.GetReductionSyntaxNode(1); -} - case (int)RuleConstants.RULE_STMT_TKRETURN : - // ::= 'tkReturn' -{ - statement_list _statement_list = new statement_list(); - - ident id = new ident("result"); - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - assign _assign = new assign((addressed_value)id, LRParser.GetReductionSyntaxNode(1) as expression, _op_type_node.type); - parsertools.create_source_context(_assign, id, LRParser.GetReductionSyntaxNode(1)); - - _statement_list.subnodes.Add((statement)_assign); - parsertools.assign_source_context(_statement_list, _assign); - return _statement_list; - } - case (int)RuleConstants.RULE_STMT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CASE_VARIANTS : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CASE_VARIANTS_TKSPLIT: -// ::= tkSplit - return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CASE_VARIANT_TKROUNDOPEN_TKROUNDCLOSE_TKARROW : - // ::= 'tkRoundOpen' 'tkRoundClose' 'tkArrow' -{ - param_value_list.Add(LRParser.GetReductionSyntaxNode(1)); - body_variant_list.Add(LRParser.GetReductionSyntaxNode(4)); - return null; - } - case (int)RuleConstants.RULE_PARAMS1: -// ::= -{ - //let_flag.Add(1); - bool b = false; - if (list_param.Count == 1) - { - list_params_temp.Add(new ArrayList()); - let_where_list_params.Add(new ArrayList());// - if (list_param[0] is new_expr && ((string_const)((new_expr)list_param[0]).params_list.expressions[1]).Value == "empty") - b = true; - list_param.Clear(); - } - else - { - list_params_temp.Add(list_param.Clone()); - let_where_list_params.Add(list_param.Clone());// - } - expression_list _expression_list = new expression_list(); - if (list_param.Count == 0) - { - if (b) - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(new int32_const(0)); - literal lt; - string text = "empty_list"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - _expression_list.expressions.Add(newexpr); - } - else - { - _expression_list.source_context = ((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - } - } - else - { - ident id = new ident(); - for (int i = 0; i < list_param.Count; i++) - { - if (list_param[i] is ident) - id.name += ((ident)list_param[i]).name; - else - { - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "èäåíòèôèêàòîð")); - return null; - } - } - _expression_list.source_context = ((expression)id).source_context; - _expression_list.expressions.Add((expression)id); - list_param.Clear(); - } - list_params1.Clear(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - list_params1.Add(_expression_list.expressions[i]); - last_list_method_calls_lambda.Clear(); - return _expression_list; -} - case (int)RuleConstants.RULE_PARAMS1_TKCOMMA: -// ::= 'tkComma' -{ - bool b = false; - if (list_param.Count == 1) - { - list_params_temp.Add(new ArrayList()); - let_where_list_params.Add(new ArrayList());// - if (list_param[0] is new_expr && ((string_const)((new_expr)list_param[0]).params_list.expressions[1]).Value == "empty") - b = true; - list_param.Clear(); - } - else - { - list_params_temp.Add(list_param.Clone()); - let_where_list_params.Add(list_param.Clone());// - } - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(0); - if (list_param.Count == 0) - { - if (!b) - { - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - } - else - { - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - expression_list el = new expression_list(); - el.expressions.Add(new int32_const(0)); - literal lt; - string text = "empty_list"; - lt = new string_const(text); - el.expressions.Add(lt as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, el, false, null); - _expression_list.expressions.Add(newexpr); - } - } - else - { - ident id = new ident(); - for (int i = 0; i < list_param.Count; i++) - { - if (list_param[i] is ident) - id.name += ((ident)list_param[i]).name; - else - { - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "èäåíòèôèêàòîð")); - return null; - } - } - _expression_list.expressions.Add((expression)id); - list_param.Clear(); - } - list_params1.Clear(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - list_params1.Add(_expression_list.expressions[i]); - last_list_method_calls_lambda.Clear(); - return _expression_list; -} - - case (int)RuleConstants.RULE_FUNC_CALL : - // ::= -{ - statement_list _statement_list = new statement_list(); - - ident id = new ident("result"); - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - expression from = (expression)LRParser.GetReductionSyntaxNode(0); - if (LRParser.GetReductionSyntaxNode(0) is ident && - (find_func_name(((ident)LRParser.GetReductionSyntaxNode(0)).name) || find_count_params_lambda(((ident)LRParser.GetReductionSyntaxNode(0)).name) >= 0)) - { - //expression_list el = LRParser.GetReductionSyntaxNode(2) as expression_list; - //int n = el.expressions.Count; - expression_list el = new expression_list(); - int fld_params_count = 0; - if (find_func_name(((ident)LRParser.GetReductionSyntaxNode(0)).name)) - fld_params_count = find_count_params(((ident)LRParser.GetReductionSyntaxNode(0)).name); - else - fld_params_count = find_count_params_lambda(((ident)LRParser.GetReductionSyntaxNode(0)).name); - if (fld_params_count != 0) - for (int i = 0; i < fld_params_count; i++) - { - string param_name = find_name_params_lambda(((ident)LRParser.GetReductionSyntaxNode(0)).name, i); - if (param_name.Contains("$")) - { - named_type_reference _named_type_reference1 = new named_type_reference(); - _named_type_reference1.names.Add(new SyntaxTree.ident("datatype")); - expression_list ell = new expression_list(); - ell.expressions.Add(new string_const("$null") as expression); - ell.expressions.Add(new string_const("string") as expression); - named_type_reference ntr = _named_type_reference1; - new_expr newexpr = new new_expr(ntr, ell, false, null); - el.expressions.Add(newexpr); - } - else - { - el.expressions.Add(new ident(param_name)); - } - } - method_call _method_call = new method_call(el); - - if (_method_call is dereference) - ((dereference)_method_call).dereferencing_value = (addressed_value)LRParser.GetReductionSyntaxNode(0); - from = _method_call; - } - if (LRParser.GetReductionSyntaxNode(0) is ident) - { - function_lambda_definition fld = find_func_lambda_name(((ident)LRParser.GetReductionSyntaxNode(0)).name); - if (fld != null) - { - expression_list _expression_list1 = new expression_list(); - function_lambda_call _lambda_call = new function_lambda_call(fld, _expression_list1); - from = _lambda_call; - } - } - - assign _assign = new assign((addressed_value)id, from, _op_type_node.type); - parsertools.create_source_context(_assign, id, LRParser.GetReductionSyntaxNode(0)); - - _statement_list.subnodes.Add((statement)_assign); - parsertools.assign_source_context(_statement_list, _assign); - //////////////////////////// - if (LRParser.GetReductionSyntaxNode(0) is ident) - { - list_return_funcs.Add(find_count_params(((ident)LRParser.GetReductionSyntaxNode(0)).name)); - } - //////////////////////////// - return _statement_list; - } - case (int)RuleConstants.RULE_PARAMS_VALUE : - // ::= -{ - expression_list _expression_list = new expression_list(); - if (LRParser.GetReductionSyntaxNode(0) != null) - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - else - _expression_list.expressions.Add(null); - return _expression_list; - } - case (int)RuleConstants.RULE_PARAMS_VALUE2 : - // ::= -{ - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list, _expression_list, LRParser.GetReductionSyntaxNode(1)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(1) as expression); - return _expression_list; - } - case (int)RuleConstants.RULE_PARAM_VALUE: -// ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LAMBDA_FUNC_TKLEFTSLASH_TKARROW : - // ::= 'tkLeftSlash' 'tkArrow' - -{ - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(1); - statement_list _statement_list = (statement_list)LRParser.GetReductionSyntaxNode(3); - //////////////////////////// - ident_list i_l = new ident_list(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - i_l.idents.Add((ident)_expression_list.expressions[i]); - ///////////////////////////// - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < _expression_list.expressions.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = (ident)_expression_list.expressions[i]; - _ident_list.idents.Add(id); - string name_param = id.name; - typed_parameters _typed_parametres = null; - int k = 0; - while (k < last_list_method_calls_lambda.Count && ((ident)((method_call)last_list_method_calls_lambda[k]).dereferencing_value).name != name_param) - k++; - if (k < last_list_method_calls_lambda.Count) - _typed_parametres = new typed_parameters(_ident_list, func_type(((method_call)last_list_method_calls_lambda[k]).parameters.expressions.Count), parametr_kind.none, null); - else - { - named_type_reference _named_type_reference = new named_type_reference(); - - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - - _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference, parametr_kind.none, null); - parsertools.create_source_context(_typed_parametres, _ident_list, _named_type_reference); - } - _formal_parametres.params_list.Add(_typed_parametres); - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parametres; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _expression_list; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parametres,(type_definition)_named_type_reference1,i_l, null,_expression_list, "lambda"+lambda_num); - object rt = _expression_list; - _procedure_definition.proc_body = _statement_list; - //////////////////////let & where - if (let_stack.Count>0 && ((ArrayList)let_stack[let_stack.Count - 1]).Count > 0) - { - _procedure_definition.defs = new List(); - for (int i = 0; i < ((ArrayList)let_stack[let_stack.Count - 1]).Count; i++) - _procedure_definition.defs.Add((procedure_definition)((ArrayList)let_stack[let_stack.Count - 1])[i]); - if (let_where_funcs_main.Count + 1 > token_where_count) - { - for (int i = 0; i < last_where_funcs.Count; i++) - //if (((procedure_definition)last_where_funcs[i]).proc_header.name.meth_name.name.Contains("lambda")) - _procedure_definition.defs.Add((procedure_definition)last_where_funcs[i]); - for (int i = 0; i < last_where_funcs.Count; i++) - if (let_funcs.Count > 0) - let_funcs.RemoveAt(let_funcs.Count - 1); - last_where_funcs.Clear(); - } - for (int i = 0; i < ((ArrayList)let_stack[let_stack.Count - 1]).Count; i++) - if (let_where_funcs.Count > 0) - let_where_funcs.RemoveAt(let_where_funcs.Count - 1); - for (int i = 0; i < ((ArrayList)let_stack[let_stack.Count - 1]).Count; i++) - if (let_funcs.Count > 0) - let_funcs.RemoveAt(let_funcs.Count - 1); - let_func_last.Clear(); - if (let_flag.Count > 0) - let_flag.RemoveAt(let_flag.Count - 1); - } - if (let_stack.Count>0) - let_stack.RemoveAt(let_stack.Count - 1); - /*if (let_where_funcs.Count > 0) - { - _procedure_definition.defs = new ArrayList(); - for (int i = 0; i < let_where_funcs.Count; i++) - if (((procedure_definition)let_where_funcs[i]).proc_header.name.meth_name.name.Contains("lambda")) - _procedure_definition.defs.Add(let_where_funcs[i]); - if (let_where_funcs_main.Count + 1 > token_where_count) - { - for (int i = 0; i < last_where_funcs.Count; i++) - //if (((procedure_definition)last_where_funcs[i]).proc_header.name.meth_name.name.Contains("lambda")) - _procedure_definition.defs.Add((procedure_definition)last_where_funcs[i]); - for (int i = 0; i < last_where_funcs.Count; i++) - if (let_funcs.Count > 0) - let_funcs.RemoveAt(let_funcs.Count - 1); - last_where_funcs.Clear(); - } - int j=0; - while (j < let_where_funcs.Count) - if (((procedure_definition)let_where_funcs[j]).proc_header.name.meth_name.name.Contains("lambda")) - let_where_funcs.RemoveAt(j); - else - j++; - //let_where_funcs.Clear(); - let_func_last.Clear(); - let_flag.Clear(); - }*/ - ////////////////////// - parsertools.create_source_context(_procedure_definition, _expression_list, rt); - _function_lambda_definitions.Add(_procedure_definition);//////////////// - if (lambda_stack.Count > 0) - { - if (((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count > 0) - { - if (_procedure_definition.defs == null) - _procedure_definition.defs = new List(); - for (int i = 0; i < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; i++) - { - _procedure_definition.defs.Add((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[i]); - int j = 0; - while (j < _function_lambda_definitions.Count && ((function_lambda_definition)_function_lambda_definitions[j]).lambda_name != - ((procedure_definition)((ArrayList)lambda_stack[lambda_stack.Count - 1])[i]).proc_header.name.meth_name.name) - j++; - if (j < _function_lambda_definitions.Count) - _function_lambda_definitions.RemoveAt(j); - } - //for (int i = 0; i < ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Count; i++) - //_function_lambda_definitions.RemoveAt(_function_lambda_definitions.Count-1); - lambda_stack.RemoveAt(lambda_stack.Count - 1); - } - if (lambda_stack.Count > 1 && ((ArrayList)lambda_stack[lambda_stack.Count - 2]).Count > 0) - { - ((ArrayList)lambda_stack[lambda_stack.Count - 2]).Add(lambda(_procedure_definition)); - lambda_stack.RemoveAt(lambda_stack.Count - 1); - } - else - ((ArrayList)lambda_stack[lambda_stack.Count - 1]).Add(lambda(_procedure_definition)); - } - //lambda_funcs.Add(_procedure_definition); - - //let_funcs.Add(lambda(_procedure_definition)); - //let_where_funcs.Add(lambda(_procedure_definition)); - - return new ident(_procedure_definition.lambda_name); -} - case (int)RuleConstants.RULE_EMPTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL -} -throw new RuleException("Unknown rule"); -} - -public method_call _ob(object dt) - { - token_info _token_info = new token_info("."); - _token_info.source_context = parsertools.GetTokenSourceContext(); - /////////// - ident id = new ident("ob"); - dot_node _dot_node = new dot_node(null, (addressed_value)id); - parsertools.create_source_context(_dot_node, _token_info, id); - _dot_node.left = (addressed_value)dt; - parsertools.create_source_context(_dot_node, dt, _dot_node.right); - ///////////////////////// - expression_list el = new expression_list(); - el.expressions.Add(_dot_node); - method_call _method_call = new method_call(el); - parsertools.create_source_context(_method_call, null, null); - ///////////////////////// - ident id1 = new ident("boolean"); - ///////////////////////// - if (_method_call is dereference) - { - ((dereference)_method_call).dereferencing_value = (addressed_value)id1; - parsertools.create_source_context(_method_call, id1, _method_call); - } - return _method_call; - } - -public method_call _count(expression dt) -{ - ident id = new ident("count"); - dot_node _dot_node = new dot_node(null, (addressed_value)id); - _dot_node.left = (addressed_value)dt; - method_call _method_call = new method_call(); - _method_call.dereferencing_value = _dot_node; - return _method_call; -} - -public method_call _add(expression dt, expression param) -{ - ident id = new ident("add"); - dot_node _dot_node = new dot_node(null, null); - expression_list el = new expression_list(); - el.expressions.Add(param); - //method_call _method_call = new method_call(el); - //_method_call.dereferencing_value = id; - _dot_node.left = (addressed_value)dt; - _dot_node.right = id; - method_call _method_call = new method_call(el); - _method_call.dereferencing_value = _dot_node; - return _method_call; -} - -public method_call _index(expression dt, expression param) -{ - token_info _token_info = new token_info("."); - ident id = new ident("index"); - dot_node _dot_node = new dot_node(null, null); - expression_list el = new expression_list(); - el.expressions.Add(param); - _dot_node.left = (addressed_value)dt; - _dot_node.right = id; - method_call _method_call = new method_call(el); - _method_call.dereferencing_value = _dot_node; - return _method_call; -} - -public procedure_definition lambda(function_lambda_definition _function_lambda_definition) -{ - SyntaxTree.procedure_definition _func_def = new PascalABCCompiler.SyntaxTree.procedure_definition(); - SyntaxTree.method_name _method_name1 = new SyntaxTree.method_name(null, new SyntaxTree.ident(_function_lambda_definition.lambda_name), null); - SyntaxTree.function_header _function_header1 = new SyntaxTree.function_header(); - - object rt1 = new object(); - _function_header1.name = _method_name1; - SyntaxTree.formal_parameters fps = new PascalABCCompiler.SyntaxTree.formal_parameters(); - _function_header1.parameters = _function_lambda_definition.formal_parameters;//fps; - SyntaxTree.named_type_reference _named_type_reference = new SyntaxTree.named_type_reference(); - SyntaxTree.ident idtype = new SyntaxTree.ident("datatype"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - - rt1 = _named_type_reference; - _function_header1.return_type = (SyntaxTree.type_definition)_named_type_reference; - - _function_header1.of_object = false; - _function_header1.class_keyword = false; - SyntaxTree.block _block1 = new SyntaxTree.block(null, null); - SyntaxTree.statement_list sl1 = new SyntaxTree.statement_list(); - sl1.subnodes.Add(_function_lambda_definition.proc_body); - _block1.program_code = sl1; - _func_def.proc_header = _function_header1; - _func_def.proc_body = (SyntaxTree.proc_block)_block1; - if (_function_lambda_definition.defs != null) - { - if (((block)_func_def.proc_body).defs == null) - ((block)_func_def.proc_body).defs = new declarations(); - for (int l = 0; l < _function_lambda_definition.defs.Count; l++) - ((block)_func_def.proc_body).defs.defs.Add(_function_lambda_definition.defs[l] as procedure_definition); - } - _function_lambda_definition.proc_definition = _func_def; - return _func_def; -} - -public procedure_definition find_function1(string name) -{ - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - return (procedure_definition)_functions[i]; - else - return null; -} - -public int find_count_params(string name) -{ - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parameters == null) - return 0; - else - return ((procedure_definition)_functions[i]).proc_header.parameters.params_list.Count; - } - else - return 0; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return 0; - else - return ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; - } - else - return 0; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return 0; - else - return ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; - } - } - else - return 0; - } -} - -public int find_count_params_lambda(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parameters.params_list.Count; - else - return -1; -} - -public string find_name_params_lambda(string name, int ind) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - { - formal_parameters fp = ((function_lambda_definition)_function_lambda_definitions_after[i]).formal_parameters; - if (ind < fp.params_list.Count) - return fp.params_list[ind].idents.idents[0].name; - else - return ""; - } - else - return ""; -} - -public bool find_func_name(string name) -{ - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - return true; - else - return false; -} - -public function_lambda_definition find_func_lambda_name(string name) -{ - int i = 0; - while (i < _function_lambda_definitions.Count && ((function_lambda_definition)_function_lambda_definitions[i]).lambda_name != name) - i++; - if (i < _function_lambda_definitions.Count) - return (function_lambda_definition)_function_lambda_definitions[i]; - else - return null; -} - -/*public procedure_definition find_let_lambda_name(string name) -{ - int i = 0; - while (i < let_funcs.Count && ((procedure_definition)let_funcs[i]).proc_header.name.meth_name.name != name) - i++; - if (i < let_funcs.Count) - return (procedure_definition)let_funcs[i]; - else - return null; -}*/ - -public type_definition func_type(int count) -{ - //int count = mc.parameters.expressions.Count; - - formal_parameters _formal_parametres = new formal_parameters(); - for (int i = 0; i < count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = new ident("$a" + i.ToString()); - _ident_list.idents.Add(id); - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("datatype"); - _named_type_reference1.names.Add(idtype1); - typed_parameters _typed_parametres = new typed_parameters(_ident_list, (type_definition)_named_type_reference1, parametr_kind.none, null); - _formal_parametres.params_list.Add(_typed_parametres); - } - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - function_header _function_header = new function_header(); - _function_header.parameters = _formal_parametres; - _function_header.return_type = (type_definition)_named_type_reference; - _function_header.of_object = false; - _function_header.class_keyword = false; - return (type_definition)_function_header; -} - -public var_statement var_st(string name, type_definition td) -{ - ident_list il = new ident_list(); - il.idents.Add(new ident(name)); - var_def_statement _var_def_statement = new var_def_statement(il, td, null, definition_attribute.None, false); - return new var_statement(_var_def_statement); -} - -public method_call find_method_call(string name, int k) -{ - int i = 0; - while (i < ((ArrayList)list_method_calls_main[k]).Count && - ((ident)((method_call)((ArrayList)list_method_calls_main[k])[i]).dereferencing_value).name != name) - i++; - if (i < ((ArrayList)list_method_calls_main[k]).Count) - return (method_call)((ArrayList)list_method_calls_main[k])[i]; - else - return null; -} - -public method_call find_method_call_lambda(string name) -{ - int i = 0; - while (i < list_method_calls_lambda.Count && - ((ident)((method_call)list_method_calls_lambda[i]).dereferencing_value).name != name) - i++; - if (i < list_method_calls_lambda.Count) - return (method_call)list_method_calls_lambda[i]; - else - return null; -} -public function_lambda_definition find_func_lambda_after(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_after.Count && - ((function_lambda_definition)_function_lambda_definitions_after[i]).lambda_name != name) - i += 2; - if (i < _function_lambda_definitions_after.Count) - return _function_lambda_definitions_after[i] as function_lambda_definition; - else - return null; -} -public ArrayList find_params(string name) -{ - ArrayList _params = new ArrayList(); - if (param_value_list_main.Count == 0 && param_value_list.Count == 0) - { - int i = 0; - while (i < _functions.Count && ((procedure_definition)_functions[i]).proc_header.name.meth_name.name != name) - i++; - if (i < _functions.Count) - { - if (((procedure_definition)_functions[i]).proc_header.parameters == null) - return _params; - else - { - for (int j = 0; j < ((procedure_definition)_functions[i]).proc_header.parameters.params_list.Count; j++) - _params.Add(((procedure_definition)_functions[i]).proc_header.parameters.params_list[j]); - return _params; - } - } - else - return _params; - } - else - { - int i = 0; - while (i < func_name.Count && ((ident)func_name[i]).name != name) - i++; - if (i < func_name.Count) - { - if (i >= param_value_list_main.Count) - { - if (i >= param_value_list_main.Count) - //if (param_value_list_main.Count==0) - { - if (param_value_list[param_value_list.Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)param_value_list[param_value_list.Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)param_value_list[param_value_list.Count - 1]).expressions[j]); - return _params; - } - } - else - return _params; - } - else - { - if (((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1] == null) - return _params; - else - { - for (int j = 0; j < ((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions.Count; j++) - _params.Add(((expression_list)((ArrayList)param_value_list_main[i])[((ArrayList)param_value_list_main[i]).Count - 1]).expressions[j]); - return _params; - } - } - } - else - return _params; - } -} -public void Error_Clear() -{ - param_value_list.Clear(); - body_variant_list.Clear(); - param_value_list_main.Clear(); - body_variant_list_main.Clear(); - guard_list.Clear(); - guard_list_main.Clear(); - func_name.Clear(); - decls_counts = 0; - where_flag = false; - list_param.Clear(); - list_params.Clear(); - list_params_temp.Clear(); - list_params_main.Clear(); - _function_lambda_definitions.Clear(); - _function_lambda_definitions_after.Clear(); - lambda_num = 0; - _functions.Clear(); - list_method_calls.Clear(); - list_method_calls_main.Clear(); - list_return_funcs.Clear(); - list_return_funcs_main.Clear(); - list_params1.Clear(); - last_function_lambda_definitions.Clear(); - last_list_method_calls.Clear(); - last_list_method_calls_lambda.Clear(); - let_fact_params.Clear(); - let_funcs.Clear(); - let_funcs_funcs.Clear(); - let_func_last.Clear(); - let_funcs1.Clear(); - let_flag.Clear(); - where_funcs.Clear(); - let_where_funcs.Clear(); - let_where_funcs_main.Clear(); - token_where = 0; - token_where_count = 0; - last_where_funcs.Clear(); - list_method_calls_lambda.Clear(); - let_where_list_params.Clear(); - _function_lambda_definitions_main.Clear(); - let_stack.Clear(); - token_let = 0; - lambda_stack.Clear(); -} - -/*public function_lambda_definition find_lambda_funcs(string name) -{ - int i = 0; - while (i < lambda_funcs.Count && ((function_lambda_definition)lambda_funcs[i]).lambda_name != name) - i++; - if (i < lambda_funcs.Count) - return (function_lambda_definition)lambda_funcs[i]; - else - return null; -}*/ -public ArrayList find_lambda_funcs_main(string name) -{ - int i = 0; - while (i < _function_lambda_definitions_main.Count && ((ArrayList)_function_lambda_definitions_main[i])[0].ToString() != name) - i++; - if (i < _function_lambda_definitions_main.Count) - return ((ArrayList)_function_lambda_definitions_main[i])[1] as ArrayList; - else - return null; -} -public void constructor_rec_var(statement_list body, new_expr n_e) -{ - ident id = null; - string name_corteg = ""; - for (int ii = 2; ii < n_e.params_list.expressions.Count; ii++) - if (n_e.params_list.expressions[ii] is ident) - name_corteg += ((ident)n_e.params_list.expressions[ii]).name; - if (name_corteg=="") - name_corteg = "$$"; - name_corteg+=rec_num; - rec_num++; - id = new ident(name_corteg); - ident_list _ident_list1 = new ident_list(); - _ident_list1.idents.Add(id); - string name_param2 = id.name; - typed_parameters _typed_parametres2 = null; - named_type_reference _named_type_reference3 = new named_type_reference(); - ident idtype3 = new ident("datatype"); - _named_type_reference3.names.Add(idtype3); - var_def_statement _var_def_statement2 = new var_def_statement(_ident_list1, (type_definition)_named_type_reference3, null, definition_attribute.None, false); - var_statement _var_statement2 = new var_statement(_var_def_statement2); - body.subnodes.Add(_var_statement2); - for (int ii = 2; ii < n_e.params_list.expressions.Count; ii++) - { - if (n_e.params_list.expressions[ii] is ident) - { - ident id1 = (ident)n_e.params_list.expressions[ii]; - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(id1); - typed_parameters _typed_parametres = null; - named_type_reference _named_type_reference = new named_type_reference(); - ident idtype = new ident("datatype"); - _named_type_reference.names.Add(idtype); - var_def_statement _var_def_statement = new var_def_statement(_ident_list, (type_definition)_named_type_reference, null, definition_attribute.None, false); - var_statement _var_statement = new var_statement(_var_def_statement); - body.subnodes.Add(_var_statement); - } - else - constructor_rec_var(body, (new_expr)n_e.params_list.expressions[ii]); - } -} -public void constructor_rec_ass(statement_list stmt_list, new_expr n_e, method_call _method_call) -{ - string name_corteg = ""; - for (int ii = 2; ii < n_e.params_list.expressions.Count; ii++) - if (n_e.params_list.expressions[ii] is ident) - name_corteg += ((ident)n_e.params_list.expressions[ii]).name; - if (name_corteg == "") - name_corteg = "$$"; - name_corteg += rec_num; - rec_num++; - assign _assign = new assign(); - _assign.operator_type = Operators.Assignment; - _assign.to = new ident(name_corteg); - _assign.from = _method_call; - stmt_list.subnodes.Add(_assign); - for (int ii = 2; ii < n_e.params_list.expressions.Count; ii++) - { - assign _assign1 = new assign(); - _assign1.operator_type = Operators.Assignment; - if (n_e.params_list.expressions[ii] is ident) - { - _assign1.to = (ident)n_e.params_list.expressions[ii]; - _assign1.from = _index(new ident(name_corteg), new int32_const(ii - 2)); - stmt_list.subnodes.Add(_assign1); - } - else - constructor_rec_ass(stmt_list, (new_expr)n_e.params_list.expressions[ii], _index(_method_call, new int32_const(ii - 2))); - } -} - - -} -} diff --git a/Parsers/HaskellParser/Parser.cs b/Parsers/HaskellParser/Parser.cs deleted file mode 100644 index 8fba7419b..000000000 --- a/Parsers/HaskellParser/Parser.cs +++ /dev/null @@ -1,171 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Parsers; -using System.Resources; -using System.Reflection; -using PascalABCCompiler.Errors; -using System.IO; - -namespace PascalABCCompiler.HaskellParser -{ - public class HaskellLanguageParser : IParser - { - GPBParser_Haskell parser; - - public HaskellLanguageParser() - { - filesExtensions = new string[1]; - filesExtensions[0] = ".hs"; - } - - string[] filesExtensions; - public string[] FilesExtensions - { - get - { - return filesExtensions; - } - } - - ILanguageInformation languageInformation; - public ILanguageInformation LanguageInformation - { - get - { - if (languageInformation == null) - languageInformation = new DefaultLanguageInformation(this); - return languageInformation; - } - } - - Keyword[] _keywords; - void initKeywords() - { - List key_words = new List(); - key_words.Add(new Keyword("module")); - key_words.Add(new Keyword("where")); - _keywords = key_words.ToArray(); - } - public Keyword[] Keywords - { - get - { - return _keywords; - } - } - - public void Reset() - { - ResourceManager rm = new ResourceManager("HaskellParser.HaskellLang", Assembly.GetExecutingAssembly()); - parser = new GPBParser_Haskell(CGTResourceExtractor.Extract(rm, "HaskellLanguage")); - parser.max_errors = 30; - } - - public bool CaseSensitive - { - get - { - return parser.LanguageGrammar.CaseSensitive; - } - } - - SourceFilesProviderDelegate sourceFilesProvider = null; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - public List compilerDirectives = new List(); - public List CompilerDirectives - { - get - { - return new List(); - } - } - - List errors = new List(); - public List Errors - { - get - { - return errors; - } - set - { - errors = value; - } - } - public syntax_tree_node BuildTree(string FileName, string Text, string[] SearchPatchs, ParseMode ParseMode) - { - if (parser == null) - Reset(); - compilerDirectives = new System.Collections.Generic.List(); - parser.CompilerDirectives = compilerDirectives; - parser.errors = Errors; - parser.current_file_name = FileName; - parser.parsertools.LineCorrection = 0; - syntax_tree_node cu = null; - switch (ParseMode) - { - case ParseMode.Normal: - cu = (syntax_tree_node)parser.Parse(Text); - break; - case ParseMode.Expression: - case ParseMode.Statement: - return null; - } - if (cu != null && cu is compilation_unit) - { - (cu as compilation_unit).file_name = FileName; - (cu as compilation_unit).compiler_directives = parser.CompilerDirectives; - } - return cu; - } - - public string Name - { - get - { - return "Haskell"; - } - } - public string Version - { - get - { - return "1.0"; - } - } - public string Copyright - { - get - { - return "(c) Бушманова Ð�. 2007"; - } - } - - public override string ToString() - { - return "Haskell Language Parser v1.0"; - } - public IPreprocessor Preprocessor - { - get - { - return null; - } - } - - } -} diff --git a/Parsers/HaskellParser/Properties/AssemblyInfo.cs b/Parsers/HaskellParser/Properties/AssemblyInfo.cs deleted file mode 100644 index d65711706..000000000 --- a/Parsers/HaskellParser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HaskellParser")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HaskellParser")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5de18530-3349-4d82-ab06-b0a984196848")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Parsers/KuMirParser/Errors.cs b/Parsers/KuMirParser/Errors.cs deleted file mode 100644 index 6c7f049f1..000000000 --- a/Parsers/KuMirParser/Errors.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -//using com.calitha.goldparser; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.Errors; -using System.Collections.Generic; -using PascalABCCompiler.KuMirParser; - - -namespace PascalABCCompiler.KuMirParser.Errors -{ - public class nonterminal_token_return_null : SyntaxError - { - public nonterminal_token_return_null(string _file_name, SourceContext _source_context, syntax_tree_node _node, string nonterminal_token_name) - : - base(string.Format(StringResources.Get("NONTERMINALTOKEN_{0}_RETURN_NULL"), nonterminal_token_name), - _file_name, _source_context, _node) - { - } - } - - public class UnexpectedToken : SyntaxError - { - private string _message; - public UnexpectedToken(PascalABCCompiler.ParserTools.GPBParser parser) - : base("", parser.current_file_name, parser.parsertools.GetTokenSourceContext(parser.LRParser), (syntax_tree_node)parser.prev_node) - { - List Symbols = parser.parsertools.GetPrioritySymbols(parser.LRParser.GetExpectedTokens()); - if (Symbols.Count == 1) - { - string OneSybmolText = "ONE_" + Symbols[0].Name.ToUpper(); - string LocOneSybmolText = StringResources.Get(OneSybmolText); - if (LocOneSybmolText != OneSybmolText) - { - _message = string.Format(LocOneSybmolText); - return; - } - } - _message = string.Format(StringResources.Get("EXPECTED{0}"), PascalABCCompiler.FormatTools.ObjectsToString(parser.parsertools.SymbolsToStrings(Symbols.ToArray()), ",")); - } - public UnexpectedToken(string _file_name, string expected, SourceContext _source_context, syntax_tree_node _node) - : base("", _file_name, _source_context, _node) - { - _message = string.Format(StringResources.Get("EXPECTED{0}"), expected); - } - public override string Message - { - get - { - return _message; - } - } - - - } - -} diff --git a/Parsers/KuMirParser/KuMirLang.resources b/Parsers/KuMirParser/KuMirLang.resources deleted file mode 100644 index 3a13f1ef9b6212c1812ee0f9a7ded20eff708a19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19170 zcmd6v30xD`+W*A`wTNh`f*=M&#SMdEL_vr4d$fHuOYh!KGq+`tV{aYv1c zVy%^ERiX_tA_}4`LRzCn7!cWnkU&DV+5QiT8-;$Ygx?ZeHLrGUr z3I7}xb&Ks5&~06}P2CoETh%SPTO^cM!FzbuH@Z1@U)Zf1XMdj$g`VA1_j|7#y5RW8 zQQWAf@z}!7g^HTZ7y2Zvv>oyC(2N1C`Flzmj*8}RN#8x;@X-Vgf4CpZ%cFSbScf1iRj1f$ z60X7L(Zb32yg)V!FLX2uJA_Ad%e2BbG;acyS|tdhgsqeVUMOjQEMbLZVKwWC?4wCy~B=nXebb96J>8{%nGPY6uFHmQepfhhLnuOFN zN&9=n)&L##USTX2)XDHdH7%t4@WP;hQ8TKVB@;6(&dJX=OwJWEyy}k^44!O!ulSO7 z!1px2sC>@FQm+Z>sw5jhQUg^*&qA$CcL1cq6bmpYOq~E$VX{Wga>&>tf<`YY7R>}O zv1mGgjzzVCMk#E}0I;#>6+xqjj71HC#yUY{i{hTPC80%OdZ!pddn@rWqv9Uf(#m)n z(6d3<*%Z92PSDsai7~e%Ff9qBVj3Bnr){BD;AL>o{es5F5^cRi+o3S+6*T@V(V7); zaJbGE>YYSeC1^B29mImhE9hA@?TxD?S{k;&Z?l3%8)NJbg2;}R#n{ z=+*&1Hv|B>gynE-Ti0iYWR09`l$bb|n(`y2o|9sqQ)0MJ?EWd!H~ z0HAXRfG!FEIwt_=LII%j1%NIQ0J06I4S=pq52vjc!`831%%0MLm5 zptHftSkMIlK*z<)xNyx)674wjEZeCt9fR%q7V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Y&n{LnQd(>r6VciezF-ZCjFslSCFS`8B`hHJ1pK@ynBhS3zAw1J=51%J- zDO+i4Eit9q=FBG*A$UqYB{uU8Tu3_l`QhJ#!G6YLjs-vYa94@0L=2J!V8b|FB)3E38?+^`qcf zD|e0IIAo0|UYbQgc7E~R4-2-wAC_~}t5DmyADuFquFhvOz?Oc}9AVh|`1qrxpO<5# z@Xe)dCucf;e{r}+Ti0y)w}n2dtO3W6h~Zdo#=5^?{X)!+0T(1$-IK|do@o#~>GD9p zZ5zCpmBBGj)<|y!bHcj6a2XI=;Q}q6Is2d8QZ<}S&0QEqslokd8E`z-qt>fn_{2hE zC{o;$Zzret(1E6uW`v(@>~%(`ocJkQ2SYBdcG<+k!#mG+NV@JB{O#_b^kr=Cb@P0w zAa%t!?a1e! - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {6C945895-BCE2-4522-8E35-F93B4661B2DA} - Library - Properties - KuMirParser - KuMirParser - - - - - 4.0 - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - ..\..\bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - ..\..\bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\bin\Errors.dll - - - False - ..\..\bin\Localization.dll - - - False - ..\..\bin\ParserTools.dll - - - False - ..\..\bin\SyntaxTree.dll - - - - - - - - - - - - - - - - - - - False - КлиентÑ�кий профиль .NET Framework 3.5 SP1 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - УÑ�тановщик Windows 3.1 - true - - - - - \ No newline at end of file diff --git a/Parsers/KuMirParser/KuMirParserTools.cs b/Parsers/KuMirParser/KuMirParserTools.cs deleted file mode 100644 index aa0b2fd2f..000000000 --- a/Parsers/KuMirParser/KuMirParserTools.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Text; -//using com.calitha.goldparser; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.ParserTools; -using GoldParser; - - -namespace PascalABCCompiler.KuMirParser -{ - public static class StringResources - { - private static string prefix = "KUMIRPARSER_"; - public static string Get(string Id) - { - string ret = PascalABCCompiler.StringResources.Get(prefix + Id); - if (ret == prefix + Id) - return Id; - else - return ret; - } - } - - public class KuMir_parsertools : parser_tools - { - public override string symbol_to_string(Symbol symbol) - { - switch (symbol.Index) - { - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_MINUS: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_DIV: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_MULT: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_GREATER: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_GREATEREQUAL: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_LOWER: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_LOWEREQUAL: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_NOTEQUAL: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_POWER: - return StringResources.Get("OPERATOR"); - } - string res = StringResources.Get(symbol.Name); - /*if (res.IndexOf("TK_") == 0) - return res.Remove(0, 3).ToLower(); - return res;*/ - - return res; - } - - public override int symbol_priority(Symbol symbol) - { - - switch (symbol.Index) - { - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_END: - return 8; - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_BEGIN: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_INTEGER: - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_ROUNDCLOSE: - return 9; - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_IDENTIFIER: - return 10; - - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_ASSIGN: - return 25; - - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_EQUAL: - return 25; - - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_EXPRESSION: - return 100; - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_STATEMENT: - return 110; - case (int)GPBParser_KuMir.SymbolConstants.SYMBOL_TK_SEMICOLON: - return 1000; - } - if (symbol.SymbolType == SymbolType.Terminal) - return 1; - return 0; - } - - - } -} diff --git a/Parsers/KuMirParser/KuMir_lrparser.cs b/Parsers/KuMirParser/KuMir_lrparser.cs deleted file mode 100644 index ffb5d4fac..000000000 --- a/Parsers/KuMirParser/KuMir_lrparser.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.KuMirParser.Errors; - -namespace PascalABCCompiler.KuMirParser -{ - public partial class GPBParser_KuMir : GPBParser - { - private Stack NodesStack; - private SyntaxError error; - private int unit_number; - public ArrayList _units; - - Stream GrammarStream; - - public GPBParser_KuMir(Stream stream) - : base(stream) - { - GrammarStream = stream; - parsertools = new KuMir_parsertools(); - unit_number = 0; - _units = new ArrayList(); - } - - public object Parse(string source) - { - _units.Add(new unit_data()); - unit_number++; - - NodesStack = new Stack(); - LRParser = new GoldParser.Parser(new StringReader(source), LanguageGrammar); - parsertools.parser = LRParser; - LRParser.TrimReductions = true; - try - { - while (true) - { - switch (LRParser.Parse()) - { - case GoldParser.ParseMessage.LexicalError: - errors.Add(new TokenReadError(this)); - LRParser.PopInputToken(); - if (errors.Count >= max_errors) - return null; - break; - - //sdes nugno vesti chtoto vrode steka poslednix oshibok. podumat - case GoldParser.ParseMessage.SyntaxError: - GoldParser.Symbol sym = LRParser.PopInputToken(); - error = new KuMirParser.Errors.UnexpectedToken(this); - //error = new UnexpectedToken(this, parsertools.symbol_collection_to_string(this.LRParser.GetExpectedTokens())); - if (sym.SymbolType == GoldParser.SymbolType.End && errors.Count > 0) - return null; - errors.Add(error); - if (errors.Count >= max_errors) - return null; - break; - case GoldParser.ParseMessage.Reduction: - LRParser.TokenSyntaxNode = CreateNonTerminalObject(LRParser.ReductionRule.Index); - if ((LRParser.TokenSyntaxNode as syntax_tree_node) != null) - prev_node = LRParser.TokenSyntaxNode; - break; - - case GoldParser.ParseMessage.Accept: - return LRParser.TokenSyntaxNode; - - case GoldParser.ParseMessage.TokenRead: - LRParser.TokenSyntaxNode = CreateTerminalObject(LRParser.TokenSymbol.Index); - break; - - case GoldParser.ParseMessage.InternalError: - errors.Add(new CompilerInternalError("KuMirParser", new Exception("ParseMessage.InternalError"))); - return null; - - case GoldParser.ParseMessage.NotLoadedError: - errors.Add(new CompilerInternalError("KuMirParser", new Exception("ParseMessage.NotLoadedError"))); - return null; - - case GoldParser.ParseMessage.CommentError: - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "(EOF)")); - return null; - - /*case ParseMessage.CommentBlockRead: - break; - - case ParseMessage.CommentLineRead: - break;*/ - } - } - } - catch (Exception e) - { - if (errors.Count > 0) - return null; - else - throw; - } - - } - } - -} \ No newline at end of file diff --git a/Parsers/KuMirParser/KuMir_lrparser_rules.cs b/Parsers/KuMirParser/KuMir_lrparser_rules.cs deleted file mode 100644 index 92e78f243..000000000 --- a/Parsers/KuMirParser/KuMir_lrparser_rules.cs +++ /dev/null @@ -1,2697 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.KuMirParser.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.KuMirParser -{ - public partial class GPBParser_KuMir : GPBParser - { - - - - - - - - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - //SymbolConstants - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - - public enum SymbolConstants : int - { - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTLINE = 3, // (Comment Line) - SYMBOL_TK_ALG = 4, // 'tk_alg' - SYMBOL_TK_AND = 5, // 'tk_and' - SYMBOL_TK_ARG = 6, // 'tk_arg' - SYMBOL_TK_ARRAY = 7, // 'tk_array' - SYMBOL_TK_ASSERT = 8, // 'tk_assert' - SYMBOL_TK_ASSIGN = 9, // 'tk_Assign' - SYMBOL_TK_BEGIN = 10, // 'tk_begin' - SYMBOL_TK_BEGIN_CYCLE = 11, // 'tk_begin_cycle' - SYMBOL_TK_BOOLEAN_TYPE = 12, // 'tk_boolean_type' - SYMBOL_TK_CASE = 13, // 'tk_case' - SYMBOL_TK_CASE_V = 14, // 'tk_case_v' - SYMBOL_TK_CHAR = 15, // 'tk_char' - SYMBOL_TK_CHAR_TYPE = 16, // 'tk_char_type' - SYMBOL_TK_COLON = 17, // 'tk_Colon' - SYMBOL_TK_COMMA = 18, // 'tk_Comma' - SYMBOL_TK_DIV = 19, // 'tk_Div' - SYMBOL_TK_DOT = 20, // 'tk_Dot' - SYMBOL_TK_ELSE = 21, // 'tk_else' - SYMBOL_TK_END = 22, // 'tk_end' - SYMBOL_TK_END_ALL = 23, // 'tk_end_all' - SYMBOL_TK_END_CYCLE = 24, // 'tk_end_cycle' - SYMBOL_TK_EOL = 25, // 'tk_eol' - SYMBOL_TK_EQUAL = 26, // 'tk_Equal' - SYMBOL_TK_FALSE = 27, // 'tk_false' - SYMBOL_TK_FOR = 28, // 'tk_for' - SYMBOL_TK_FROM = 29, // 'tk_from' - SYMBOL_TK_FUNC_VAL = 30, // 'tk_func_val' - SYMBOL_TK_GREATER = 31, // 'tk_Greater' - SYMBOL_TK_GREATEREQUAL = 32, // 'tk_GreaterEqual' - SYMBOL_TK_IDENTIFIER = 33, // 'tk_Identifier' - SYMBOL_TK_IF = 34, // 'tk_if' - SYMBOL_TK_INTEGER = 35, // 'tk_integer' - SYMBOL_TK_INTEGER_TYPE = 36, // 'tk_integer_type' - SYMBOL_TK_ISP = 37, // 'tk_isp' - SYMBOL_TK_LOWER = 38, // 'tk_Lower' - SYMBOL_TK_LOWEREQUAL = 39, // 'tk_LowerEqual' - SYMBOL_TK_MINUS = 40, // 'tk_Minus' - SYMBOL_TK_MULT = 41, // 'tk_Mult' - SYMBOL_TK_NEWLINE = 42, // 'tk_NewLine' - SYMBOL_TK_NOT = 43, // 'tk_not' - SYMBOL_TK_NOTEQUAL = 44, // 'tk_NotEqual' - SYMBOL_TK_OR = 45, // 'tk_or' - SYMBOL_TK_PLUS = 46, // 'tk_Plus' - SYMBOL_TK_POWER = 47, // 'tk_Power' - SYMBOL_TK_RAZ = 48, // 'tk_raz' - SYMBOL_TK_READ = 49, // 'tk_read' - SYMBOL_TK_REAL = 50, // 'tk_real' - SYMBOL_TK_REAL_TYPE = 51, // 'tk_real_type' - SYMBOL_TK_ROUNDCLOSE = 52, // 'tk_RoundClose' - SYMBOL_TK_ROUNDOPEN = 53, // 'tk_RoundOpen' - SYMBOL_TK_SEMICOLON = 54, // 'tk_SemiColon' - SYMBOL_TK_SQUARECLOSE = 55, // 'tk_SquareClose' - SYMBOL_TK_SQUAREOPEN = 56, // 'tk_SquareOpen' - SYMBOL_TK_STRING_TYPE = 57, // 'tk_string_type' - SYMBOL_TK_STRINGLITERAL = 58, // 'tk_StringLiteral' - SYMBOL_TK_THEN = 59, // 'tk_then' - SYMBOL_TK_TO = 60, // 'tk_to' - SYMBOL_TK_TRUE = 61, // 'tk_true' - SYMBOL_TK_USES = 62, // 'tk_uses' - SYMBOL_TK_VAR = 63, // 'tk_var' - SYMBOL_TK_WHILE = 64, // 'tk_while' - SYMBOL_TK_WRITE = 65, // 'tk_write' - SYMBOL_ADDEXP = 66, // - SYMBOL_ARRAY_LIST1 = 67, // - SYMBOL_ARRAY_LIST2 = 68, // - SYMBOL_CASE_VARIANT = 69, // - SYMBOL_CASE_VARIANT_LIST = 70, // - SYMBOL_DECLARATIONS = 71, // - SYMBOL_DIAP = 72, // - SYMBOL_DIAP_LIST = 73, // - SYMBOL_EXPRESSION = 74, // - SYMBOL_FACT_LIST = 75, // - SYMBOL_FORMAL_LIST = 76, // - SYMBOL_FORMAL_PARAMETER1 = 77, // - SYMBOL_FORMAL_PARAMETER2 = 78, // - SYMBOL_FORMAL_TYPE_LIST1 = 79, // - SYMBOL_FORMAL_TYPE_LIST2 = 80, // - SYMBOL_FREE_OPERATOR = 81, // - SYMBOL_FUNCTION = 82, // - SYMBOL_GLOBAL_DECL_LIST = 83, // - SYMBOL_GLOBAL_PART = 84, // - SYMBOL_GLOBAL_VARS = 85, // - SYMBOL_ID_LIST1 = 86, // - SYMBOL_ID_LIST2 = 87, // - SYMBOL_INITIALIZATION = 88, // - SYMBOL_LIST_OF_EXPRESSIONS = 89, // - SYMBOL_MULTEXP = 90, // - SYMBOL_NEGATEEXP = 91, // - SYMBOL_POWEREXP = 92, // - SYMBOL_PROCEDURE = 93, // - SYMBOL_PROGRAM = 94, // - SYMBOL_SEPARATOR = 95, // - SYMBOL_SEPARATORS = 96, // - SYMBOL_SEPARATORSOPT = 97, // - SYMBOL_STATEMENT = 98, // - SYMBOL_STATEMENTS = 99, // - SYMBOL_SUB_DECLARATIONS = 100, // - SYMBOL_TYPE = 101, // - SYMBOL_USES_UNITS = 102, // - SYMBOL_VALUE = 103, // - SYMBOL_VAR_DECL_LIST1 = 104, // - SYMBOL_VAR_DECL_LIST2 = 105, // - SYMBOL_VAR_DECLARATIONS1 = 106, // - SYMBOL_VAR_DECLARATIONS2 = 107 // - }; - - - - - - - - - - - - - - - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - //RuleConstants - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - - public enum RuleConstants : int - { - RULE_SEPARATOR_TK_SEMICOLON = 0, // ::= 'tk_SemiColon' - RULE_SEPARATOR_TK_NEWLINE = 1, // ::= 'tk_NewLine' - RULE_SEPARATORS = 2, // ::= - RULE_SEPARATORS2 = 3, // ::= - RULE_SEPARATORSOPT = 4, // ::= - RULE_SEPARATORSOPT2 = 5, // ::= - RULE_PROGRAM_TK_ALG_TK_IDENTIFIER_TK_BEGIN_TK_END = 6, // ::= 'tk_alg' 'tk_Identifier' 'tk_begin' 'tk_end' - RULE_PROGRAM_TK_ISP_TK_IDENTIFIER_TK_END = 7, // ::= 'tk_isp' 'tk_Identifier' 'tk_end' - RULE_PROCEDURE_TK_ALG_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE_TK_BEGIN_TK_END = 8, // ::= 'tk_alg' 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' 'tk_begin' 'tk_end' - RULE_PROCEDURE_TK_ALG_TK_IDENTIFIER_TK_BEGIN_TK_END = 9, // ::= 'tk_alg' 'tk_Identifier' 'tk_begin' 'tk_end' - RULE_FUNCTION_TK_ALG_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE_TK_BEGIN_TK_END = 10, // ::= 'tk_alg' 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' 'tk_begin' 'tk_end' - RULE_FUNCTION_TK_ALG_TK_IDENTIFIER_TK_BEGIN_TK_END = 11, // ::= 'tk_alg' 'tk_Identifier' 'tk_begin' 'tk_end' - RULE_SUB_DECLARATIONS = 12, // ::= - RULE_SUB_DECLARATIONS2 = 13, // ::= - RULE_SUB_DECLARATIONS3 = 14, // ::= - RULE_SUB_DECLARATIONS4 = 15, // ::= - RULE_TYPE_TK_INTEGER_TYPE = 16, // ::= 'tk_integer_type' - RULE_TYPE_TK_REAL_TYPE = 17, // ::= 'tk_real_type' - RULE_TYPE_TK_BOOLEAN_TYPE = 18, // ::= 'tk_boolean_type' - RULE_TYPE_TK_CHAR_TYPE = 19, // ::= 'tk_char_type' - RULE_TYPE_TK_STRING_TYPE = 20, // ::= 'tk_string_type' - RULE_DIAP_TK_COLON = 21, // ::= 'tk_Colon' - RULE_DIAP_LIST_TK_COMMA = 22, // ::= 'tk_Comma' - RULE_DIAP_LIST = 23, // ::= - RULE_LIST_OF_EXPRESSIONS_TK_COMMA = 24, // ::= 'tk_Comma' - RULE_LIST_OF_EXPRESSIONS = 25, // ::= - RULE_ID_LIST1_TK_IDENTIFIER = 26, // ::= 'tk_Identifier' - RULE_ID_LIST1_TK_IDENTIFIER_TK_COMMA = 27, // ::= 'tk_Identifier' 'tk_Comma' - RULE_ARRAY_LIST1_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE = 28, // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' - RULE_ARRAY_LIST1_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_COMMA = 29, // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_Comma' - RULE_ID_LIST2_TK_IDENTIFIER_TK_COMMA = 30, // ::= 'tk_Identifier' 'tk_Comma' - RULE_ID_LIST2_TK_IDENTIFIER_TK_COMMA2 = 31, // ::= 'tk_Identifier' 'tk_Comma' - RULE_ARRAY_LIST2_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_COMMA = 32, // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_Comma' - RULE_ARRAY_LIST2_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_COMMA2 = 33, // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_Comma' - RULE_VAR_DECLARATIONS1 = 34, // ::= - RULE_VAR_DECLARATIONS1_TK_ARRAY = 35, // ::= 'tk_array' - RULE_VAR_DECLARATIONS2 = 36, // ::= - RULE_VAR_DECLARATIONS2_TK_ARRAY = 37, // ::= 'tk_array' - RULE_VAR_DECL_LIST1 = 38, // ::= - RULE_VAR_DECL_LIST12 = 39, // ::= - RULE_VAR_DECL_LIST2 = 40, // ::= - RULE_VAR_DECL_LIST22 = 41, // ::= - RULE_DECLARATIONS = 42, // ::= - RULE_USES_UNITS_TK_USES = 43, // ::= 'tk_uses' - RULE_GLOBAL_DECL_LIST = 44, // ::= - RULE_GLOBAL_DECL_LIST2 = 45, // ::= - RULE_INITIALIZATION_TK_ASSIGN = 46, // ::= 'tk_Assign' - RULE_INITIALIZATION_TK_ASSIGN2 = 47, // ::= 'tk_Assign' - RULE_GLOBAL_VARS = 48, // ::= - RULE_GLOBAL_VARS2 = 49, // ::= - RULE_GLOBAL_PART = 50, // ::= - RULE_GLOBAL_PART2 = 51, // ::= - RULE_GLOBAL_PART3 = 52, // ::= - RULE_GLOBAL_PART4 = 53, // ::= - RULE_FORMAL_PARAMETER1 = 54, // ::= - RULE_FORMAL_PARAMETER1_TK_VAR = 55, // ::= 'tk_var' - RULE_FORMAL_PARAMETER1_TK_ARRAY = 56, // ::= 'tk_array' - RULE_FORMAL_PARAMETER1_TK_VAR_TK_ARRAY = 57, // ::= 'tk_var' 'tk_array' - RULE_FORMAL_PARAMETER2 = 58, // ::= - RULE_FORMAL_PARAMETER2_TK_VAR = 59, // ::= 'tk_var' - RULE_FORMAL_PARAMETER2_TK_ARRAY = 60, // ::= 'tk_array' - RULE_FORMAL_PARAMETER2_TK_VAR_TK_ARRAY = 61, // ::= 'tk_var' 'tk_array' - RULE_FORMAL_TYPE_LIST1 = 62, // ::= - RULE_FORMAL_TYPE_LIST12 = 63, // ::= - RULE_FORMAL_TYPE_LIST2 = 64, // ::= - RULE_FORMAL_TYPE_LIST22 = 65, // ::= - RULE_FORMAL_LIST = 66, // ::= - RULE_FORMAL_LIST2 = 67, // ::= - RULE_FACT_LIST = 68, // ::= - RULE_FACT_LIST2 = 69, // ::= - RULE_FREE_OPERATOR = 70, // ::= - RULE_CASE_VARIANT_LIST = 71, // ::= - RULE_CASE_VARIANT_LIST2 = 72, // ::= - RULE_CASE_VARIANT_TK_CASE_V_TK_COLON = 73, // ::= 'tk_case_v' 'tk_Colon' - RULE_STATEMENTS = 74, // ::= - RULE_STATEMENTS2 = 75, // ::= - RULE_STATEMENT = 76, // ::= - RULE_STATEMENT2 = 77, // ::= - RULE_STATEMENT_TK_ASSIGN = 78, // ::= 'tk_Assign' - RULE_STATEMENT_TK_IF_TK_THEN_TK_END_ALL = 79, // ::= 'tk_if' 'tk_then' 'tk_end_all' - RULE_STATEMENT_TK_IF_TK_THEN_TK_ELSE_TK_END_ALL = 80, // ::= 'tk_if' 'tk_then' 'tk_else' 'tk_end_all' - RULE_STATEMENT_TK_BEGIN_CYCLE_TK_RAZ_TK_END_CYCLE = 81, // ::= 'tk_begin_cycle' 'tk_raz' 'tk_end_cycle' - RULE_STATEMENT_TK_BEGIN_CYCLE_TK_FOR_TK_IDENTIFIER_TK_FROM_TK_TO_TK_END_CYCLE = 82, // ::= 'tk_begin_cycle' 'tk_for' 'tk_Identifier' 'tk_from' 'tk_to' 'tk_end_cycle' - RULE_STATEMENT_TK_BEGIN_CYCLE_TK_WHILE_TK_END_CYCLE = 83, // ::= 'tk_begin_cycle' 'tk_while' 'tk_end_cycle' - RULE_STATEMENT_TK_CASE_TK_END_ALL = 84, // ::= 'tk_case' 'tk_end_all' - RULE_STATEMENT_TK_CASE_TK_ELSE_TK_END_ALL = 85, // ::= 'tk_case' 'tk_else' 'tk_end_all' - RULE_STATEMENT_TK_ASSERT = 86, // ::= 'tk_assert' - RULE_STATEMENT_TK_READ = 87, // ::= 'tk_read' - RULE_STATEMENT_TK_WRITE = 88, // ::= 'tk_write' - RULE_STATEMENT_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE = 89, // ::= 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' - RULE_STATEMENT_TK_IDENTIFIER = 90, // ::= 'tk_Identifier' - RULE_EXPRESSION_TK_GREATER = 91, // ::= 'tk_Greater' - RULE_EXPRESSION_TK_LOWER = 92, // ::= 'tk_Lower' - RULE_EXPRESSION_TK_LOWEREQUAL = 93, // ::= 'tk_LowerEqual' - RULE_EXPRESSION_TK_GREATEREQUAL = 94, // ::= 'tk_GreaterEqual' - RULE_EXPRESSION_TK_EQUAL = 95, // ::= 'tk_Equal' - RULE_EXPRESSION_TK_NOTEQUAL = 96, // ::= 'tk_NotEqual' - RULE_EXPRESSION = 97, // ::= - RULE_ADDEXP_TK_OR = 98, // ::= 'tk_or' - RULE_ADDEXP_TK_PLUS = 99, // ::= 'tk_Plus' - RULE_ADDEXP_TK_MINUS = 100, // ::= 'tk_Minus' - RULE_ADDEXP = 101, // ::= - RULE_MULTEXP_TK_AND = 102, // ::= 'tk_and' - RULE_MULTEXP_TK_MULT = 103, // ::= 'tk_Mult' - RULE_MULTEXP_TK_DIV = 104, // ::= 'tk_Div' - RULE_MULTEXP = 105, // ::= - RULE_POWEREXP_TK_POWER = 106, // ::= 'tk_Power' - RULE_POWEREXP = 107, // ::= - RULE_NEGATEEXP_TK_MINUS = 108, // ::= 'tk_Minus' - RULE_NEGATEEXP_TK_NOT = 109, // ::= 'tk_not' - RULE_NEGATEEXP = 110, // ::= - RULE_VALUE_TK_IDENTIFIER = 111, // ::= 'tk_Identifier' - RULE_VALUE_TK_FUNC_VAL = 112, // ::= 'tk_func_val' - RULE_VALUE_TK_INTEGER = 113, // ::= 'tk_integer' - RULE_VALUE_TK_REAL = 114, // ::= 'tk_real' - RULE_VALUE_TK_TRUE = 115, // ::= 'tk_true' - RULE_VALUE_TK_FALSE = 116, // ::= 'tk_false' - RULE_VALUE_TK_STRINGLITERAL = 117, // ::= 'tk_StringLiteral' - RULE_VALUE_TK_CHAR = 118, // ::= 'tk_char' - RULE_VALUE_TK_EOL = 119, // ::= 'tk_eol' - RULE_VALUE_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_SQUAREOPEN_TK_SQUARECLOSE = 120, // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_SquareOpen' 'tk_SquareClose' - RULE_VALUE_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE = 121, // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' - RULE_VALUE_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE = 122, // ::= 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' - RULE_VALUE_TK_ROUNDOPEN_TK_ROUNDCLOSE = 123 // ::= 'tk_RoundOpen' 'tk_RoundClose' - }; - - - - - - - - - - - - - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - //CreateTerminalObject - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - - private Object CreateTerminalObject(int TokenSymbolIndex) - { - switch (TokenSymbolIndex) - { - case (int)SymbolConstants.SYMBOL_EOF: - //(EOF) - return null; - - case (int)SymbolConstants.SYMBOL_ERROR: - //(Error) - return null; - - case (int)SymbolConstants.SYMBOL_WHITESPACE: - //(Whitespace) - return null; - - case (int)SymbolConstants.SYMBOL_COMMENTLINE: - //(Comment Line) - return null; - - case (int)SymbolConstants.SYMBOL_TK_ALG: - //'tk_alg' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_AND: - //'tk_and' - { - op_type_node _op_type_node = new op_type_node(Operators.LogicalAND); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_ARG: - //'tk_arg' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_ARRAY: - //'tk_array' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_ASSERT: - //'tk_assert' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_ASSIGN: - //'tk_Assign' - { - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_BEGIN: - //'tk_begin' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_BEGIN_CYCLE: - //'tk_begin_cycle' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_BOOLEAN_TYPE: - //'tk_boolean_type' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_CASE: - //'tk_case' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_CASE_V: - //'tk_case_v' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_CHAR: - //'tk_char' - return parsertools.create_char_const(this); - - case (int)SymbolConstants.SYMBOL_TK_CHAR_TYPE: - //'tk_char_type' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_COLON: - //'tk_Colon' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_COMMA: - //'tk_Comma' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_DIV: - //'tk_Div' - { - op_type_node _op_type_node = new op_type_node(Operators.Division); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_DOT: - //'tk_Dot' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_ELSE: - //'tk_else' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_END: - //'tk_end' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_END_ALL: - //'tk_end_all' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_END_CYCLE: - //'tk_end_cycle' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_EOL: - //'tk_eol' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_EQUAL: - //'tk_Equal' - { - op_type_node _op_type_node = new op_type_node(Operators.Equal); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_FALSE: - //'tk_false' - bool_const _bool_const = new bool_const(false); - _bool_const.source_context = parsertools.GetTokenSourceContext(); - return _bool_const; - - case (int)SymbolConstants.SYMBOL_TK_FOR: - //'tk_for' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_FROM: - //'tk_from' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_FUNC_VAL: - //'tk_func_val' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_GREATER: - //'tk_Greater' - { - op_type_node _op_type_node = new op_type_node(Operators.Greater); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_GREATEREQUAL: - //'tk_GreaterEqual' - { - op_type_node _op_type_node = new op_type_node(Operators.GreaterEqual); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_IDENTIFIER: - //'tk_Identifier' - return parsertools.create_ident(this); - - case (int)SymbolConstants.SYMBOL_TK_IF: - //'tk_if' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_INTEGER: - //'tk_integer' - return parsertools.create_int_const(this); - - case (int)SymbolConstants.SYMBOL_TK_INTEGER_TYPE: - //'tk_integer_type' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_ISP: - //'tk_isp' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_LOWER: - //'tk_Lower' - { - op_type_node _op_type_node = new op_type_node(Operators.Less); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_LOWEREQUAL: - //'tk_LowerEqual' - { - op_type_node _op_type_node = new op_type_node(Operators.LessEqual); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_MINUS: - //'tk_Minus' - { - op_type_node _op_type_node = new op_type_node(Operators.Minus); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_MULT: - //'tk_Mult' - { - op_type_node _op_type_node = new op_type_node(Operators.Multiplication); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_NEWLINE: - //'tk_NewLine' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_NOT: - //'tk_not' - { - op_type_node _op_type_node = new op_type_node(Operators.LogicalNOT); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_NOTEQUAL: - //'tk_NotEqual' - { - op_type_node _op_type_node = new op_type_node(Operators.NotEqual); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_OR: - //'tk_or' - { - op_type_node _op_type_node = new op_type_node(Operators.LogicalOR); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_PLUS: - //'tk_Plus' - { - op_type_node _op_type_node = new op_type_node(Operators.Plus); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_POWER: - //'tk_Power' - { // make it! - op_type_node _op_type_node = new op_type_node(Operators.Undefined); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TK_RAZ: - //'tk_raz' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_READ: - //'tk_read' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_REAL: - //'tk_real' - return parsertools.create_double_const(this); - - case (int)SymbolConstants.SYMBOL_TK_REAL_TYPE: - //'tk_real_type' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_ROUNDCLOSE: - //'tk_RoundClose' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_ROUNDOPEN: - //'tk_RoundOpen' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_SEMICOLON: - //'tk_SemiColon' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_SQUARECLOSE: - //'tk_SquareClose' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_SQUAREOPEN: - //'tk_SquareOpen' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_STRING_TYPE: - //'tk_string_type' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_STRINGLITERAL: - //'tk_StringLiteral' - return parsertools.create_string_const(this); - - case (int)SymbolConstants.SYMBOL_TK_THEN: - //'tk_then' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_TO: - //'tk_to' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_TRUE: - //'tk_true' - bool_const _true_const = new bool_const(true); - _true_const.source_context = parsertools.GetTokenSourceContext(); - return _true_const; - case (int)SymbolConstants.SYMBOL_TK_USES: - //'tk_uses' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_VAR: - //'tk_var' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_WHILE: - //'tk_while' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TK_WRITE: - //'tk_write' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_ADDEXP: - // - //TERMINAL:Add Exp - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_ARRAY_LIST1: - // - //TERMINAL:Array_list1 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_ARRAY_LIST2: - // - //TERMINAL:Array_list2 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_CASE_VARIANT: - // - //TERMINAL:Case_variant - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_CASE_VARIANT_LIST: - // - //TERMINAL:Case_variant_list - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_DECLARATIONS: - // - //TERMINAL:Declarations - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_DIAP: - // - //TERMINAL:Diap - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_DIAP_LIST: - // - //TERMINAL:Diap_list - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_EXPRESSION: - // - //TERMINAL:Expression - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FACT_LIST: - // - //TERMINAL:Fact_list - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FORMAL_LIST: - // - //TERMINAL:Formal_list - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FORMAL_PARAMETER1: - // - //TERMINAL:Formal_parameter1 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FORMAL_PARAMETER2: - // - //TERMINAL:Formal_Parameter2 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FORMAL_TYPE_LIST1: - // - //TERMINAL:Formal_type_list1 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FORMAL_TYPE_LIST2: - // - //TERMINAL:Formal_type_list2 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FREE_OPERATOR: - // - //TERMINAL:Free_operator - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_FUNCTION: - // - //TERMINAL:Function - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_GLOBAL_DECL_LIST: - // - //TERMINAL:Global_decl_list - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_GLOBAL_PART: - // - //TERMINAL:Global_part - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_GLOBAL_VARS: - // - //TERMINAL:Global_vars - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_ID_LIST1: - // - //TERMINAL:Id_list1 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_ID_LIST2: - // - //TERMINAL:Id_list2 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_INITIALIZATION: - // - //TERMINAL:Initialization - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_LIST_OF_EXPRESSIONS: - // - //TERMINAL:List_of_expressions - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_MULTEXP: - // - //TERMINAL:Mult Exp - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_NEGATEEXP: - // - //TERMINAL:Negate Exp - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_POWEREXP: - // - //TERMINAL:Power Exp - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_PROCEDURE: - // - //TERMINAL:Procedure - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_PROGRAM: - // - //TERMINAL:Program - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_SEPARATOR: - // - //TERMINAL:Separator - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_SEPARATORS: - // - //TERMINAL:Separators - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_SEPARATORSOPT: - // - //TERMINAL:Separators Opt - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_STATEMENT: - // - //TERMINAL:Statement - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_STATEMENTS: - // - //TERMINAL:Statements - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_SUB_DECLARATIONS: - // - //TERMINAL:Sub_declarations - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_TYPE: - // - //TERMINAL:Type - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_USES_UNITS: - // - //TERMINAL:Uses_units - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_VALUE: - // - //TERMINAL:Value - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_VAR_DECL_LIST1: - // - //TERMINAL:Var_decl_list1 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_VAR_DECL_LIST2: - // - //TERMINAL:Var_decl_list2 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_VAR_DECLARATIONS1: - // - //TERMINAL:Var_declarations1 - return null; - //ENDTERMINAL - - case (int)SymbolConstants.SYMBOL_VAR_DECLARATIONS2: - // - //TERMINAL:Var_declarations2 - return null; - //ENDTERMINAL - - } - throw new SymbolException("Unknown symbol"); - } - - - - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - //Some methods - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - - public class unit_data - { - public declarations sub_progs; - public statement_list initialization; - public ident_list used_units; - - public unit_data() - { - sub_progs = new declarations(); - used_units = new ident_list(); - initialization = new statement_list(); - initialization.subnodes.Add(new empty_statement()); - } - - public void ClearData() - { - sub_progs.defs.Clear(); - used_units.idents.Clear(); - initialization.subnodes.Clear(); - initialization.subnodes.Add(new empty_statement()); - } - } - - public statement_list GetStatements(object _object) - { - statement_list _statement_list; - if (_object is statement_list) - _statement_list = _object as statement_list; - else - { - _statement_list = new statement_list(); - if (_object is statement) - _statement_list.subnodes.Add(_object as statement); - else - _statement_list.subnodes.Add(new empty_statement()); - } - return _statement_list; - } - - public expression_list GetExpressions(object _object) - { - expression_list _expression_list; - if (_object is expression_list) - _expression_list = _object as expression_list; - else - { - _expression_list = new expression_list(); - _expression_list.expressions.Add(_object as expression); - } - return _expression_list; - } - - public ident_list GetIdents(object _object) - { - ident_list _ident_list; - if (_object is ident_list) - _ident_list = _object as ident_list; - else - { - _ident_list = new ident_list(); - _ident_list.idents.Add(_object as ident); - } - return _ident_list; - } - - public indexers_types GetIndexers(object _object) - { - indexers_types _indexers_types; - if (_object is indexers_types) - _indexers_types = _object as indexers_types; - else - { - _indexers_types = new indexers_types(); - _indexers_types.indexers.Add(_object as diapason); - - } - return _indexers_types; - } - - public formal_parameters GetFormals(object _object) - { - if (_object == null) - return null; - formal_parameters _formal_parametres; - if (_object is formal_parameters) - _formal_parametres = _object as formal_parameters; - else - { - _formal_parametres = new formal_parameters(); - _formal_parametres.params_list.Add(_object as typed_parameters); - } - return _formal_parametres; - } - - public named_type_reference GetType(string name) - { //case ? - named_type_reference _named_type_reference = new named_type_reference(); - if (name == StringResources.Get("tk_integer_type")) _named_type_reference.names.Add(new ident("integer")); - if (name == StringResources.Get("tk_real_type")) _named_type_reference.names.Add(new ident("real")); - if (name == StringResources.Get("tk_boolean_type")) _named_type_reference.names.Add(new ident("boolean")); - if (name == StringResources.Get("tk_char_type")) _named_type_reference.names.Add(new ident("char")); - if (name == StringResources.Get("tk_string_type")) _named_type_reference.names.Add(new ident("string")); - return _named_type_reference; - } - - - - - - - - - - - - - - - - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - //CreateNonTerminalObject - /////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// - - public Object CreateNonTerminalObject(int ReductionRuleIndex) - { - switch (ReductionRuleIndex) - { - case (int)RuleConstants.RULE_SEPARATOR_TK_SEMICOLON: - // ::= 'tk_SemiColon' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_SEPARATOR_TK_NEWLINE: - // ::= 'tk_NewLine' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_SEPARATORS: - // ::= - return LRParser.GetReductionSyntaxNode(1); - - case (int)RuleConstants.RULE_SEPARATORS2: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_SEPARATORSOPT: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_SEPARATORSOPT2: - // ::= - return null; - - case (int)RuleConstants.RULE_PROGRAM_TK_ALG_TK_IDENTIFIER_TK_BEGIN_TK_END: - // ::= 'tk_alg' 'tk_Identifier' 'tk_begin' 'tk_end' - { - program_module _program_module; - block _block; - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(6)); - program_name _program_name = new program_name((ident)LRParser.GetReductionSyntaxNode(3)); - - if ((_units[this.unit_number - 1] as unit_data).initialization.subnodes.Count != 0) - _statement_list.subnodes.InsertRange(0, (_units[this.unit_number - 1] as unit_data).initialization.subnodes); - - if ((_units[this.unit_number - 1] as unit_data).sub_progs.defs.Count != 0) - _block = new block((_units[this.unit_number - 1] as unit_data).sub_progs, _statement_list); - else - _block = new block(null, _statement_list); - - (_units[this.unit_number - 1] as unit_data).used_units.idents.Add(new ident("MathForKumir")); - - if ((_units[this.unit_number - 1] as unit_data).used_units.idents.Count != 0) - { - unit_or_namespace _unit_or_namespace; - uses_list _uses_list = new uses_list(); - - for (int i = 0; i < (_units[this.unit_number - 1] as unit_data).used_units.idents.Count; i++) - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add((_units[this.unit_number - 1] as unit_data).used_units.idents[i]); - _unit_or_namespace = new unit_or_namespace(_ident_list); - _uses_list.units.Add(_unit_or_namespace); - } - _program_module = new program_module(_program_name, _uses_list, _block, null); - - } - else - _program_module = new program_module(_program_name, null, _block, null); - declarations _declarations = new declarations(); - _program_module.Language = LanguageId.PascalABCNET; - parsertools.create_source_context(_program_module, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(3)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(8), LRParser.GetReductionSyntaxNode(7), LRParser.GetReductionSyntaxNode(6))); - parsertools.create_source_context(_block, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(2)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(8), LRParser.GetReductionSyntaxNode(7))); - parsertools.create_source_context(_program_name, LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(3)); - return _program_module; - } - - case (int)RuleConstants.RULE_PROGRAM_TK_ISP_TK_IDENTIFIER_TK_END: - // ::= 'tk_isp' 'tk_Identifier' 'tk_end' - { - interface_node _interface_node; - (_units[this.unit_number - 1] as unit_data).used_units.idents.Add(new ident("MathForKumir")); - if ((_units[this.unit_number - 1] as unit_data).used_units.idents.Count > 0) - { - unit_or_namespace _unit_or_namespace; - uses_list _uses_list = new uses_list(); - for (int i = 0; i < (_units[this.unit_number - 1] as unit_data).used_units.idents.Count; i++) - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add((_units[this.unit_number - 1] as unit_data).used_units.idents[i]); - _unit_or_namespace = new unit_or_namespace(_ident_list); - _uses_list.units.Add(_unit_or_namespace); - } - _interface_node = new interface_node((_units[this.unit_number - 1] as unit_data).sub_progs, _uses_list, null); - } - else - _interface_node = new interface_node((_units[this.unit_number - 1] as unit_data).sub_progs, null, null); - unit_module _unit_module = new unit_module(new unit_name((ident)LRParser.GetReductionSyntaxNode(2), 0), _interface_node, null, (_units[this.unit_number - 1] as unit_data).initialization, null); - _unit_module.Language = LanguageId.PascalABCNET; - unit_name _unit_name = new unit_name((ident)LRParser.GetReductionSyntaxNode(2), 0); - parsertools.create_source_context(_unit_module, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(3)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(6), LRParser.GetReductionSyntaxNode(5))); - parsertools.create_source_context(_unit_name, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - - return _unit_module; - } - - case (int)RuleConstants.RULE_PROCEDURE_TK_ALG_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE_TK_BEGIN_TK_END: - // ::= 'tk_alg' 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' 'tk_begin' 'tk_end' - { - method_name _method_name = new method_name(null, (ident)LRParser.GetReductionSyntaxNode(1), null); - procedure_header _procedure_header = new procedure_header(GetFormals(LRParser.GetReductionSyntaxNode(3)), null, _method_name, false, false, null,null); - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(7)); - block _block = new block(null, _statement_list); - - procedure_definition _procedure_definition = new procedure_definition(_procedure_header, _block); - parsertools.create_source_context(_method_name, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_procedure_header, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(4)); - parsertools.create_source_context(_procedure_definition, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(8)); - parsertools.create_source_context(_block, LRParser.GetReductionSyntaxNode(6), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(8), LRParser.GetReductionSyntaxNode(7))); - (_units[this.unit_number - 1] as unit_data).sub_progs.defs.Add(_procedure_definition); - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_PROCEDURE_TK_ALG_TK_IDENTIFIER_TK_BEGIN_TK_END: - // ::= 'tk_alg' 'tk_Identifier' 'tk_begin' 'tk_end' - { - method_name _method_name = new method_name(null, (ident)LRParser.GetReductionSyntaxNode(1), null); - procedure_header _procedure_header = new procedure_header(null, null, _method_name, false, false, null,null); - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(4)); - block _block = new block(null, _statement_list); - - procedure_definition _procedure_definition = new procedure_definition(_procedure_header, _block); - - parsertools.create_source_context(_method_name, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_procedure_header, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_procedure_definition, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_block, LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(5)); - (_units[this.unit_number - 1] as unit_data).sub_progs.defs.Add(_procedure_definition); - declarations _declarations = new declarations(); - _declarations.defs.Add(_procedure_definition); - parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(5), LRParser.GetReductionSyntaxNode(4))); - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_FUNCTION_TK_ALG_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE_TK_BEGIN_TK_END: - // ::= 'tk_alg' 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' 'tk_begin' 'tk_end' - { - method_name _method_name = new method_name(null, LRParser.GetReductionSyntaxNode(2) as ident, null); - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(1)).text.ToLower()); - - function_header _function_header = new function_header(_named_type_reference); - _function_header.of_object = false; - _function_header.name = _method_name; - _function_header.parameters = GetFormals(LRParser.GetReductionSyntaxNode(4)); - - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(8)); - block _block = new block(null, _statement_list); - - procedure_definition _procedure_definition = new procedure_definition(_function_header, _block); - parsertools.create_source_context(_method_name, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_function_header, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_procedure_definition, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(9)); - parsertools.create_source_context(_block, LRParser.GetReductionSyntaxNode(7), LRParser.GetReductionSyntaxNode(9)); - (_units[this.unit_number - 1] as unit_data).sub_progs.defs.Add(_procedure_definition); - declarations _declarations = new declarations(); - _declarations.defs.Add(_procedure_definition); - parsertools.create_source_context(_declarations, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(9)); - return _procedure_definition; - } - - case (int)RuleConstants.RULE_FUNCTION_TK_ALG_TK_IDENTIFIER_TK_BEGIN_TK_END: - // ::= 'tk_alg' 'tk_Identifier' 'tk_begin' 'tk_end' - { - method_name _method_name = new method_name(null, LRParser.GetReductionSyntaxNode(2) as ident, null); - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(1)).text.ToLower()); - - function_header _function_header = new function_header(_named_type_reference); - _function_header.of_object = false; - _function_header.name = _method_name; - - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(5)); - block _block = new block(null, _statement_list); - - procedure_definition _procedure_definition = new procedure_definition(_function_header, _block); - parsertools.create_source_context(_method_name, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_function_header, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_procedure_definition, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(6)); - parsertools.create_source_context(_block, LRParser.GetReductionSyntaxNode(4), LRParser.GetReductionSyntaxNode(6)); - (_units[this.unit_number - 1] as unit_data).sub_progs.defs.Add(_procedure_definition); - return _procedure_definition; - } - - case (int)RuleConstants.RULE_SUB_DECLARATIONS: - // ::= - return null; - - case (int)RuleConstants.RULE_SUB_DECLARATIONS2: - // ::= - { - declarations _declarations; - if (LRParser.GetReductionSyntaxNode(0) != null) - { - _declarations = (declarations)LRParser.GetReductionSyntaxNode(0); - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - } - else - { - _declarations = new declarations(); - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - } - // - parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)), LRParser.GetReductionSyntaxNode(1)); - return _declarations; - } - - case (int)RuleConstants.RULE_SUB_DECLARATIONS3: - // ::= - { - declarations _declarations; - if (LRParser.GetReductionSyntaxNode(0) != null) - { - _declarations = (declarations)LRParser.GetReductionSyntaxNode(0); - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - } - else - { - _declarations = new declarations(); - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - } - parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)), LRParser.GetReductionSyntaxNode(1)); - return _declarations; - } - - case (int)RuleConstants.RULE_SUB_DECLARATIONS4: - // ::= - { - declarations _declarations; - if (LRParser.GetReductionSyntaxNode(0) != null) - { - _declarations = (declarations)LRParser.GetReductionSyntaxNode(0); - } - else - { - _declarations = new declarations(); - - } - parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0))); - return _declarations; - } - - - case (int)RuleConstants.RULE_TYPE_TK_INTEGER_TYPE: - // ::= 'tk_integer_type' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_TYPE_TK_REAL_TYPE: - // ::= 'tk_real_type' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_TYPE_TK_BOOLEAN_TYPE: - // ::= 'tk_boolean_type' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_TYPE_TK_CHAR_TYPE: - // ::= 'tk_char_type' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_TYPE_TK_STRING_TYPE: - // ::= 'tk_string_type' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_DIAP_TK_COLON: - // ::= 'tk_Colon' - { - diapason _diapason = new diapason(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression); - - parsertools.create_source_context(_diapason, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _diapason; - } - - case (int)RuleConstants.RULE_DIAP_LIST_TK_COMMA: - // ::= 'tk_Comma' - { - indexers_types _indexers_types = GetIndexers(LRParser.GetReductionSyntaxNode(0)); - _indexers_types.indexers.Add(LRParser.GetReductionSyntaxNode(2) as diapason); - - parsertools.create_source_context(_indexers_types, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _indexers_types; - } - - case (int)RuleConstants.RULE_DIAP_LIST: - // ::= - { - indexers_types _indexers_types = new indexers_types(); - _indexers_types.indexers.Add(LRParser.GetReductionSyntaxNode(0) as diapason); - - parsertools.create_source_context(_indexers_types, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _indexers_types; - } - - case (int)RuleConstants.RULE_LIST_OF_EXPRESSIONS_TK_COMMA: - // ::= 'tk_Comma' - { - expression_list _expression_list = GetExpressions(LRParser.GetReductionSyntaxNode(0)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - - parsertools.create_source_context(_expression_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _expression_list; - } - - case (int)RuleConstants.RULE_LIST_OF_EXPRESSIONS: - // ::= - { - expression_list _expression_list = new expression_list(); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - - _expression_list.source_context = ((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - return _expression_list; - } - - case (int)RuleConstants.RULE_ID_LIST1_TK_IDENTIFIER: - // ::= 'tk_Identifier' - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - _ident_list.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - return _ident_list; - } - - case (int)RuleConstants.RULE_ID_LIST1_TK_IDENTIFIER_TK_COMMA: - // ::= 'tk_Identifier' 'tk_Comma' - { - ident_list _ident_list = GetIdents(LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - parsertools.create_source_context(_ident_list, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(0))); - return _ident_list; - } - - case (int)RuleConstants.RULE_ARRAY_LIST1_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE: - // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - indexers_types _indexers_types = GetIndexers(LRParser.GetReductionSyntaxNode(2)); - array_type _array_type = new array_type(_indexers_types, null); - - var_def_statement _var_def_statement = new var_def_statement(_ident_list, _array_type, null, definition_attribute.None, false); - variable_definitions _variable_definitions = new variable_definitions(); - _variable_definitions.var_definitions.Add(_var_def_statement); - - //_ident_list.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - parsertools.create_source_context(_array_type, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - //parsertools.create_source_context(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_ident_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_indexers_types, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_var_def_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _variable_definitions; - } - - case (int)RuleConstants.RULE_ARRAY_LIST1_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_COMMA: - // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_Comma' - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - indexers_types _indexers_types = GetIndexers(LRParser.GetReductionSyntaxNode(2)); - array_type _array_type = new array_type(_indexers_types, null); - - var_def_statement _var_def_statement = new var_def_statement(_ident_list, _array_type, null, definition_attribute.None, false); - variable_definitions _variable_definitions = (LRParser.GetReductionSyntaxNode(5) as variable_definitions); - _variable_definitions.var_definitions.Add(_var_def_statement); - - //_ident_list.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - parsertools.create_source_context(_array_type, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_ident_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - //parsertools.create_source_context(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_indexers_types, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_var_def_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _variable_definitions; - } - - case (int)RuleConstants.RULE_ID_LIST2_TK_IDENTIFIER_TK_COMMA: - // ::= 'tk_Identifier' 'tk_Comma' - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - _ident_list.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - return _ident_list; - } - - case (int)RuleConstants.RULE_ID_LIST2_TK_IDENTIFIER_TK_COMMA2: - // ::= 'tk_Identifier' 'tk_Comma' - { - ident_list _ident_list = GetIdents(LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - parsertools.create_source_context(_ident_list, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(0))); - return _ident_list; - } - - case (int)RuleConstants.RULE_ARRAY_LIST2_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_COMMA: - // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_Comma' - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - indexers_types _indexers_types = GetIndexers(LRParser.GetReductionSyntaxNode(2)); - array_type _array_type = new array_type(_indexers_types, null); - - var_def_statement _var_def_statement = new var_def_statement(_ident_list, _array_type, null, definition_attribute.None, false); - variable_definitions _variable_definitions = new variable_definitions(); - _variable_definitions.var_definitions.Add(_var_def_statement); - - //_ident_list.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - parsertools.create_source_context(_array_type, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_ident_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - //parsertools.create_source_context(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_indexers_types, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_var_def_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _variable_definitions; - } - - case (int)RuleConstants.RULE_ARRAY_LIST2_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_COMMA2: - // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_Comma' - { - ident_list _ident_list = new ident_list(); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(0) as ident); - - indexers_types _indexers_types = GetIndexers(LRParser.GetReductionSyntaxNode(2)); - array_type _array_type = new array_type(_indexers_types, null); - - var_def_statement _var_def_statement = new var_def_statement(_ident_list, _array_type, null, definition_attribute.None, false); - variable_definitions _variable_definitions = (LRParser.GetReductionSyntaxNode(5) as variable_definitions); - _variable_definitions.var_definitions.Add(_var_def_statement); - - //_ident_list.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - parsertools.create_source_context(_array_type, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_ident_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - //parsertools.create_source_context(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_indexers_types, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_var_def_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _variable_definitions; - } - - case (int)RuleConstants.RULE_VAR_DECLARATIONS1: - // ::= - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - - var_def_statement _var_def_statement = new var_def_statement(GetIdents(LRParser.GetReductionSyntaxNode(1)), _named_type_reference, null, definition_attribute.None, false); - var_statement _var_statement = new var_statement(_var_def_statement); - - parsertools.create_source_context(_var_def_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_var_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_named_type_reference, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _var_statement; - } - - case (int)RuleConstants.RULE_VAR_DECLARATIONS1_TK_ARRAY: - // ::= 'tk_array' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - - statement_list var_statement_list = new statement_list(); - - variable_definitions _variable_definitions = LRParser.GetReductionSyntaxNode(2) as variable_definitions; - for (int i = 0; i < _variable_definitions.var_definitions.Count; i++) - { - ((_variable_definitions.var_definitions[i]).vars_type as array_type).elemets_types = _named_type_reference; - var_statement _var_statement = new var_statement((var_def_statement)_variable_definitions.var_definitions[i]); - var_statement_list.subnodes.Add(_var_statement); - - parsertools.create_source_context(_var_statement, _variable_definitions.var_definitions[i], _variable_definitions.var_definitions[i]); - - } - parsertools.create_source_context(_named_type_reference.names[0], LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(var_statement_list, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_named_type_reference, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return var_statement_list; - } - - case (int)RuleConstants.RULE_VAR_DECLARATIONS2: - // ::= - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - var_def_statement _var_def_statement = new var_def_statement(GetIdents(LRParser.GetReductionSyntaxNode(1)), _named_type_reference, null, definition_attribute.None, false); - var_statement _var_statement = new var_statement(_var_def_statement); - - parsertools.create_source_context(_var_def_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_var_statement, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_named_type_reference, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _var_statement; - } - - case (int)RuleConstants.RULE_VAR_DECLARATIONS2_TK_ARRAY: - // ::= 'tk_array' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - - statement_list var_statement_list = new statement_list(); - - variable_definitions _variable_definitions = LRParser.GetReductionSyntaxNode(2) as variable_definitions; - for (int i = 0; i < _variable_definitions.var_definitions.Count; i++) - { - ((_variable_definitions.var_definitions[i]).vars_type as array_type).elemets_types = _named_type_reference; - var_statement _var_statement = new var_statement((var_def_statement)_variable_definitions.var_definitions[i]); - var_statement_list.subnodes.Add(_var_statement); - - parsertools.create_source_context(_var_statement, _variable_definitions.var_definitions[i], _variable_definitions.var_definitions[i]); - } - - parsertools.create_source_context(_named_type_reference.names[0], LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(var_statement_list, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_named_type_reference, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - - return var_statement_list; - } - - case (int)RuleConstants.RULE_VAR_DECL_LIST1: - // ::= - { - statement_list var_statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - - parsertools.create_source_context(var_statement_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return var_statement_list; - } - - case (int)RuleConstants.RULE_VAR_DECL_LIST12: - // ::= - { - statement_list var_statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - var_statement_list.subnodes.AddRange(GetStatements(LRParser.GetReductionSyntaxNode(1)).subnodes); - - parsertools.create_source_context(var_statement_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return var_statement_list; - } - - case (int)RuleConstants.RULE_VAR_DECL_LIST2: - // ::= - { - statement_list var_statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - - parsertools.create_source_context(var_statement_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return var_statement_list; - } - - case (int)RuleConstants.RULE_VAR_DECL_LIST22: - // ::= - { - statement_list var_statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - var_statement_list.subnodes.AddRange(GetStatements(LRParser.GetReductionSyntaxNode(1)).subnodes); - - parsertools.create_source_context(var_statement_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return var_statement_list; - } - - - case (int)RuleConstants.RULE_DECLARATIONS: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - //------------------------- Globals - - case (int)RuleConstants.RULE_USES_UNITS_TK_USES: - // ::= 'tk_uses' - { - if (_units[unit_number - 1] != null) - (_units[unit_number - 1] as unit_data).used_units.idents.AddRange(((ident_list)LRParser.GetReductionSyntaxNode(1)).idents); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return LRParser.GetReductionSyntaxNode(1); - - //return null; - } - - case (int)RuleConstants.RULE_GLOBAL_DECL_LIST: - // ::= - { - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - _statement_list.subnodes.AddRange(GetStatements(LRParser.GetReductionSyntaxNode(2)).subnodes); - parsertools.create_source_context(_statement_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _statement_list; - } - - case (int)RuleConstants.RULE_GLOBAL_DECL_LIST2: - // ::= - { // etot kod pohoje inogda ne vipolniaetsia hotia pravilo srabativaet - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - for (int i = 0; i < _statement_list.subnodes.Count; i++) - (_units[this.unit_number - 1] as unit_data).sub_progs.defs.Add(_statement_list.subnodes[i] as declaration); - parsertools.create_source_context(_statement_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _statement_list; - } - - case (int)RuleConstants.RULE_INITIALIZATION_TK_ASSIGN: - // ::= 'tk_Assign' - { - assign _assign = new assign((addressed_value)LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(4) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(3)).type); - (_units[this.unit_number - 1] as unit_data).initialization.subnodes.Add(_assign); - - parsertools.create_source_context(_assign, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(4)); - return null; - } - - case (int)RuleConstants.RULE_INITIALIZATION_TK_ASSIGN2: - // ::= 'tk_Assign' - { - assign _assign = new assign((addressed_value)LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - (_units[this.unit_number - 1] as unit_data).initialization.subnodes.Add(_assign); - - parsertools.create_source_context(_assign, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return null; - } - - case (int)RuleConstants.RULE_GLOBAL_VARS: - // ::= - { - declarations _declarations = new declarations(); - //_declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(2)); - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - for (int i = 0; i < _statement_list.subnodes.Count; i++) - { - (_units[this.unit_number - 1] as unit_data).sub_progs.defs.Add(_statement_list.subnodes[i] as declaration); - _declarations.defs.Add(_statement_list.subnodes[i] as declaration); - } - parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(3)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0))); - return _declarations; - } - - case (int)RuleConstants.RULE_GLOBAL_VARS2: - // ::= - { - //declarations _declarations = (declarations)LRParser.GetReductionSyntaxNode(0); - declarations _declarations = new declarations(); - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - for (int i = 0; i < _statement_list.subnodes.Count; i++) - { - (_units[this.unit_number - 1] as unit_data).sub_progs.defs.Add(_statement_list.subnodes[i] as declaration); - _declarations.defs.Add(_statement_list.subnodes[i] as declaration); - } - parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0))); - return _declarations; - } - - case (int)RuleConstants.RULE_GLOBAL_PART: - // ::= - return null; - - case (int)RuleConstants.RULE_GLOBAL_PART2: - // ::= - { - //declarations _declarations = (declarations)LRParser.GetReductionSyntaxNode(0); - //parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0))); - return null; - } - - case (int)RuleConstants.RULE_GLOBAL_PART3: - // ::= - { - //declarations _declarations = (declarations)LRParser.GetReductionSyntaxNode(0); - //_declarations.defs.AddRange(((declarations)LRParser.GetReductionSyntaxNode(2)).defs); - //parsertools.create_source_context(_declarations, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(2)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0))); - return null; - } - case (int)RuleConstants.RULE_GLOBAL_PART4: - // ::= - { - //declarations _declarations = (declarations)LRParser.GetReductionSyntaxNode(0); - //parsertools.create_source_context(_declarations, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return null; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER1: - // ::= - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - ident_list _ident_list = GetIdents(LRParser.GetReductionSyntaxNode(1)); - _ident_list.idents.Reverse(); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, _named_type_reference, parametr_kind.none, null); - formal_parameters _formal_parametres = new formal_parameters(); - _formal_parametres.params_list.Add(_typed_parametres); - - parsertools.create_source_context(_typed_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER1_TK_VAR: - // ::= 'tk_var' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(1)).text.ToLower()); - ident_list _ident_list = GetIdents(LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Reverse(); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, _named_type_reference, parametr_kind.var_parametr, null); - formal_parameters _formal_parametres = new formal_parameters(); - _formal_parametres.params_list.Add(_typed_parametres); - - parsertools.create_source_context(_typed_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER1_TK_ARRAY: - // ::= 'tk_array' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - variable_definitions _variable_definitions = LRParser.GetReductionSyntaxNode(2) as variable_definitions; - formal_parameters _formal_parametres = new formal_parameters(); - _variable_definitions.var_definitions.Reverse(); - - for (int i = 0; i < _variable_definitions.var_definitions.Count; i++) - { - ((_variable_definitions.var_definitions[i]).vars_type as array_type).elemets_types = _named_type_reference; - _formal_parametres.params_list.Add(new typed_parameters((_variable_definitions.var_definitions[i]).vars, (_variable_definitions.var_definitions[i]).vars_type, parametr_kind.none, null)); - } - _variable_definitions.var_definitions.Clear(); - - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_named_type_reference, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER1_TK_VAR_TK_ARRAY: - // ::= 'tk_var' 'tk_array' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(1)).text.ToLower()); - variable_definitions _variable_definitions = LRParser.GetReductionSyntaxNode(3) as variable_definitions; - formal_parameters _formal_parametres = new formal_parameters(); - _variable_definitions.var_definitions.Reverse(); - - for (int i = 0; i < _variable_definitions.var_definitions.Count; i++) - { - ((_variable_definitions.var_definitions[i]).vars_type as array_type).elemets_types = _named_type_reference; - _formal_parametres.params_list.Add(new typed_parameters((_variable_definitions.var_definitions[i]).vars, (_variable_definitions.var_definitions[i]).vars_type, parametr_kind.var_parametr, null)); - } - _variable_definitions.var_definitions.Clear(); - - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_named_type_reference, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER2: - // ::= - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - ident_list _ident_list = GetIdents(LRParser.GetReductionSyntaxNode(1)); - _ident_list.idents.Reverse(); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, _named_type_reference, parametr_kind.none, null); - formal_parameters _formal_parametres = new formal_parameters(); - _formal_parametres.params_list.Add(_typed_parametres); - - parsertools.create_source_context(_typed_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER2_TK_VAR: - // ::= 'tk_var' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(1)).text.ToLower()); - ident_list _ident_list = GetIdents(LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Reverse(); - - typed_parameters _typed_parametres = new typed_parameters(_ident_list, _named_type_reference, parametr_kind.var_parametr, null); - formal_parameters _formal_parametres = new formal_parameters(); - _formal_parametres.params_list.Add(_typed_parametres); - - parsertools.create_source_context(_typed_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER2_TK_ARRAY: - // ::= 'tk_array' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(0)).text.ToLower()); - variable_definitions _variable_definitions = LRParser.GetReductionSyntaxNode(2) as variable_definitions; - formal_parameters _formal_parametres = new formal_parameters(); - _variable_definitions.var_definitions.Reverse(); - - for (int i = 0; i < _variable_definitions.var_definitions.Count; i++) - { - ((_variable_definitions.var_definitions[i]).vars_type as array_type).elemets_types = _named_type_reference; - _formal_parametres.params_list.Add(new typed_parameters((_variable_definitions.var_definitions[i]).vars, (_variable_definitions.var_definitions[i]).vars_type, parametr_kind.none, null)); - } - _variable_definitions.var_definitions.Clear(); - - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_PARAMETER2_TK_VAR_TK_ARRAY: - // ::= 'tk_var' 'tk_array' - { - named_type_reference _named_type_reference = GetType(((token_info)LRParser.GetReductionSyntaxNode(1)).text.ToLower()); - variable_definitions _variable_definitions = LRParser.GetReductionSyntaxNode(3) as variable_definitions; - formal_parameters _formal_parametres = new formal_parameters(); - _variable_definitions.var_definitions.Reverse(); - - for (int i = 0; i < _variable_definitions.var_definitions.Count; i++) - { - ((_variable_definitions.var_definitions[i]).vars_type as array_type).elemets_types = _named_type_reference; - _formal_parametres.params_list.Add(new typed_parameters((_variable_definitions.var_definitions[i]).vars, (_variable_definitions.var_definitions[i]).vars_type, parametr_kind.var_parametr, null)); - } - _variable_definitions.var_definitions.Clear(); - - parsertools.create_source_context(_variable_definitions, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_TYPE_LIST1: - // ::= - { - formal_parameters _formal_parametres = GetFormals(LRParser.GetReductionSyntaxNode(0)); - - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_TYPE_LIST12: - // ::= - { - formal_parameters _formal_parametres = GetFormals(LRParser.GetReductionSyntaxNode(0)); - _formal_parametres.params_list.AddRange(GetFormals(LRParser.GetReductionSyntaxNode(1)).params_list); - - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_TYPE_LIST2: - // ::= - { - formal_parameters _formal_parametres = GetFormals(LRParser.GetReductionSyntaxNode(0)); - - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_TYPE_LIST22: - // ::= - { - formal_parameters _formal_parametres = GetFormals(LRParser.GetReductionSyntaxNode(0)); - _formal_parametres.params_list.AddRange(GetFormals(LRParser.GetReductionSyntaxNode(1)).params_list); - - parsertools.create_source_context(_formal_parametres, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _formal_parametres; - } - - case (int)RuleConstants.RULE_FORMAL_LIST: - // ::= - return null; - - case (int)RuleConstants.RULE_FORMAL_LIST2: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_FACT_LIST: - // ::= - return null; - - case (int)RuleConstants.RULE_FACT_LIST2: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - //-------------------------- Operators - - case (int)RuleConstants.RULE_FREE_OPERATOR: - // ::= - return null; - - case (int)RuleConstants.RULE_CASE_VARIANT_LIST: - // ::= - { - if_node _if_node1; - if (LRParser.GetReductionSyntaxNode(1) is case_variant) - { - case_variant _case_variant1 = (case_variant)LRParser.GetReductionSyntaxNode(1); - _if_node1 = new if_node((expression)_case_variant1.conditions.expressions[0], GetStatements(_case_variant1.exec_if_true), null); - parsertools.create_source_context(_if_node1, LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); //make - - } - else - _if_node1 = LRParser.GetReductionSyntaxNode(1) as if_node; - - case_variant _case_variant = (case_variant)LRParser.GetReductionSyntaxNode(0); - if_node _if_node = new if_node((expression)_case_variant.conditions.expressions[0], _case_variant.exec_if_true, _if_node1); - - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0))); //make - return _if_node; - } - - case (int)RuleConstants.RULE_CASE_VARIANT_LIST2: - // ::= - { //unreacheable rule.. ? - case_variant _case_variant = (case_variant)LRParser.GetReductionSyntaxNode(0); - if_node _if_node = new if_node(GetExpressions(_case_variant.conditions), (statement)_case_variant.exec_if_true, null); - - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); //make - return _if_node; - } - - case (int)RuleConstants.RULE_CASE_VARIANT_TK_CASE_V_TK_COLON: - // ::= 'tk_case_v' 'tk_Colon' - { - expression_list _expression_list = GetExpressions(LRParser.GetReductionSyntaxNode(1)); - case_variant _case_variant = new case_variant(_expression_list, GetStatements(LRParser.GetReductionSyntaxNode(3))); - - //_case_variant.source_context = (GetExpressions(LRParser.GetReductionSyntaxNode(1))).source_context; - parsertools.create_source_context(_case_variant, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(2))); - return _case_variant; - } - - case (int)RuleConstants.RULE_STATEMENTS: - // ::= - { - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - _statement_list.subnodes.AddRange(GetStatements(LRParser.GetReductionSyntaxNode(2)).subnodes); - - parsertools.create_source_context(_statement_list, parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(0))); - //parsertools.create_source_context(_statement_list, _statement_list, _statement_list); //make - return _statement_list; - } - - case (int)RuleConstants.RULE_STATEMENTS2: - // ::= - { - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(0)); - - parsertools.create_source_context(_statement_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _statement_list; - } - - case (int)RuleConstants.RULE_STATEMENT: - // ::= - { - empty_statement _empty_statement = new empty_statement(); - - return _empty_statement; - } - - case (int)RuleConstants.RULE_STATEMENT2: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_STATEMENT_TK_ASSIGN: - // ::= 'tk_Assign' - { - assign _assign = new assign((addressed_value)LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - - parsertools.create_source_context(_assign, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _assign; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_IF_TK_THEN_TK_END_ALL: - // ::= 'tk_if' 'tk_then' 'tk_end_all' - { - if_node _if_node = new if_node((expression)LRParser.GetReductionSyntaxNode(1), GetStatements(LRParser.GetReductionSyntaxNode(3)), null); - - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(4), LRParser.GetReductionSyntaxNode(2))); - return _if_node; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_IF_TK_THEN_TK_ELSE_TK_END_ALL: - // ::= 'tk_if' 'tk_then' 'tk_else' 'tk_end_all' - { - if_node _if_node = new if_node((expression)LRParser.GetReductionSyntaxNode(1), GetStatements(LRParser.GetReductionSyntaxNode(3)), GetStatements(LRParser.GetReductionSyntaxNode(5))); - - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(6), LRParser.GetReductionSyntaxNode(2))); - return _if_node; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_BEGIN_CYCLE_TK_RAZ_TK_END_CYCLE: - // ::= 'tk_begin_cycle' 'tk_raz' 'tk_end_cycle' - { // remake without "_system_loop_var_" ! - int32_const _int32_const = new int32_const(1); - ident loop_var = new ident("&_system_loop_var"); - statement_list _statement_list = GetStatements(LRParser.GetReductionSyntaxNode(3)); - - for_node _for_node = new for_node(loop_var, _int32_const, (expression)LRParser.GetReductionSyntaxNode(1), _statement_list, for_cycle_type.to, null, null, true); - - parsertools.create_source_context(_for_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(4), LRParser.GetReductionSyntaxNode(1))); - if ((_statement_list as statement).source_context != null) - parsertools.create_source_context(_statement_list, LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_for_node, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(4)); - return _for_node; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_BEGIN_CYCLE_TK_FOR_TK_IDENTIFIER_TK_FROM_TK_TO_TK_END_CYCLE: - // ::= 'tk_begin_cycle' 'tk_for' 'tk_Identifier' 'tk_from' 'tk_to' 'tk_end_cycle' - { - for_node _for_node = new for_node((ident)LRParser.GetReductionSyntaxNode(2), (expression)LRParser.GetReductionSyntaxNode(4), (expression)LRParser.GetReductionSyntaxNode(6), GetStatements(LRParser.GetReductionSyntaxNode(7)), for_cycle_type.to, null, null, false); - - parsertools.create_source_context(_for_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(8), LRParser.GetReductionSyntaxNode(1))); - parsertools.create_source_context(GetStatements(LRParser.GetReductionSyntaxNode(7)), LRParser.GetReductionSyntaxNode(7), LRParser.GetReductionSyntaxNode(7)); - return _for_node; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_BEGIN_CYCLE_TK_WHILE_TK_END_CYCLE: - // ::= 'tk_begin_cycle' 'tk_while' 'tk_end_cycle' - { - while_node _while_node = new while_node((expression)LRParser.GetReductionSyntaxNode(2), GetStatements(LRParser.GetReductionSyntaxNode(3)), WhileCycleType.While); - - parsertools.create_source_context(_while_node, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(4)); - return _while_node; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_CASE_TK_END_ALL: - // ::= 'tk_case' 'tk_end_all' - { - if_node _if_node; - if (LRParser.GetReductionSyntaxNode(2) is case_variant) - { - case_variant _case_variant = (case_variant)LRParser.GetReductionSyntaxNode(2); - _if_node = new if_node((expression)_case_variant.conditions.expressions[0], (statement)_case_variant.exec_if_true, null); - - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1))); //make - return _if_node; - } - else{ - if_node _if_node1; - _if_node = (if_node)LRParser.GetReductionSyntaxNode(2); - _if_node1 = _if_node; - while (_if_node1.else_body is if_node) - _if_node1 = _if_node1.else_body as if_node; - - _if_node1.else_body = null; - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1))); - return _if_node; - - } - } - - case (int)RuleConstants.RULE_STATEMENT_TK_CASE_TK_ELSE_TK_END_ALL: - // ::= 'tk_case' 'tk_else' 'tk_end_all' - { - if_node _if_node; - if (LRParser.GetReductionSyntaxNode(2) is case_variant) - { - case_variant _case_variant = (case_variant)LRParser.GetReductionSyntaxNode(2); - _if_node = new if_node((expression)_case_variant.conditions.expressions[0], (statement)_case_variant.exec_if_true, GetStatements(LRParser.GetReductionSyntaxNode(4))); - - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(5), LRParser.GetReductionSyntaxNode(4), LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1))); //make - return _if_node; - } - else - { - if_node _if_node1; - _if_node = (if_node)LRParser.GetReductionSyntaxNode(2); - _if_node1 = _if_node; - while (_if_node1.else_body is if_node) - _if_node1 = _if_node1.else_body as if_node; - - - _if_node1.else_body = GetStatements(LRParser.GetReductionSyntaxNode(4)); - // _if_node1.else_body.source_context.end_position - //parsertools.create_source_context(_if_node1, LRParser.GetReductionSyntaxNode(2), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(5), LRParser.GetReductionSyntaxNode(4), LRParser.GetReductionSyntaxNode(3))); //make - parsertools.create_source_context(_if_node, LRParser.GetReductionSyntaxNode(0), parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(5), LRParser.GetReductionSyntaxNode(4), LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(1))); //make - return _if_node; - } - } - - case (int)RuleConstants.RULE_STATEMENT_TK_ASSERT: - // ::= 'tk_assert' - { //make it! - procedure_call _procedure_call = new procedure_call(); - expression_list _expression_list = new expression_list(); - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(1)); - method_call _method_call = new method_call(_expression_list); - _method_call.dereferencing_value = new ident("assert"); - _procedure_call.func_name = _method_call; - - parsertools.create_source_context(_method_call.dereferencing_value, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_expression_list, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_procedure_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - - return _procedure_call; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_READ: - // ::= 'tk_read' - { - procedure_call _procedure_call = new procedure_call(); - expression_list _expression_list = new expression_list(); - ident_list _ident_list = GetIdents(LRParser.GetReductionSyntaxNode(1)); - - for (int i = 0; i < _ident_list.idents.Count; i++) - { - _expression_list.expressions.Add(_ident_list.idents[i] as expression); - } - _ident_list.idents.Clear(); - - method_call _method_call = new method_call(_expression_list); - _method_call.dereferencing_value = new ident("read"); - _procedure_call.func_name = _method_call; - - parsertools.create_source_context(_method_call.dereferencing_value, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_ident_list, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_procedure_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _procedure_call; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_WRITE: - // ::= 'tk_write' - { - procedure_call _procedure_call = new procedure_call(); - expression_list _expression_list = GetExpressions(LRParser.GetReductionSyntaxNode(1)); - method_call _method_call = new method_call(_expression_list); - _method_call.dereferencing_value = new ident("write"); - _procedure_call.func_name = _method_call; - - parsertools.create_source_context(_method_call.dereferencing_value, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_expression_list, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_procedure_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _procedure_call; - } - - case (int)RuleConstants.RULE_STATEMENT_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE: - // ::= 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' - { - procedure_call _procedure_call = new procedure_call(); - method_call _method_call; - expression_list _expression_list; - - if (LRParser.GetReductionSyntaxNode(2) != null) - { - _expression_list = GetExpressions(LRParser.GetReductionSyntaxNode(2)); - _method_call = new method_call(_expression_list); - } - else - _method_call = new method_call(); - - - _method_call.dereferencing_value = new ident(((ident)LRParser.GetReductionSyntaxNode(0)).name); - _procedure_call.func_name = _method_call; - - parsertools.create_source_context(_method_call.dereferencing_value, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - //parsertools.create_source_context(_expression_list, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_procedure_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _procedure_call; - } - - - case (int)RuleConstants.RULE_STATEMENT_TK_IDENTIFIER: - // ::= 'tk_Identifier' - { - procedure_call _procedure_call = new procedure_call(); - method_call _method_call = new method_call(null); - _method_call.dereferencing_value = new ident(((ident)LRParser.GetReductionSyntaxNode(0)).name); - _procedure_call.func_name = _method_call; - - parsertools.create_source_context(_method_call.dereferencing_value, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_procedure_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _procedure_call; - } - - case (int)RuleConstants.RULE_EXPRESSION_TK_GREATER: - // ::= 'tk_Greater' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPRESSION_TK_LOWER: - // ::= 'tk_Lower' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPRESSION_TK_LOWEREQUAL: - // ::= 'tk_LowerEqual' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPRESSION_TK_GREATEREQUAL: - // ::= 'tk_GreaterEqual' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPRESSION_TK_EQUAL: - // ::= 'tk_Equal' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPRESSION_TK_NOTEQUAL: - // ::= 'tk_NotEqual' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPRESSION: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_ADDEXP_TK_OR: - // ::= 'tk_or' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_ADDEXP_TK_PLUS: - // ::= 'tk_Plus' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_ADDEXP_TK_MINUS: - // ::= 'tk_Minus' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_ADDEXP: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_MULTEXP_TK_AND: - // ::= 'tk_and' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_MULTEXP_TK_MULT: - // ::= 'tk_Mult' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_MULTEXP_TK_DIV: - // ::= 'tk_Div' - { - bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_MULTEXP: - // ::= - return LRParser.GetReductionSyntaxNode(0); //make it! - - case (int)RuleConstants.RULE_POWEREXP_TK_POWER: - { - // ::= 'tk_Power' - - expression_list _expression_list = new expression_list(); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(0) as expression); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - method_call _method_call = new method_call(_expression_list); - _method_call.dereferencing_value = new ident("Power"); - parsertools.create_source_context(_method_call.dereferencing_value, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - return _method_call; - - //bin_expr _bin_expr = new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression, LRParser.GetReductionSyntaxNode(2) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - //parsertools.create_source_context(_bin_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - - //return _bin_expr; - } - case (int)RuleConstants.RULE_POWEREXP: - // ::= - return LRParser.GetReductionSyntaxNode(0); //make it! - - case (int)RuleConstants.RULE_NEGATEEXP_TK_MINUS: - // ::= 'tk_Minus' - { - un_expr _un_expr = new un_expr(LRParser.GetReductionSyntaxNode(1) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_NEGATEEXP_TK_NOT: - // ::= 'tk_not' - { - un_expr _un_expr = new un_expr(LRParser.GetReductionSyntaxNode(1) as expression, ((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_NEGATEEXP: - // ::= - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_IDENTIFIER: - // ::= 'tk_Identifier' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_FUNC_VAL: - // ::= 'tk_func_val' - return new ident("result"); - - case (int)RuleConstants.RULE_VALUE_TK_INTEGER: - // ::= 'tk_integer' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_REAL: - // ::= 'tk_real' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_TRUE: - // ::= 'tk_true' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_FALSE: - // ::= 'tk_false' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_STRINGLITERAL: - // ::= 'tk_StringLiteral' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_CHAR: - // ::= 'tk_char' - return LRParser.GetReductionSyntaxNode(0); - - case (int)RuleConstants.RULE_VALUE_TK_EOL: - // ::= 'tk_eol' - { - literal_const_line _literal_const_line = new literal_const_line(); - sharp_char_const _sharp_char_const_13 = new sharp_char_const(13); - sharp_char_const _sharp_char_const_10 = new sharp_char_const(10); - _literal_const_line.literals.Add(_sharp_char_const_13); - _literal_const_line.literals.Add(_sharp_char_const_10); - - parsertools.create_source_context(_sharp_char_const_13, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); //make - parsertools.create_source_context(_sharp_char_const_10, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); //make - parsertools.create_source_context(_literal_const_line, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); //make - return _literal_const_line; - } - - case (int)RuleConstants.RULE_VALUE_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE_TK_SQUAREOPEN_TK_SQUARECLOSE: - // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' 'tk_SquareOpen' 'tk_SquareClose' - { - - indexer _indexer = new indexer(GetExpressions(LRParser.GetReductionSyntaxNode(2))); - indexer _indexer1 = new indexer(GetExpressions(LRParser.GetReductionSyntaxNode(5))); - _indexer.dereferencing_value = LRParser.GetReductionSyntaxNode(0) as ident; - _indexer1.dereferencing_value = _indexer; - parsertools.create_source_context(_indexer, LRParser.GetReductionSyntaxNode(2), LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_indexer, LRParser.GetReductionSyntaxNode(5), LRParser.GetReductionSyntaxNode(5)); - return _indexer1; - } - - case (int)RuleConstants.RULE_VALUE_TK_IDENTIFIER_TK_SQUAREOPEN_TK_SQUARECLOSE: - // ::= 'tk_Identifier' 'tk_SquareOpen' 'tk_SquareClose' - { - - indexer _indexer = new indexer(GetExpressions(LRParser.GetReductionSyntaxNode(2))); - _indexer.dereferencing_value = LRParser.GetReductionSyntaxNode(0) as ident; - parsertools.create_source_context(_indexer, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(3)); - return _indexer; - } - - case (int)RuleConstants.RULE_VALUE_TK_IDENTIFIER_TK_ROUNDOPEN_TK_ROUNDCLOSE: - // ::= 'tk_Identifier' 'tk_RoundOpen' 'tk_RoundClose' - { - expression_list _expression_list; - method_call _method_call; - if (LRParser.GetReductionSyntaxNode(2) != null) - { - _expression_list = GetExpressions(LRParser.GetReductionSyntaxNode(2)); - _method_call = new method_call(_expression_list); - } - else - _method_call = new method_call(); - switch (((ident)LRParser.GetReductionSyntaxNode(0)).name) - { - case "tg": _method_call.dereferencing_value = new ident("tan"); break; - case "ctg": _method_call.dereferencing_value = new ident("ctg"); break; - case "arctg": _method_call.dereferencing_value = new ident("arctan"); break; - case "arcctg": _method_call.dereferencing_value = new ident("arcctg"); break; - case "lg": _method_call.dereferencing_value = new ident("log10"); break; - case "mod": _method_call.dereferencing_value = new ident("md"); break; - case "div": _method_call.dereferencing_value = new ident("dv"); break; - case "rnd": _method_call.dereferencing_value = new ident("random"); break; - case "int": _method_call.dereferencing_value = new ident("round"); break; - - default: - _method_call.dereferencing_value = new ident(((ident)LRParser.GetReductionSyntaxNode(0)).name); - break; - } - //_method_call.dereferencing_value = LRParser.GetReductionSyntaxNode(0) as ident; - - parsertools.create_source_context(_method_call.dereferencing_value, LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_method_call, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _method_call; - } - - case (int)RuleConstants.RULE_VALUE_TK_ROUNDOPEN_TK_ROUNDCLOSE: - // ::= 'tk_RoundOpen' 'tk_RoundClose' - return LRParser.GetReductionSyntaxNode(1); - - } - throw new RuleException("Unknown rule"); - } - - - - - - - } -} diff --git a/Parsers/KuMirParser/Parser.cs b/Parsers/KuMirParser/Parser.cs deleted file mode 100644 index 9b50e2ac1..000000000 --- a/Parsers/KuMirParser/Parser.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System; -using System.IO; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Parsers; -using System.Resources; -using System.Reflection; -using PascalABCCompiler.Errors; -using System.Collections.Generic; - - -namespace PascalABCCompiler.KuMirParser -{ - - public class KuMirLanguageParser : IParser - { - GPBParser_KuMir parser; - - public KuMirLanguageParser() - { - filesExtensions = new string[1]; - filesExtensions[0] = ".alg"; - } - - string[] filesExtensions; - public string[] FilesExtensions - { - get - { - return filesExtensions; - } - } - - public ILanguageInformation LanguageInformation { - get { - return new DefaultLanguageInformation(this); - } - } - - public void Reset() - { - parser = new GPBParser_KuMir(CGTResourceExtractor.Extract(new ResourceManager("KuMirParser.KuMirLang", Assembly.GetExecutingAssembly()), "KuMirLanguage")); - parser.max_errors = 30; - } - - public bool CaseSensitive - { - get - { - return parser.LanguageGrammar.CaseSensitive; - } - } - - - public List CompilerDirectives - { - get - { - return new List(); - } - } - SourceFilesProviderDelegate sourceFilesProvider = null; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - List errors = new List(); - public List Errors - { - get - { - return errors; - } - set - { - errors = value; - } - } - public Keyword[] Keywords - { - get - { - return new Keyword[0]; - } - } - - - public syntax_tree_node BuildTree(string FileName, string Text, string[] SearchPatchs, ParseMode ParseMode) - { - if (parser == null) - Reset(); - parser.errors = Errors; - parser.current_file_name = FileName; - parser.parsertools.LineCorrection = 0; - syntax_tree_node cu = null; - switch (ParseMode) - { - case ParseMode.Normal: - cu = (syntax_tree_node)parser.Parse(Text); - break; - case ParseMode.Expression: - case ParseMode.Statement: - return null; - } - if (cu != null && cu is compilation_unit) - { - (cu as compilation_unit).file_name = FileName; - (cu as compilation_unit).compiler_directives = CompilerDirectives; - } - return cu; - } - - public string Name - { - get - { - return "KuMir"; - } - } - public string Version - { - get - { - return "1.0"; - } - } - public string Copyright - { - get - { - return "(c) 3 course"; - } - } - - public override string ToString() - { - return "KuMir Language Parser v1.0"; - } - - public IPreprocessor Preprocessor - { - get - { - return null; - } - } - - - } - - - -} diff --git a/Parsers/KuMirParser/Properties/AssemblyInfo.cs b/Parsers/KuMirParser/Properties/AssemblyInfo.cs deleted file mode 100644 index 3cb461afa..000000000 --- a/Parsers/KuMirParser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("KuMirParser")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("3c")] -[assembly: AssemblyProduct("KuMirParser")] -[assembly: AssemblyCopyright("Copyright © 3c 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("48d49307-d409-4acd-878e-0e6561b69c9f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Parsers/PL0Parser/Errors.cs b/Parsers/PL0Parser/Errors.cs deleted file mode 100644 index 0eca9f430..000000000 --- a/Parsers/PL0Parser/Errors.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -//using com.calitha.goldparser; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.PL0Parser; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.Errors; -using System.Collections.Generic; - - -namespace PascalABCCompiler.PL0Parser.Errors -{ - public class UnexpectedToken : SyntaxError - { - private string _message; - public UnexpectedToken(PascalABCCompiler.ParserTools.GPBParser parser) - : base("", parser.current_file_name, parser.parsertools.GetTokenSourceContext(parser.LRParser), (syntax_tree_node)parser.prev_node) - { - List Symbols = parser.parsertools.GetPrioritySymbols(parser.LRParser.GetExpectedTokens()); - if (Symbols.Count == 1) - { - string OneSybmolText = "ONE_" + Symbols[0].Name.ToUpper(); - string LocOneSybmolText = StringResources.Get(OneSybmolText); - if (LocOneSybmolText != OneSybmolText) - { - _message = string.Format(LocOneSybmolText); - return; - } - } - _message = string.Format(StringResources.Get("EXPECTED{0}"), PascalABCCompiler.FormatTools.ObjectsToString(parser.parsertools.SymbolsToStrings(Symbols.ToArray()), ",")); - } - public UnexpectedToken(string _file_name, string expected, SourceContext _source_context, syntax_tree_node _node) - : base("", _file_name, _source_context, _node) - { - _message = string.Format(StringResources.Get("EXPECTED{0}"), expected); - } - public override string Message - { - get - { - return _message; - } - } - } - -} diff --git a/Parsers/PL0Parser/PL0Lang.resources b/Parsers/PL0Parser/PL0Lang.resources deleted file mode 100644 index ed4a002db6232896784e38a4fff0314503559022..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5067 zcmbVPc~}!y*AIw*3ohU*3L+pVwTf(pR8f$+;KpLHwr^3w78FC6B5F`zhDAg`M8r}d z1>AsYYa=406=Xn!fPx63VNpf|0!Tt2fvhu=@7g|npXYtPfBJn%ZtmPW_nzPHoclXx zk{8b;wK^0EB?q)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%7piC{%7VfW)|~9qN?sv7W$-OM;0c6Y%zRQn0D?6Ac81v%>R>G(Ce4m}%k?4tb3(4SMW zmw$yL6tD_GG~OWP^8qW6&xZi3UQ*r%1R4iq3DgM^18XGnfDhlu`b>){jQRTySC=I} z`KhRzy7WGu?i)#-OUPNCsj!>L!BL*X5KKvCnBOn*K6jR6et*y#O$gq&)mFtG z2zSu4Q;VO|Q~Z~7iAqXVwl+c_`LaL|%0bLPSV{q0E67ZMw+^slfx-Z8J_bhwP6|{T z$#K}^^~v^|x<@ByRbWQOxj(xm1H0@cH#wgzF<6q>vFAORw{!xE7$EaX<3?!s>8c*+ zD2F(`tJ?kk4m?ZrBbuX<*1;~gQn9K+_EMXuFZ2&ObP{~%w#TXL^p9<{nN0@ zK9Z{xn_k1t83lPoHRz*%%$9Njtk6GnPQ=?RTD(G;g60BWsA$VUj~s`w*Toy7bjI!% zmqe(4v*^Cu@O;NPwW>{Jqoknsz%o~KPlbP9WEf|xs|D&5<+G|-oIAh$h~4fPsp{cH zRzN-Bm~&e#i?bFTh0qF>cR^uKIGa^bUDb2smB_8C$D&VkiFKO4QS&&mqMYSg)iz3t zPA%G3VN@gf;#;L$;aW4@7+3Rot5)-^)#?5~!^`x2kwXv@(G<1;ynTI!S;J-|187OOJj~tns$GKB&m$eMEuwb;74F^ z7^w*-Z#;7yH@?v#Q81Ue+_&3y5*Nwv+l28Y;{Pg+5M&?F@-Hgy*p3L>@1H@DK)*uT z)FBv3k~8~jn-`IYehnz>B+xI=Xlz=`?;XG gD(@~@T~v|XnHly2F6o0djcI57AdI-)MWayu2Tm+~vH$=8 diff --git a/Parsers/PL0Parser/PL0Parser.csproj b/Parsers/PL0Parser/PL0Parser.csproj deleted file mode 100644 index 4be18235e..000000000 --- a/Parsers/PL0Parser/PL0Parser.csproj +++ /dev/null @@ -1,114 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {0DE2DAD6-D1E9-435E-8A19-91DA2AD3B59B} - Library - Properties - PL0Parser - PL0Parser - - - 4.0 - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - ..\..\bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - ..\..\bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - - - - - - - - - - - - {44A01F9E-DCE7-470C-AAE5-C3DE0CCBEE3B} - Errors - - - {2DE2842F-0912-4251-BC0F-480854C44A13} - Localization - - - {AF2EFD7B-69DD-4B43-AF65-B59B29349C23} - ParserTools - - - {C2CAC65A-B2AE-4CCC-B067-E6B8E75DF73A} - SyntaxTree - - - - - - - - False - КлиентÑ�кий профиль .NET Framework 3.5 SP1 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - УÑ�тановщик Windows 3.1 - true - - - - - \ No newline at end of file diff --git a/Parsers/PL0Parser/PL0ParserTools.cs b/Parsers/PL0Parser/PL0ParserTools.cs deleted file mode 100644 index cf21f7354..000000000 --- a/Parsers/PL0Parser/PL0ParserTools.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Text; -//using com.calitha.goldparser; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.ParserTools; -using GoldParser; - - -namespace PascalABCCompiler.PL0Parser -{ - public static class StringResources - { - private static string prefix = "PL0PARSER_"; - public static string Get(string Id) - { - string ret = PascalABCCompiler.StringResources.Get(prefix + Id); - if (ret == prefix + Id) - return Id; - else - return ret; - } - } - - public class PL0_parsertools:parser_tools - { - public override string symbol_to_string(Symbol symbol) - { - switch (symbol.Index) - { - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKMINUS: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKSLASH: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKSTAR: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKGREATER: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKGREATEREQUAL: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKLOWER: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKLOWEREQUAL: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKNOTEQUAL: - return StringResources.Get("OPERATOR"); - } - string res = StringResources.Get(symbol.Name.ToUpper()); - if (res.IndexOf("TK") == 0) - return res.Remove(0, 2).ToLower(); - return res; - } - - public override int symbol_priority(Symbol symbol) - { - - switch (symbol.Index) - { - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKEND: - return 8; - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKBEGIN: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKNUMBER: - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKROUNDCLOSE: - return 9; - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKIDENT: - return 10; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKASSIGN: - return 25; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKEQUAL: - return 25; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_TKSEMICOLON: - return 30; - - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_EXPRESSION: - return 100; - case (int)GPBParser_PL0.SymbolConstants.SYMBOL_STATEMENT: - return 110; - - } - if (symbol.SymbolType == SymbolType.Terminal) - return 1; - return 0; - } - - - } -} diff --git a/Parsers/PL0Parser/PL0_lrparser.cs b/Parsers/PL0Parser/PL0_lrparser.cs deleted file mode 100644 index 010638264..000000000 --- a/Parsers/PL0Parser/PL0_lrparser.cs +++ /dev/null @@ -1,101 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.PL0Parser.Errors; -using PascalABCCompiler.ParserTools; - -namespace PascalABCCompiler.PL0Parser -{ - public partial class GPBParser_PL0 : GPBParser - { - private Stack NodesStack; - private SyntaxError error; - - Stream GrammarStream; - - public GPBParser_PL0(Stream stream) - : base(stream) - { - GrammarStream = stream; - parsertools = new PL0_parsertools(); - } - - public object Parse(string source) - { - NodesStack = new Stack(); - LRParser = new GoldParser.Parser(new StringReader(source), LanguageGrammar); - parsertools.parser = LRParser; - LRParser.TrimReductions = true; - try - { - while (true) - { - switch (LRParser.Parse()) - { - case GoldParser.ParseMessage.LexicalError: - errors.Add(new TokenReadError(this)); - LRParser.PopInputToken(); - if (errors.Count >= max_errors) - return null; - break; - - //sdes nugno vesti chtoto vrode steka poslednix oshibok. podumat - case GoldParser.ParseMessage.SyntaxError: - GoldParser.Symbol sym = LRParser.PopInputToken(); - error = new PL0Parser.Errors.UnexpectedToken(this); - //error = new UnexpectedToken(this, parsertools.symbol_collection_to_string(this.LRParser.GetExpectedTokens())); - if (sym.SymbolType == GoldParser.SymbolType.End && errors.Count > 0) - return null; - errors.Add(error); - if (errors.Count >= max_errors) - return null; - break; - case GoldParser.ParseMessage.Reduction: - LRParser.TokenSyntaxNode = CreateNonTerminalObject(LRParser.ReductionRule.Index); - if ((LRParser.TokenSyntaxNode as syntax_tree_node) != null) - prev_node = LRParser.TokenSyntaxNode; - break; - - case GoldParser.ParseMessage.Accept: - return LRParser.TokenSyntaxNode; - - case GoldParser.ParseMessage.TokenRead: - LRParser.TokenSyntaxNode = CreateTerminalObject(LRParser.TokenSymbol.Index); - break; - - case GoldParser.ParseMessage.InternalError: - errors.Add(new CompilerInternalError("PL0Parser", new Exception("ParseMessage.InternalError"))); - return null; - - case GoldParser.ParseMessage.NotLoadedError: - errors.Add(new CompilerInternalError("PL0Parser", new Exception("ParseMessage.NotLoadedError"))); - return null; - - case GoldParser.ParseMessage.CommentError: - errors.Add(new PascalABCCompiler.Errors.UnexpectedToken(this, "(EOF)")); - return null; - - /*case ParseMessage.CommentBlockRead: - break; - - case ParseMessage.CommentLineRead: - break;*/ - } - } - } - catch (Exception e) - { - if (errors.Count > 0) - return null; - else - throw; - } - - } - } - -} diff --git a/Parsers/PL0Parser/PL0_lrparser_rules.cs b/Parsers/PL0Parser/PL0_lrparser_rules.cs deleted file mode 100644 index cffaa5e6c..000000000 --- a/Parsers/PL0Parser/PL0_lrparser_rules.cs +++ /dev/null @@ -1,1060 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.PL0Parser.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.PL0Parser -{ -public partial class GPBParser_PL0 : GPBParser -{ - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//SymbolConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum SymbolConstants : int -{ - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTEND = 3, // (Comment End) - SYMBOL_COMMENTLINE = 4, // (Comment Line) - SYMBOL_COMMENTSTART = 5, // (Comment Start) - SYMBOL_TKASSIGN = 6, // 'tkAssign' - SYMBOL_TKBEGIN = 7, // 'tkBegin' - SYMBOL_TKCALL = 8, // 'tkCall' - SYMBOL_TKCOMMA = 9, // 'tkComma' - SYMBOL_TKCONST = 10, // 'tkConst' - SYMBOL_TKDO = 11, // 'tkDo' - SYMBOL_TKDOT = 12, // 'tkDot' - SYMBOL_TKEND = 13, // 'tkEnd' - SYMBOL_TKEQUAL = 14, // 'tkEqual' - SYMBOL_TKGREATER = 15, // 'tkGreater' - SYMBOL_TKGREATEREQUAL = 16, // 'tkGreaterEqual' - SYMBOL_TKIDENT = 17, // 'tkIdent' - SYMBOL_TKIF = 18, // 'tkIf' - SYMBOL_TKLOWER = 19, // 'tkLower' - SYMBOL_TKLOWEREQUAL = 20, // 'tkLowerEqual' - SYMBOL_TKMINUS = 21, // 'tkMinus' - SYMBOL_TKNOTEQUAL = 22, // 'tkNotEqual' - SYMBOL_TKNUMBER = 23, // 'tkNumber' - SYMBOL_TKODD = 24, // 'tkOdd' - SYMBOL_TKPLUS = 25, // 'tkPlus' - SYMBOL_TKPROCEDURE = 26, // 'tkProcedure' - SYMBOL_TKREADLN = 27, // 'tkReadln' - SYMBOL_TKROUNDCLOSE = 28, // 'tkRoundClose' - SYMBOL_TKROUNDOPEN = 29, // 'tkRoundOpen' - SYMBOL_TKSEMICOLON = 30, // 'tkSemiColon' - SYMBOL_TKSLASH = 31, // 'tkSlash' - SYMBOL_TKSTAR = 32, // 'tkStar' - SYMBOL_TKTHEN = 33, // 'tkThen' - SYMBOL_TKVAR = 34, // 'tkVar' - SYMBOL_TKWHILE = 35, // 'tkWhile' - SYMBOL_TKWRITELN = 36, // 'tkWriteln' - SYMBOL_ADDOP = 37, // - SYMBOL_BLOCK = 38, // - SYMBOL_COMPOUND_STATEMENT = 39, // - SYMBOL_CONSTANTS = 40, // - SYMBOL_CONSTDECL = 41, // - SYMBOL_CONSTDEF = 42, // - SYMBOL_DECLARATION = 43, // - SYMBOL_DECLARATIONS = 44, // - SYMBOL_EMPTY = 45, // - SYMBOL_EXPR_LIST = 46, // - SYMBOL_EXPRESSION = 47, // - SYMBOL_FACTOR = 48, // - SYMBOL_MULOP = 49, // - SYMBOL_OPT_DECLARATIONS = 50, // - SYMBOL_OPT_PARAMS_LIST = 51, // - SYMBOL_PROC_DECL = 52, // - SYMBOL_PROGRAM = 53, // - SYMBOL_RELOP = 54, // - SYMBOL_SIMPLE_EXPR = 55, // - SYMBOL_STATEMENT = 56, // - SYMBOL_TERM = 57, // - SYMBOL_VARDECLS = 58, // - SYMBOL_VARIABLES = 59 // -}; - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//RuleConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum RuleConstants : int -{ - RULE_PROGRAM_TKDOT = 0, // ::= 'tkDot' - RULE_BLOCK = 1, // ::= - RULE_OPT_DECLARATIONS = 2, // ::= - RULE_OPT_DECLARATIONS2 = 3, // ::= - RULE_DECLARATIONS = 4, // ::= - RULE_DECLARATIONS2 = 5, // ::= - RULE_DECLARATION = 6, // ::= - RULE_DECLARATION2 = 7, // ::= - RULE_DECLARATION3 = 8, // ::= - RULE_CONSTANTS_TKCONST_TKSEMICOLON = 9, // ::= 'tkConst' 'tkSemiColon' - RULE_CONSTDECL = 10, // ::= - RULE_CONSTDECL_TKCOMMA = 11, // ::= 'tkComma' - RULE_CONSTDEF_TKIDENT_TKEQUAL_TKNUMBER = 12, // ::= 'tkIdent' 'tkEqual' 'tkNumber' - RULE_VARIABLES_TKVAR_TKSEMICOLON = 13, // ::= 'tkVar' 'tkSemiColon' - RULE_VARDECLS_TKIDENT = 14, // ::= 'tkIdent' - RULE_VARDECLS_TKCOMMA_TKIDENT = 15, // ::= 'tkComma' 'tkIdent' - RULE_PROC_DECL_TKPROCEDURE_TKIDENT_TKSEMICOLON_TKSEMICOLON = 16, // ::= 'tkProcedure' 'tkIdent' 'tkSemiColon' 'tkSemiColon' - RULE_STATEMENT_TKIDENT_TKASSIGN = 17, // ::= 'tkIdent' 'tkAssign' - RULE_STATEMENT_TKCALL_TKIDENT = 18, // ::= 'tkCall' 'tkIdent' - RULE_STATEMENT_TKWRITELN = 19, // ::= 'tkWriteln' - RULE_STATEMENT_TKREADLN_TKIDENT = 20, // ::= 'tkReadln' 'tkIdent' - RULE_STATEMENT_TKBEGIN_TKEND = 21, // ::= 'tkBegin' 'tkEnd' - RULE_STATEMENT_TKIF_TKTHEN = 22, // ::= 'tkIf' 'tkThen' - RULE_STATEMENT_TKWHILE_TKDO = 23, // ::= 'tkWhile' 'tkDo' - RULE_STATEMENT = 24, // ::= - RULE_OPT_PARAMS_LIST_TKROUNDOPEN_TKROUNDCLOSE = 25, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_OPT_PARAMS_LIST = 26, // ::= - RULE_EXPR_LIST = 27, // ::= - RULE_EXPR_LIST_TKCOMMA = 28, // ::= 'tkComma' - RULE_COMPOUND_STATEMENT = 29, // ::= - RULE_COMPOUND_STATEMENT_TKSEMICOLON = 30, // ::= 'tkSemiColon' - RULE_EXPRESSION_TKODD = 31, // ::= 'tkOdd' - RULE_EXPRESSION = 32, // ::= - RULE_SIMPLE_EXPR = 33, // ::= - RULE_SIMPLE_EXPR2 = 34, // ::= - RULE_TERM = 35, // ::= - RULE_TERM2 = 36, // ::= - RULE_FACTOR_TKIDENT = 37, // ::= 'tkIdent' - RULE_FACTOR_TKNUMBER = 38, // ::= 'tkNumber' - RULE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE = 39, // ::= 'tkRoundOpen' 'tkRoundClose' - RULE_RELOP_TKEQUAL = 40, // ::= 'tkEqual' - RULE_RELOP_TKNOTEQUAL = 41, // ::= 'tkNotEqual' - RULE_RELOP_TKLOWER = 42, // ::= 'tkLower' - RULE_RELOP_TKLOWEREQUAL = 43, // ::= 'tkLowerEqual' - RULE_RELOP_TKGREATER = 44, // ::= 'tkGreater' - RULE_RELOP_TKGREATEREQUAL = 45, // ::= 'tkGreaterEqual' - RULE_ADDOP_TKPLUS = 46, // ::= 'tkPlus' - RULE_ADDOP_TKMINUS = 47, // ::= 'tkMinus' - RULE_MULOP_TKSTAR = 48, // ::= 'tkStar' - RULE_MULOP_TKSLASH = 49, // ::= 'tkSlash' - RULE_EMPTY = 50 // ::= -}; - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -private Object CreateTerminalObject(int TokenSymbolIndex) -{ -switch (TokenSymbolIndex) -{ - case (int)SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - //TERMINAL:Whitespace - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMMENTEND : - //(Comment End) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment End' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTLINE : - //(Comment Line) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Line' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTSTART : - //(Comment Start) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Start' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKASSIGN : - //'tkAssign' - - { - op_type_node _op_type_node=new op_type_node(Operators.Assignment); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKBEGIN : - //'tkBegin' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCALL : - //'tkCall' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCOMMA : - //'tkComma' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCONST : - //'tkConst' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDO : - //'tkDo' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDOT : - //'tkDot' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEND : - //'tkEnd' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEQUAL : - //'tkEqual' - - { - op_type_node _op_type_node=new op_type_node(Operators.Equal); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKGREATER : - //'tkGreater' - - { - op_type_node _op_type_node=new op_type_node(Operators.Greater); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKGREATEREQUAL : - //'tkGreaterEqual' - - { - op_type_node _op_type_node=new op_type_node(Operators.GreaterEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKIDENT : - //'tkIdent' -return parsertools.create_ident(this); - case (int)SymbolConstants.SYMBOL_TKIF : - //'tkIf' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKLOWER : - //'tkLower' - - { - op_type_node _op_type_node=new op_type_node(Operators.Less); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKLOWEREQUAL : - //'tkLowerEqual' - - { - op_type_node _op_type_node=new op_type_node(Operators.LessEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMINUS : - //'tkMinus' - - { - op_type_node _op_type_node=new op_type_node(Operators.Minus); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNOTEQUAL : - //'tkNotEqual' - - { - op_type_node _op_type_node=new op_type_node(Operators.NotEqual); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNUMBER : - //'tkNumber' -return parsertools.create_int_const(this); - case (int)SymbolConstants.SYMBOL_TKODD : - //'tkOdd' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKPLUS : - //'tkPlus' - - { - op_type_node _op_type_node=new op_type_node(Operators.Plus); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKPROCEDURE : - //'tkProcedure' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKREADLN : - //'tkReadln' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKROUNDCLOSE : - //'tkRoundClose' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKROUNDOPEN : - //'tkRoundOpen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSEMICOLON : - //'tkSemiColon' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSLASH : - //'tkSlash' - - { - op_type_node _op_type_node=new op_type_node(Operators.IntegerDivision); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSTAR : - //'tkStar' - - { - op_type_node _op_type_node=new op_type_node(Operators.Multiplication); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKTHEN : - //'tkThen' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKVAR : - //'tkVar' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKWHILE : - //'tkWhile' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKWRITELN : - //'tkWriteln' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_ADDOP : - // - //TERMINAL:addop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BLOCK : - // - //TERMINAL:block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMPOUND_STATEMENT : - // - //TERMINAL:compound_statement - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONSTANTS : - // - //TERMINAL:constants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONSTDECL : - // - //TERMINAL:constdecl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONSTDEF : - // - //TERMINAL:constdef - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DECLARATION : - // - //TERMINAL:declaration - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DECLARATIONS : - // - //TERMINAL:declarations - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EMPTY : - // - //TERMINAL:empty - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR_LIST : - // - //TERMINAL:expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPRESSION : - // - //TERMINAL:expression - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FACTOR : - // - //TERMINAL:factor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULOP : - // - //TERMINAL:mulop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_DECLARATIONS : - // - //TERMINAL:opt_declarations - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_PARAMS_LIST : - // - //TERMINAL:opt_params_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_DECL : - // - //TERMINAL:proc_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM : - // - //TERMINAL:program - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RELOP : - // - //TERMINAL:relop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_EXPR : - // - //TERMINAL:simple_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STATEMENT : - // - //TERMINAL:statement - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TERM : - // - //TERMINAL:term - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARDECLS : - // - //TERMINAL:vardecls - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLES : - // - //TERMINAL:variables - return null; - //ENDTERMINAL -} -throw new SymbolException("Unknown symbol"); -} - - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateNonTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public Object CreateNonTerminalObject(int ReductionRuleIndex) -{ -switch (ReductionRuleIndex) -{ - case (int)RuleConstants.RULE_PROGRAM_TKDOT : - // ::= 'tkDot' - - { - program_module _program_module=new program_module(null,null,(block)LRParser.GetReductionSyntaxNode(0),null); - - _program_module.Language = LanguageId.PascalABCNET; - parsertools.create_source_context(_program_module,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),LRParser.GetReductionSyntaxNode(1)); - return _program_module; - } - - case (int)RuleConstants.RULE_BLOCK : - // ::= - - { - block _block=new block((declarations)LRParser.GetReductionSyntaxNode(0),null); - - statement_list sl=null; - if(LRParser.GetReductionSyntaxNode(1) is statement_list) - sl = LRParser.GetReductionSyntaxNode(1) as statement_list; - else - { - sl = new statement_list(); - sl.subnodes.Add(LRParser.GetReductionSyntaxNode(1) as statement); - if(!(LRParser.GetReductionSyntaxNode(1) is empty_statement)) - parsertools.assign_source_context(sl,LRParser.GetReductionSyntaxNode(1)); - } - _block.program_code=sl; - if(!(LRParser.GetReductionSyntaxNode(1) is empty_statement)) - parsertools.create_source_context(_block,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _block; - } - - case (int)RuleConstants.RULE_OPT_DECLARATIONS : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_DECLARATIONS2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_DECLARATIONS : - // ::= - - //TemplateList for declarations (create) - { - declarations _declarations=new declarations(); - _declarations.source_context=((declaration)LRParser.GetReductionSyntaxNode(0)).source_context; - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(0)); - return _declarations; - } - - case (int)RuleConstants.RULE_DECLARATIONS2 : - // ::= - - //TemplateList for declarations (add) - { - declarations _declarations=(declarations)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_declarations,_declarations,LRParser.GetReductionSyntaxNode(2)); - _declarations.defs.Add(LRParser.GetReductionSyntaxNode(2) as declaration); - return _declarations; - } - - case (int)RuleConstants.RULE_DECLARATION : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_DECLARATION2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_DECLARATION3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONSTANTS_TKCONST_TKSEMICOLON : - // ::= 'tkConst' 'tkSemiColon' - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_CONSTDECL : - // ::= - - //TemplateList for consts_definitions_list (create) - { - consts_definitions_list _consts_definitions_list=new consts_definitions_list(); - _consts_definitions_list.source_context=((const_definition)LRParser.GetReductionSyntaxNode(0)).source_context; - _consts_definitions_list.const_defs.Add((const_definition)LRParser.GetReductionSyntaxNode(0)); - return _consts_definitions_list; - } - - case (int)RuleConstants.RULE_CONSTDECL_TKCOMMA : - // ::= 'tkComma' - - //TemplateList for consts_definitions_list (add) - { - consts_definitions_list _consts_definitions_list=(consts_definitions_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_consts_definitions_list,_consts_definitions_list,LRParser.GetReductionSyntaxNode(2)); - _consts_definitions_list.const_defs.Add(LRParser.GetReductionSyntaxNode(2) as const_definition); - return _consts_definitions_list; - } - - case (int)RuleConstants.RULE_CONSTDEF_TKIDENT_TKEQUAL_TKNUMBER : - // ::= 'tkIdent' 'tkEqual' 'tkNumber' - - { - simple_const_definition _simple_const_definition=new simple_const_definition(); - - _simple_const_definition.const_name=(ident)LRParser.GetReductionSyntaxNode(0); - _simple_const_definition.const_value=(expression)LRParser.GetReductionSyntaxNode(2); - parsertools.create_source_context(_simple_const_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _simple_const_definition; - } - - case (int)RuleConstants.RULE_VARIABLES_TKVAR_TKSEMICOLON : - // ::= 'tkVar' 'tkSemiColon' - - { - variable_definitions _variable_definitions=new variable_definitions(); - - //var_def_statement vdf = new var_def_statement((ident_list)LRParser.GetReductionSyntaxNode(1),null,new int32_const(0),definition_attribute.None,false); - foreach (ident id in ((ident_list)LRParser.GetReductionSyntaxNode(1)).idents) - { - ident_list idl=new ident_list(); - idl.idents.Add(id); - parsertools.create_source_context(idl,id,id); - var_def_statement vdf = new var_def_statement(idl,null,new int32_const(0),definition_attribute.None,false); - parsertools.create_source_context(vdf,id,id); - _variable_definitions.var_definitions.Add(vdf); - } - parsertools.create_source_context(_variable_definitions,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _variable_definitions; - } - - case (int)RuleConstants.RULE_VARDECLS_TKIDENT : - // ::= 'tkIdent' - - //TemplateList for ident_list (create) - { - ident_list _ident_list=new ident_list(); - _ident_list.source_context=((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _ident_list; - } - - case (int)RuleConstants.RULE_VARDECLS_TKCOMMA_TKIDENT : - // ::= 'tkComma' 'tkIdent' - - //TemplateList for ident_list (add) - { - ident_list _ident_list=(ident_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_ident_list,_ident_list,LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(2) as ident); - return _ident_list; - } - - case (int)RuleConstants.RULE_PROC_DECL_TKPROCEDURE_TKIDENT_TKSEMICOLON_TKSEMICOLON : - // ::= 'tkProcedure' 'tkIdent' 'tkSemiColon' 'tkSemiColon' - - method_name mn = new method_name(null,(ident)LRParser.GetReductionSyntaxNode(1),null); - procedure_header ph = new procedure_header(null,null,mn,false,false,null,null); - procedure_definition pd = new procedure_definition(ph,(block)LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(mn,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(pd,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - return pd; - case (int)RuleConstants.RULE_STATEMENT_TKIDENT_TKASSIGN : - // ::= 'tkIdent' 'tkAssign' - - { - assign _assign=new assign(LRParser.GetReductionSyntaxNode(0) as addressed_value,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_assign,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _assign; - } - - case (int)RuleConstants.RULE_STATEMENT_TKCALL_TKIDENT : - // ::= 'tkCall' 'tkIdent' - - { - procedure_call _procedure_call=new procedure_call(); - - method_call mc = new method_call(LRParser.GetReductionSyntaxNode(2) as expression_list); - mc.dereferencing_value=(addressed_value)LRParser.GetReductionSyntaxNode(1); - parsertools.create_source_context(mc,LRParser.GetReductionSyntaxNode(1),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - _procedure_call.func_name = mc; - parsertools.create_source_context(_procedure_call,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - return _procedure_call; - } - - case (int)RuleConstants.RULE_STATEMENT_TKWRITELN : - // ::= 'tkWriteln' - -{ - procedure_call pc = new procedure_call(); - expression_list expr = new expression_list(); - expr.expressions.Add((expression)LRParser.GetReductionSyntaxNode(1)); - method_call mc = new method_call(expr); - mc.dereferencing_value = new ident("writeln"); - pc.func_name = mc; - parsertools.create_source_context(mc.dereferencing_value,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(expr,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(mc,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(pc,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return pc; -} - - case (int)RuleConstants.RULE_STATEMENT_TKREADLN_TKIDENT : - // ::= 'tkReadln' 'tkIdent' - -{ - procedure_call pc = new procedure_call(); - expression_list expr = new expression_list(); - expr.expressions.Add((expression)LRParser.GetReductionSyntaxNode(1)); - method_call mc = new method_call(expr); - mc.dereferencing_value = new ident("readln"); - pc.func_name = mc; - parsertools.create_source_context(mc.dereferencing_value,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(expr,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(mc,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(pc,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return pc; -} - - case (int)RuleConstants.RULE_STATEMENT_TKBEGIN_TKEND : - // ::= 'tkBegin' 'tkEnd' -parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).right_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(2); - return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_STATEMENT_TKIF_TKTHEN : - // ::= 'tkIf' 'tkThen' - - { - if_node _if_node=new if_node((expression)LRParser.GetReductionSyntaxNode(1),(statement)LRParser.GetReductionSyntaxNode(3),null); - - parsertools.create_source_context(_if_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - return _if_node; - } - - case (int)RuleConstants.RULE_STATEMENT_TKWHILE_TKDO : - // ::= 'tkWhile' 'tkDo' - - { - while_node _while_node=new while_node((expression)LRParser.GetReductionSyntaxNode(1),(statement)LRParser.GetReductionSyntaxNode(3),WhileCycleType.While); - - parsertools.create_source_context(_while_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - return _while_node; - } - - case (int)RuleConstants.RULE_STATEMENT : - // ::= - - { - empty_statement _empty_statement=new empty_statement(); - - return _empty_statement; - } - - case (int)RuleConstants.RULE_OPT_PARAMS_LIST_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_OPT_PARAMS_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPR_LIST : - // ::= - - //TemplateList for expression_list (create) - { - expression_list _expression_list=new expression_list(); - _expression_list.source_context=((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - return _expression_list; - } - - case (int)RuleConstants.RULE_EXPR_LIST_TKCOMMA : - // ::= 'tkComma' - - //TemplateList for expression_list (add) - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return _expression_list; - } - - case (int)RuleConstants.RULE_COMPOUND_STATEMENT : - // ::= - - { - statement_list _statement_list=new statement_list(); - - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_statement_list,LRParser.GetReductionSyntaxNode(0)); - return _statement_list; - } - - case (int)RuleConstants.RULE_COMPOUND_STATEMENT_TKSEMICOLON : - // ::= 'tkSemiColon' - - { - statement_list _statement_list; - _statement_list=(statement_list)LRParser.GetReductionSyntaxNode(0); - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_statement_list,_statement_list,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - return _statement_list; - } - - case (int)RuleConstants.RULE_EXPRESSION_TKODD : - // ::= 'tkOdd' - - { - bin_expr _bin_expr=new bin_expr(new bin_expr((expression)LRParser.GetReductionSyntaxNode(1), new int32_const(2), Operators.ModulusRemainder),new int32_const(0),Operators.Equal); - - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _bin_expr; - } - - case (int)RuleConstants.RULE_EXPRESSION : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_SIMPLE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_TERM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TERM2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_FACTOR_TKIDENT : - // ::= 'tkIdent' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FACTOR_TKNUMBER : - // ::= 'tkNumber' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= 'tkRoundOpen' 'tkRoundClose' - return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_RELOP_TKEQUAL : - // ::= 'tkEqual' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKNOTEQUAL : - // ::= 'tkNotEqual' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKLOWER : - // ::= 'tkLower' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKLOWEREQUAL : - // ::= 'tkLowerEqual' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKGREATER : - // ::= 'tkGreater' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKGREATEREQUAL : - // ::= 'tkGreaterEqual' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKPLUS : - // ::= 'tkPlus' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKMINUS : - // ::= 'tkMinus' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKSTAR : - // ::= 'tkStar' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKSLASH : - // ::= 'tkSlash' -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EMPTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL -} -throw new RuleException("Unknown rule"); -} - - - - - - -} -} diff --git a/Parsers/PL0Parser/Parser.cs b/Parsers/PL0Parser/Parser.cs deleted file mode 100644 index 1915280b0..000000000 --- a/Parsers/PL0Parser/Parser.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System; -using System.IO; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Parsers; -using System.Resources; -using System.Reflection; -using PascalABCCompiler.Errors; -using System.Collections.Generic; - - -namespace PascalABCCompiler.PL0Parser -{ - - public class PL0LanguageParser:IParser - { - GPBParser_PL0 parser; - - public PL0LanguageParser() - { - filesExtensions = new string[1]; - filesExtensions[0] = ".pl0"; - } - - string[] filesExtensions; - public string[] FilesExtensions - { - get - { - return filesExtensions; - } - } - - ILanguageInformation languageInformation; - public ILanguageInformation LanguageInformation { - get { - if (languageInformation == null) - languageInformation = new DefaultLanguageInformation(this); - return languageInformation; - } - } - - Keyword[] _keywords; - void initKeywords() - { - List key_words = new List(); - key_words.Add(new Keyword("CONST")); - key_words.Add(new Keyword("VAR", KeywordKind.Var)); - key_words.Add(new Keyword("CALL")); - key_words.Add(new Keyword("BEGIN")); - key_words.Add(new Keyword("END")); - key_words.Add(new Keyword("IF")); - key_words.Add(new Keyword("THEN")); - key_words.Add(new Keyword("WHILE")); - key_words.Add(new Keyword("DO")); - key_words.Add(new Keyword("PROCEDURE", KeywordKind.Function)); - key_words.Add(new Keyword("ODD")); - _keywords = key_words.ToArray(); - } - public Keyword[] Keywords - { - get - { - return _keywords; - } - } - - public void Reset() - { - parser = new GPBParser_PL0(CGTResourceExtractor.Extract(new ResourceManager("PL0Parser.PL0Lang", Assembly.GetExecutingAssembly()), "PL0Language")); - parser.max_errors = 30; - } - - public bool CaseSensitive - { - get - { - return parser.LanguageGrammar.CaseSensitive; - } - } - - SourceFilesProviderDelegate sourceFilesProvider = null; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - public List CompilerDirectives - { - get - { - return new List(); - } - } - - List errors = new List(); - public List Errors - { - get - { - return errors; - } - set - { - errors = value; - } - } - public syntax_tree_node BuildTree(string FileName, string Text, string[] SearchPatchs, ParseMode ParseMode) - { - if (parser == null) - Reset(); - parser.errors = Errors; - parser.current_file_name = FileName; - parser.parsertools.LineCorrection = 0; - syntax_tree_node cu = null; - switch (ParseMode) - { - case ParseMode.Normal: - cu = (syntax_tree_node)parser.Parse(Text); - break; - case ParseMode.Expression: - case ParseMode.Statement: - return null; - } - if (cu != null && cu is compilation_unit) - { - (cu as compilation_unit).file_name = FileName; - (cu as compilation_unit).compiler_directives = CompilerDirectives; - } - return cu; - } - - public string Name - { - get - { - return "PL/0"; - } - } - public string Version - { - get - { - return "1.0"; - } - } - public string Copyright - { - get - { - return "(c) Òêà÷óê À.Â., 2007"; - } - } - - public override string ToString() - { - return "PL/0 Language Parser v1.0"; - } - public IPreprocessor Preprocessor - { - get - { - return null; - } - } - - } - - - -} diff --git a/Parsers/PL0Parser/Properties/AssemblyInfo.cs b/Parsers/PL0Parser/Properties/AssemblyInfo.cs deleted file mode 100644 index f1f179423..000000000 --- a/Parsers/PL0Parser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("PL0Parser")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("DSS")] -[assembly: AssemblyProduct("PascalABCParser")] -[assembly: AssemblyCopyright("Copyright © DSS 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e5788e70-934b-42a9-a652-255b64cf1709")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("1.0.*")] diff --git a/Parsers/PascalABCParser/CodeFormatting/CommentBinder.cs b/Parsers/PascalABCParser/CodeFormatting/CommentBinder.cs deleted file mode 100644 index ec3a7132e..000000000 --- a/Parsers/PascalABCParser/CodeFormatting/CommentBinder.cs +++ /dev/null @@ -1,1259 +0,0 @@ -using System; -using System.IO; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Parsers; -using System.Resources; -using System.Reflection; -using System.Collections.Generic; -using System.Text; - -namespace PascalABCCompiler.PascalABCParser -{ - public class CommentInfo - { - public string before; - public string after; - } - - public class CommentBinder : IVisitor - { - private string Text=null; - private Dictionary comment_table = new Dictionary(); - - public Dictionary Bind(compilation_unit cu, string Text) - { - return null; - } - - private string GetCommentsBefore(int pos) - { - StringBuilder sb = new StringBuilder(); - StringBuilder tmp = new StringBuilder(); - while (pos >= 0) - { - if (char.IsWhiteSpace(Text[pos])) - { - tmp.Insert(0, Text[pos]); - pos--; - } - else if (Text[pos] == '}') - { - sb.Append(tmp.ToString()); - while (pos >= 0 && Text[pos] != '{') - { - sb.Insert(0, Text[pos]); - pos--; - } - } - else - break; - } - if (sb.Length > 0) - return sb.ToString(); - else - return null; - } - - private string GetCommentsAfter(int pos) - { - StringBuilder sb = new StringBuilder(); - StringBuilder tmp = new StringBuilder(); - while (pos >= 0) - { - if (char.IsWhiteSpace(Text[pos])) - { - tmp.Append(Text[pos]); - pos++; - } - else if (Text[pos] == '}') - { - sb.Append(tmp.ToString()); - while (pos >= 0 && Text[pos] != '{') - { - sb.Append(Text[pos]); - pos++; - } - } - else - break; - } - if (sb.Length > 0) - return sb.ToString(); - else - return null; - } - - private void AddPossibleComments(syntax_tree_node sn, bool search_before, bool search_after) - { - string before = null; - if (search_before) - before = GetCommentsBefore(sn.source_context.Position - 1); - string after = null; - if (search_after) - after = GetCommentsAfter(sn.source_context.Position + sn.source_context.Length); - if (before != null || after != null) - { - comment_table.Add(sn, new string[] { before, after }); - } - } - - #region IVisitor Member - - public void visit(syntax_tree_node _syntax_tree_node) - { - throw new NotImplementedException(); - } - - private bool is_begin(statement_list sl) - { - return (sl.left_logical_bracket != null && sl.left_logical_bracket is token_info - && (sl.left_logical_bracket as token_info).text.ToLower() == "begin"); - } - - public void visit(statement_list _statement_list) - { - if (is_begin(_statement_list)) - AddPossibleComments(_statement_list, true, false); - foreach (statement stmt in _statement_list.subnodes) - stmt.visit(this); - } - - public void visit(expression _expression) - { - throw new NotImplementedException(); - } - - public void visit(assign _assign) - { - _assign.to.visit(this); - _assign.from.visit(this); - } - - public void visit(bin_expr _bin_expr) - { - _bin_expr.left.visit(this); - _bin_expr.right.visit(this); - } - - public void visit(un_expr _un_expr) - { - _un_expr.subnode.visit(this); - } - - public void visit(const_node _const_node) - { - throw new NotImplementedException(); - } - - public void visit(bool_const _bool_const) - { - AddPossibleComments(_bool_const, true, true); - } - - public void visit(int32_const _int32_const) - { - AddPossibleComments(_int32_const, true, true); - } - - public void visit(double_const _double_const) - { - AddPossibleComments(_double_const, true, true); - } - - public void visit(statement _statement) - { - throw new NotImplementedException(); - } - - public void visit(subprogram_body _subprogram_body) - { - throw new NotImplementedException(); - } - - public void visit(ident _ident) - { - AddPossibleComments(_ident, true, true); - } - - public void visit(addressed_value _addressed_value) - { - throw new NotImplementedException(); - } - - public void visit(type_definition _type_definition) - { - throw new NotImplementedException(); - } - - public void visit(named_type_reference _named_type_reference) - { - foreach (ident id in _named_type_reference.names) - id.visit(this); - } - - public void visit(variable_definitions _variable_definitions) - { - AddPossibleComments(_variable_definitions,true,false); - foreach (var_def_statement vds in _variable_definitions.var_definitions) - vds.visit(this); - } - - public void visit(ident_list _ident_list) - { - foreach (ident id in _ident_list.idents) - id.visit(this); - } - - public void visit(var_def_statement _var_def_statement) - { - if (_var_def_statement.is_event) - AddPossibleComments(_var_def_statement, true, false); - _var_def_statement.vars.visit(this); - if (_var_def_statement.vars_type != null) - _var_def_statement.vars_type.visit(this); - if (_var_def_statement.inital_value != null) - _var_def_statement.inital_value.visit(this); - } - - public void visit(declaration _declaration) - { - throw new NotImplementedException(); - } - - public void visit(declarations _declarations) - { - foreach (declaration decl in _declarations.defs) - decl.visit(this); - } - - public void visit(program_tree _program_tree) - { - throw new NotImplementedException(); - } - - public void visit(program_name _program_name) - { - AddPossibleComments(_program_name, true, false); - _program_name.prog_name.visit(this); - } - - public void visit(string_const _string_const) - { - AddPossibleComments(_string_const, true, true); - } - - public void visit(expression_list _expression_list) - { - foreach (expression ex in _expression_list.expressions) - ex.visit(this); - } - - public void visit(dereference _dereference) - { - throw new NotImplementedException(); - } - - public void visit(roof_dereference _roof_dereference) - { - _roof_dereference.dereferencing_value.visit(this); - AddPossibleComments(_roof_dereference, false, true); - } - - public void visit(indexer _indexer) - { - _indexer.dereferencing_value.visit(this); - _indexer.indexes.visit(this); - } - - public void visit(for_node _for_node) - { - AddPossibleComments(_for_node, true, false); - _for_node.loop_variable.visit(this); - if (_for_node.type_name != null) - _for_node.type_name.visit(this); - _for_node.initial_value.visit(this); - _for_node.finish_value.visit(this); - _for_node.statements.visit(this); - } - - public void visit(repeat_node _repeat_node) - { - AddPossibleComments(_repeat_node, true, false); - _repeat_node.statements.visit(this); - _repeat_node.expr.visit(this); - } - - public void visit(while_node _while_node) - { - AddPossibleComments(_while_node, true, false); - _while_node.expr.visit(this); - _while_node.statements.visit(this); - } - - public void visit(if_node _if_node) - { - AddPossibleComments(_if_node, true, false); - _if_node.condition.visit(this); - _if_node.then_body.visit(this); - if (_if_node.else_body != null) - _if_node.else_body.visit(this); - } - - public void visit(ref_type _ref_type) - { - AddPossibleComments(_ref_type, true, false); - _ref_type.pointed_to.visit(this); - } - - public void visit(diapason _diapason) - { - _diapason.left.visit(this); - _diapason.right.visit(this); - } - - public void visit(indexers_types _indexers_types) - { - foreach (type_definition td in _indexers_types.indexers) - if (td != null) - td.visit(this); - } - - public void visit(array_type _array_type) - { - AddPossibleComments(_array_type, true, false); - if (_array_type.indexers != null) - _array_type.indexers.visit(this); - _array_type.elemets_types.visit(this); - } - - public void visit(label_definitions _label_definitions) - { - AddPossibleComments(_label_definitions, true, false); - _label_definitions.labels.visit(this); - } - - public void visit(procedure_attribute _procedure_attribute) - { - if (_procedure_attribute.source_context != null) - AddPossibleComments(_procedure_attribute, true, true); - } - - public void visit(typed_parametres _typed_parametres) - { - if (_typed_parametres.param_kind != parametr_kind.none) - AddPossibleComments(_typed_parametres, true, false); - _typed_parametres.idents.visit(this); - _typed_parametres.vars_type.visit(this); - if (_typed_parametres.inital_value != null) - _typed_parametres.inital_value.visit(this); - } - - public void visit(formal_parametres _formal_parametres) - { - foreach (typed_parametres tp in _formal_parametres.params_list) - tp.visit(this); - } - - public void visit(procedure_attributes_list _procedure_attributes_list) - { - foreach (procedure_attribute pa in _procedure_attributes_list.proc_attributes) - pa.visit(this); - } - - public void visit(procedure_header _procedure_header) - { - AddPossibleComments(_procedure_header, true, false); - _procedure_header.name.visit(this); - if (_procedure_header.parametres != null) - _procedure_header.parametres.visit(this); - if (_procedure_header.proc_attributes != null) - _procedure_header.proc_attributes.visit(this); - if (_procedure_header.where_defs != null) - _procedure_header.where_defs.visit(this); - } - - public void visit(function_header _function_header) - { - AddPossibleComments(_function_header, true, false); - _function_header.name.visit(this); - if (_function_header.parametres != null) - _function_header.parametres.visit(this); - _function_header.return_type.visit(this); - if (_function_header.proc_attributes != null) - _function_header.proc_attributes.visit(this); - if (_function_header.where_defs != null) - _function_header.where_defs.visit(this); - } - - public void visit(procedure_definition _procedure_definition) - { - _procedure_definition.proc_header.visit(this); - _procedure_definition.proc_body.visit(this); - } - - public void visit(type_declaration _type_declaration) - { - if (_type_declaration.attributes != null) - _type_declaration.attributes.visit(this); - _type_declaration.type_name.visit(this); - _type_declaration.type_def.visit(this); - } - - public void visit(type_declarations _type_declarations) - { - AddPossibleComments(_type_declarations, true, false); - foreach (type_declaration td in _type_declarations.types_decl) - td.visit(this); - } - - public void visit(simple_const_definition _simple_const_definition) - { - _simple_const_definition.const_name.visit(this); - _simple_const_definition.const_value.visit(this); - } - - public void visit(typed_const_definition _typed_const_definition) - { - _typed_const_definition.const_name.visit(this); - _typed_const_definition.const_type.visit(this); - _typed_const_definition.const_value.visit(this); - } - - public void visit(const_definition _const_definition) - { - throw new NotImplementedException(); - } - - public void visit(consts_definitions_list _consts_definitions_list) - { - AddPossibleComments(_consts_definitions_list, true, false); - foreach (const_definition cd in _consts_definitions_list.const_defs) - cd.visit(this); - } - - public void visit(unit_name _unit_name) - { - AddPossibleComments(_unit_name, true, false); - _unit_name.idunit_name.visit(this); - } - - public void visit(unit_or_namespace _unit_or_namespace) - { - _unit_or_namespace.name.visit(this); - } - - public void visit(uses_unit_in _uses_unit_in) - { - _uses_unit_in.name.visit(this); - _uses_unit_in.in_file.visit(this); - } - - public void visit(uses_list _uses_list) - { - AddPossibleComments(_uses_list,true,false); - foreach (unit_or_namespace un in _uses_list.units) - un.visit(this); - } - - public void visit(program_body _program_body) - { - throw new NotImplementedException(); - } - - public void visit(compilation_unit _compilation_unit) - { - throw new NotImplementedException(); - } - - public void visit(unit_module _unit_module) - { - _unit_module.unit_name.visit(this); - if (_unit_module.interface_part != null) - _unit_module.interface_part.visit(this); - if (_unit_module.implementation_part != null) - _unit_module.implementation_part.visit(this); - if (_unit_module.initialization_part != null) - _unit_module.initialization_part.visit(this); - if (_unit_module.finalization_part != null) - _unit_module.finalization_part.visit(this); - } - - public void visit(program_module _program_module) - { - if (_program_module.program_name != null) - _program_module.program_name.visit(this); - if (_program_module.used_units != null) - _program_module.used_units.visit(this); - _program_module.program_block.visit(this); - } - - public void visit(hex_constant _hex_constant) - { - AddPossibleComments(_hex_constant, true, true); - } - - public void visit(get_address _get_address) - { - AddPossibleComments(_get_address, true, true); - } - - public void visit(case_variant _case_variant) - { - throw new NotImplementedException(); - } - - public void visit(case_node _case_node) - { - throw new NotImplementedException(); - } - - public void visit(method_name _method_name) - { - if (_method_name.class_name != null) - _method_name.class_name.visit(this); - if (_method_name.explicit_interface_name != null) - _method_name.explicit_interface_name.visit(this); - if (_method_name.meth_name != null) - _method_name.meth_name.visit(this); - } - - public void visit(dot_node _dot_node) - { - _dot_node.left.visit(this); - _dot_node.right.visit(this); - } - - public void visit(empty_statement _empty_statement) - { - throw new NotImplementedException(); - } - - public void visit(goto_statement _goto_statement) - { - _goto_statement.label.visit(this); - } - - public void visit(labeled_statement _labeled_statement) - { - _labeled_statement.label_name.visit(this); - _labeled_statement.to_statement.visit(this); - } - - public void visit(with_statement _with_statement) - { - _with_statement.do_with.visit(this); - _with_statement.what_do.visit(this); - } - - public void visit(method_call _method_call) - { - _method_call.dereferencing_value.visit(this); - if (_method_call.parametres != null) - _method_call.parametres.visit(this); - } - - public void visit(pascal_set_constant _pascal_set_constant) - { - AddPossibleComments(_pascal_set_constant, true, true); - if (_pascal_set_constant.values != null) - _pascal_set_constant.values.visit(this); - } - - public void visit(array_const _array_const) - { - AddPossibleComments(_array_const, true, true); - _array_const.elements.visit(this); - } - - public void visit(write_accessor_name _write_accessor_name) - { - throw new NotImplementedException(); - } - - public void visit(read_accessor_name _read_accessor_name) - { - throw new NotImplementedException(); - } - - public void visit(property_accessors _property_accessors) - { - throw new NotImplementedException(); - } - - public void visit(simple_property _simple_property) - { - throw new NotImplementedException(); - } - - public void visit(index_property _index_property) - { - throw new NotImplementedException(); - } - - public void visit(class_members _class_members) - { - throw new NotImplementedException(); - } - - public void visit(access_modifer_node _access_modifer_node) - { - throw new NotImplementedException(); - } - - public void visit(class_body _class_body) - { - throw new NotImplementedException(); - } - - public void visit(class_definition _class_definition) - { - throw new NotImplementedException(); - } - - public void visit(default_indexer_property_node _default_indexer_property_node) - { - throw new NotImplementedException(); - } - - public void visit(known_type_definition _known_type_definition) - { - throw new NotImplementedException(); - } - - public void visit(set_type_definition _set_type_definition) - { - throw new NotImplementedException(); - } - - public void visit(try_statement _try_statement) - { - throw new NotImplementedException(); - } - - public void visit(on_exception _on_exception) - { - throw new NotImplementedException(); - } - - public void visit(on_exception_list _on_exception_list) - { - throw new NotImplementedException(); - } - - public void visit(try_finally_statement _try_finally_statement) - { - throw new NotImplementedException(); - } - - public void visit(try_except_statement _try_except_statement) - { - throw new NotImplementedException(); - } - - public void visit(record_const_definition _record_const_definition) - { - throw new NotImplementedException(); - } - - public void visit(record_const _record_const) - { - throw new NotImplementedException(); - } - - public void visit(record_type _record_type) - { - throw new NotImplementedException(); - } - - public void visit(enum_type_definition _enum_type_definition) - { - throw new NotImplementedException(); - } - - public void visit(char_const _char_const) - { - AddPossibleComments(_char_const, true, true); - } - - public void visit(raise_statement _raise_statement) - { - throw new NotImplementedException(); - } - - public void visit(sharp_char_const _sharp_char_const) - { - AddPossibleComments(_sharp_char_const, true, true); - } - - public void visit(literal_const_line _literal_const_line) - { - throw new NotImplementedException(); - } - - public void visit(string_num_definition _string_num_definition) - { - _string_num_definition.name.visit(this); - _string_num_definition.num_of_symbols.visit(this); - AddPossibleComments(_string_num_definition, false, true); - } - - public void visit(variant _variant) - { - throw new NotImplementedException(); - } - - public void visit(variant_list _variant_list) - { - throw new NotImplementedException(); - } - - public void visit(variant_type _variant_type) - { - throw new NotImplementedException(); - } - - public void visit(variant_types _variant_types) - { - throw new NotImplementedException(); - } - - public void visit(variant_record_type _variant_record_type) - { - throw new NotImplementedException(); - } - - public void visit(procedure_call _procedure_call) - { - throw new NotImplementedException(); - } - - public void visit(class_predefinition _class_predefinition) - { - throw new NotImplementedException(); - } - - public void visit(nil_const _nil_const) - { - AddPossibleComments(_nil_const, true, true); - } - - public void visit(file_type_definition _file_type_definition) - { - throw new NotImplementedException(); - } - - public void visit(constructor _constructor) - { - throw new NotImplementedException(); - } - - public void visit(destructor _destructor) - { - throw new NotImplementedException(); - } - - public void visit(inherited_method_call _inherited_method_call) - { - throw new NotImplementedException(); - } - - public void visit(typecast_node _typecast_node) - { - throw new NotImplementedException(); - } - - public void visit(interface_node _interface_node) - { - if (_interface_node.uses_modules != null) - _interface_node.uses_modules.visit(this); - if (_interface_node.interface_definitions != null) - _interface_node.interface_definitions.visit(this); - } - - public void visit(implementation_node _implementation_node) - { - if (_implementation_node.uses_modules != null) - _implementation_node.uses_modules.visit(this); - if (_implementation_node.implementation_definitions != null) - _implementation_node.implementation_definitions.visit(this); - } - - public void visit(diap_expr _diap_expr) - { - throw new NotImplementedException(); - } - - public void visit(block _block) - { - if (_block.defs != null) - _block.defs.visit(this); - if (_block.program_code != null) - _block.program_code.visit(this); - } - - public void visit(proc_block _proc_block) - { - throw new NotImplementedException(); - } - - public void visit(array_of_named_type_definition _array_of_named_type_definition) - { - throw new NotImplementedException(); - } - - public void visit(array_of_const_type_definition _array_of_const_type_definition) - { - throw new NotImplementedException(); - } - - public void visit(literal _literal) - { - AddPossibleComments(_literal, true, true); - } - - public void visit(case_variants _case_variants) - { - throw new NotImplementedException(); - } - - public void visit(diapason_expr _diapason_expr) - { - _diapason_expr.left.visit(this); - _diapason_expr.right.visit(this); - } - - public void visit(var_def_list _var_def_list) - { - throw new NotImplementedException(); - } - - public void visit(record_type_parts _record_type_parts) - { - throw new NotImplementedException(); - } - - public void visit(property_array_default _property_array_default) - { - throw new NotImplementedException(); - } - - public void visit(property_interface _property_interface) - { - throw new NotImplementedException(); - } - - public void visit(property_parameter _property_parameter) - { - throw new NotImplementedException(); - } - - public void visit(property_parameter_list _property_parameter_list) - { - throw new NotImplementedException(); - } - - public void visit(inherited_ident _inherited_ident) - { - throw new NotImplementedException(); - } - - public void visit(format_expr _format_expr) - { - _format_expr.expr.visit(this); - _format_expr.format1.visit(this); - if (_format_expr.format2 != null) - _format_expr.format2.visit(this); - } - - public void visit(initfinal_part _initfinal_part) - { - throw new NotImplementedException(); - } - - public void visit(token_info _token_info) - { - throw new NotImplementedException(); - } - - public void visit(raise_stmt _raise_stmt) - { - AddPossibleComments(_raise_stmt, true, false); - _raise_stmt.expr.visit(this); - } - - public void visit(op_type_node _op_type_node) - { - throw new NotImplementedException(); - } - - public void visit(file_type _file_type) - { - AddPossibleComments(_file_type, true, false); - if (_file_type.file_of_type != null) - _file_type.file_of_type.visit(this); - } - - public void visit(known_type_ident _known_type_ident) - { - throw new NotImplementedException(); - } - - public void visit(exception_handler _exception_handler) - { - throw new NotImplementedException(); - } - - public void visit(exception_ident _exception_ident) - { - throw new NotImplementedException(); - } - - public void visit(exception_handler_list _exception_handler_list) - { - throw new NotImplementedException(); - } - - public void visit(exception_block _exception_block) - { - throw new NotImplementedException(); - } - - public void visit(try_handler _try_handler) - { - throw new NotImplementedException(); - } - - public void visit(try_handler_finally _try_handler_finally) - { - throw new NotImplementedException(); - } - - public void visit(try_handler_except _try_handler_except) - { - throw new NotImplementedException(); - } - - public void visit(try_stmt _try_stmt) - { - AddPossibleComments(_try_stmt, true, false); - _try_stmt.stmt_list.visit(this); - _try_stmt.handler.visit(this); - } - - public void visit(inherited_message _inherited_message) - { - throw new NotImplementedException(); - } - - public void visit(external_directive _external_directive) - { - throw new NotImplementedException(); - } - - public void visit(using_list _using_list) - { - throw new NotImplementedException(); - } - - public void visit(oberon_import_module _oberon_import_module) - { - throw new NotImplementedException(); - } - - public void visit(oberon_module _oberon_module) - { - throw new NotImplementedException(); - } - - public void visit(oberon_ident_with_export_marker _oberon_ident_with_export_marker) - { - throw new NotImplementedException(); - } - - public void visit(oberon_exit_stmt _oberon_exit_stmt) - { - throw new NotImplementedException(); - } - - public void visit(jump_stmt _jump_stmt) - { - throw new NotImplementedException(); - } - - public void visit(oberon_procedure_receiver _oberon_procedure_receiver) - { - throw new NotImplementedException(); - } - - public void visit(oberon_procedure_header _oberon_procedure_header) - { - throw new NotImplementedException(); - } - - public void visit(oberon_withstmt_guardstat _oberon_withstmt_guardstat) - { - throw new NotImplementedException(); - } - - public void visit(oberon_withstmt_guardstat_list _oberon_withstmt_guardstat_list) - { - throw new NotImplementedException(); - } - - public void visit(oberon_withstmt _oberon_withstmt) - { - throw new NotImplementedException(); - } - - public void visit(loop_stmt _loop_stmt) - { - throw new NotImplementedException(); - } - - public void visit(foreach_stmt _foreach_stmt) - { - AddPossibleComments(_foreach_stmt, true, false); - _foreach_stmt.identifier.visit(this); - if (_foreach_stmt.type_name != null) - _foreach_stmt.type_name.visit(this); - _foreach_stmt.in_what.visit(this); - _foreach_stmt.stmt.visit(this); - } - - public void visit(addressed_value_funcname _addressed_value_funcname) - { - throw new NotImplementedException(); - } - - public void visit(named_type_reference_list _named_type_reference_list) - { - foreach (named_type_reference ntr in _named_type_reference_list.types) - ntr.visit(this); - } - - public void visit(template_param_list _template_param_list) - { - throw new NotImplementedException(); - } - - public void visit(template_type_reference _template_type_reference) - { - throw new NotImplementedException(); - } - - public void visit(int64_const _int64_const) - { - AddPossibleComments(_int64_const, true, true); - } - - public void visit(uint64_const _uint64_const) - { - AddPossibleComments(_uint64_const, true, true); - } - - public void visit(new_expr _new_expr) - { - AddPossibleComments(_new_expr, true, false); - _new_expr.type.visit(this); - if (_new_expr.params_list != null) - _new_expr.params_list.visit(this); - if (_new_expr.array_init_expr != null) - _new_expr.array_init_expr.visit(this); - } - - public void visit(type_definition_list _type_definition_list) - { - throw new NotImplementedException(); - } - - public void visit(where_definition _where_definition) - { - throw new NotImplementedException(); - } - - public void visit(where_definition_list _where_definition_list) - { - throw new NotImplementedException(); - } - - public void visit(sizeof_operator _sizeof_operator) - { - AddPossibleComments(_sizeof_operator, true, true); - if (_sizeof_operator.type_def != null) - _sizeof_operator.type_def.visit(this); - if (_sizeof_operator.expr != null) - _sizeof_operator.expr.visit(this); - } - - public void visit(typeof_operator _typeof_operator) - { - AddPossibleComments(_typeof_operator, true, true); - _typeof_operator.type_name.visit(this); - } - - public void visit(compiler_directive _compiler_directive) - { - throw new NotImplementedException(); - } - - public void visit(operator_name_ident _operator_name_ident) - { - throw new NotImplementedException(); - } - - public void visit(var_statement _var_statement) - { - AddPossibleComments(_var_statement, true, false); - } - - public void visit(question_colon_expression _question_colon_expression) - { - _question_colon_expression.condition.visit(this); - _question_colon_expression.ret_if_true.visit(this); - _question_colon_expression.ret_if_false.visit(this); - } - - public void visit(expression_as_statement _expression_as_statement) - { - throw new NotImplementedException(); - } - - public void visit(c_scalar_type _c_scalar_type) - { - throw new NotImplementedException(); - } - - public void visit(c_module _c_module) - { - throw new NotImplementedException(); - } - - public void visit(declarations_as_statement _declarations_as_statement) - { - throw new NotImplementedException(); - } - - public void visit(array_size _array_size) - { - throw new NotImplementedException(); - } - - public void visit(enumerator _enumerator) - { - if (_enumerator.name != null) - _enumerator.name.visit(this); - _enumerator.value.visit(this); - } - - public void visit(enumerator_list _enumerator_list) - { - foreach (enumerator en in _enumerator_list.enumerators) - en.visit(this); - } - - public void visit(c_for_cycle _c_for_cycle) - { - throw new NotImplementedException(); - } - - public void visit(switch_stmt _switch_stmt) - { - throw new NotImplementedException(); - } - - public void visit(type_definition_attr_list _type_definition_attr_list) - { - throw new NotImplementedException(); - } - - public void visit(type_definition_attr _type_definition_attr) - { - throw new NotImplementedException(); - } - - public void visit(lock_stmt _lock_stmt) - { - throw new NotImplementedException(); - } - - public void visit(compiler_directive_list _compiler_directive_list) - { - throw new NotImplementedException(); - } - - public void visit(compiler_directive_if _compiler_directive_if) - { - throw new NotImplementedException(); - } - - public void visit(documentation_comment_list _documentation_comment_list) - { - throw new NotImplementedException(); - } - - public void visit(documentation_comment_tag _documentation_comment_tag) - { - throw new NotImplementedException(); - } - - public void visit(documentation_comment_tag_param _documentation_comment_tag_param) - { - throw new NotImplementedException(); - } - - public void visit(documentation_comment_section _documentation_comment_section) - { - throw new NotImplementedException(); - } - - public void visit(token_taginfo _token_taginfo) - { - throw new NotImplementedException(); - } - - public void visit(declaration_specificator _declaration_specificator) - { - throw new NotImplementedException(); - } - - public void visit(ident_with_templateparams _ident_with_templateparams) - { - throw new NotImplementedException(); - } - - public void visit(template_type_name _template_type_name) - { - throw new NotImplementedException(); - } - - public void visit(default_operator _default_operator) - { - AddPossibleComments(_default_operator, true, true); - _default_operator.type_name.visit(this); - } - - public void visit(bracket_expr _bracket_expr) - { - AddPossibleComments(_bracket_expr, true, true); - _bracket_expr.expr.visit(this); - } - - public void visit(attribute _attribute) - { - throw new NotImplementedException(); - } - - public void visit(simple_attribute_list _simple_attribute_list) - { - throw new NotImplementedException(); - } - - public void visit(attribute_list _attribute_list) - { - throw new NotImplementedException(); - } - - #endregion - } -} \ No newline at end of file diff --git a/Parsers/PascalABCParser/Errors.cs b/Parsers/PascalABCParser/Errors.cs deleted file mode 100644 index c7919f862..000000000 --- a/Parsers/PascalABCParser/Errors.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.PascalABCParser; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.Errors; -using System.Collections.Generic; - - -namespace PascalABCCompiler.PascalABCParser.Errors -{ - public class bad_operand_type: SyntaxError - { - public bad_operand_type(string _file_name,SourceContext _source_context,syntax_tree_node _node): - base(StringResources.Get("OPERATOR_NOT_IMPLEMET_TO_THIS_OPEAND_TYPE"), _file_name, _source_context, _node) - { - } - } - public class statement_expected : SyntaxError - { - public statement_expected(string _file_name,SourceContext _source_context,syntax_tree_node _node): - base(StringResources.Get("STATEMENT_EXPECTED"), _file_name, _source_context, _node) - { - } - - } - public class bad_leftside_assigment : SyntaxError - { - public bad_leftside_assigment(string _file_name,SourceContext _source_context,syntax_tree_node _node): - base(StringResources.Get("LEFT_SIDE_ASSIGN_MUST_BE_VARIABLE"), _file_name, _source_context, _node) - { - } - } - public class nonterminal_token_return_null : SyntaxError - { - public nonterminal_token_return_null(string _file_name,SourceContext _source_context,syntax_tree_node _node,string nonterminal_token_name): - base(string.Format(StringResources.Get("NONTERMINALTOKEN_{0}_RETURN_NULL"), nonterminal_token_name), - _file_name,_source_context,_node) - { - } - } - public class unexpected_return_value : SyntaxError - { - public unexpected_return_value(string _file_name, SourceContext _source_context, syntax_tree_node _node) - : base(StringResources.Get("PROCEDURE_CANNOT_HAVE_RETURNED_VALUE"), _file_name, _source_context, _node) - { - } - } - public class unexpected_ident : SyntaxError - { - public unexpected_ident(string _file_name,ident unexpected_id,string expected,SourceContext _source_context, syntax_tree_node _node) - : base(string.Format(StringResources.Get("EXPECTED_{0}_BUT_FOUND_{1}"), expected, unexpected_id.name), _file_name, _source_context, _node) - { - } - } - public class PABCNETUnexpectedToken : SyntaxError - { - private string _message; - public PABCNETUnexpectedToken(PascalABCCompiler.ParserTools.GPBParser parser) - : base("", parser.current_file_name, parser.parsertools.GetTokenSourceContext(parser.LRParser), (syntax_tree_node)parser.prev_node) - { - List Symbols = parser.parsertools.GetPrioritySymbols(parser.LRParser.GetExpectedTokens()); - if (Symbols.Count == 1) - { - string OneSybmolText = "ONE_" + Symbols[0].Name.ToUpper(); - string LocOneSybmolText = StringResources.Get(OneSybmolText); - if (LocOneSybmolText != OneSybmolText) - { - _message = string.Format(LocOneSybmolText); - return; - } - } - _message = string.Format(StringResources.Get("EXPECTED{0}"), PascalABCCompiler.FormatTools.ObjectsToString(parser.parsertools.SymbolsToStrings(Symbols.ToArray()), ",")); - } - public PABCNETUnexpectedToken(string _file_name, string expected, SourceContext _source_context, syntax_tree_node _node) - : base("", _file_name, _source_context, _node) - { - _message = string.Format(StringResources.Get("EXPECTED{0}"), expected); - } - public override string Message - { - get - { - return _message; - } - } - } - -} diff --git a/Parsers/PascalABCParser/Parser.cs b/Parsers/PascalABCParser/Parser.cs deleted file mode 100644 index 62dd1007f..000000000 --- a/Parsers/PascalABCParser/Parser.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.IO; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Parsers; -using System.Resources; -using System.Reflection; -using System.Collections.Generic; -using PascalABCCompiler.Errors; -using PascalABCCompiler.Preprocessor2; - - -namespace PascalABCCompiler.PascalABCParser -{ - - public class PascalABCLanguageParser : BaseParser, IParser - { - private GPBParser_PascalABC parser; - private GPBParser_PascalABC localparser; // ВынеÑ� localparser Ñ�юда длÑ� передачи между методами. ПоÑ�ле избавлениÑ� от GPB должен оÑ�татьÑ�Ñ� только Ñ�тот парÑ�ер - - public Preprocessor2.Preprocessor2 preprocessor2 = new PascalABCCompiler.Preprocessor2.Preprocessor2(null); - - private Stream grammar_stream; - - public PascalABCLanguageParser() - : base("PascalABC.NET", "2.2", "(c) Ткачук Ð�.Ð’. 2005,2008; Михалкович С.С. 2012", false, new string[1]{".gpas"}) - { - parser = null; - } - - public override void Reset() - { - CompilerDirectives.Clear(); - grammar_stream = CGTResourceExtractor.Extract(new ResourceManager("PascalABCParser.PascalABCLang", Assembly.GetExecutingAssembly()),"PascalABCLanguage"); - parser = new GPBParser_PascalABC(grammar_stream, preprocessor2); - parser.Parse("begin end."); - max_errors = 30; - } - - public override SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - preprocessor2.SourceFilesProvider = value; - } - } - - int max_errors - { - get - { - return parser.max_errors; - } - set - { - parser.max_errors = value; - } - } - - public override void PreBuildTree(string FileName) - { - if (this.parser == null) - Reset(); - CompilerDirectives = new List(); - localparser = new GPBParser_PascalABC(this.grammar_stream, this.parser.LanguageGrammar, preprocessor2); - localparser.CompilerDirectives = CompilerDirectives; - localparser.errors = Errors; - localparser.current_file_name = FileName; - localparser.parsertools.LineCorrection = 0; - localparser.build_tree_for_brackets = false; - preprocessor2 = new Preprocessor2.Preprocessor2(SourceFilesProvider); - } - - public override syntax_tree_node BuildTreeInNormalMode(string FileName, string Text) - { - Errors.Clear(); - - string[] file_names = new string[1]; - file_names[0] = FileName; - SourceContextMap scm = new SourceContextMap(); - Text = preprocessor2.Build(file_names, Errors, scm); - - localparser.scm = scm; - ((localparser.parsertools) as pascalabc_parsertools).scm = scm; - - if (Errors.Count > 0) - return null; - - syntax_tree_node root = (syntax_tree_node)localparser.Parse(Text); - if (root != null && root is compilation_unit) - (root as compilation_unit).file_name = FileName; - if (preprocessor2.CompilerDirectives != null && preprocessor2.CompilerDirectives.Count != 0) - localparser.CompilerDirectives.AddRange(preprocessor2.CompilerDirectives); - - return root; - } - - public override syntax_tree_node BuildTreeInExprMode(string FileName, string Text) - { - Text = String.Concat("<>", Environment.NewLine, Text); - localparser.parsertools.LineCorrection = -1; - syntax_tree_node root = (syntax_tree_node)localparser.Parse(Text); - return root as expression; - } - - public override syntax_tree_node BuildTreeInStatementMode(string FileName, string Text) - { - Text = String.Concat("<>", Environment.NewLine, Text); - localparser.parsertools.LineCorrection = -1; - syntax_tree_node root = (syntax_tree_node)localparser.Parse(Text); - return root as statement; - } - - public override syntax_tree_node BuildTreeInSpecialMode(string FileName, string Text) - { - Errors.Clear(); - syntax_tree_node root = (syntax_tree_node)localparser.Parse(Text); - return root; - } - - public override syntax_tree_node BuildTreeInFormatterMode(string FileName, string Text) - { - localparser.build_tree_for_brackets = true; - Errors.Clear(); - syntax_tree_node root = (syntax_tree_node)localparser.Parse(Text); - return root; - } - - public override string ToString() - { - return "PascalABC.NET Language Parser v2.2"; - } - public override IPreprocessor Preprocessor - { - get - { - //MZ - return preprocessor2; - } - } - - } - - - -} diff --git a/Parsers/PascalABCParser/PascalABCLang.resources b/Parsers/PascalABCParser/PascalABCLang.resources deleted file mode 100644 index ee5d1af29f017f876f7c73a287f87aec1cead304..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222628 zcmZs@2UrtZ`|hpVUJw;4h_NFUumK7}R8#~7EZd3@6%pAHqZ9)I85I=~5fl}vQ30`R z$aVvwv{6xt2oX@Dv;iq0QbHQZBva1g`~JW4UFSMyyUj0I_uOmN%qp|ynKjmYl$Hz~ zGGxdt_vErR*@&&&P9v<;v7Qi{|q zA=2XieiYcGxR|IhntAxd@u8;%Yn&P?Q|DfIR>5HMLK)0?cC3gdtickbMx)>>VB@TN}GX_v_G3 z!C8X69=CAmZk&#mnHHlz1%7NJ|K(CE>pH|~7S^2FJnJ|CH}L(BfV z`^qno#%I$JCjo7!?E8TYuz9i`(lE}-yPeh3E7VxjPz5YquK>@h;l;DmQ7oP4esT(F zh>j%n(bUgE5p$5e04?Ka*u+-AjtkTyR%xh=O&JQ1NU~j|weX;i>BC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syX9)s?v^g>;x(PS*;?B%6SH_2)m5H$Rbek>5AanU(@h^G?ivY@+nbR?=Z!FX zFDHGLI1rVQPgcUur1(Z(hX>>gblkVd3&pX408*6#^|d|Gt^*wvF6av#x5${DwWQQq zY{B`b!t(hYbIAFgh2;Ersyj&2`%sh*;WJZIsYHfoBI)Nt9lhW~rJVOcPx%f!^O2s~ dx2mPZ8m6Dq*YBbcX+qXWo0&SPRijo7{tvZHxm^GN diff --git a/Parsers/PascalABCParser/PascalABCParser.csproj b/Parsers/PascalABCParser/PascalABCParser.csproj deleted file mode 100644 index 9c6ce4ffa..000000000 --- a/Parsers/PascalABCParser/PascalABCParser.csproj +++ /dev/null @@ -1,123 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {93E024EA-632F-495C-9142-86769EA42118} - Library - Properties - PascalABCParser - PascalABCOldParser - - - 4.0 - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - ..\..\bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - ..\..\bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - - - - - Code - - - - Code - - - - - - - - - - - - - - - {44A01F9E-DCE7-470C-AAE5-C3DE0CCBEE3B} - Errors - - - {2DE2842F-0912-4251-BC0F-480854C44A13} - Localization - - - {AF2EFD7B-69DD-4B43-AF65-B59B29349C23} - ParserTools - - - {C2CAC65A-B2AE-4CCC-B067-E6B8E75DF73A} - SyntaxTree - - - - - False - КлиентÑ�кий профиль .NET Framework 3.5 SP1 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - УÑ�тановщик Windows 3.1 - true - - - - - \ No newline at end of file diff --git a/Parsers/PascalABCParser/PascalABCParserTools.cs b/Parsers/PascalABCParser/PascalABCParserTools.cs deleted file mode 100644 index bfb482799..000000000 --- a/Parsers/PascalABCParser/PascalABCParserTools.cs +++ /dev/null @@ -1,172 +0,0 @@ -using System; -using System.Text; -//using com.calitha.goldparser; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.ParserTools; -using GoldParser; - - -namespace PascalABCCompiler.PascalABCParser -{ - public static class StringResources - { - private static string prefix = "PASCALABCPARSER_"; - public static string Get(string Id) - { - string ret = PascalABCCompiler.StringResources.Get(prefix + Id); - if (ret == prefix + Id) - return Id; - else - return ret; - } - } - - public class pascalabc_parsertools : parser_tools - { - public SourceContextMap scm = null; - public override SourceContext GetTokenSourceContext() - { - return GetTokenSourceContext(parser); - } - int NewLineLength = Environment.NewLine.Length; - int GetLinesCount(string s) - { - //Ð�е учитывает поÑ�ледний перевод еÑ�ли за ним ничего - int i = s.IndexOf(Environment.NewLine); - int res = 0; - if (i >= 0 && i < s.Length - NewLineLength) - res++; - while (i >= 0) - { - i = s.IndexOf(Environment.NewLine, i + NewLineLength); - if (i >= 0 && i < s.Length - NewLineLength) - res++; - } - return res; - } - public override SourceContext GetTokenSourceContext(Parser parser) - { - int LineNum = parser.TokenLineNumber + LineCorrection; - SourceContext sc = new SourceContext(LineNum, parser.TokenLinePosition, LineNum + GetLinesCount(parser.TokenText), parser.TokenLinePosition + parser.TokenLength - 1, parser.TokenCharPosition, parser.TokenCharPosition + parser.TokenLength); - if (scm != null) - sc = scm.GetSourceContext(sc); - return sc; - } - - public compiler_directive MakeDirective(token_info ti) - { - compiler_directive cd = new compiler_directive(); - cd.Directive = new token_info(); - string name = ti.text.Remove(0, 2).Replace("}",""); - int i = name.IndexOf(' '); - if (i > 0) - { - cd.Directive = new token_info(name.Remove(0, i + 1)); - cd.Directive.source_context = ti.source_context; - name = name.Remove(i); - cd.Directive.text = cd.Directive.text.Trim(' '); - cd.Directive.text = cd.Directive.text.Replace(@"'", "".ToString()); - } - - cd.Name = new token_info(name); - cd.Name.source_context = ti.source_context; - cd.source_context = ti.source_context; - return cd; - } - - public override string symbol_to_string(Symbol symbol) - { - switch (symbol.Index) - { - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKMINUS: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKOR: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKXOR: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKAND: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKDIV: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKMOD: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKSHL: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKSHR: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKSLASH: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKSTAR: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKGREATER: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKGREATEREQUAL: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKIN: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKLOWER: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKLOWEREQUAL: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKNOTEQUAL: - return StringResources.Get("OPERATOR"); - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKSQUARECLOSE: - return "]"; - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKSQUAREOPEN: - return "["; - } - string res = StringResources.Get(symbol.Name.ToUpper()); - if (res.IndexOf("TK") == 0) - return res.Remove(0, 2).ToLower(); - return res; - } - - public override int symbol_priority(Symbol symbol) - { - - switch (symbol.Index) - { - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKEND: - return 8; - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKBEGIN: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKINTEGER: - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKROUNDCLOSE: - return 9; - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKIDENTIFIER: - return 10; - - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKASSIGN: - return 25; - - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKCOLON: - return 20; - - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKEQUAL: - return 25; - - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKSEMICOLON: - return 30; - - // case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKDO: - // return 50; - //case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_TKPOINT: - // return 35; - - // return 5; - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_EXPR: - return 100; - case (int)GPBParser_PascalABC.SymbolConstants.SYMBOL_STMT: - return 110; - - } - if (symbol.SymbolType == SymbolType.Terminal) - return 1; - return 0; - } - - /*public override void check_comment_text(GPBParser parser) - { - string original_text = parser.LRParser.TokenString; - if (original_text[0] == '{' && original_text[1] == '$') - { - string text = original_text.Substring(2, original_text.Length - 3); - int delim_pos = text.IndexOf(' '); - if (delim_pos > 1) - { - string dname = text.Substring(0, delim_pos - 1); - string derictive = text.Substring(delim_pos, text.Length - delim_pos - 1); - compiler_directive cd = new compiler_directive(dname, derictive); - cd.source_context = GetTokenSourceContext(parser.LRParser); - parser.CompilerDirectives.Add(cd); - } - } - }*/ - - - } -} diff --git a/Parsers/PascalABCParser/Preprocessor/Parser.cs b/Parsers/PascalABCParser/Preprocessor/Parser.cs deleted file mode 100644 index bf392a172..000000000 --- a/Parsers/PascalABCParser/Preprocessor/Parser.cs +++ /dev/null @@ -1,173 +0,0 @@ -using System; -using System.IO; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; - -using System.Resources; -using System.Reflection; -using PascalABCCompiler.Parsers; -using System.Collections.Generic; -using PascalABCCompiler.Errors; - - -namespace PascalABCCompiler.PascalPreprocessor -{ - - public class PascalPreprocessorLanguageParser:IParser - { - private GPBPreprocessor_Pascal parser; - - public PascalPreprocessorLanguageParser() - { - this.filesExtensions = new string[1]; - this.filesExtensions[0] = ".paspr" + Parsers.Controller.HideParserExtensionPostfixChar; - parser = null; - } - - string[] filesExtensions; - public string[] FilesExtensions - { - get - { - return filesExtensions; - } - } - - ILanguageInformation lnginf = new DefaultLanguageInformation(); - public ILanguageInformation LanguageInformation { - get { - return lnginf; - } - } - - public bool CaseSensitive - { - get - { - return parser.LanguageGrammar.CaseSensitive; - } - } - - public Keyword[] Keywords - { - get - { - return new Keyword[0]; - } - } - - public List compilerDirectives = new List(); - public List CompilerDirectives - { - get - { - return compilerDirectives; - } - } - - List errors = new List(); - public List Errors - { - get - { - return errors; - } - set - { - errors = value; - } - } - - private Stream grammar_stream = null; - public void Reset() - { - grammar_stream = CGTResourceExtractor.Extract(new ResourceManager("PascalABCParser.Preprocessor.PascalPreprocessorLang", Assembly.GetExecutingAssembly()), "PascalPreprocessorLanguage"); - parser = new GPBPreprocessor_Pascal(grammar_stream); - max_errors = 5; - } - public virtual int max_errors - { - get - { - return parser.max_errors; - } - set - { - parser.max_errors=value; - } - } - - SourceFilesProviderDelegate sourceFilesProvider = null; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - public syntax_tree_node BuildTree(string FileName, string Text, string[] SearchPatchs, ParseMode parseMode) - { - if (this.parser == null) - Reset(); - GPBPreprocessor_Pascal parser = new GPBPreprocessor_Pascal(this.grammar_stream,this.parser.LanguageGrammar); - parser.errors = Errors; - parser.current_file_name = FileName; - compilerDirectives = new List(); - parser.CompilerDirectives = compilerDirectives; - switch (parseMode) - { - case ParseMode.Expression: - case ParseMode.Statement: - return null; - } - syntax_tree_node cu = (syntax_tree_node)parser.Parse(Text); - if (cu != null && cu is compilation_unit) - { - (cu as compilation_unit).file_name = FileName; - (cu as compilation_unit).compiler_directives = compilerDirectives; - } - return cu; - } - - public string Name - { - get - { - return "Pascal Preprocessor"; - } - } - public string Version - { - get - { - return "0.2"; - } - } - public string Copyright - { - get - { - return "(c) Ткачук Ð�.Ð’. 2008"; - } - } - public override string ToString() - { - return "Pascal Preprocessor v0.1"; - } - public IPreprocessor Preprocessor - { - get - { - return null; - } - } - - } - - -} diff --git a/Parsers/PascalABCParser/Preprocessor/PascalPreprocessorLang.resources b/Parsers/PascalABCParser/Preprocessor/PascalPreprocessorLang.resources deleted file mode 100644 index af4024172bf7eb1863be7f230f7ae7126e90569d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5350 zcmZXYeS8zuo`>rj__E0Ea4>Ei2oMEgpwbzH zt5vZ^K-xkZauG^ZE}d1xt^|5Sq@@&E+6sfzGC-l}FqDucX_CpDGxytjclVFow3#Q* zWWICGZ_b&?XQughpzfxmq@;~_FPXJ^#mfApgLW;)+ovM6s_ z{_6j5*z=cVyqTUpFD)n@4+xzUFhv$Us zztOaDVo4{TXV|Y9DWqNs9+gb{^xV3s9o=$y8yQ7jo#nfS&TTDNwR4BEcrh(3&h0pw znsdM2!FNTZ);>pg6?>(K1Rjtn?(gwz0Mo*Dnjve~&6o2Y=^6)zP zvlRUJ#bCD_yDG;T`7R%+4^X?2N$PWGih{-!zAJ%sQM2j1+6gZfxSa%2Qm_DqF(`mx4E!*Rfggr3 zNQU7sB%3KBhGL*~3`H3XLoo-2-p+wxC}bFhLWW@|(qR~ibXb!Vtc7&|um&mUg2@1^ zMG8h?3Sg#~KT5%&EX6zpz>Y~lH|#6`!|~05{Q|&FNWm7^ZvgBkDVPdt17OFcpaeSy zz%cP0urmOxSqcVV=KzfuTMHhWe~9)MtgE zz9vj@W;Z_OyF{8MT#^rd662?8}hHVsqv^&n#D@eKBV#$&P4$6+C=c`-NnOwC_l> zF8^RSYXpyrG)JV+dfuOGTC5=rXOX{*S#TDG22%^pqENA6!C4e4hQ*{%7VI(r3rnE} z*fjuVNTD&XO8~4-3RT0d0x(?)6~MXySicnV!>$7`CWVq=IOxf+pcE>DsQ?UzY7XoQ z07ExrST6vhQYanP1;9d5s1~LHu!I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#92>PE9Rg+I&IyJQ8P|I zy6r&f!bhezDc-tCyK|IS;M7aeKu*^qw|gtUJk{nX3wH!^HV--$(} z+fe=In-9}V^3gGP)G$T#w5`3V|DG9X?DKlkFHPaRZD&uFTjS2l!wNH6Wzl97-uZ8r ztYStylzyt8)ERN@iCaG~hhLD}Q-xye@$=7Cv|Vu|4QfvoJVR2A z1F^ebH12yk`n%`XyhM%_^Tz0yCZ|hdnD(QdK0d=3w6IU>FT5a&Cl0dVgCuk6^z_vk zQ#SLHneJGaYnH4>#~*r;NgNW7NMS@8T1Wn0FaM^A2hV{M`&)};I>e542&i4MsjCWf4F@J8vX zSMImH-zD!ORPV18t3}o=UeJ-Xul?7)1Rb*+?ey)U1WFBlm>~=LEY*153y`% zHOh-3-L1x_t6q8e+_Up`Jo;Vn%A3?$+nS(u%ZL9Oliw?Bf8yzHnclXZ^=lo9a7(D- v;Dzz#{@%N0pN;*aorlp(L){xkH~hUT>#CkN@USb} if_part = new Stack(); - private Stack first_if = new Stack(); - private pascalabc_parsertools pascal_parsertools; - - public GPBPreprocessor_Pascal(Stream stream) - :base(stream) - { - pascal_parsertools = new pascalabc_parsertools(); - parsertools = pascal_parsertools; - } - - public GPBPreprocessor_Pascal(Stream stream, GoldParser.Grammar grammar):base(grammar) - { - pascal_parsertools = new pascalabc_parsertools(); - parsertools = pascal_parsertools; - } - - public object Parse(string source) - { - if_part.Clear(); - first_if.Clear(); - LRParser = new Parser(new StringReader(source), LanguageGrammar); - parsertools.parser = LRParser; - LRParser.TrimReductions = true; - try -{ - while (true) - { - switch (LRParser.Parse()) - { - case ParseMessage.LexicalError: - errors.Add(new TokenReadError(this)); - LRParser.PopInputToken(); - if (errors.Count > max_errors) - return null; - break; - - case ParseMessage.SyntaxError: - if ((LRParser.TokenSyntaxNode as syntax_tree_node)!= null) - prev_node = LRParser.TokenSyntaxNode; - Error er = new PABCNETUnexpectedToken(this); - Symbol sym = LRParser.PopInputToken(); - if (sym.SymbolType == SymbolType.End && errors.Count > 0) - return null; - errors.Add(er); - if (errors.Count > max_errors) - return null; - break; - case ParseMessage.Reduction: - LRParser.TokenSyntaxNode = CreateNonTerminalObject(); - break; - - case ParseMessage.Accept: - return LRParser.TokenSyntaxNode; - - case ParseMessage.TokenRead: - LRParser.TokenSyntaxNode = CreateTerminalObject(); - break; - - case ParseMessage.InternalError: - errors.Add(new CompilerInternalError("CParser", new Exception("ParseMessage.InternalError"))); - return null; - - case ParseMessage.NotLoadedError: - errors.Add(new CompilerInternalError("CParser", new Exception("ParseMessage.NotLoadedError"))); - return null; - - case ParseMessage.CommentError: - errors.Add(new UnexpectedToken(this,"(EOF)")); - return null; - - /*case ParseMessage.CommentBlockRead: - break; - - case ParseMessage.CommentLineRead: - break;*/ - } - } - } - catch (GoldParser.UnexpectedEOFinParseCommentBlock) - { - throw new TokenReadError(this); - } - catch (Exception e) - { - if (errors.Count > 0) - return null; - else - throw; - } - - } - - public enum SymbolConstants : int - { - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTEND = 3, // (Comment End) - SYMBOL_COMMENTLINE = 4, // (Comment Line) - SYMBOL_COMMENTSTART = 5, // (Comment Start) - SYMBOL_TKDIRECTIVE = 6, // 'TKDIRECTIVE' - SYMBOL_TKNEWLINE = 7, // 'TKNEWLINE' - SYMBOL_TKPROGRAM_LINE_PART = 8, // 'TKPROGRAM_LINE_PART' - SYMBOL__DIRECTIVE_GROUPS = 9, // <_directive_groups> - SYMBOL_DIRECTIVE_GROUP = 10, // - SYMBOL_DIRECTIVE_GROUPS = 11, // - SYMBOL_EMPTY = 12, // - SYMBOL_PREPROCESSOR_PROGRAM = 13 // - }; - - public enum RuleConstants : int - { - RULE_PREPROCESSOR_PROGRAM = 0, // ::= - RULE_DIRECTIVE_GROUPS = 1, // ::= <_directive_groups> - RULE_DIRECTIVE_GROUPS2 = 2, // ::= - RULE__DIRECTIVE_GROUPS = 3, // <_directive_groups> ::= - RULE__DIRECTIVE_GROUPS2 = 4, // <_directive_groups> ::= - RULE_DIRECTIVE_GROUP_TKNEWLINE = 5, // ::= 'TKNEWLINE' - RULE_DIRECTIVE_GROUP_TKPROGRAM_LINE_PART = 6, // ::= 'TKPROGRAM_LINE_PART' - RULE_DIRECTIVE_GROUP_TKDIRECTIVE = 7, // ::= 'TKDIRECTIVE' - RULE_EMPTY = 8 // ::= - }; - - private Object CreateTerminalObject() - { - switch ((SymbolConstants) LRParser.TokenSymbol.Index) - { - case SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Whitespace' return NULL! \n\r");*/return null; - - case SymbolConstants.SYMBOL_COMMENTEND : - //(Comment End) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment End' return NULL! \n\r");*/return null; - - case SymbolConstants.SYMBOL_COMMENTLINE : - //(Comment Line) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Line' return NULL! \n\r");*/return null; - - case SymbolConstants.SYMBOL_COMMENTSTART : - //(Comment Start) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Start' return NULL! \n\r");*/return null; - - case SymbolConstants.SYMBOL_TKDIRECTIVE : - //'TKDIRECTIVE' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKNEWLINE : - //'TKNEWLINE' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL_TKPROGRAM_LINE_PART : - //'TKPROGRAM_LINE_PART' - - { - token_info _token_info=new token_info(LRParser.TokenText); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - - case SymbolConstants.SYMBOL__DIRECTIVE_GROUPS : - //<_directive_groups> - //TERMINAL:_directive_groups - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_DIRECTIVE_GROUP : - // - //TERMINAL:directive_group - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_DIRECTIVE_GROUPS : - // - //TERMINAL:directive_groups - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_EMPTY : - // - //TERMINAL:empty - return null; - //ENDTERMINAL - - case SymbolConstants.SYMBOL_PREPROCESSOR_PROGRAM : - // - //TERMINAL:preprocessor_program - return null; - //ENDTERMINAL - - } - throw new SymbolException("Unknown symbol"); - } - - - - public Object CreateNonTerminalObject() - { - switch ((RuleConstants) LRParser.ReductionRule.Index) - { - case RuleConstants.RULE_PREPROCESSOR_PROGRAM : - // ::= - - { - compilation_unit _compilation_unit=new compilation_unit(); - - _compilation_unit.Language=LanguageId.PascalABCNET; - if(LRParser.GetReductionSyntaxNode(0)!=null){ - parsertools.create_source_context(_compilation_unit,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - CompilerDirectives.AddRange(((compiler_directive_list)LRParser.GetReductionSyntaxNode(0)).directives); - } - - return _compilation_unit; - } - - - case RuleConstants.RULE_DIRECTIVE_GROUPS : - // ::= <_directive_groups> -return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_DIRECTIVE_GROUPS2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - - case RuleConstants.RULE__DIRECTIVE_GROUPS : - //<_directive_groups> ::= - - { - compiler_directive_list _compiler_directive_list=new compiler_directive_list(); - - if(LRParser.GetReductionSyntaxNode(0) is compiler_directive) - _compiler_directive_list.directives.Add((compiler_directive)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_compiler_directive_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _compiler_directive_list; - } - - - case RuleConstants.RULE__DIRECTIVE_GROUPS2 : - //<_directive_groups> ::= - - { - compiler_directive_list _compiler_directive_list=(compiler_directive_list)LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1) is compiler_directive) - _compiler_directive_list.directives.Add((compiler_directive)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_compiler_directive_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _compiler_directive_list; - } - - - case RuleConstants.RULE_DIRECTIVE_GROUP_TKNEWLINE : - // ::= 'TKNEWLINE' -return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_DIRECTIVE_GROUP_TKPROGRAM_LINE_PART : - // ::= 'TKPROGRAM_LINE_PART' -return LRParser.GetReductionSyntaxNode(0); - - case RuleConstants.RULE_DIRECTIVE_GROUP_TKDIRECTIVE : - // ::= 'TKDIRECTIVE' - - { - compiler_directive _compiler_directive=(compiler_directive)pascal_parsertools.MakeDirective((token_info)LRParser.GetReductionSyntaxNode(0)); - return _compiler_directive; - } - - - case RuleConstants.RULE_EMPTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - - } - throw new RuleException("Unknown rule"); - } - } -} diff --git a/Parsers/PascalABCParser/Preprocessor/Preprocessor.cs b/Parsers/PascalABCParser/Preprocessor/Preprocessor.cs deleted file mode 100644 index 1c36f58bf..000000000 --- a/Parsers/PascalABCParser/Preprocessor/Preprocessor.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using PascalABCCompiler; -using PascalABCCompiler.Errors; -using System.IO; -using PascalABCCompiler.SyntaxTree; -using System.Text.RegularExpressions; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.Parsers; -using PascalABCCompiler.PascalPreprocessor; - -namespace PascalABCCompiler.PascalPreprocessor -{ - public class Preprocessor : IPreprocessor - { - public Preprocessor(SourceFilesProviderDelegate sourceFilesProvider) - { - this.sourceFilesProvider = sourceFilesProvider; - } - - SourceFilesProviderDelegate sourceFilesProvider; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - List compilerDirectives=null; - public List CompilerDirectives - { - get - { - return compilerDirectives; - } - } - - PascalPreprocessorLanguageParser PascalPreprocessorParser; - public string Build(string[] fileNames,string[] SearchPaches, List errors, SourceContextMap sourceContextMap) - { - if (PascalPreprocessorParser == null) - PascalPreprocessorParser = new PascalPreprocessorLanguageParser(); - compilerDirectives = new List(); - string text = (string)SourceFilesProvider(fileNames[0], SourceFileOperation.GetText); - PascalPreprocessorParser.Errors = errors; - compilation_unit cu = PascalPreprocessorParser.BuildTree(fileNames[0], text, SearchPaches, PascalABCCompiler.Parsers.ParseMode.Normal) as compilation_unit; - if (errors.Count > 0) - return text; - if (cu == null) - errors.Add(new CompilerInternalError("PascalPreprocessor", new Exception("cu==null"))); - if (cu != null) - compilerDirectives.AddRange(cu.compiler_directives); - return text; - } - - } -} diff --git a/Parsers/PascalABCParser/Preprocessor_2/Errors.cs b/Parsers/PascalABCParser/Preprocessor_2/Errors.cs deleted file mode 100644 index 130eb6b2c..000000000 --- a/Parsers/PascalABCParser/Preprocessor_2/Errors.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.PascalABCParser; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.Errors; -using System.Collections.Generic; - - -namespace PascalABCCompiler.Preprocessor_2.Errors -{ - public static class StringResources - { - private static string prefix = "PABCPreprocessor2_"; - public static string Get(string Id) - { - string ret = PascalABCCompiler.StringResources.Get(prefix + Id); - if (ret == prefix + Id) - return Id; - else - return ret; - } - } - - public class IncludeFileNotFound : SyntaxError - { - public IncludeFileNotFound(string _file_name, SourceContext _source_context, syntax_tree_node _node, string FileName) - : - base(String.Format(StringResources.Get("INCLUDE_FILE_{0}_NOTFOUND"), FileName), _file_name, _source_context, _node) - { - } - } - - public class CircularInclude : SyntaxError - { - public CircularInclude(string _file_name, SourceContext _source_context, syntax_tree_node _node, string FileName) - : - base(String.Format(StringResources.Get("CIRCULAR_INCLUDE_{0}"), FileName), _file_name, _source_context, _node) - { - } - } - - public class ErrorInDefineSyntax : SyntaxError - { - public ErrorInDefineSyntax(string _file_name, SourceContext _source_context) - : - base(StringResources.Get("ERROR_IN_DEFINE_SYNTAX"), _file_name, _source_context, null) - { - } - } - - public class NameDefineError : SyntaxError - { - public NameDefineError(string name, string _file_name, SourceContext _source_context) - : - base(String.Format(StringResources.Get("NAME_IS_DEFINED_{0}"), name), _file_name, _source_context, null) - { - } - } - - public class NameUndefError : SyntaxError - { - public NameUndefError(string name, string _file_name, SourceContext _source_context) - : - base(String.Format(StringResources.Get("NAME_WAS_NOT_DEFINED_{0}"), name), _file_name, _source_context, null) - { - } - } - - public class ErrorInIncludeSyntax : SyntaxError - { - public ErrorInIncludeSyntax(string _file_name, SourceContext _source_context) - : - base(StringResources.Get("ERROR_IN_INCLUDE_SYNTAX"), _file_name, _source_context, null) - { - } - } - public class UnexpectedEndif : SyntaxError - { - public UnexpectedEndif(string _file_name, SourceContext _source_context) - : - base(StringResources.Get("UNEXPEXTED_ENDIF_DIRECTIVE"), _file_name, _source_context, null) - { - } - } - public class UnexpectedElse : SyntaxError - { - public UnexpectedElse(string _file_name, SourceContext _source_context) - : - base(StringResources.Get("UNEXPEXTED_ELSE_DIRECTIVE"), _file_name, _source_context, null) - { - } - } - public class UnexpectedEOF : SyntaxError - { - public UnexpectedEOF(string _file_name, SourceContext _source_context) - : - base(StringResources.Get("ENDIF_DIRECTIVE_EXPEXTED"), _file_name, _source_context, null) - { - } - } - public class SyntaxErrorInDirective : SyntaxError - { - public SyntaxErrorInDirective(string _file_name, SourceContext _source_context, string command) - : - base(String.Format(StringResources.Get("SYNTAX_ERROR_IN_DIRECTIVE_{0}"), command), _file_name, _source_context, null) - { - } - } - public class UnknownDirective : SyntaxError - { - public UnknownDirective(string _file_name, SourceContext _source_context, string command) - : - base(String.Format(StringResources.Get("UNKNOWN_DIRECTIVE_{0}"), command), _file_name, _source_context, null) - { - } - } - - //aspects - public class AspSpacesError : SyntaxError - { - public AspSpacesError(string _file_name, SourceContext _source_context, string command) - : - base(String.Format(StringResources.Get("UNEXPECTED_SPACES_IN_DIRECTIVE_{0}"), command), _file_name, _source_context, null) - { - } - } - - public class UnexpAspData : SyntaxError - { - public UnexpAspData(string _file_name, SourceContext _source_context, string command) - : - base(String.Format(StringResources.Get("UNEXPECTED_ASPDATA_DIRECTIVE_{0}"), command), _file_name, _source_context, null) - { - } - } - - public class DoubleAspData : SyntaxError - { - public DoubleAspData(string _file_name, SourceContext _source_context, string command) - : - base(String.Format(StringResources.Get("DOUBLE_ASPDATA_DIRECTIVE_{0}"), command), _file_name, _source_context, null) - { - } - } - - public class ErrorAspData : SyntaxError - { - public ErrorAspData(string _file_name, SourceContext _source_context, string command) - : - base(String.Format(StringResources.Get("ERROR_ASPDATA_DIRECTIVE_{0}"), command), _file_name, _source_context, null) - { - } - } - - public class AspBeginEndError : SyntaxError - { - public AspBeginEndError(string _file_name, SourceContext _source_context, string command) - : - base(String.Format(StringResources.Get("ASPBEGINEND_ERROR_IN_DIRECTIVE_{0}"), command), _file_name, _source_context, null) - { - } - } - //end aspects - -} diff --git a/Parsers/PascalABCParser/Preprocessor_2/PABCPreprocessor2Lang.resources b/Parsers/PascalABCParser/Preprocessor_2/PABCPreprocessor2Lang.resources deleted file mode 100644 index a745f9911ef71d8842b663c6bcf8b9cae25eb4ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5817 zcmZ|T4O|p;!Uu5F%sMkJy~2aD^}<3E#kUn*k-hTH%~vY#vLu|8ki1p5)NOp7$uP+y z+Ke8scviACIgiu5&XjV4zm|e;z%h7^N;2po%evt5vb*fg&VS~9JkRHz&vVZUFY}$* zAIxv&KQHW1f6-q(C?+OmAHLTu+q!9U&ictO=4`T9H)iK-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1vM;h^bZp;*4~A99OQyFZbv&EoPxxrXGe5h!^w4AXpZ`KR=d{)T z_6>f_tfLF(B)#za(!l?{!>2!7O-`Z$TXAyepXXhXMq(h|;G>0?Ez{nY&JI4A_vXBz cpK^1f%}xu7JO6b^sPWx1e|miEoS2w@04d{GApigX diff --git a/Parsers/PascalABCParser/Preprocessor_2/PABCPreprocessor2_lrparser.cs b/Parsers/PascalABCParser/Preprocessor_2/PABCPreprocessor2_lrparser.cs deleted file mode 100644 index 836280f15..000000000 --- a/Parsers/PascalABCParser/Preprocessor_2/PABCPreprocessor2_lrparser.cs +++ /dev/null @@ -1,597 +0,0 @@ - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//������ ���� ��������� �������, �� ��������� �������������!!! -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.PascalABCParser.Errors; -using PascalABCCompiler.Preprocessor_2.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; -using PascalABCCompiler.PascalABCParser; - -namespace PascalABCCompiler.Preprocessor2 -{ -public class GPB_PABCPreprocessor2 : GPBParser -{ - - -public PascalABCCompiler.Preprocessor2.Preprocessor2 prepr; - -private pascalabc_parsertools pascal_parsertools; - -public GPB_PABCPreprocessor2(Stream stream, PascalABCCompiler.Preprocessor2.Preprocessor2 prepr1) - : base(stream) - { - pascal_parsertools = new pascalabc_parsertools(); - parsertools = pascal_parsertools; - - prepr = prepr1; - } - - public GPB_PABCPreprocessor2(Stream stream, GoldParser.Grammar grammar, PascalABCCompiler.Preprocessor2.Preprocessor2 prepr1) - : base(grammar) - { - pascal_parsertools = new pascalabc_parsertools(); - parsertools = pascal_parsertools; - - prepr = prepr1; - } - - public object Parse(string source) - { - LRParser = new Parser(new StringReader(source), LanguageGrammar); - parsertools.parser = LRParser; - LRParser.TrimReductions = true; - try - { - while (true) - { - switch (LRParser.Parse()) - { - case ParseMessage.LexicalError: - errors.Add(new TokenReadError(this)); - LRParser.PopInputToken(); - if (errors.Count > max_errors) - return null; - break; - - case ParseMessage.SyntaxError: - if ((LRParser.TokenSyntaxNode as syntax_tree_node) != null) - prev_node = LRParser.TokenSyntaxNode; - Error er = new PABCNETUnexpectedToken(this); - Symbol sym = LRParser.PopInputToken(); - if (sym.SymbolType == SymbolType.End && errors.Count > 0) - return null; - errors.Add(er); - if (errors.Count > max_errors) - return null; - break; - case ParseMessage.Reduction: - LRParser.TokenSyntaxNode = CreateNonTerminalObject(); - break; - - case ParseMessage.Accept: - return LRParser.TokenSyntaxNode; - - case ParseMessage.TokenRead: - LRParser.TokenSyntaxNode = CreateTerminalObject(); - break; - - case ParseMessage.InternalError: - errors.Add(new CompilerInternalError("PABCPreprocessor2", new Exception("ParseMessage.InternalError"))); - return null; - - case ParseMessage.NotLoadedError: - errors.Add(new CompilerInternalError("PABCPreprocessor2", new Exception("ParseMessage.NotLoadedError"))); - return null; - - case ParseMessage.CommentError: - errors.Add(new UnexpectedToken(this, "(EOF)")); - return null; - - case ParseMessage.CommentBlockRead: - { - SourceContext sc1 = parsertools.GetTokenSourceContext(this.LRParser); - string comment = this.LRParser.CommentText; - SourceContext sc2 = new SourceContext(sc1, parsertools.GetTokenSourceContext(this.LRParser)); - if (comment[0] == '{' && comment[1] == '$') - prepr.Errors.Add(new SyntaxErrorInDirective(prepr.CurrentFileName, sc2, comment)); - //if (prepr.sm.AllowWrite()) - //prepr.WriteToThread(sc2, comment.Replace(Environment.NewLine, " ")); - //prepr.WriteToStream(sc2, comment.Replace("\r\n", " ")); - } - break; - - case ParseMessage.CommentLineRead: - { - SourceContext sc1 = parsertools.GetTokenSourceContext(this.LRParser); - string comment = this.LRParser.CommentText; - SourceContext sc2 = new SourceContext(sc1, sc1); - if (prepr.sm.AllowWrite()) - prepr.WriteToStream(sc1, comment.Replace("\r\n", " ")); - //prepr.WriteToStream(sc1, comment); - } - break; - } - } - } - catch (GoldParser.UnexpectedEOFinParseCommentBlock) - { - throw new TokenReadError(this); - } - catch (Exception e) - { - if (errors.Count > 0) - return null; - else - throw; - } - - } - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//SymbolConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum SymbolConstants : int -{ - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTEND = 3, // (Comment End) - SYMBOL_COMMENTLINE = 4, // (Comment Line) - SYMBOL_COMMENTSTART = 5, // (Comment Start) - SYMBOL_TK_AP = 6, // 'TK_AP' - SYMBOL_TK_DIRECTIVE = 7, // 'TK_DIRECTIVE' - SYMBOL_TK_KAV = 8, // 'TK_KAV' - SYMBOL_TK_NEWLINE = 9, // 'TK_NEWLINE' - SYMBOL_TK_PROGRAM_LINE = 10, // 'TK_PROGRAM_LINE' - SYMBOL_TK_SLASH = 11, // 'TK_SLASH' - SYMBOL_TK_SLASHEKV = 12, // 'TK_SLASHEKV' - SYMBOL__PREPROCESSOR_LEXEMS = 13, // <_preprocessor_lexems> - SYMBOL_EMPTY = 14, // - SYMBOL_PREPROCESSOR_LEXEM = 15, // - SYMBOL_PREPROCESSOR_LEXEMS = 16, // - SYMBOL_PREPROCESSOR_PROGRAM = 17 // -}; - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//RuleConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum RuleConstants : int -{ - RULE_PREPROCESSOR_PROGRAM = 0, // ::= - RULE_PREPROCESSOR_LEXEMS = 1, // ::= <_preprocessor_lexems> - RULE_PREPROCESSOR_LEXEMS2 = 2, // ::= - RULE__PREPROCESSOR_LEXEMS = 3, // <_preprocessor_lexems> ::= - RULE__PREPROCESSOR_LEXEMS2 = 4, // <_preprocessor_lexems> ::= - RULE_PREPROCESSOR_LEXEM_TK_NEWLINE = 5, // ::= 'TK_NEWLINE' - RULE_PREPROCESSOR_LEXEM_TK_SLASH = 6, // ::= 'TK_SLASH' - RULE_PREPROCESSOR_LEXEM_TK_SLASHEKV = 7, // ::= 'TK_SLASHEKV' - RULE_PREPROCESSOR_LEXEM_TK_AP = 8, // ::= 'TK_AP' - RULE_PREPROCESSOR_LEXEM_TK_KAV = 9, // ::= 'TK_KAV' - RULE_PREPROCESSOR_LEXEM_TK_PROGRAM_LINE = 10, // ::= 'TK_PROGRAM_LINE' - RULE_PREPROCESSOR_LEXEM_TK_DIRECTIVE = 11, // ::= 'TK_DIRECTIVE' - RULE_EMPTY = 12 // ::= -}; - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -private Object CreateTerminalObject() -{ -switch ((SymbolConstants)LRParser.TokenSymbol.Index) -{ - case SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - case SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - case SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Whitespace' return NULL! \n\r");*/return null; - case SymbolConstants.SYMBOL_COMMENTEND : - //(Comment End) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment End' return NULL! \n\r");*/return null; - case SymbolConstants.SYMBOL_COMMENTLINE : - //(Comment Line) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Line' return NULL! \n\r");*/return null; - case SymbolConstants.SYMBOL_COMMENTSTART : - //(Comment Start) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Start' return NULL! \n\r");*/return null; - case SymbolConstants.SYMBOL_TK_AP : - //'TK_AP' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - case SymbolConstants.SYMBOL_TK_DIRECTIVE : - //'TK_DIRECTIVE' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - case SymbolConstants.SYMBOL_TK_KAV : - //'TK_KAV' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - case SymbolConstants.SYMBOL_TK_NEWLINE : - //'TK_NEWLINE' - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'TK_NEWLINE' return NULL! \n\r");*/return null; - case SymbolConstants.SYMBOL_TK_PROGRAM_LINE : - //'TK_PROGRAM_LINE' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - case SymbolConstants.SYMBOL_TK_SLASH : - //'TK_SLASH' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - case SymbolConstants.SYMBOL_TK_SLASHEKV : - //'TK_SLASHEKV' - { - token_info _token_info = new token_info(LRParser.TokenText); - _token_info.source_context = parsertools.GetTokenSourceContext(); - - return _token_info; - } - case SymbolConstants.SYMBOL__PREPROCESSOR_LEXEMS : - //<_preprocessor_lexems> - //TERMINAL:_preprocessor_lexems - return null; - //ENDTERMINAL - case SymbolConstants.SYMBOL_EMPTY : - // - //TERMINAL:empty - return null; - //ENDTERMINAL - case SymbolConstants.SYMBOL_PREPROCESSOR_LEXEM : - // - //TERMINAL:preprocessor_lexem - return null; - //ENDTERMINAL - case SymbolConstants.SYMBOL_PREPROCESSOR_LEXEMS : - // - //TERMINAL:preprocessor_lexems - return null; - //ENDTERMINAL - case SymbolConstants.SYMBOL_PREPROCESSOR_PROGRAM : - // - //TERMINAL:preprocessor_program - return null; - //ENDTERMINAL -} -throw new SymbolException("Unknown symbol"); -} - - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateNonTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public Object CreateNonTerminalObject() -{ -switch ((RuleConstants)LRParser.ReductionRule.Index) -{ - case RuleConstants.RULE_PREPROCESSOR_PROGRAM : - // ::= - { - compilation_unit _compilation_unit = new compilation_unit(); - - _compilation_unit.Language = LanguageId.PascalABCNET; - if (LRParser.GetReductionSyntaxNode(0) != null) - { - parsertools.create_source_context(_compilation_unit, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - CompilerDirectives.AddRange(((compiler_directive_list)LRParser.GetReductionSyntaxNode(0)).directives); - if (CompilerDirectives.Count != 0) - prepr.CompilerDirectives.AddRange(CompilerDirectives); - } - - return _compilation_unit; - } - case RuleConstants.RULE_PREPROCESSOR_LEXEMS : - // ::= <_preprocessor_lexems> - return LRParser.GetReductionSyntaxNode(0); - case RuleConstants.RULE_PREPROCESSOR_LEXEMS2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case RuleConstants.RULE__PREPROCESSOR_LEXEMS : - //<_preprocessor_lexems> ::= - { - compiler_directive_list _compiler_directive_list = new compiler_directive_list(); - - if (LRParser.GetReductionSyntaxNode(0) is compiler_directive) - _compiler_directive_list.directives.Add((compiler_directive)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_compiler_directive_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(0)); - return _compiler_directive_list; - } - case RuleConstants.RULE__PREPROCESSOR_LEXEMS2 : - //<_preprocessor_lexems> ::= - { - compiler_directive_list _compiler_directive_list = (compiler_directive_list)LRParser.GetReductionSyntaxNode(0); - if (LRParser.GetReductionSyntaxNode(1) is compiler_directive) - _compiler_directive_list.directives.Add((compiler_directive)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_compiler_directive_list, LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(1)); - return _compiler_directive_list; - } - case RuleConstants.RULE_PREPROCESSOR_LEXEM_TK_NEWLINE : - // ::= 'TK_NEWLINE' - return LRParser.GetReductionSyntaxNode(0); - case RuleConstants.RULE_PREPROCESSOR_LEXEM_TK_SLASH : - // ::= 'TK_SLASH' - { - if (prepr.sm.AllowWrite()) - prepr.WriteToStream(((token_info)LRParser.GetReductionSyntaxNode(0)).source_context, ((token_info)LRParser.GetReductionSyntaxNode(0)).text); - return LRParser.GetReductionSyntaxNode(0); - } - case RuleConstants.RULE_PREPROCESSOR_LEXEM_TK_SLASHEKV : - // ::= 'TK_SLASHEKV' - { - if (prepr.sm.AllowWrite()) - prepr.WriteToStream(((token_info)LRParser.GetReductionSyntaxNode(0)).source_context, ((token_info)LRParser.GetReductionSyntaxNode(0)).text); - return LRParser.GetReductionSyntaxNode(0); - } - case RuleConstants.RULE_PREPROCESSOR_LEXEM_TK_AP : - // ::= 'TK_AP' - { - if (prepr.sm.AllowWrite()) - prepr.WriteToStream(((token_info)LRParser.GetReductionSyntaxNode(0)).source_context, ((token_info)LRParser.GetReductionSyntaxNode(0)).text); - return LRParser.GetReductionSyntaxNode(0); - } - case RuleConstants.RULE_PREPROCESSOR_LEXEM_TK_KAV : - // ::= 'TK_KAV' - { - if (prepr.sm.AllowWrite()) - prepr.WriteToStream(((token_info)LRParser.GetReductionSyntaxNode(0)).source_context, ((token_info)LRParser.GetReductionSyntaxNode(0)).text); - return LRParser.GetReductionSyntaxNode(0); - } - case RuleConstants.RULE_PREPROCESSOR_LEXEM_TK_PROGRAM_LINE : - // ::= 'TK_PROGRAM_LINE' - { - if (prepr.sm.AllowWrite()) - prepr.WriteToStream(((token_info)LRParser.GetReductionSyntaxNode(0)).source_context, ((token_info)LRParser.GetReductionSyntaxNode(0)).text); - return LRParser.GetReductionSyntaxNode(0); - } - case RuleConstants.RULE_PREPROCESSOR_LEXEM_TK_DIRECTIVE : - // ::= 'TK_DIRECTIVE' - { - bool inline = ( ((token_info)LRParser.GetReductionSyntaxNode(0)).source_context.begin_position.line_num - ((token_info)LRParser.GetReductionSyntaxNode(0)).source_context.end_position.line_num == 0 ); - string token_text = ((token_info)LRParser.GetReductionSyntaxNode(0)).text; - - if (token_text[1] == '$' && inline) - { - compiler_directive _compiler_directive = (compiler_directive)pascal_parsertools.MakeDirective((token_info)LRParser.GetReductionSyntaxNode(0)); - _compiler_directive.source_context.FileName = prepr.CurrentFileName; - prepr.CurrentFileName = _compiler_directive.source_context.FileName; - - //INCLUDE - if (_compiler_directive.Name.text == prepr.INCLUDE) - { - if (prepr.sm.AllowWrite()) - { - string IncludeFileName = _compiler_directive.Directive.text; - if (prepr.ProcessedFileNames.Contains(IncludeFileName) || Path.GetFileName(prepr.CurrentFileName) == Path.GetFileName(IncludeFileName)) - { - prepr.Errors.Add(new CircularInclude(prepr.CurrentFileName, _compiler_directive.source_context, null, IncludeFileName)); - } - else - { - if (!(bool)prepr.SourceFilesProvider(IncludeFileName, SourceFileOperation.Exists)) - prepr.Errors.Add(new IncludeFileNotFound(prepr.CurrentFileName, _compiler_directive.source_context, null, IncludeFileName)); - string b = prepr.CurrentFileName; - //string t = prepr.SourceText; - //string[] sl = prepr.SourceLines; - prepr.ProcessFile(IncludeFileName); - prepr.CurrentFileName = b; - //prepr.SourceText = t; - //prepr.SourceLines = sl; - prepr.ProcessedFileNames.Remove(IncludeFileName); - } - } - return _compiler_directive; - } - //DEFINE - if (_compiler_directive.Name.text == prepr.DEFINE) - { - if (prepr.sm.AllowWrite()) - { - string directive = _compiler_directive.Directive.text; - string name = prepr.getFirstIdent(directive); - string text = prepr.getSecondIdent(directive); - prepr.AddDefineDirective(name, text, _compiler_directive); - } - return _compiler_directive; - } - //UNDEF - if (_compiler_directive.Name.text == prepr.UNDEF) - { - if (prepr.sm.AllowWrite()) - { - string directive = _compiler_directive.Directive.text; - string name = prepr.getFirstIdent(directive); - if (name != null) - if (prepr.DefineDirectiveDefinded(name)) - prepr.DeleteDefineDirective(name, _compiler_directive); - } - return _compiler_directive; - } - //IFDEF - if (_compiler_directive.Name.text == prepr.IFDEF) - { - string directive = _compiler_directive.Directive.text; - if (prepr.sm.AllowWrite()) - { - - if (directive != null) - { - if (!prepr.DefineDirectiveDefinded(directive)) - prepr.sm.ChangeState(false, 1); - else - prepr.sm.ChangeState(true, 1); - } - - } - else - prepr.sm.ChangeState(false, -1); - return _compiler_directive; - } - //IFNDEF - if (_compiler_directive.Name.text == prepr.IFNDEF) - { - string directive = _compiler_directive.Directive.text; - if (prepr.sm.AllowWrite()) - { - - if (directive != null) - { - if (prepr.DefineDirectiveDefinded(directive)) - prepr.sm.ChangeState(false, 1); - else - prepr.sm.ChangeState(true, 1); - } - - } - else - prepr.sm.ChangeState(false, -1); - return _compiler_directive; - } - //ELSE - if (_compiler_directive.Name.text == prepr.ELSE) - { - if (prepr.sm.GetEndifCount() == 0 || prepr.sm.AllowElse() == false) - { - prepr.Errors.Add(new UnexpectedElse(prepr.CurrentFileName, _compiler_directive.source_context)); - } - else - { - if (prepr.sm.AllowWrite()) - prepr.sm.ChangeState(false, false); - else - { - if (prepr.sm.LastCondition() == 1) - prepr.sm.ChangeState(true, false); - else - prepr.sm.ChangeState(false, false); - } - } - return _compiler_directive; - } - //ENDIF - if (_compiler_directive.Name.text == prepr.ENDIF) - { - if (prepr.sm.GetEndifCount() == 0) - { - prepr.Errors.Add(new UnexpectedEndif(prepr.CurrentFileName, _compiler_directive.source_context)); - } - else - { - if (prepr.sm.AllowWrite()) - prepr.sm.ChangeState(true, true); - else - { - if (prepr.sm.LastEndifCondition() == 1) - prepr.sm.ChangeState(true, true); - else - prepr.sm.ChangeState(false, true); - } - } - return _compiler_directive; - } - return _compiler_directive; - } - return LRParser.GetReductionSyntaxNode(0); - } - case RuleConstants.RULE_EMPTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL -} -throw new RuleException("Unknown rule"); -} - - - - - - -} -} diff --git a/Parsers/PascalABCParser/Preprocessor_2/Parser.cs b/Parsers/PascalABCParser/Preprocessor_2/Parser.cs deleted file mode 100644 index 05dcfb450..000000000 --- a/Parsers/PascalABCParser/Preprocessor_2/Parser.cs +++ /dev/null @@ -1,173 +0,0 @@ -using System; -using System.IO; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.SyntaxTree; -using System.Resources; -using System.Reflection; -using PascalABCCompiler.Parsers; -using System.Collections.Generic; -using PascalABCCompiler.Errors; - - -namespace PascalABCCompiler.Preprocessor2 -{ - - public class PascalPreprocessor2LanguageParser:IParser - { - public GPB_PABCPreprocessor2 parser; - - public PascalPreprocessor2LanguageParser() - { - this.filesExtensions = new string[1]; - this.filesExtensions[0] = ".paspr2" + Parsers.Controller.HideParserExtensionPostfixChar; - parser = null; - } - - string[] filesExtensions; - public string[] FilesExtensions - { - get - { - return filesExtensions; - } - } - - ILanguageInformation lnginf = new DefaultLanguageInformation(); - public ILanguageInformation LanguageInformation { - get { - return lnginf; - } - } - - public bool CaseSensitive - { - get - { - return parser.LanguageGrammar.CaseSensitive; - } - } - - public Keyword[] Keywords - { - get - { - return new Keyword[0]; - } - } - - public List compilerDirectives = new List(); - public List CompilerDirectives - { - get - { - return compilerDirectives; - } - } - - List errors = new List(); - public List Errors - { - get - { - return errors; - } - set - { - errors = value; - } - } - - private Stream grammar_stream = null; - public void Reset() - { - grammar_stream = CGTResourceExtractor.Extract(new ResourceManager("PascalABCParser.Preprocessor_2.PABCPreprocessor2Lang", Assembly.GetExecutingAssembly()), "PABCPreprocessor2Language"); - parser = new GPB_PABCPreprocessor2(grammar_stream,null); - - max_errors = 5; - } - public virtual int max_errors - { - get - { - return parser.max_errors; - } - set - { - parser.max_errors=value; - } - } - - SourceFilesProviderDelegate sourceFilesProvider = null; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - public syntax_tree_node BuildTree(string FileName, string Text, ParseMode parseMode) - { - if (this.parser == null) - Reset(); - GPB_PABCPreprocessor2 parser = new GPB_PABCPreprocessor2(this.grammar_stream, this.parser.LanguageGrammar, this.parser.prepr); - parser.errors = Errors; - parser.current_file_name = FileName; - compilerDirectives = new List(); - parser.CompilerDirectives = compilerDirectives; - switch (parseMode) - { - case ParseMode.Expression: - case ParseMode.Statement: - return null; - } - syntax_tree_node cu = (syntax_tree_node)parser.Parse(Text); - if (cu != null && cu is compilation_unit) - { - (cu as compilation_unit).file_name = FileName; - (cu as compilation_unit).compiler_directives = compilerDirectives; - } - return cu; - } - - public string Name - { - get - { - return "PABCPreprocessor2"; - } - } - public string Version - { - get - { - return "0.1"; - } - } - public string Copyright - { - get - { - return "(c) Зарубин М.Ð�. 2009"; - } - } - public override string ToString() - { - return "PABCPreprocessor2 v0.1"; - } - public IPreprocessor Preprocessor - { - get - { - return null; - } - } - - } - - -} diff --git a/Parsers/PascalABCParser/Preprocessor_2/Preprocessor2.cs b/Parsers/PascalABCParser/Preprocessor_2/Preprocessor2.cs deleted file mode 100644 index e74833876..000000000 --- a/Parsers/PascalABCParser/Preprocessor_2/Preprocessor2.cs +++ /dev/null @@ -1,620 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using PascalABCCompiler; -using PascalABCCompiler.Errors; -using PascalABCCompiler.Preprocessor_2.Errors; -using System.IO; -using PascalABCCompiler.SyntaxTree; -using System.Text.RegularExpressions; -using PascalABCCompiler.ParserTools; -using PascalABCCompiler.Parsers; -using PascalABCCompiler.Preprocessor_2; - -namespace PascalABCCompiler.Preprocessor2 -{ - - public class Preprocessor2 : IPreprocessor - { - public string DEFINE = "define"; - public string UNDEF = "undef"; - public string INCLUDE = "include"; - public string IFDEF = "ifdef"; - public string IFNDEF = "ifndef"; - public string ENDIF = "endif"; - public string ELSE = "else"; - public string ASP = "asp"; - public string ENDASP = "endasp"; - public string ASPDATA = "aspdata"; - - PascalABCCompiler.Preprocessor2.PascalPreprocessor2LanguageParser preprocessor_parser = new PascalPreprocessor2LanguageParser(); - public StatesManager sm = new StatesManager(); - public List Directives = new List(); - public SourceContextMap SourceContextMap; - public TextWriter tw; - //public string SourceText; - //public string[] SourceLines; - public int CurrentLineNumber = 1; - public int Position = 0; - public List Errors; - public string CurrentFileName; - public List ProcessedFileNames = new List(); - - Dictionary DefineDirectives = new Dictionary(); - - //Aspects - public string CurrentAspectDirective = ""; - public bool InAspect = false; - public Dictionary AspectsMap = new Dictionary(); - public List AspectsNames = new List(); - //------- - - public int newLineLength = Environment.NewLine.Length; - - SourceFilesProviderDelegate sourceFilesProvider; - public SourceFilesProviderDelegate SourceFilesProvider - { - get - { - return sourceFilesProvider; - } - set - { - sourceFilesProvider = value; - } - } - - List compilerDirectives = null; - public List CompilerDirectives - { - get - { - return compilerDirectives; - } - } - - - public void AddDefineDirective(string name, string text, compiler_directive _compiler_directive) - { - if (!DefineDirectives.ContainsKey(name)) - { - DefineDirectives.Add(name, text); - } - else - { - Errors.Add(new NameDefineError(name, CurrentFileName, _compiler_directive.source_context)); - } - } - - public void DeleteDefineDirective(string name, compiler_directive _compiler_directive) - { - if (name != null) - { - if (DefineDirectives.ContainsKey(name)) - { - DefineDirectives.Remove(name); - } - else - { - Errors.Add(new NameUndefError(name, CurrentFileName, _compiler_directive.source_context)); - } - } - } - - public bool DefineDirectiveDefinded(string name) - { - return DefineDirectives.ContainsKey(name); - } - - public string getFirstIdent(string s) - { - s.Trim(); - int n = s.IndexOf(' '); - if (n > 0) - return s.Substring(0, s.IndexOf(' ')); - else - return s; - } - - public string getSecondIdent(string s) - { - string s1 = getFirstIdent(s); - return s.Substring(s1.Length, s.Length - s1.Length).Trim(); - } - - public Preprocessor2(SourceFilesProviderDelegate sourceFilesProvider) - { - this.sourceFilesProvider = sourceFilesProvider; - this.sm.Reset(); - } - - public string Build(string[] fileNames, List errors, SourceContextMap sourceContextMap) - { - compilerDirectives = new List(); - StringWriter sw = new StringWriter(); - tw = sw; - Errors = errors; - SourceContextMap = sourceContextMap; - //AspectsMap.Clear(); - ProcessedFileNames.Clear(); - DefineDirectives.Clear(); - foreach (string name in fileNames) - { - ProcessFile(name); - if (sm.GetEndifCount() != 0) - Errors.Add(new UnexpectedEOF(CurrentFileName, new SourceContext(int.MaxValue, 1, int.MaxValue, 1))); - if (errors.Count > 0) - return null; - } - return sw.ToString(); - } - - //Aspects - public string GetAspects(List cd_list, SourceContextMap sourceContextMap) - { - try - { - compilerDirectives = new List(cd_list); - //AspectsMap.Clear(); - - //GetStructures - foreach (compiler_directive cd in compilerDirectives) - { - if (cd.Name.text == ASP) - { - if (!(AspectsNames.Contains(cd.Directive.text))) - //if (!(AspectsMap.ContainsKey(cd.Directive.text))) - { - AspectsNames.Add(cd.Directive.text); - AspectsMap.Add(cd.Directive.text, new Aspect(cd.Directive.text)); - AspectsMap[cd.Directive.text].AddBegin(cd.source_context); - } - else - AspectsMap[cd.Directive.text].AddBegin(cd.source_context); - } - //if (cd.Name.text == ) - } - foreach (compiler_directive cd in compilerDirectives) - { - if (cd.Name.text == ENDASP) - { - if (!AspectsNames.Contains(cd.Directive.text)) - { - //Error - unexp end of aspect - } - else - AspectsMap[cd.Directive.text].AddEnd(cd.source_context); - //AspectsMap.Add(cd.Directive.text, new Aspect(cd.Directive.text, false, cd.source_context)); - } - } - //Get Text - StringWriter sw = new StringWriter(); - //SourceContextMap = sourceContextMap; - List beg; - List end; - string CurrentFileName; - string CurrentFileText; - - foreach (string str in AspectsMap.Keys) - { - beg = AspectsMap[str].GetBeginList(); - end = AspectsMap[str].GetEndList(); - - for (int i = 0; i < beg.Count; i++) - { - CurrentFileName = beg[i].FileName; - CurrentFileText = (string)SourceFilesProvider(CurrentFileName, SourceFileOperation.GetText); - sw.WriteLine(CurrentFileText.Substring(beg[i].Position, end[i].Position - beg[i].Position + end[i].Length)); - } - //AspectsMap[str].GetBeginList(); - } - return sw.ToString(); - } - catch (Exception e) - { - this.Errors.Add(new PascalABCCompiler.Errors.Error("Error in aspects reading")); - return "Error in aspects reading"; - } - } - - public string WriteAspects(string aspects, string proj) - { - - StringWriter sw = new StringWriter(); - List beg; - List end; - string CurrentAspectText; - string CurrentFileText; - string CurrentFileName; - string CurrentPath; - if (proj != "") - CurrentPath = proj + "\\"; - else - CurrentPath = ""; - - foreach (string str in AspectsMap.Keys) - { - beg = AspectsMap[str].GetBeginList(); - end = AspectsMap[str].GetEndList(); - int asp_num = 0; - int asp_num_file = 0; - string asp_file_name = CurrentPath + beg[0].FileName; - for (int i = 0; i < beg.Count; i++) - { - ///Files names & asp_num? - CurrentFileName = CurrentPath + beg[i].FileName; - CurrentFileText = (string)SourceFilesProvider(CurrentFileName, SourceFileOperation.GetText); - if (asp_file_name != CurrentFileName) - { - asp_num_file = 0; - asp_file_name = CurrentFileName; - } - if (aspects.IndexOf("{$asp " + str + "}", asp_num)>=0) - { - CurrentAspectText = aspects.Substring(aspects.IndexOf("{$asp " + str + "}", asp_num), aspects.IndexOf("{$endasp " + str + "}", asp_num) - aspects.IndexOf("{$asp " + str + "}", asp_num) + ("{$endasp " + str + "}").Length); - asp_num = aspects.IndexOf("{$endasp " + str + "}", asp_num) + ("{$endasp " + str + "}").Length; - - int d = CurrentFileText.IndexOf("{$asp " + str + "}", asp_num_file); - int c = CurrentFileText.IndexOf("{$endasp " + str + "}", asp_num_file); - if (d >= 0 && c >= 0) - { - CurrentFileText = CurrentFileText.Substring(0, asp_num_file) + CurrentFileText.Substring(asp_num_file, d - asp_num_file) + CurrentAspectText + CurrentFileText.Substring(c + ("{$endasp " + str + "}").Length); - - c = d + CurrentAspectText.Length; - - asp_num_file = c + ("{$endasp " + str + "}").Length; ; - } - else - break; - - StreamWriter swrt = new StreamWriter(Path.GetDirectoryName(CurrentFileName) + "\\" + Path.GetFileNameWithoutExtension(CurrentFileName) + ".pas", false, Encoding.UTF8); - swrt.Write(CurrentFileText); - swrt.Close(); - } - } - } - return sw.ToString(); - } - - public string WriteAspect(string aspects, string proj, string str) - { - - StringWriter sw = new StringWriter(); - List beg; - List end; - string CurrentAspectText; - string CurrentFileText; - string CurrentFileName; - string CurrentPath; - if (proj != "") - CurrentPath = proj + "\\"; - else - CurrentPath = ""; - - beg = AspectsMap[str].GetBeginList(); - end = AspectsMap[str].GetEndList(); - int asp_num = 0; - int asp_num_file = 0; - string asp_file_name = CurrentPath + beg[0].FileName; - for (int i = 0; i < beg.Count; i++) - { - CurrentFileName = CurrentPath + beg[i].FileName; - CurrentFileText = (string)SourceFilesProvider(CurrentFileName, SourceFileOperation.GetText); - if (asp_file_name != CurrentFileName) - { - asp_num_file = 0; - asp_file_name = CurrentFileName; - } - if (aspects.IndexOf("{$asp " + str + "}", asp_num) >= 0) - { - CurrentAspectText = aspects.Substring(aspects.IndexOf("{$asp " + str + "}", asp_num), aspects.IndexOf("{$endasp " + str + "}", asp_num) - aspects.IndexOf("{$asp " + str + "}", asp_num) + ("{$endasp " + str + "}").Length); - asp_num = aspects.IndexOf("{$endasp " + str + "}", asp_num) + ("{$endasp " + str + "}").Length; - - int d = CurrentFileText.IndexOf("{$asp " + str + "}", asp_num_file); - int c = CurrentFileText.IndexOf("{$endasp " + str + "}", asp_num_file); - if (d >= 0 && c >= 0) - { - CurrentFileText = CurrentFileText.Substring(0, asp_num_file) + CurrentFileText.Substring(asp_num_file, d - asp_num_file) + CurrentAspectText + CurrentFileText.Substring(c + ("{$endasp " + str + "}").Length); - - c = d + CurrentAspectText.Length; - - asp_num_file = c + ("{$endasp " + str + "}").Length; - } - else - { - break; - } - StreamWriter swrt = new StreamWriter(Path.GetDirectoryName(CurrentFileName) + "\\" + Path.GetFileNameWithoutExtension(CurrentFileName) + ".pas", false, Encoding.UTF8); - swrt.Write(CurrentFileText); - swrt.Close(); - } - } - - return sw.ToString(); - } - - //end aspects - - public void ProcessFile(string FileName) - { - ProcessedFileNames.Add(Path.GetFileName(FileName)); - string Text = (string)SourceFilesProvider(FileName, SourceFileOperation.GetText); - CurrentFileName = FileName; - //SourceText = Text; - //string[] s ={ "\r\n" }; - //SourceLines = Text.Split(s, StringSplitOptions.None); - preprocessor_parser.Reset(); - preprocessor_parser.Errors = Errors; - preprocessor_parser.parser.prepr = this; - compilation_unit cu = preprocessor_parser.BuildTree(FileName, Text, PascalABCCompiler.Parsers.ParseMode.Normal) as compilation_unit; - CurrentFileName = FileName; - - //if (cu.compiler_directives.Count != 0) - // CompilerDirectives.AddRange(cu.compiler_directives); - - ProcessedFileNames.Remove(FileName); - } - - /* - public void WriteToStream(int line1, int line2) - { - int startl = 1; - int endl = SourceLines.Length; - if (line1 >= 0) - startl = line1; - if (line2 >= 0) - endl = line2; - if (endl - startl < 0) - return; - int Length = 0; - for (int i = startl; i <= endl; i++) - { - tw.WriteLine(SourceLines[i - 1]); - Length += SourceLines[i - 1].Length + newLineLength; - } - SourceContext nsc = new SourceContext(CurrentLineNumber, 1, CurrentLineNumber + endl - startl, int.MaxValue, Position, Position + Length); - SourceContext rsc = new SourceContext(startl, 1, endl, int.MaxValue); - rsc.FileName = CurrentFileName; - SourceContextMap.AddArea(nsc, rsc); - CurrentLineNumber += endl - startl + 1; - Position += Length; - } - - public void WriteToStream(int line1, int line2, int col1, int col2) - { - int startl = 1; - int endl = SourceLines.Length; - if (line1 >= 0) - startl = line1; - if (line2 >= 0) - endl = line2; - if (endl - startl < 0) - return; - int Length = 0; - for (int i = startl; i <= endl; i++) - { - string s = (SourceLines[i - 1]).Substring(col1 - 1, col2 - col1 + 1); - Length += s.Length + newLineLength; - } - SourceContext nsc = new SourceContext(CurrentLineNumber, col1 - 1, CurrentLineNumber + endl - startl, int.MaxValue, Position, Position + Length); - SourceContext rsc = new SourceContext(startl, 1, endl, int.MaxValue); - rsc.FileName = CurrentFileName; - SourceContextMap.AddArea(nsc, rsc); - CurrentLineNumber += endl - startl + 1; - Position += Length; - } - */ - - public void WriteToStream(SourceContext sc, string text) - { - tw.WriteLine(text); - sc.FileName = CurrentFileName; - SourceContextMap.AddArea(new SourceContext(CurrentLineNumber, 1, CurrentLineNumber + sc.end_position.line_num - sc.begin_position.line_num, sc.end_position.column_num, Position, Position + text.Length), sc); - CurrentLineNumber += 1;// sc.end_position.line_num - sc.begin_position.line_num + 1; - Position += text.Length; - - } - - } - - public class StatesManager - { - private Stack if_stack; - private Stack endif_stack; - bool allow_write; - bool allow_else; - - public StatesManager() - { - allow_write = true; - allow_else = false; - if_stack = new Stack(); - endif_stack = new Stack(); - } - - public void Reset() - { - allow_write = true; - if_stack.Clear(); - endif_stack.Clear(); - } - - public void AddCondition(int i) - { - allow_else = true; - if_stack.Push(i); - endif_stack.Push(i); - } - - public int GetIfCount() - { - return if_stack.Count; - } - - public int GetEndifCount() - { - return endif_stack.Count; - } - - public int DeleteCondition(bool endif) - { - int i = 0; - if (endif) - { - allow_else = true; - i = endif_stack.Pop(); - } - else - allow_else = false; - if (if_stack.Count != 0) - return if_stack.Pop(); - else - { - //error - return i; - } - } - - public int LastCondition() - { - if (if_stack.Count != 0) - return if_stack.Peek(); - else - return 0; - } - - public int LastEndifCondition() - { - if (endif_stack.Count != 0) - return endif_stack.Peek(); - else - return 0; - } - - public bool AllowWrite() - { - return allow_write; - } - - public bool AllowElse() - { - return allow_else; - } - - public void ChangeState(bool new_mode) - { - allow_write = new_mode; - } - - public void ChangeState(bool new_mode, int new_if) - { - allow_write = new_mode; - AddCondition(new_if); - } - - public void ChangeState(bool new_mode, bool endif) - { - allow_write = new_mode; - int i = DeleteCondition(endif); - // return i; - } - - } - - //Aspects - public class Aspect - { - private string AspName; - private string AspAuthor = "name"; - private string AspVersion = "0.1"; - private List begin_list; - private List end_list; - bool allow_mod; - bool saved_params; - - public Aspect(string name) - { - this.AspName = name; - begin_list = new List(); - end_list = new List(); - allow_mod = true; - } - - public Aspect(string name, string auth, string ver) - { - this.AspName = name; - this.AspAuthor = auth; - this.AspVersion = ver; - begin_list = new List(); - end_list = new List(); - allow_mod = true; - } - - public void AddBegin(SourceContext sc) - { - if (!begin_list.Contains(sc)) - begin_list.Add(sc); - } - - public void AddEnd(SourceContext sc) - { - if (!end_list.Contains(sc)) - end_list.Add(sc); - } - - public bool IsSavedParams - { - set - { - IsSavedParams = value; - } - get - { - return saved_params; - } - } - - public string Author - { - set - { - AspAuthor = value; - } - get - { - return AspAuthor; - } - } - - public string Version - { - set - { - AspVersion = value; - } - get - { - return AspVersion; - } - } - - public List GetBeginList() - { - return new List(begin_list); - } - - public List GetEndList() - { - return new List(end_list); - } - - public void Reset() - { - allow_mod = true; - begin_list.Clear(); - end_list.Clear(); - } - } - //end aspects - -} \ No newline at end of file diff --git a/Parsers/PascalABCParser/Properties/AssemblyInfo.cs b/Parsers/PascalABCParser/Properties/AssemblyInfo.cs deleted file mode 100644 index 2129aacb6..000000000 --- a/Parsers/PascalABCParser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("PascalABCParser")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("DSS")] -[assembly: AssemblyProduct("PascalABCParser")] -[assembly: AssemblyCopyright("Copyright © DSS 2006-2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e5788e70-934b-42a9-a652-255b64cf1709")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.6.*")] -[assembly: AssemblyFileVersion("1.6.*")] diff --git a/Parsers/PascalABCParser/pascalabc_lrparser.cs b/Parsers/PascalABCParser/pascalabc_lrparser.cs deleted file mode 100644 index e8706bc3a..000000000 --- a/Parsers/PascalABCParser/pascalabc_lrparser.cs +++ /dev/null @@ -1,422 +0,0 @@ - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using System.Collections.Generic; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.PascalABCParser.Errors; -using PascalABCCompiler.ParserTools; - -using PascalABCCompiler.Preprocessor2; - -namespace PascalABCCompiler.PascalABCParser -{ - public partial class GPBParser_PascalABC : GPBParser - { - public Preprocessor2.Preprocessor2 prepr; - internal SourceContextMap scm; - public bool build_tree_for_brackets = false; - private Stack NodesStack; - private SyntaxError error; - - Stream GrammarStream; - - public GPBParser_PascalABC(Stream stream, GoldParser.Grammar grammar, Preprocessor2.Preprocessor2 prepr1) - : base(grammar) - { - prepr = prepr1; - - GrammarStream = stream; - parsertools = new pascalabc_parsertools(); - } - - public GPBParser_PascalABC(Stream stream, Preprocessor2.Preprocessor2 prepr1) - : base(stream) - { - prepr = prepr1; - - GrammarStream = stream; - parsertools = new pascalabc_parsertools(); - } - - public object Parse(string source) - { - NodesStack = new Stack(); - LRParser = new GoldParser.Parser(new StringReader(source), LanguageGrammar); - parsertools.parser = LRParser; - LRParser.TrimReductions = true; - try - { - while (true) - { - switch (LRParser.Parse()) - { - case GoldParser.ParseMessage.LexicalError: - errors.Add(new TokenReadError(this)); - LRParser.PopInputToken(); - if (errors.Count >= max_errors) - return null; - break; - - //sdes nugno vesti chtoto vrode steka poslednix oshibok. podumat - case GoldParser.ParseMessage.SyntaxError: - GoldParser.Symbol sym = LRParser.PopInputToken(); - error = new PABCNETUnexpectedToken(this); - //error = new UnexpectedToken(this, parsertools.symbol_collection_to_string(this.LRParser.GetExpectedTokens())); - if (sym.SymbolType == GoldParser.SymbolType.End && errors.Count > 0) - return null; - errors.Add(error); - if (errors.Count >= max_errors) - return null; - break; - case GoldParser.ParseMessage.Reduction: - LRParser.TokenSyntaxNode = CreateNonTerminalObject(LRParser.ReductionRule.Index); - if ((LRParser.TokenSyntaxNode as syntax_tree_node) != null) - prev_node = LRParser.TokenSyntaxNode; - break; - - case GoldParser.ParseMessage.Accept: - return LRParser.TokenSyntaxNode; - - case GoldParser.ParseMessage.TokenRead: - LRParser.TokenSyntaxNode = CreateTerminalObject(LRParser.TokenSymbol.Index); - break; - - case GoldParser.ParseMessage.InternalError: - errors.Add(new CompilerInternalError("PascalABCParser", new Exception("ParseMessage.InternalError"))); - return null; - - case GoldParser.ParseMessage.NotLoadedError: - errors.Add(new CompilerInternalError("PascalABCParser", new Exception("ParseMessage.NotLoadedError"))); - return null; - - case GoldParser.ParseMessage.CommentError: - errors.Add(new UnexpectedToken(this, "(EOF)")); - return null; - - case GoldParser.ParseMessage.CommentBlockRead: - { - /* - compiler_directive cd = new compiler_directive(); - cd.source_context = parsertools.GetTokenSourceContext(this.LRParser); - string comment = this.LRParser.CommentText; - cd.Name = new token_info(comment); - cd.Directive = new token_info(comment); - cd.source_context = new SourceContext(cd.source_context,parsertools.GetTokenSourceContext(this.LRParser)); - if (cd.Directive.text[0] == '{' && cd.Directive.text[1] == '$') - this.errors.Add(new Preprocessor_2.Errors.SyntaxErrorInDirective(cd.source_context.FileName, cd.source_context, cd.Directive.text)); - - this.CompilerDirectives.Add(cd); - */ - - } break; - - case GoldParser.ParseMessage.CommentLineRead: - { - /* - compiler_directive cd = new compiler_directive(); - cd.source_context = parsertools.GetTokenSourceContext(this.LRParser); - string comment = this.LRParser.CommentText; - cd.Name = new token_info(comment); - cd.Directive = new token_info(comment); - cd.source_context = new SourceContext(cd.source_context.begin_position.line_num, cd.source_context.begin_position.column_num, cd.source_context.end_position.line_num, cd.source_context.end_position.column_num + comment.Length - Environment.NewLine.Length); - this.CompilerDirectives.Add(cd); - */ - } break; - - } - } - } - catch (GoldParser.UnexpectedEOFinParseCommentBlock) - { - throw new TokenReadError(this); - } - catch (Exception e) - { - if (errors.Count > 0) - return null; - else - throw; - } - - } - - ////////////////////////////////////tasha_16.04.2010 - /// SSM перенеÑ� из pascalabc_lparser_rules Ñ�юда, Ñ‚.к. Ñ�то partial клаÑ�Ñ�, а та чаÑ�ть генерировалаÑ�ÑŒ автоматичеÑ�ки. Голову отрывать надо - int lambda_num = 0; - List pascalABC_lambda_definitions = new List(); - List pascalABC_var_statements = new List(); - List pascalABC_type_declarations = new List(); - procedure_definition lambda(function_lambda_definition _function_lambda_definition) - { - procedure_definition _func_def = new procedure_definition(); - method_name _method_name1 = new method_name(null,null, new SyntaxTree.ident(_function_lambda_definition.lambda_name), null); - parsertools.create_source_context(_method_name1, _method_name1.meth_name, _method_name1.meth_name); - function_header _function_header1 = new function_header(); - - object rt1 = new object(); - _function_header1.name = _method_name1; - if (_function_header1.name.meth_name is template_type_name) - { - _function_header1.template_args = (_function_header1.name.meth_name as template_type_name).template_args; - ident id = new ident(_function_header1.name.meth_name.name); - parsertools.create_source_context(id, _function_header1.name.meth_name, _function_header1.name.meth_name); - _function_header1.name.meth_name = id; - } - - SyntaxTree.formal_parameters fps = new PascalABCCompiler.SyntaxTree.formal_parameters(); - _function_header1.parameters = _function_lambda_definition.formal_parameters;//fps; - - /*SyntaxTree.named_type_reference _named_type_reference = new SyntaxTree.named_type_reference(); - SyntaxTree.ident idtype = new SyntaxTree.ident("object"); - _named_type_reference.source_context = idtype.source_context; - _named_type_reference.names.Add(idtype); - rt1 = _named_type_reference; - _function_header1.return_type = (SyntaxTree.type_definition)_named_type_reference;*/ - _function_header1.return_type = _function_lambda_definition.return_type; - - _function_header1.of_object = false; - _function_header1.class_keyword = false; - token_info _token_info = new token_info("function"); - _token_info.source_context = parsertools.GetTokenSourceContext(); - parsertools.create_source_context(_function_header1, _token_info, _token_info); - - SyntaxTree.block _block1 = new SyntaxTree.block(null, null); - SyntaxTree.statement_list sl1 = new SyntaxTree.statement_list(); - sl1.subnodes.Add(_function_lambda_definition.proc_body); - _block1.program_code = sl1; - _func_def.proc_header = _function_header1; - _func_def.proc_body = (SyntaxTree.proc_block)_block1; - if (_function_lambda_definition.defs != null) - { - if (((block)_func_def.proc_body).defs == null) - ((block)_func_def.proc_body).defs = new declarations(); - for (int l = 0; l < _function_lambda_definition.defs.Count; l++) - ((block)_func_def.proc_body).defs.defs.Add(_function_lambda_definition.defs[l] as procedure_definition); - } - _function_lambda_definition.proc_definition = _func_def; - parsertools.create_source_context(_func_def, _function_header1, _function_header1); - return _func_def; - } - public function_lambda_definition find_pascalABC_lambda_name(string name) - { - int i = 0; - while (i < pascalABC_lambda_definitions.Count && (pascalABC_lambda_definitions[i] == null || ((function_lambda_definition)pascalABC_lambda_definitions[i]).lambda_name != name)) - i++; - if (i < pascalABC_lambda_definitions.Count) - return (function_lambda_definition)pascalABC_lambda_definitions[i]; - else - return null; - } - public var_def_statement find_var_statements(string name) - { - int i = pascalABC_var_statements.Count - 1; - bool b = false; - while (!b && i >= 0) - { - var_def_statement vds = (var_def_statement)pascalABC_var_statements[i]; - int j = 0; - while (j < vds.vars.idents.Count && - vds.vars.idents[j].name != name) - j++; - if (j < vds.vars.idents.Count) - b = true; - else - i--; - } - if (i >= 0 && i < pascalABC_var_statements.Count && - ((var_def_statement)pascalABC_var_statements[i]).vars_type != null) - return (var_def_statement)pascalABC_var_statements[i]; - else - return null; - } - public ident func_decl_lambda(object lr0, object lr2) - { - statement_list _statement_list = (statement_list)lr2; - expression_list _expression_list = new expression_list(); - ident_list _i_l = new ident_list(); - formal_parameters _formal_parameters = new formal_parameters(); - if (lr0 != null) - { - List ar = (List)lr0; - for (int i = 0; i < ar.Count; i++) - if (ar[i] is ident) - _i_l.idents.Add((ident)ar[i]); - else - _i_l.idents.Add(((var_def_statement)ar[i]).vars.idents[0]); - - for (int i = 0; i < _i_l.idents.Count; i++) - _expression_list.expressions.Add(_i_l.idents[i]); - - for (int i = 0; i < ar.Count; i++) - { - ident_list _ident_list = new ident_list(); - ident id = _i_l.idents[i]; - _ident_list.idents.Add(id); - string name_param = id.name; - typed_parameters _typed_parameters = null; - int k = 0; - { - named_type_reference _named_type_reference = new named_type_reference(); - type_definition t_d = new type_definition(); - if (ar[i] is ident) - { - ident idtype = new ident("object"); - _named_type_reference.names.Add(idtype); - t_d = (type_definition)_named_type_reference; - } - else - { - t_d = ((var_def_statement)ar[i]).vars_type; - } - _typed_parameters = new typed_parameters(_ident_list, t_d, parametr_kind.none, null); - parsertools.create_source_context(_typed_parameters, _ident_list, t_d); - - } - _formal_parameters.params_list.Add(_typed_parameters); - } - } - ////////////////////////// - named_type_reference _named_type_reference1 = new named_type_reference(); - ident idtype1 = new ident("object"); - _named_type_reference1.source_context = idtype1.source_context; - _named_type_reference1.names.Add(idtype1); - ///////////////////////////// - lambda_num++; - function_lambda_definition _procedure_definition = new function_lambda_definition(); - _procedure_definition.formal_parameters = _formal_parameters; - _procedure_definition.return_type = (type_definition)_named_type_reference1; - _procedure_definition.ident_list = _i_l; - _procedure_definition.proc_body = null; - _procedure_definition.parameters = _expression_list; - _procedure_definition.lambda_name = "__lambda__" + lambda_num; - //new function_lambda_definition(_formal_parameters, (type_definition)_named_type_reference1, _i_l, null, _expression_list, "lambda" + lambda_num); - object rt = _i_l; - _procedure_definition.proc_body = _statement_list; - - //////////////////////////////vnutrennie lambda - if (_procedure_definition.defs == null) - _procedure_definition.defs = new List(); - while (pascalABC_lambda_definitions.Count > 0 && pascalABC_lambda_definitions[pascalABC_lambda_definitions.Count - 1] != null) - { - _procedure_definition.defs.Add(lambda((function_lambda_definition)pascalABC_lambda_definitions[pascalABC_lambda_definitions.Count - 1])); - pascalABC_lambda_definitions.RemoveAt(pascalABC_lambda_definitions.Count - 1); - } - if (pascalABC_lambda_definitions.Count > 0 && pascalABC_lambda_definitions[pascalABC_lambda_definitions.Count - 1] == null) - pascalABC_lambda_definitions.RemoveAt(pascalABC_lambda_definitions.Count - 1); - pascalABC_lambda_definitions.Add(_procedure_definition); - /////////////////////////////////////////////// - parsertools.create_source_context(_procedure_definition, _expression_list, rt); - ident _name = new ident(_procedure_definition.lambda_name); - if (lr0 != null) - _name.source_context = _i_l.idents[0].source_context; - return _name; - } - - public List ident_list11(object lr1, object lr3) - { - List ar = (List)lr3; - ar.Insert(0, lr1); - return ar; - } - - public List ident_list12(object lr0) - { - List ar = new List(); - ar.Add(lr0); - return ar; - } - - public List ident_list21(object lr0, object lr2) - { - List ar = (List)lr0; - ar.Add(lr2); - return ar; - } - - public List ident_list13(object lr1, object lr3, object lr5) - { - List ar = (List)lr5; - //named_type_reference n_t_r = (named_type_reference)lr3; - var_def_statement vds = new var_def_statement(); - vds.vars = new ident_list(); - vds.vars.idents.Add((ident)lr1); - vds.vars_type = (type_definition)lr3;//n_t_r; - ar.Insert(0, vds); - return ar; - } - - public List ident_list14(object lr1, object lr3) - { - List ar = new List(); - //named_type_reference n_t_r = (named_type_reference)lr3; - var_def_statement vds = new var_def_statement(); - vds.vars = new ident_list(); - vds.vars.idents.Add((ident)lr1); - vds.vars_type = (type_definition)lr3; - ar.Add(vds); - return ar; - } - - public void add_lambda_to_program_block(block _block) - { - //tasha 16.04.2010 - if (pascalABC_lambda_definitions.Count > 0) - { - if (_block.defs == null) - _block.defs = new declarations(); - for (int i = 0; i < pascalABC_lambda_definitions.Count; i++) - _block.defs.defs.Add(lambda((function_lambda_definition)pascalABC_lambda_definitions[i])); - pascalABC_lambda_definitions.Clear(); - } - } - - public void add_lambda(object lr1, procedure_definition _procedure_definition) - { - if (pascalABC_lambda_definitions.Count > 0)//tasha 16.04.2010 - { - block _block = (block)lr1; - if (_block.defs == null) - _block.defs = new declarations(); - for (int i = 0; i < pascalABC_lambda_definitions.Count; i++) - _block.defs.defs.Add(lambda((function_lambda_definition)pascalABC_lambda_definitions[i])); - pascalABC_lambda_definitions.Clear(); - _procedure_definition.proc_body = (proc_block)_block; - } - else - //////////////////////////tasha 16.04.2010 - _procedure_definition.proc_body = (proc_block)lr1; - } - - public void for_assignment(object lr0, object lr2) - { - if (lr0 is ident && lr2 is ident && ((ident)lr2).name.Contains("__lambda__")) - { - string type_name = ""; - var_def_statement vds = find_var_statements(((ident)lr0).name); - if (vds != null) - type_name = ((named_type_reference)vds.vars_type).names[0].name; - if (type_name != "") - { - int ii = 0; - while (ii < pascalABC_type_declarations.Count && - ((type_declaration)pascalABC_type_declarations[ii]).type_name.name != type_name) - ii++; - if (ii < pascalABC_type_declarations.Count) - { - type_definition td = ((type_declaration)pascalABC_type_declarations[ii]).type_def; - function_lambda_definition fld = find_pascalABC_lambda_name(((ident)lr2).name); - fld.return_type = ((function_header)td).return_type; - for (int k = 0; k < fld.formal_parameters.params_list.Count && k < ((function_header)td).parameters.params_list.Count; k++) - fld.formal_parameters.params_list[k].vars_type = ((function_header)td).parameters.params_list[k].vars_type; - } - pascalABC_var_statements.Remove(vds); - } - } - } - - } - -} diff --git a/Parsers/PascalABCParser/pascalabc_lrparser_rules.cs b/Parsers/PascalABCParser/pascalabc_lrparser_rules.cs deleted file mode 100644 index 850634269..000000000 --- a/Parsers/PascalABCParser/pascalabc_lrparser_rules.cs +++ /dev/null @@ -1,11164 +0,0 @@ - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//������ ���� ��������� �������, �� ��������� �������������!!! -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Collections; -using System.Collections.Generic; -using PascalABCCompiler.SyntaxTree; -using PascalABCCompiler.Errors; -using PascalABCCompiler.PascalABCParser.Errors; -using PascalABCCompiler.ParserTools; -using GoldParser; - -namespace PascalABCCompiler.PascalABCParser -{ -public partial class GPBParser_PascalABC : GPBParser -{ - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//SymbolConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum SymbolConstants : int -{ - SYMBOL_EOF = 0, // (EOF) - SYMBOL_ERROR = 1, // (Error) - SYMBOL_WHITESPACE = 2, // (Whitespace) - SYMBOL_COMMENTEND = 3, // (Comment End) - SYMBOL_COMMENTLINE = 4, // (Comment Line) - SYMBOL_COMMENTSTART = 5, // (Comment Start) - SYMBOL_TKABSOLUTE = 6, // tkAbsolute - SYMBOL_TKABSTRACT = 7, // tkAbstract - SYMBOL_TKADDRESSOF = 8, // tkAddressOf - SYMBOL_TKAMPERSEND = 9, // tkAmpersend - SYMBOL_TKAND = 10, // tkAnd - SYMBOL_TKARRAY = 11, // tkArray - SYMBOL_TKARROW = 12, // tkArrow - SYMBOL_TKAS = 13, // tkAs - SYMBOL_TKASCIICHAR = 14, // tkAsciiChar - SYMBOL_TKASMBODY = 15, // tkAsmBody - SYMBOL_TKASSEMBLER = 16, // tkAssembler - SYMBOL_TKASSIGN = 17, // tkAssign - SYMBOL_TKAT = 18, // tkAt - SYMBOL_TKAUTOMATED = 19, // tkAutomated - SYMBOL_TKBEGIN = 20, // tkBegin - SYMBOL_TKBOOLEAN = 21, // tkBoolean - SYMBOL_TKBYTE = 22, // tkByte - SYMBOL_TKCARDINAL = 23, // tkCardinal - SYMBOL_TKCASE = 24, // tkCase - SYMBOL_TKCHAR = 25, // tkChar - SYMBOL_TKCLASS = 26, // tkClass - SYMBOL_TKCOLON = 27, // tkColon - SYMBOL_TKCOMMA = 28, // tkComma - SYMBOL_TKCOMP = 29, // tkComp - SYMBOL_TKCONST = 30, // tkConst - SYMBOL_TKCONSTRUCTOR = 31, // tkConstructor - SYMBOL_TKCONTAINS = 32, // tkContains - SYMBOL_TKCSHARPSTYLEOR = 33, // tkCSharpStyleOr - SYMBOL_TKDEFAULT = 34, // tkDefault - SYMBOL_TKDEREF = 35, // tkDeref - SYMBOL_TKDESTRUCTOR = 36, // tkDestructor - SYMBOL_TKDIRECTIVENAME = 37, // tkDirectiveName - SYMBOL_TKDISPID = 38, // tkDispid - SYMBOL_TKDIV = 39, // tkDiv - SYMBOL_TKDIVEQUAL = 40, // tkDivEqual - SYMBOL_TKDO = 41, // tkDo - SYMBOL_TKDOTDOT = 42, // tkDotDot - SYMBOL_TKDOUBLE = 43, // tkDouble - SYMBOL_TKDOWNTO = 44, // tkDownto - SYMBOL_TKELSE = 45, // tkElse - SYMBOL_TKEND = 46, // tkEnd - SYMBOL_TKEQUAL = 47, // tkEqual - SYMBOL_TKERROR = 48, // tkError - SYMBOL_TKEVENT = 49, // tkEvent - SYMBOL_TKEXCEPT = 50, // tkExcept - SYMBOL_TKEXPLICIT = 51, // tkExplicit - SYMBOL_TKEXPORTS = 52, // tkExports - SYMBOL_TKEXTENDED = 53, // tkExtended - SYMBOL_TKEXTERNAL = 54, // tkExternal - SYMBOL_TKFILE = 55, // tkFile - SYMBOL_TKFINAL = 56, // tkFinal - SYMBOL_TKFINALIZATION = 57, // tkFinalization - SYMBOL_TKFINALLY = 58, // tkFinally - SYMBOL_TKFLOAT = 59, // tkFloat - SYMBOL_TKFOR = 60, // tkFor - SYMBOL_TKFOREACH = 61, // tkForeach - SYMBOL_TKFORWARD = 62, // tkForward - SYMBOL_TKFUNCTION = 63, // tkFunction - SYMBOL_TKGOTO = 64, // tkGoto - SYMBOL_TKGREATER = 65, // tkGreater - SYMBOL_TKGREATEREQUAL = 66, // tkGreaterEqual - SYMBOL_TKHEX = 67, // tkHex - SYMBOL_TKIDENTIFIER = 68, // tkIdentifier - SYMBOL_TKIF = 69, // tkIf - SYMBOL_TKILCODE = 70, // tkILCode - SYMBOL_TKIMPLEMENTATION = 71, // tkImplementation - SYMBOL_TKIMPLEMENTS = 72, // tkImplements - SYMBOL_TKIMPLICIT = 73, // tkImplicit - SYMBOL_TKIN = 74, // tkIn - SYMBOL_TKINDEX = 75, // tkIndex - SYMBOL_TKINHERITED = 76, // tkInherited - SYMBOL_TKINITIALIZATION = 77, // tkInitialization - SYMBOL_TKINLINE = 78, // tkInline - SYMBOL_TKINT64 = 79, // tkInt64 - SYMBOL_TKINTEGER = 80, // tkInteger - SYMBOL_TKINTERFACE = 81, // tkInterface - SYMBOL_TKINTERNAL = 82, // tkInternal - SYMBOL_TKIS = 83, // tkIs - SYMBOL_TKLABEL = 84, // tkLabel - SYMBOL_TKLIBRARY = 85, // tkLibrary - SYMBOL_TKLOCK = 86, // tkLock - SYMBOL_TKLONGINT = 87, // tkLongInt - SYMBOL_TKLONGWORD = 88, // tkLongWord - SYMBOL_TKLOWER = 89, // tkLower - SYMBOL_TKLOWEREQUAL = 90, // tkLowerEqual - SYMBOL_TKMESSAGE = 91, // tkMessage - SYMBOL_TKMINUS = 92, // tkMinus - SYMBOL_TKMINUSEQUAL = 93, // tkMinusEqual - SYMBOL_TKMOD = 94, // tkMod - SYMBOL_TKMULTEQUAL = 95, // tkMultEqual - SYMBOL_TKNAME = 96, // tkName - SYMBOL_TKNIL = 97, // tkNil - SYMBOL_TKNODEFAULT = 98, // tkNodefault - SYMBOL_TKNOT = 99, // tkNot - SYMBOL_TKNOTEQUAL = 100, // tkNotEqual - SYMBOL_TKOF = 101, // tkOf - SYMBOL_TKOLEVARIANT = 102, // tkOleVariant - SYMBOL_TKON = 103, // tkOn - SYMBOL_TKOPERATOR = 104, // tkOperator - SYMBOL_TKOR = 105, // tkOr - SYMBOL_TKORDINTEGER = 106, // tkOrdInteger - SYMBOL_TKOUT = 107, // tkOut - SYMBOL_TKOVERLOAD = 108, // tkOverload - SYMBOL_TKOVERRIDE = 109, // tkOverride - SYMBOL_TKPACKAGE = 110, // tkPackage - SYMBOL_TKPACKED = 111, // tkPacked - SYMBOL_TKPARAMS = 112, // tkParams - SYMBOL_TKPARSEMODEEXPRESSION = 113, // tkParseModeExpression - SYMBOL_TKPARSEMODESTATEMENT = 114, // tkParseModeStatement - SYMBOL_TKPCHAR = 115, // tkPChar - SYMBOL_TKPLUS = 116, // tkPlus - SYMBOL_TKPLUSEQUAL = 117, // tkPlusEqual - SYMBOL_TKPOINT = 118, // tkPoint - SYMBOL_TKPRIVATE = 119, // tkPrivate - SYMBOL_TKPROCEDURE = 120, // tkProcedure - SYMBOL_TKPROGRAM = 121, // tkProgram - SYMBOL_TKPROPERTY = 122, // tkProperty - SYMBOL_TKPROTECTED = 123, // tkProtected - SYMBOL_TKPUBLIC = 124, // tkPublic - SYMBOL_TKQUESTION = 125, // tkQuestion - SYMBOL_TKRAISE = 126, // tkRaise - SYMBOL_TKREAD = 127, // tkRead - SYMBOL_TKREADONLY = 128, // tkReadOnly - SYMBOL_TKREAL = 129, // tkReal - SYMBOL_TKRECORD = 130, // tkRecord - SYMBOL_TKREINTRODUCE = 131, // tkReintroduce - SYMBOL_TKREPEAT = 132, // tkRepeat - SYMBOL_TKREQUIRES = 133, // tkRequires - SYMBOL_TKRESIDENT = 134, // tkResident - SYMBOL_TKRESOURCESTRING = 135, // tkResourceString - SYMBOL_TKROUNDCLOSE = 136, // tkRoundClose - SYMBOL_TKROUNDOPEN = 137, // tkRoundOpen - SYMBOL_TKSEMICOLON = 138, // tkSemiColon - SYMBOL_TKSET = 139, // tkSet - SYMBOL_TKSHL = 140, // tkShl - SYMBOL_TKSHORTINT = 141, // tkShortInt - SYMBOL_TKSHR = 142, // tkShr - SYMBOL_TKSINGLE = 143, // tkSingle - SYMBOL_TKSIZEOF = 144, // tkSizeOf - SYMBOL_TKSLASH = 145, // tkSlash - SYMBOL_TKSMALLINT = 146, // tkSmallInt - SYMBOL_TKSQUARECLOSE = 147, // tkSquareClose - SYMBOL_TKSQUAREOPEN = 148, // tkSquareOpen - SYMBOL_TKSTAR = 149, // tkStar - SYMBOL_TKSTATIC = 150, // tkStatic - SYMBOL_TKSTORED = 151, // tkStored - SYMBOL_TKSTRINGLITERAL = 152, // tkStringLiteral - SYMBOL_TKTEMPLATE = 153, // tkTemplate - SYMBOL_TKTHEN = 154, // tkThen - SYMBOL_TKTHREADVAR = 155, // tkThreadvar - SYMBOL_TKTO = 156, // tkTo - SYMBOL_TKTRY = 157, // tkTry - SYMBOL_TKTYPE = 158, // tkType - SYMBOL_TKTYPEOF = 159, // tkTypeOf - SYMBOL_TKUNIT = 160, // tkUnit - SYMBOL_TKUNTIL = 161, // tkUntil - SYMBOL_TKUSES = 162, // tkUses - SYMBOL_TKUSING = 163, // tkUsing - SYMBOL_TKVAR = 164, // tkVar - SYMBOL_TKVARIANT = 165, // tkVariant - SYMBOL_TKVIRTUAL = 166, // tkVirtual - SYMBOL_TKWHERE = 167, // tkWhere - SYMBOL_TKWHILE = 168, // tkWhile - SYMBOL_TKWIDECHAR = 169, // tkWideChar - SYMBOL_TKWITH = 170, // tkWith - SYMBOL_TKWORD = 171, // tkWord - SYMBOL_TKWRITE = 172, // tkWrite - SYMBOL_TKWRITEONLY = 173, // tkWriteOnly - SYMBOL_TKXOR = 174, // tkXor - SYMBOL_ZKCOMMA = 175, // zkComma - SYMBOL_ABC_BLOCK = 176, // - SYMBOL_ABC_CONSTRUCTOR_DECL = 177, // - SYMBOL_ABC_DECL_SECT = 178, // - SYMBOL_ABC_DECL_SECT_LIST = 179, // - SYMBOL_ABC_DECL_SECT_LIST1 = 180, // - SYMBOL_ABC_DESTRUCTOR_DECL = 181, // - SYMBOL_ABC_EXTERNAL_DIRECTR = 182, // - SYMBOL_ABC_FUNC_DECL = 183, // - SYMBOL_ABC_FUNC_DECL_NOCLASS = 184, // - SYMBOL_ABC_INTERFACE_PART = 185, // - SYMBOL_ABC_METHOD_DECL = 186, // - SYMBOL_ABC_PROC_BLOCK = 187, // - SYMBOL_ABC_PROC_DECL = 188, // - SYMBOL_ABC_PROC_DECL_NOCLASS = 189, // - SYMBOL_ADDOP = 190, // - SYMBOL_ALLOWABLE_EXPR_AS_STMT = 191, // - SYMBOL_ARRAY_CONST = 192, // - SYMBOL_ARRAY_NAME_FOR_NEW_EXPR = 193, // - SYMBOL_ARRAY_TYPE = 194, // - SYMBOL_AS_IS_CONSTEXPR = 195, // - SYMBOL_AS_IS_EXPR = 196, // - SYMBOL_ASM_BLOCK = 197, // - SYMBOL_ASM_STMT = 198, // - SYMBOL_ASSIGN_OPERATOR = 199, // - SYMBOL_ASSIGNMENT = 200, // - SYMBOL_ATTR_EXPR_LIST = 201, // - SYMBOL_ATTRIBUTE_DECLARATION = 202, // - SYMBOL_ATTRIBUTE_DECLARATIONS = 203, // - SYMBOL_ATTRIBUTE_VAR_SPECIFIERS = 204, // - SYMBOL_ATTRIBUTE_VARIABLE = 205, // - SYMBOL_BASE_CLASS_NAME = 206, // - SYMBOL_BASE_CLASSES_NAMES_LIST = 207, // - SYMBOL_BLOCK = 208, // - SYMBOL_CASE_ITEM = 209, // - SYMBOL_CASE_LABEL = 210, // - SYMBOL_CASE_LABEL_LIST = 211, // - SYMBOL_CASE_LIST = 212, // - SYMBOL_CASE_STMT = 213, // - SYMBOL_CASE_TAG_LIST = 214, // - SYMBOL_CLASS_ATTRIBUTES = 215, // - SYMBOL_CLASS_OR_INTERFACE_KEYWORD = 216, // - SYMBOL_COMPOUND_STMT = 217, // - SYMBOL_CONST_ADDOP = 218, // - SYMBOL_CONST_DECL = 219, // - SYMBOL_CONST_DECL_SECT = 220, // - SYMBOL_CONST_ELEM = 221, // - SYMBOL_CONST_ELEM_LIST = 222, // - SYMBOL_CONST_ELEM_LIST1 = 223, // - SYMBOL_CONST_EXPR = 224, // - SYMBOL_CONST_EXPR_LIST = 225, // - SYMBOL_CONST_FACTOR = 226, // - SYMBOL_CONST_FIELD = 227, // - SYMBOL_CONST_FIELD_LIST = 228, // - SYMBOL_CONST_FIELD_LIST_1 = 229, // - SYMBOL_CONST_FIELD_NAME = 230, // - SYMBOL_CONST_FUNC_EXPR_LIST = 231, // - SYMBOL_CONST_MULOP = 232, // - SYMBOL_CONST_NAME = 233, // - SYMBOL_CONST_RELOP = 234, // - SYMBOL_CONST_SET = 235, // - SYMBOL_CONST_SIMPLE_EXPR = 236, // - SYMBOL_CONST_TERM = 237, // - SYMBOL_CONST_VARIABLE = 238, // - SYMBOL_CONST_VARIABLE_2 = 239, // - SYMBOL_CONSTRUCTOR_DECL = 240, // - SYMBOL_CONSTRUCTOR_DECL_WITH_ATTR = 241, // - SYMBOL_CONTAINS_CLAUSE = 242, // - SYMBOL_DECLARED_VAR_NAME = 243, // - SYMBOL_DEFAULT_EXPR = 244, // - SYMBOL_DESTRUCTOR_DECL = 245, // - SYMBOL_DESTRUCTOR_DECL_WITH_ATTR = 246, // - SYMBOL_ELEM = 247, // - SYMBOL_ELEM_LIST = 248, // - SYMBOL_ELEM_LIST1 = 249, // - SYMBOL_ELSE_BRANCH = 250, // - SYMBOL_ELSE_CASE = 251, // - SYMBOL_EMPTY = 252, // - SYMBOL_ENUMERATION_ID = 253, // - SYMBOL_ENUMERATION_ID_LIST = 254, // - SYMBOL_ERROR2 = 255, // - SYMBOL_EXCEPTION_BLOCK = 256, // - SYMBOL_EXCEPTION_BLOCK_ELSE_BRANCH = 257, // - SYMBOL_EXCEPTION_CLASS_TYPE_IDENTIFIER = 258, // - SYMBOL_EXCEPTION_HANDLER = 259, // - SYMBOL_EXCEPTION_HANDLER_LIST = 260, // - SYMBOL_EXCEPTION_IDENTIFIER = 261, // - SYMBOL_EXCEPTION_VARIABLE = 262, // - SYMBOL_EXPORT_CLAUSE = 263, // - SYMBOL_EXPORTS_ENTRY = 264, // - SYMBOL_EXPORTS_INDEX = 265, // - SYMBOL_EXPORTS_LIST = 266, // - SYMBOL_EXPORTS_NAME = 267, // - SYMBOL_EXPORTS_RESIDENT = 268, // - SYMBOL_EXPR = 269, // - SYMBOL_EXPR_AS_STMT = 270, // - SYMBOL_EXPR_L1 = 271, // - SYMBOL_EXPR_LIST = 272, // - SYMBOL_EXTERNAL_DIRECTR = 273, // - SYMBOL_EXTERNAL_DIRECTR_IDENT = 274, // - SYMBOL_FACTOR = 275, // - SYMBOL_FIELD_ACCESS_MODIFIER = 276, // - SYMBOL_FIELD_LIST = 277, // - SYMBOL_FILE_TYPE = 278, // - SYMBOL_FILED_OR_CONST_DEFINITION = 279, // - SYMBOL_FILED_OR_CONST_DEFINITION_OR_AM = 280, // - SYMBOL_FIXED_PART = 281, // - SYMBOL_FIXED_PART_2 = 282, // - SYMBOL_FOR_CYCLE_TYPE = 283, // - SYMBOL_FOR_STMT = 284, // - SYMBOL_FOR_STMT_DECL_OR_ASSIGN = 285, // - SYMBOL_FOREACH_STMT = 286, // - SYMBOL_FOREACH_STMT_IDENT_DYPE_OPT = 287, // - SYMBOL_FORMAT_EXPR = 288, // - SYMBOL_FP_LIST = 289, // - SYMBOL_FP_SECT = 290, // - SYMBOL_FP_SECT_LIST = 291, // - SYMBOL_FPTYPE = 292, // - SYMBOL_FPTYPE_NEW = 293, // - SYMBOL_FUNC_BLOCK = 294, // - SYMBOL_FUNC_CLASS_NAME_IDENT = 295, // - SYMBOL_FUNC_DECL = 296, // - SYMBOL_FUNC_DECL_LAMBDA = 297, // - SYMBOL_FUNC_DECL_NOCLASS = 298, // - SYMBOL_FUNC_DECL_WITH_ATTR = 299, // - SYMBOL_FUNC_HEADING = 300, // - SYMBOL_FUNC_METH_NAME_IDENT = 301, // - SYMBOL_FUNC_NAME = 302, // - SYMBOL_FUNC_NAME_IDENT = 303, // - SYMBOL_FUNC_NAME_WITH_TEMPLATE_ARGS = 304, // - SYMBOL_GOTO_STMT = 305, // - SYMBOL_HEAD_COMPILER_DIRECTIVES = 306, // - SYMBOL_IDENT_LIST = 307, // - SYMBOL_IDENT_LIST1 = 308, // - SYMBOL_IDENT_LIST2 = 309, // - SYMBOL_IDENT_OR_KEYWORD_POINTSEPARATOR_LIST = 310, // - SYMBOL_IDENTIFIER = 311, // - SYMBOL_IDENTIFIER_KEYWORD_OPERATORNAME = 312, // - SYMBOL_IDENTIFIER_OR_KEYWORD = 313, // - SYMBOL_IF_STMT = 314, // - SYMBOL_IF_THEN_ELSE_BRANCH = 315, // - SYMBOL_IMPL_DECL_SECT = 316, // - SYMBOL_IMPL_DECL_SECT_LIST = 317, // - SYMBOL_IMPL_DECL_SECT_LIST1 = 318, // - SYMBOL_IMPLEMENTATION_PART = 319, // - SYMBOL_INHERITED_MESSAGE = 320, // - SYMBOL_INIT_CONST_EXPR = 321, // - SYMBOL_INITIALIZATION_PART = 322, // - SYMBOL_INT_DECL_SECT = 323, // - SYMBOL_INT_DECL_SECT_LIST = 324, // - SYMBOL_INT_DECL_SECT_LIST1 = 325, // - SYMBOL_INT_FUNC_HEADING = 326, // - SYMBOL_INT_PROC_HEADING = 327, // - SYMBOL_INTEGER_CONST = 328, // - SYMBOL_INTERFACE_PART = 329, // - SYMBOL_KEYWORD = 330, // - SYMBOL_LABEL_DECL_SECT = 331, // - SYMBOL_LABEL_LIST = 332, // - SYMBOL_LABEL_NAME = 333, // - SYMBOL_LAMBDA_BODY = 334, // - SYMBOL_LIBRARY_BLOCK = 335, // - SYMBOL_LIBRARY_FILE = 336, // - SYMBOL_LIBRARY_HEADING = 337, // - SYMBOL_LIBRARY_IMPL_DECL_SECT = 338, // - SYMBOL_LIBRARY_IMPL_DECL_SECT_LIST = 339, // - SYMBOL_LITERAL = 340, // - SYMBOL_LITERAL_LIST = 341, // - SYMBOL_LITERAL_OR_NUMBER = 342, // - SYMBOL_LOCK_STMT = 343, // - SYMBOL_MAIN_USED_UNIT_NAME = 344, // - SYMBOL_MAIN_USED_UNITS_LIST = 345, // - SYMBOL_MAIN_USES_CLAUSE = 346, // - SYMBOL_MAYBE_ERROR = 347, // - SYMBOL_METH_MODIFICATOR = 348, // - SYMBOL_METH_MODIFICATORS = 349, // - SYMBOL_MULOP = 350, // - SYMBOL_NEW_EXPR = 351, // - SYMBOL_NEW_OBJECT_TYPE = 352, // - SYMBOL_NEW_RECORD_TYPE = 353, // - SYMBOL_NON_RESERVED = 354, // - SYMBOL_NOT_ARRAY_DEFAULTPROPERTY = 355, // - SYMBOL_NOT_COMPONENT_LIST = 356, // - SYMBOL_NOT_COMPONENT_LIST_1 = 357, // - SYMBOL_NOT_COMPONENT_LIST_2 = 358, // - SYMBOL_NOT_COMPONENT_LIST_SEQ = 359, // - SYMBOL_NOT_CONSTRUCTOR_BLOCK_DECL = 360, // - SYMBOL_NOT_CONSTRUCTOR_HEADING = 361, // - SYMBOL_NOT_CONSTRUCTOR_HEADING_OBJECT = 362, // - SYMBOL_NOT_DESTRUCTOR_HEADING = 363, // - SYMBOL_NOT_FIELD_DEFINITION = 364, // - SYMBOL_NOT_GUID = 365, // - SYMBOL_NOT_METHOD_DEFINITION = 366, // - SYMBOL_NOT_METHOD_HEADING = 367, // - SYMBOL_NOT_OBJECT_TYPE = 368, // - SYMBOL_NOT_OBJECT_TYPE_IDENTIFIER_LIST = 369, // - SYMBOL_NOT_PARAMETER_DECL = 370, // - SYMBOL_NOT_PARAMETER_DECL_LIST = 371, // - SYMBOL_NOT_PARAMETER_NAME_LIST = 372, // - SYMBOL_NOT_PROCFUNC_HEADING = 373, // - SYMBOL_NOT_PROCFUNC_HEADING_VARIANTS = 374, // - SYMBOL_NOT_PROPERTY_DEFINITION = 375, // - SYMBOL_NOT_PROPERTY_INTERFACE = 376, // - SYMBOL_NOT_PROPERTY_INTERFACE_INDEX = 377, // - SYMBOL_NOT_PROPERTY_PARAMETER_LIST = 378, // - SYMBOL_NOT_PROPERTY_SPECIFIERS = 379, // - SYMBOL_NOT_SIMPLE_PROPERTY_DEFINITION = 380, // - SYMBOL_OBJECT_TYPE = 381, // - SYMBOL_ONE_ATTRIBUTE = 382, // - SYMBOL_ONE_COMPILER_DIRECTIVE = 383, // - SYMBOL_ONE_LITERAL = 384, // - SYMBOL_ONE_OR_SOME_ATTRIBUTE = 385, // - SYMBOL_ONLY_CONST_DECL = 386, // - SYMBOL_OOT_COMPONENT_LIST = 387, // - SYMBOL_OOT_CONSTRUCTOR_HEAD = 388, // - SYMBOL_OOT_DESTRUCTOR_HEAD = 389, // - SYMBOL_OOT_FIELD = 390, // - SYMBOL_OOT_FIELD_IDENTIFIER = 391, // - SYMBOL_OOT_FIELD_LIST = 392, // - SYMBOL_OOT_ID_LIST = 393, // - SYMBOL_OOT_METHOD = 394, // - SYMBOL_OOT_METHOD_HEAD = 395, // - SYMBOL_OOT_METHOD_LIST = 396, // - SYMBOL_OOT_PRIVAT_LIST = 397, // - SYMBOL_OOT_SUCCESSOR = 398, // - SYMBOL_OOT_TYPEIDENTIFIER = 399, // - SYMBOL_OPERATOR_NAME_IDENT = 400, // - SYMBOL_OPT_AMPERSEND = 401, // - SYMBOL_OPT_ARRAY_INITIALIZER = 402, // - SYMBOL_OPT_ATTR_EXPR_LIST = 403, // - SYMBOL_OPT_ATTRIBUTE_DECLARATIONS = 404, // - SYMBOL_OPT_BASE_CLASSES = 405, // - SYMBOL_OPT_CONST_FUNC_EXPR_LIST = 406, // - SYMBOL_OPT_EXPR_LIST = 407, // - SYMBOL_OPT_EXPR_LIST_WITH_BRACKET = 408, // - SYMBOL_OPT_HEAD_COMPILER_DIRECTIVES = 409, // - SYMBOL_OPT_IDENTIFIER = 410, // - SYMBOL_OPT_METH_MODIFICATORS = 411, // - SYMBOL_OPT_NOT_COMPONENT_LIST_SEQ_END = 412, // - SYMBOL_OPT_PROC_NAME = 413, // - SYMBOL_OPT_SEMICOLON = 414, // - SYMBOL_OPT_TEMPLATE_ARGUMENTS = 415, // - SYMBOL_OPT_TEMPLATE_TYPE_PARAMS = 416, // - SYMBOL_OPT_TK_DO = 417, // - SYMBOL_OPT_TK_POINT = 418, // - SYMBOL_OPT_VAR = 419, // - SYMBOL_OPT_WHERE_SECTION = 420, // - SYMBOL_OPTIONAL_QUALIFIED_IDENTIFIER = 421, // - SYMBOL_ORD_TYPE_NAME = 422, // - SYMBOL_OT_VISIBILITY_SPECIFIER = 423, // - SYMBOL_OTHER = 424, // - SYMBOL_OVERLOAD_OPERATOR = 425, // - SYMBOL_PACKAGE_FILE = 426, // - SYMBOL_PACKAGE_NAME = 427, // - SYMBOL_PARAM_NAME = 428, // - SYMBOL_PARAM_NAME_LIST = 429, // - SYMBOL_PARSE_GOAL = 430, // - SYMBOL_PARTS = 431, // - SYMBOL_POINTER_TYPE = 432, // - SYMBOL_PROC_BLOCK = 433, // - SYMBOL_PROC_BLOCK_DECL = 434, // - SYMBOL_PROC_CALL = 435, // - SYMBOL_PROC_DECL = 436, // - SYMBOL_PROC_DECL_NOCLASS = 437, // - SYMBOL_PROC_DECL_WITH_ATTR = 438, // - SYMBOL_PROC_HEADING = 439, // - SYMBOL_PROC_NAME = 440, // - SYMBOL_PROCEDURAL_TYPE = 441, // - SYMBOL_PROCEDURAL_TYPE_DECL = 442, // - SYMBOL_PROCEDURAL_TYPE_KIND = 443, // - SYMBOL_PROGRAM_BLOCK = 444, // - SYMBOL_PROGRAM_DECL_SECT_LIST = 445, // - SYMBOL_PROGRAM_FILE = 446, // - SYMBOL_PROGRAM_HEADING = 447, // - SYMBOL_PROGRAM_HEADING_2 = 448, // - SYMBOL_PROGRAM_NAME = 449, // - SYMBOL_PROGRAM_PARAM = 450, // - SYMBOL_PROGRAM_PARAM_LIST = 451, // - SYMBOL_PROPERTY_SPECIFIER_DIRECTIVES = 452, // - SYMBOL_QUALIFIED_IDENTIFIER = 453, // - SYMBOL_QUESTION_CONSTEXPR = 454, // - SYMBOL_QUESTION_EXPR = 455, // - SYMBOL_RAISE_STMT = 456, // - SYMBOL_RANGE_EXPR = 457, // - SYMBOL_RANGE_FACTOR = 458, // - SYMBOL_RANGE_METHODNAME = 459, // - SYMBOL_RANGE_TERM = 460, // - SYMBOL_REAL_TYPE_NAME = 461, // - SYMBOL_RECORD_COMPONENT_LIST = 462, // - SYMBOL_RECORD_CONST = 463, // - SYMBOL_RECORD_KEYWORD = 464, // - SYMBOL_RECORD_SECTION = 465, // - SYMBOL_RECORD_SECTION_ID = 466, // - SYMBOL_RECORD_SECTION_ID_LIST = 467, // - SYMBOL_RECORD_TYPE = 468, // - SYMBOL_RELOP = 469, // - SYMBOL_RELOP_EXPR = 470, // - SYMBOL_REPEAT_STMT = 471, // - SYMBOL_REQUIRES_CLAUSE = 472, // - SYMBOL_RES_STR_DECL_SECT = 473, // - SYMBOL_RESERVED_KEYWORD = 474, // - SYMBOL_SET_TYPE = 475, // - SYMBOL_SIGN = 476, // - SYMBOL_SIMPLE_EXPR = 477, // - SYMBOL_SIMPLE_FILED_OR_CONST_DEFINITION = 478, // - SYMBOL_SIMPLE_FP_SECT = 479, // - SYMBOL_SIMPLE_NOT_PROPERTY_DEFINITION = 480, // - SYMBOL_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE = 481, // - SYMBOL_SIMPLE_TYPE = 482, // - SYMBOL_SIMPLE_TYPE_DECL = 483, // - SYMBOL_SIMPLE_TYPE_IDENTIFIER = 484, // - SYMBOL_SIMPLE_TYPE_LIST = 485, // - SYMBOL_SIMPLE_TYPE_OR_EMPTY = 486, // - SYMBOL_SIZEOF_EXPR = 487, // - SYMBOL_STMT = 488, // - SYMBOL_STMT_LIST = 489, // - SYMBOL_STMT_OR_EXPRESSION = 490, // - SYMBOL_STRING_TYPE = 491, // - SYMBOL_STRUCTURED_TYPE = 492, // - SYMBOL_TAG_FIELD = 493, // - SYMBOL_TAG_FIELD_NAME = 494, // - SYMBOL_TAG_FIELD_TYPENAME = 495, // - SYMBOL_TEMPLATE_ARGUMENTS = 496, // - SYMBOL_TEMPLATE_IDENTIFIER_WITH_EQUAL = 497, // - SYMBOL_TEMPLATE_PARAM = 498, // - SYMBOL_TEMPLATE_PARAM_LIST = 499, // - SYMBOL_TEMPLATE_TYPE = 500, // - SYMBOL_TEMPLATE_TYPE_BACK_VARSPECIFIERS = 501, // - SYMBOL_TEMPLATE_TYPE_PARAMS = 502, // - SYMBOL_TERM = 503, // - SYMBOL_THEN_BRANCH = 504, // - SYMBOL_TRY_HANDLER = 505, // - SYMBOL_TRY_STMT = 506, // - SYMBOL_TYPE_DECL = 507, // - SYMBOL_TYPE_DECL_IDENTIFIER = 508, // - SYMBOL_TYPE_DECL_SECT = 509, // - SYMBOL_TYPE_DECL_TYPE = 510, // - SYMBOL_TYPE_REF = 511, // - SYMBOL_TYPE_REF_AND_SECIFIC_LIST = 512, // - SYMBOL_TYPE_REF_OR_SECIFIC = 513, // - SYMBOL_TYPECAST_OP = 514, // - SYMBOL_TYPED_CONST = 515, // - SYMBOL_TYPED_CONST_LIST = 516, // - SYMBOL_TYPED_CONST_OR_NEW = 517, // - SYMBOL_TYPEOF_EXPR = 518, // - SYMBOL_UNIT_FILE = 519, // - SYMBOL_UNIT_HEADING = 520, // - SYMBOL_UNIT_KEY_WORD = 521, // - SYMBOL_UNIT_NAME = 522, // - SYMBOL_UNLABELLED_STMT = 523, // - SYMBOL_UNPACKED_STRUCTURED_TYPE = 524, // - SYMBOL_UNSIGNED_NUMBER = 525, // - SYMBOL_UNSIZED_ARRAY_TYPE = 526, // - SYMBOL_USES_CLAUSE = 527, // - SYMBOL_USING_CLAUSE = 528, // - SYMBOL_USING_LIST = 529, // - SYMBOL_USING_ONE = 530, // - SYMBOL_VAR_ADDRESS = 531, // - SYMBOL_VAR_DECL = 532, // - SYMBOL_VAR_DECL_PART = 533, // - SYMBOL_VAR_DECL_PART_ASSIGN = 534, // - SYMBOL_VAR_DECL_PART_IN_STMT = 535, // - SYMBOL_VAR_DECL_PART_NORMAL = 536, // - SYMBOL_VAR_DECL_SECT = 537, // - SYMBOL_VAR_INIT_VALUE = 538, // - SYMBOL_VAR_INIT_VALUE_TYPED = 539, // - SYMBOL_VAR_NAME = 540, // - SYMBOL_VAR_NAME_LIST = 541, // - SYMBOL_VAR_OR_IDENTIFIER = 542, // - SYMBOL_VAR_REFERENCE = 543, // - SYMBOL_VAR_SPECIFIERS = 544, // - SYMBOL_VAR_STMT = 545, // - SYMBOL_VARIABLE = 546, // - SYMBOL_VARIANT = 547, // - SYMBOL_VARIANT_FIELD_LIST = 548, // - SYMBOL_VARIANT_LIST = 549, // - SYMBOL_VARIANT_LIST_2 = 550, // - SYMBOL_VARIANT_PART = 551, // - SYMBOL_VARIANT_TYPE_NAME = 552, // - SYMBOL_VISIBILITY_SPECIFIER = 553, // - SYMBOL_WHERE_PART = 554, // - SYMBOL_WHERE_PART_LIST = 555, // - SYMBOL_WHILE_STMT = 556, // - SYMBOL_WITH_STMT = 557 // -}; - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//RuleConstants -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public enum RuleConstants : int -{ - RULE_PARSE_GOAL = 0, // ::= - RULE_PARSE_GOAL2 = 1, // ::= - RULE_PARSE_GOAL3 = 2, // ::= - RULE_PARTS_TKPARSEMODEEXPRESSION = 3, // ::= tkParseModeExpression - RULE_PARTS_TKPARSEMODESTATEMENT = 4, // ::= tkParseModeStatement - RULE_STMT_OR_EXPRESSION = 5, // ::= - RULE_STMT_OR_EXPRESSION2 = 6, // ::= - RULE_STMT_OR_EXPRESSION3 = 7, // ::= - RULE_OPT_HEAD_COMPILER_DIRECTIVES = 8, // ::= - RULE_OPT_HEAD_COMPILER_DIRECTIVES2 = 9, // ::= - RULE_HEAD_COMPILER_DIRECTIVES = 10, // ::= - RULE_HEAD_COMPILER_DIRECTIVES2 = 11, // ::= - RULE_ONE_COMPILER_DIRECTIVE_TKDIRECTIVENAME_TKIDENTIFIER = 12, // ::= tkDirectiveName tkIdentifier - RULE_ONE_COMPILER_DIRECTIVE_TKDIRECTIVENAME_TKSTRINGLITERAL = 13, // ::= tkDirectiveName tkStringLiteral - RULE_PROGRAM_FILE = 14, // ::= - RULE_OPT_TK_POINT_TKPOINT = 15, // ::= tkPoint - RULE_OPT_TK_POINT_TKSEMICOLON = 16, // ::= tkSemiColon - RULE_OPT_TK_POINT_TKCOLON = 17, // ::= tkColon - RULE_OPT_TK_POINT_ZKCOMMA = 18, // ::= zkComma - RULE_OPT_TK_POINT_TKDOTDOT = 19, // ::= tkDotDot - RULE_OPT_TK_POINT = 20, // ::= - RULE_PROGRAM_HEADING = 21, // ::= - RULE_PROGRAM_HEADING_TKPROGRAM = 22, // ::= tkProgram - RULE_PROGRAM_HEADING_2_TKSEMICOLON = 23, // ::= tkSemiColon - RULE_PROGRAM_HEADING_2_TKROUNDOPEN_TKROUNDCLOSE_TKSEMICOLON = 24, // ::= tkRoundOpen tkRoundClose tkSemiColon - RULE_PROGRAM_NAME = 25, // ::= - RULE_PROGRAM_PARAM_LIST = 26, // ::= - RULE_PROGRAM_PARAM_LIST_TKCOMMA = 27, // ::= tkComma - RULE_PROGRAM_PARAM = 28, // ::= - RULE_PROGRAM_BLOCK = 29, // ::= - RULE_PROGRAM_DECL_SECT_LIST = 30, // ::= - RULE_USES_CLAUSE = 31, // ::= - RULE_USING_CLAUSE = 32, // ::= - RULE_USING_CLAUSE2 = 33, // ::= - RULE_USING_LIST = 34, // ::= - RULE_USING_LIST2 = 35, // ::= - RULE_USING_ONE_TKUSING_TKSEMICOLON = 36, // ::= tkUsing tkSemiColon - RULE_IDENT_OR_KEYWORD_POINTSEPARATOR_LIST = 37, // ::= - RULE_IDENT_OR_KEYWORD_POINTSEPARATOR_LIST_TKPOINT = 38, // ::= tkPoint - RULE_MAIN_USES_CLAUSE = 39, // ::= - RULE_MAIN_USES_CLAUSE_TKUSES_TKSEMICOLON = 40, // ::= tkUses tkSemiColon - RULE_MAIN_USED_UNITS_LIST_TKCOMMA = 41, // ::= tkComma - RULE_MAIN_USED_UNITS_LIST = 42, // ::= - RULE_MAIN_USED_UNIT_NAME = 43, // ::= - RULE_MAIN_USED_UNIT_NAME_TKIN_TKSTRINGLITERAL = 44, // ::= tkIn tkStringLiteral - RULE_LIBRARY_FILE_TKPOINT = 45, // ::= tkPoint - RULE_LIBRARY_HEADING_TKLIBRARY_TKSEMICOLON = 46, // ::= tkLibrary tkSemiColon - RULE_LIBRARY_BLOCK = 47, // ::= - RULE_LIBRARY_IMPL_DECL_SECT_LIST = 48, // ::= - RULE_LIBRARY_IMPL_DECL_SECT_LIST2 = 49, // ::= - RULE_LIBRARY_IMPL_DECL_SECT = 50, // ::= - RULE_LIBRARY_IMPL_DECL_SECT2 = 51, // ::= - RULE_LIBRARY_IMPL_DECL_SECT3 = 52, // ::= - RULE_LIBRARY_IMPL_DECL_SECT4 = 53, // ::= - RULE_LIBRARY_IMPL_DECL_SECT5 = 54, // ::= - RULE_LIBRARY_IMPL_DECL_SECT6 = 55, // ::= - RULE_LIBRARY_IMPL_DECL_SECT7 = 56, // ::= - RULE_LIBRARY_IMPL_DECL_SECT8 = 57, // ::= - RULE_LIBRARY_IMPL_DECL_SECT9 = 58, // ::= - RULE_LIBRARY_IMPL_DECL_SECT10 = 59, // ::= - RULE_EXPORT_CLAUSE_TKEXPORTS_TKSEMICOLON = 60, // ::= tkExports tkSemiColon - RULE_EXPORTS_LIST = 61, // ::= - RULE_EXPORTS_LIST_TKCOMMA = 62, // ::= tkComma - RULE_EXPORTS_ENTRY = 63, // ::= - RULE_EXPORTS_INDEX = 64, // ::= - RULE_EXPORTS_INDEX_TKINDEX = 65, // ::= tkIndex - RULE_EXPORTS_NAME = 66, // ::= - RULE_EXPORTS_NAME_TKNAME = 67, // ::= tkName - RULE_EXPORTS_NAME_TKNAME2 = 68, // ::= tkName - RULE_EXPORTS_RESIDENT = 69, // ::= - RULE_EXPORTS_RESIDENT_TKRESIDENT = 70, // ::= tkResident - RULE_UNIT_FILE_TKPOINT = 71, // ::= tkPoint - RULE_UNIT_FILE_TKPOINT2 = 72, // ::= tkPoint - RULE_UNIT_HEADING_TKSEMICOLON = 73, // ::= tkSemiColon - RULE_UNIT_KEY_WORD_TKUNIT = 74, // ::= tkUnit - RULE_UNIT_KEY_WORD_TKLIBRARY = 75, // ::= tkLibrary - RULE_UNIT_NAME = 76, // ::= - RULE_INTERFACE_PART_TKINTERFACE = 77, // ::= tkInterface - RULE_IMPLEMENTATION_PART_TKIMPLEMENTATION = 78, // ::= tkImplementation - RULE_ABC_INTERFACE_PART = 79, // ::= - RULE_INITIALIZATION_PART_TKEND = 80, // ::= tkEnd - RULE_INITIALIZATION_PART_TKINITIALIZATION_TKEND = 81, // ::= tkInitialization tkEnd - RULE_INITIALIZATION_PART_TKINITIALIZATION_TKFINALIZATION_TKEND = 82, // ::= tkInitialization tkFinalization tkEnd - RULE_INITIALIZATION_PART_TKBEGIN_TKEND = 83, // ::= tkBegin tkEnd - RULE_PACKAGE_FILE_TKPACKAGE_TKSEMICOLON_TKEND_TKPOINT = 84, // ::= tkPackage tkSemiColon tkEnd tkPoint - RULE_PACKAGE_NAME = 85, // ::= - RULE_REQUIRES_CLAUSE = 86, // ::= - RULE_REQUIRES_CLAUSE_TKREQUIRES = 87, // ::= tkRequires - RULE_REQUIRES_CLAUSE_TKREQUIRES_TKSEMICOLON = 88, // ::= tkRequires tkSemiColon - RULE_CONTAINS_CLAUSE = 89, // ::= - RULE_CONTAINS_CLAUSE_TKCONTAINS = 90, // ::= tkContains - RULE_CONTAINS_CLAUSE_TKCONTAINS_TKSEMICOLON = 91, // ::= tkContains tkSemiColon - RULE_INT_DECL_SECT_LIST = 92, // ::= - RULE_INT_DECL_SECT_LIST1 = 93, // ::= - RULE_INT_DECL_SECT_LIST12 = 94, // ::= - RULE_IMPL_DECL_SECT_LIST = 95, // ::= - RULE_IMPL_DECL_SECT_LIST1 = 96, // ::= - RULE_IMPL_DECL_SECT_LIST12 = 97, // ::= - RULE_ABC_DECL_SECT_LIST = 98, // ::= - RULE_ABC_DECL_SECT_LIST1 = 99, // ::= - RULE_ABC_DECL_SECT_LIST12 = 100, // ::= - RULE_INT_DECL_SECT = 101, // ::= - RULE_INT_DECL_SECT2 = 102, // ::= - RULE_INT_DECL_SECT3 = 103, // ::= - RULE_INT_DECL_SECT4 = 104, // ::= - RULE_INT_DECL_SECT5 = 105, // ::= - RULE_INT_DECL_SECT6 = 106, // ::= - RULE_IMPL_DECL_SECT = 107, // ::= - RULE_IMPL_DECL_SECT2 = 108, // ::= - RULE_IMPL_DECL_SECT3 = 109, // ::= - RULE_IMPL_DECL_SECT4 = 110, // ::= - RULE_IMPL_DECL_SECT5 = 111, // ::= - RULE_IMPL_DECL_SECT6 = 112, // ::= - RULE_IMPL_DECL_SECT7 = 113, // ::= - RULE_IMPL_DECL_SECT8 = 114, // ::= - RULE_IMPL_DECL_SECT9 = 115, // ::= - RULE_PROC_DECL_WITH_ATTR = 116, // ::= - RULE_FUNC_DECL_WITH_ATTR = 117, // ::= - RULE_CONSTRUCTOR_DECL_WITH_ATTR = 118, // ::= - RULE_DESTRUCTOR_DECL_WITH_ATTR = 119, // ::= - RULE_ABC_DECL_SECT = 120, // ::= - RULE_ABC_DECL_SECT2 = 121, // ::= - RULE_ABC_DECL_SECT3 = 122, // ::= - RULE_ABC_DECL_SECT4 = 123, // ::= - RULE_ABC_DECL_SECT5 = 124, // ::= - RULE_INT_PROC_HEADING = 125, // ::= - RULE_INT_PROC_HEADING_TKFORWARD_TKSEMICOLON = 126, // ::= tkForward tkSemiColon - RULE_INT_FUNC_HEADING = 127, // ::= - RULE_INT_FUNC_HEADING_TKFORWARD_TKSEMICOLON = 128, // ::= tkForward tkSemiColon - RULE_LABEL_DECL_SECT_TKLABEL_TKSEMICOLON = 129, // ::= tkLabel tkSemiColon - RULE_LABEL_LIST = 130, // ::= - RULE_LABEL_LIST_TKCOMMA = 131, // ::= tkComma - RULE_LABEL_NAME_TKINTEGER = 132, // ::= tkInteger - RULE_LABEL_NAME_TKFLOAT = 133, // ::= tkFloat - RULE_LABEL_NAME = 134, // ::= - RULE_CONST_DECL_SECT_TKCONST = 135, // ::= tkConst - RULE_CONST_DECL_SECT = 136, // ::= - RULE_RES_STR_DECL_SECT_TKRESOURCESTRING = 137, // ::= tkResourceString - RULE_RES_STR_DECL_SECT = 138, // ::= - RULE_TYPE_DECL_SECT_TKTYPE = 139, // ::= tkType - RULE_TYPE_DECL_SECT = 140, // ::= - RULE_VAR_DECL_SECT_TKVAR = 141, // ::= tkVar - RULE_VAR_DECL_SECT_TKEVENT = 142, // ::= tkEvent - RULE_VAR_DECL_SECT = 143, // ::= - RULE_CONST_DECL_TKSEMICOLON = 144, // ::= tkSemiColon - RULE_ONLY_CONST_DECL_TKEQUAL = 145, // ::= tkEqual - RULE_ONLY_CONST_DECL_TKCOLON_TKEQUAL = 146, // ::= tkColon tkEqual - RULE_INIT_CONST_EXPR = 147, // ::= - RULE_INIT_CONST_EXPR2 = 148, // ::= - RULE_CONST_NAME = 149, // ::= - RULE_CONST_EXPR = 150, // ::= - RULE_CONST_EXPR2 = 151, // ::= - RULE_CONST_EXPR3 = 152, // ::= - RULE_QUESTION_CONSTEXPR_TKQUESTION_TKCOLON = 153, // ::= tkQuestion tkColon - RULE_CONST_RELOP_TKEQUAL = 154, // ::= tkEqual - RULE_CONST_RELOP_TKNOTEQUAL = 155, // ::= tkNotEqual - RULE_CONST_RELOP_TKLOWER = 156, // ::= tkLower - RULE_CONST_RELOP_TKGREATER = 157, // ::= tkGreater - RULE_CONST_RELOP_TKLOWEREQUAL = 158, // ::= tkLowerEqual - RULE_CONST_RELOP_TKGREATEREQUAL = 159, // ::= tkGreaterEqual - RULE_CONST_RELOP_TKIN = 160, // ::= tkIn - RULE_CONST_SIMPLE_EXPR = 161, // ::= - RULE_CONST_SIMPLE_EXPR2 = 162, // ::= - RULE_CONST_ADDOP_TKPLUS = 163, // ::= tkPlus - RULE_CONST_ADDOP_TKMINUS = 164, // ::= tkMinus - RULE_CONST_ADDOP_TKOR = 165, // ::= tkOr - RULE_CONST_ADDOP_TKXOR = 166, // ::= tkXor - RULE_AS_IS_CONSTEXPR = 167, // ::= - RULE_CONST_TERM = 168, // ::= - RULE_CONST_TERM2 = 169, // ::= - RULE_CONST_TERM3 = 170, // ::= - RULE_CONST_MULOP_TKSTAR = 171, // ::= tkStar - RULE_CONST_MULOP_TKSLASH = 172, // ::= tkSlash - RULE_CONST_MULOP_TKDIV = 173, // ::= tkDiv - RULE_CONST_MULOP_TKMOD = 174, // ::= tkMod - RULE_CONST_MULOP_TKSHL = 175, // ::= tkShl - RULE_CONST_MULOP_TKSHR = 176, // ::= tkShr - RULE_CONST_MULOP_TKAND = 177, // ::= tkAnd - RULE_CONST_FACTOR = 178, // ::= - RULE_CONST_FACTOR2 = 179, // ::= - RULE_CONST_FACTOR3 = 180, // ::= - RULE_CONST_FACTOR4 = 181, // ::= - RULE_CONST_FACTOR_TKNIL = 182, // ::= tkNil - RULE_CONST_FACTOR_TKADDRESSOF = 183, // ::= tkAddressOf - RULE_CONST_FACTOR_TKROUNDOPEN_TKROUNDCLOSE = 184, // ::= tkRoundOpen tkRoundClose - RULE_CONST_FACTOR_TKNOT = 185, // ::= tkNot - RULE_CONST_FACTOR5 = 186, // ::= - RULE_CONST_FACTOR_TKDEREF = 187, // ::= tkDeref - RULE_CONST_SET_TKSQUAREOPEN_TKSQUARECLOSE = 188, // ::= tkSquareOpen tkSquareClose - RULE_SIGN_TKPLUS = 189, // ::= tkPlus - RULE_SIGN_TKMINUS = 190, // ::= tkMinus - RULE_CONST_VARIABLE = 191, // ::= - RULE_CONST_VARIABLE2 = 192, // ::= - RULE_CONST_VARIABLE3 = 193, // ::= - RULE_CONST_VARIABLE4 = 194, // ::= - RULE_CONST_VARIABLE_2_TKPOINT = 195, // ::= tkPoint - RULE_CONST_VARIABLE_2_TKDEREF = 196, // ::= tkDeref - RULE_CONST_VARIABLE_2_TKROUNDOPEN_TKROUNDCLOSE = 197, // ::= tkRoundOpen tkRoundClose - RULE_CONST_VARIABLE_2_TKSQUAREOPEN_TKSQUARECLOSE = 198, // ::= tkSquareOpen tkSquareClose - RULE_OPT_CONST_FUNC_EXPR_LIST = 199, // ::= - RULE_OPT_CONST_FUNC_EXPR_LIST2 = 200, // ::= - RULE_CONST_FUNC_EXPR_LIST = 201, // ::= - RULE_CONST_FUNC_EXPR_LIST_TKCOMMA = 202, // ::= tkComma - RULE_CONST_ELEM_LIST = 203, // ::= - RULE_CONST_ELEM_LIST2 = 204, // ::= - RULE_CONST_ELEM_LIST1 = 205, // ::= - RULE_CONST_ELEM_LIST1_TKCOMMA = 206, // ::= tkComma - RULE_CONST_ELEM = 207, // ::= - RULE_CONST_ELEM_TKDOTDOT = 208, // ::= tkDotDot - RULE_UNSIGNED_NUMBER_TKINTEGER = 209, // ::= tkInteger - RULE_UNSIGNED_NUMBER_TKHEX = 210, // ::= tkHex - RULE_UNSIGNED_NUMBER_TKFLOAT = 211, // ::= tkFloat - RULE_TYPED_CONST = 212, // ::= - RULE_TYPED_CONST2 = 213, // ::= - RULE_TYPED_CONST3 = 214, // ::= - RULE_ARRAY_CONST_TKROUNDOPEN_TKROUNDCLOSE = 215, // ::= tkRoundOpen tkRoundClose - RULE_ARRAY_CONST_TKROUNDOPEN_TKROUNDCLOSE2 = 216, // ::= tkRoundOpen tkRoundClose - RULE_ARRAY_CONST_TKROUNDOPEN_TKROUNDCLOSE3 = 217, // ::= tkRoundOpen tkRoundClose - RULE_TYPED_CONST_LIST = 218, // ::= - RULE_TYPED_CONST_LIST2 = 219, // ::= - RULE_TYPED_CONST_LIST_TKCOMMA = 220, // ::= tkComma - RULE_RECORD_CONST_TKROUNDOPEN_TKROUNDCLOSE = 221, // ::= tkRoundOpen tkRoundClose - RULE_CONST_FIELD_LIST = 222, // ::= - RULE_CONST_FIELD_LIST_TKSEMICOLON = 223, // ::= tkSemiColon - RULE_CONST_FIELD_LIST_1 = 224, // ::= - RULE_CONST_FIELD_LIST_1_TKSEMICOLON = 225, // ::= tkSemiColon - RULE_CONST_FIELD_TKCOLON = 226, // ::= tkColon - RULE_CONST_FIELD_NAME = 227, // ::= - RULE_TYPE_DECL = 228, // ::= - RULE_OPT_ATTRIBUTE_DECLARATIONS = 229, // ::= - RULE_OPT_ATTRIBUTE_DECLARATIONS2 = 230, // ::= - RULE_ATTRIBUTE_DECLARATIONS = 231, // ::= - RULE_ATTRIBUTE_DECLARATIONS2 = 232, // ::= - RULE_ATTRIBUTE_DECLARATION_TKSQUAREOPEN_TKSQUARECLOSE = 233, // ::= tkSquareOpen tkSquareClose - RULE_ONE_OR_SOME_ATTRIBUTE = 234, // ::= - RULE_ONE_OR_SOME_ATTRIBUTE_TKCOMMA = 235, // ::= tkComma - RULE_ONE_ATTRIBUTE = 236, // ::= - RULE_ONE_ATTRIBUTE_TKCOLON = 237, // ::= tkColon - RULE_SIMPLE_TYPE_DECL_TKEQUAL_TKSEMICOLON = 238, // ::= tkEqual tkSemiColon - RULE_SIMPLE_TYPE_DECL_TKSEMICOLON = 239, // ::= tkSemiColon - RULE_TYPE_DECL_IDENTIFIER = 240, // ::= - RULE_TYPE_DECL_IDENTIFIER2 = 241, // ::= - RULE_TEMPLATE_IDENTIFIER_WITH_EQUAL_TKLOWER_TKGREATEREQUAL = 242, // ::= tkLower tkGreaterEqual - RULE_TYPE_DECL_TYPE = 243, // ::= - RULE_TYPE_DECL_TYPE_TKTYPE = 244, // ::= tkType - RULE_TYPE_DECL_TYPE2 = 245, // ::= - RULE_TYPE_REF = 246, // ::= - RULE_TYPE_REF2 = 247, // ::= - RULE_TYPE_REF3 = 248, // ::= - RULE_TYPE_REF4 = 249, // ::= - RULE_TYPE_REF5 = 250, // ::= - RULE_TYPE_REF6 = 251, // ::= - RULE_TEMPLATE_TYPE = 252, // ::= - RULE_TEMPLATE_TYPE_PARAMS_TKLOWER_TKGREATER = 253, // ::= tkLower tkGreater - RULE_TEMPLATE_PARAM_LIST = 254, // ::= - RULE_TEMPLATE_PARAM_LIST_TKCOMMA = 255, // ::= tkComma - RULE_TEMPLATE_PARAM = 256, // ::= - RULE_TEMPLATE_PARAM2 = 257, // ::= - RULE_SIMPLE_TYPE = 258, // ::= - RULE_SIMPLE_TYPE_TKDOTDOT = 259, // ::= tkDotDot - RULE_SIMPLE_TYPE_TKROUNDOPEN_TKROUNDCLOSE = 260, // ::= tkRoundOpen tkRoundClose - RULE_RANGE_EXPR = 261, // ::= - RULE_RANGE_EXPR2 = 262, // ::= - RULE_RANGE_TERM = 263, // ::= - RULE_RANGE_TERM2 = 264, // ::= - RULE_RANGE_FACTOR = 265, // ::= - RULE_RANGE_FACTOR2 = 266, // ::= - RULE_RANGE_FACTOR3 = 267, // ::= - RULE_RANGE_FACTOR4 = 268, // ::= - RULE_RANGE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE = 269, // ::= tkRoundOpen tkRoundClose - RULE_RANGE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE2 = 270, // ::= tkRoundOpen tkRoundClose - RULE_RANGE_METHODNAME = 271, // ::= - RULE_RANGE_METHODNAME_TKPOINT = 272, // ::= tkPoint - RULE_SIMPLE_TYPE_IDENTIFIER = 273, // ::= - RULE_SIMPLE_TYPE_IDENTIFIER_TKPOINT = 274, // ::= tkPoint - RULE_ENUMERATION_ID_LIST_TKCOMMA = 275, // ::= tkComma - RULE_ENUMERATION_ID_LIST_TKCOMMA2 = 276, // ::= tkComma - RULE_ENUMERATION_ID = 277, // ::= - RULE_ENUMERATION_ID_TKEQUAL = 278, // ::= tkEqual - RULE_POINTER_TYPE_TKDEREF = 279, // ::= tkDeref - RULE_STRUCTURED_TYPE = 280, // ::= - RULE_STRUCTURED_TYPE_TKPACKED = 281, // ::= tkPacked - RULE_UNPACKED_STRUCTURED_TYPE = 282, // ::= - RULE_UNPACKED_STRUCTURED_TYPE2 = 283, // ::= - RULE_UNPACKED_STRUCTURED_TYPE3 = 284, // ::= - RULE_UNPACKED_STRUCTURED_TYPE4 = 285, // ::= - RULE_ARRAY_TYPE_TKARRAY_TKSQUAREOPEN_TKSQUARECLOSE_TKOF = 286, // ::= tkArray tkSquareOpen tkSquareClose tkOf - RULE_ARRAY_TYPE = 287, // ::= - RULE_UNSIZED_ARRAY_TYPE_TKARRAY_TKOF = 288, // ::= tkArray tkOf - RULE_SIMPLE_TYPE_LIST = 289, // ::= - RULE_SIMPLE_TYPE_LIST_TKCOMMA = 290, // ::= tkComma - RULE_SIMPLE_TYPE_OR_EMPTY = 291, // ::= - RULE_SIMPLE_TYPE_OR_EMPTY2 = 292, // ::= - RULE_RECORD_TYPE_TKRECORD_TKEND = 293, // ::= tkRecord tkEnd - RULE_RECORD_TYPE_TKRECORD_TKEND2 = 294, // ::= tkRecord tkEnd - RULE_FIELD_LIST = 295, // ::= - RULE_FIELD_LIST2 = 296, // ::= - RULE_FIELD_LIST_TKSEMICOLON = 297, // ::= tkSemiColon - RULE_FIXED_PART = 298, // ::= - RULE_FIXED_PART_TKSEMICOLON = 299, // ::= tkSemiColon - RULE_FIXED_PART_2 = 300, // ::= - RULE_FIXED_PART_2_TKSEMICOLON = 301, // ::= tkSemiColon - RULE_RECORD_SECTION_TKCOLON = 302, // ::= tkColon - RULE_RECORD_SECTION_ID_LIST = 303, // ::= - RULE_RECORD_SECTION_ID_LIST_TKCOMMA = 304, // ::= tkComma - RULE_RECORD_SECTION_ID = 305, // ::= - RULE_VARIANT_PART_TKCASE_TKOF = 306, // ::= tkCase tkOf - RULE_TAG_FIELD = 307, // ::= - RULE_TAG_FIELD_TKCOLON = 308, // ::= tkColon - RULE_TAG_FIELD_NAME = 309, // ::= - RULE_TAG_FIELD_TYPENAME = 310, // ::= - RULE_VARIANT_LIST = 311, // ::= - RULE_VARIANT_LIST_TKSEMICOLON = 312, // ::= tkSemiColon - RULE_VARIANT_LIST_2 = 313, // ::= - RULE_VARIANT_LIST_2_TKSEMICOLON = 314, // ::= tkSemiColon - RULE_VARIANT_TKCOLON_TKROUNDOPEN_TKROUNDCLOSE = 315, // ::= tkColon tkRoundOpen tkRoundClose - RULE_VARIANT_FIELD_LIST = 316, // ::= - RULE_VARIANT_FIELD_LIST2 = 317, // ::= - RULE_CASE_TAG_LIST = 318, // ::= - RULE_CONST_EXPR_LIST = 319, // ::= - RULE_CONST_EXPR_LIST_TKCOMMA = 320, // ::= tkComma - RULE_SET_TYPE_TKSET_TKOF = 321, // ::= tkSet tkOf - RULE_FILE_TYPE_TKFILE_TKOF = 322, // ::= tkFile tkOf - RULE_FILE_TYPE_TKFILE = 323, // ::= tkFile - RULE_STRING_TYPE_TKIDENTIFIER_TKSQUAREOPEN_TKSQUARECLOSE = 324, // ::= tkIdentifier tkSquareOpen tkSquareClose - RULE_PROCEDURAL_TYPE = 325, // ::= - RULE_PROCEDURAL_TYPE_KIND = 326, // ::= - RULE_PROCEDURAL_TYPE_DECL_TKPROCEDURE = 327, // ::= tkProcedure - RULE_PROCEDURAL_TYPE_DECL_TKFUNCTION_TKCOLON = 328, // ::= tkFunction tkColon - RULE_MAYBE_ERROR_TKCOLON = 329, // ::= tkColon - RULE_MAYBE_ERROR = 330, // ::= - RULE_OBJECT_TYPE = 331, // ::= - RULE_OOT_PRIVAT_LIST = 332, // ::= - RULE_OOT_PRIVAT_LIST_TKPRIVATE = 333, // ::= tkPrivate - RULE_OOT_COMPONENT_LIST = 334, // ::= - RULE_OOT_COMPONENT_LIST2 = 335, // ::= - RULE_OOT_COMPONENT_LIST3 = 336, // ::= - RULE_OOT_COMPONENT_LIST4 = 337, // ::= - RULE_OOT_SUCCESSOR_TKROUNDOPEN_TKROUNDCLOSE = 338, // ::= tkRoundOpen tkRoundClose - RULE_OOT_TYPEIDENTIFIER = 339, // ::= - RULE_OOT_FIELD_LIST = 340, // ::= - RULE_OOT_FIELD_LIST2 = 341, // ::= - RULE_OOT_FIELD_TKCOLON_TKSEMICOLON = 342, // ::= tkColon tkSemiColon - RULE_OOT_ID_LIST = 343, // ::= - RULE_OOT_ID_LIST_TKCOMMA = 344, // ::= tkComma - RULE_OOT_FIELD_IDENTIFIER = 345, // ::= - RULE_OOT_METHOD_LIST = 346, // ::= - RULE_OOT_METHOD_LIST2 = 347, // ::= - RULE_OOT_METHOD = 348, // ::= - RULE_OOT_METHOD_HEAD = 349, // ::= - RULE_OOT_METHOD_HEAD2 = 350, // ::= - RULE_OOT_METHOD_HEAD3 = 351, // ::= - RULE_OOT_METHOD_HEAD4 = 352, // ::= - RULE_OOT_CONSTRUCTOR_HEAD_TKCONSTRUCTOR = 353, // ::= tkConstructor - RULE_OOT_DESTRUCTOR_HEAD_TKDESTRUCTOR = 354, // ::= tkDestructor - RULE_NEW_OBJECT_TYPE = 355, // ::= - RULE_NOT_OBJECT_TYPE = 356, // ::= - RULE_NEW_RECORD_TYPE_TKEND = 357, // ::= tkEnd - RULE_CLASS_ATTRIBUTES_TKFINAL = 358, // ::= tkFinal - RULE_CLASS_ATTRIBUTES = 359, // ::= - RULE_CLASS_OR_INTERFACE_KEYWORD_TKCLASS = 360, // ::= tkClass - RULE_CLASS_OR_INTERFACE_KEYWORD_TKINTERFACE = 361, // ::= tkInterface - RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE = 362, // ::= tkTemplate - RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE_TKCLASS = 363, // ::= tkTemplate tkClass - RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE_TKRECORD = 364, // ::= tkTemplate tkRecord - RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE_TKINTERFACE = 365, // ::= tkTemplate tkInterface - RULE_RECORD_KEYWORD_TKRECORD = 366, // ::= tkRecord - RULE_OPT_NOT_COMPONENT_LIST_SEQ_END = 367, // ::= - RULE_OPT_NOT_COMPONENT_LIST_SEQ_END_TKEND = 368, // ::= tkEnd - RULE_OPT_BASE_CLASSES = 369, // ::= - RULE_OPT_BASE_CLASSES_TKROUNDOPEN_TKROUNDCLOSE = 370, // ::= tkRoundOpen tkRoundClose - RULE_BASE_CLASSES_NAMES_LIST = 371, // ::= - RULE_BASE_CLASSES_NAMES_LIST_TKCOMMA = 372, // ::= tkComma - RULE_BASE_CLASS_NAME = 373, // ::= - RULE_BASE_CLASS_NAME2 = 374, // ::= - RULE_OPT_TEMPLATE_ARGUMENTS = 375, // ::= - RULE_OPT_TEMPLATE_ARGUMENTS2 = 376, // ::= - RULE_TEMPLATE_ARGUMENTS_TKLOWER_TKGREATER = 377, // ::= tkLower tkGreater - RULE_OPT_WHERE_SECTION = 378, // ::= - RULE_OPT_WHERE_SECTION2 = 379, // ::= - RULE_WHERE_PART_LIST = 380, // ::= - RULE_WHERE_PART_LIST2 = 381, // ::= - RULE_WHERE_PART_TKWHERE_TKCOLON_TKSEMICOLON = 382, // ::= tkWhere tkColon tkSemiColon - RULE_TYPE_REF_AND_SECIFIC_LIST = 383, // ::= - RULE_TYPE_REF_AND_SECIFIC_LIST_TKCOMMA = 384, // ::= tkComma - RULE_TYPE_REF_OR_SECIFIC = 385, // ::= - RULE_TYPE_REF_OR_SECIFIC_TKCLASS = 386, // ::= tkClass - RULE_TYPE_REF_OR_SECIFIC_TKRECORD = 387, // ::= tkRecord - RULE_TYPE_REF_OR_SECIFIC_TKCONSTRUCTOR = 388, // ::= tkConstructor - RULE_RECORD_COMPONENT_LIST = 389, // ::= - RULE_NOT_COMPONENT_LIST_SEQ = 390, // ::= - RULE_NOT_COMPONENT_LIST_SEQ2 = 391, // ::= - RULE_OT_VISIBILITY_SPECIFIER_TKINTERNAL = 392, // ::= tkInternal - RULE_OT_VISIBILITY_SPECIFIER_TKPUBLIC = 393, // ::= tkPublic - RULE_OT_VISIBILITY_SPECIFIER_TKPROTECTED = 394, // ::= tkProtected - RULE_OT_VISIBILITY_SPECIFIER_TKPRIVATE = 395, // ::= tkPrivate - RULE_NOT_OBJECT_TYPE_IDENTIFIER_LIST = 396, // ::= - RULE_NOT_OBJECT_TYPE_IDENTIFIER_LIST_TKCOMMA = 397, // ::= tkComma - RULE_IDENT_LIST = 398, // ::= - RULE_IDENT_LIST_TKCOMMA = 399, // ::= tkComma - RULE_NOT_COMPONENT_LIST = 400, // ::= - RULE_NOT_COMPONENT_LIST2 = 401, // ::= - RULE_NOT_COMPONENT_LIST3 = 402, // ::= - RULE_NOT_COMPONENT_LIST_TKSEMICOLON = 403, // ::= tkSemiColon - RULE_OPT_SEMICOLON = 404, // ::= - RULE_OPT_SEMICOLON_TKSEMICOLON = 405, // ::= tkSemiColon - RULE_NOT_GUID = 406, // ::= - RULE_NOT_COMPONENT_LIST_1 = 407, // ::= - RULE_NOT_COMPONENT_LIST_1_TKSEMICOLON = 408, // ::= tkSemiColon - RULE_NOT_COMPONENT_LIST_2 = 409, // ::= - RULE_NOT_COMPONENT_LIST_22 = 410, // ::= - RULE_NOT_COMPONENT_LIST_23 = 411, // ::= - RULE_NOT_COMPONENT_LIST_24 = 412, // ::= - RULE_FILED_OR_CONST_DEFINITION = 413, // ::= - RULE_SIMPLE_FILED_OR_CONST_DEFINITION_TKCONST = 414, // ::= tkConst - RULE_SIMPLE_FILED_OR_CONST_DEFINITION = 415, // ::= - RULE_SIMPLE_FILED_OR_CONST_DEFINITION_TKCLASS = 416, // ::= tkClass - RULE_FILED_OR_CONST_DEFINITION_OR_AM = 417, // ::= - RULE_FILED_OR_CONST_DEFINITION_OR_AM2 = 418, // ::= - RULE_NOT_FIELD_DEFINITION = 419, // ::= - RULE_NOT_FIELD_DEFINITION_TKEVENT_TKCOLON = 420, // ::= tkEvent tkColon - RULE_FIELD_ACCESS_MODIFIER_TKSTATIC = 421, // ::= tkStatic - RULE_NOT_METHOD_DEFINITION = 422, // ::= - RULE_NOT_METHOD_DEFINITION2 = 423, // ::= - RULE_ABC_METHOD_DECL = 424, // ::= - RULE_ABC_METHOD_DECL2 = 425, // ::= - RULE_ABC_METHOD_DECL3 = 426, // ::= - RULE_ABC_METHOD_DECL4 = 427, // ::= - RULE_NOT_METHOD_HEADING_TKCLASS = 428, // ::= tkClass - RULE_NOT_METHOD_HEADING = 429, // ::= - RULE_NOT_METHOD_HEADING2 = 430, // ::= - RULE_NOT_METHOD_HEADING3 = 431, // ::= - RULE_NOT_PROCFUNC_HEADING = 432, // ::= - RULE_NOT_PROCFUNC_HEADING_VARIANTS = 433, // ::= - RULE_NOT_PROCFUNC_HEADING_VARIANTS2 = 434, // ::= - RULE_OPTIONAL_QUALIFIED_IDENTIFIER = 435, // ::= - RULE_OPTIONAL_QUALIFIED_IDENTIFIER2 = 436, // ::= - RULE_NOT_CONSTRUCTOR_HEADING = 437, // ::= - RULE_NOT_CONSTRUCTOR_HEADING_TKCLASS = 438, // ::= tkClass - RULE_OPT_PROC_NAME = 439, // ::= - RULE_OPT_PROC_NAME2 = 440, // ::= - RULE_NOT_CONSTRUCTOR_HEADING_OBJECT_TKCONSTRUCTOR = 441, // ::= tkConstructor - RULE_NOT_DESTRUCTOR_HEADING_TKDESTRUCTOR = 442, // ::= tkDestructor - RULE_QUALIFIED_IDENTIFIER = 443, // ::= - RULE_QUALIFIED_IDENTIFIER2 = 444, // ::= - RULE_QUALIFIED_IDENTIFIER_TKPOINT = 445, // ::= tkPoint - RULE_QUALIFIED_IDENTIFIER_TKPOINT2 = 446, // ::= tkPoint - RULE_NOT_PROPERTY_DEFINITION = 447, // ::= - RULE_SIMPLE_NOT_PROPERTY_DEFINITION = 448, // ::= - RULE_SIMPLE_NOT_PROPERTY_DEFINITION_TKCLASS = 449, // ::= tkClass - RULE_NOT_SIMPLE_PROPERTY_DEFINITION_TKPROPERTY_TKSEMICOLON = 450, // ::= tkProperty tkSemiColon - RULE_NOT_ARRAY_DEFAULTPROPERTY = 451, // ::= - RULE_NOT_ARRAY_DEFAULTPROPERTY_TKDEFAULT_TKSEMICOLON = 452, // ::= tkDefault tkSemiColon - RULE_NOT_PROPERTY_INTERFACE = 453, // ::= - RULE_NOT_PROPERTY_INTERFACE_TKCOLON = 454, // ::= tkColon - RULE_NOT_PROPERTY_INTERFACE_INDEX = 455, // ::= - RULE_NOT_PROPERTY_INTERFACE_INDEX_TKINDEX = 456, // ::= tkIndex - RULE_NOT_PROPERTY_PARAMETER_LIST = 457, // ::= - RULE_NOT_PROPERTY_PARAMETER_LIST_TKSQUAREOPEN_TKSQUARECLOSE = 458, // ::= tkSquareOpen tkSquareClose - RULE_NOT_PARAMETER_DECL_LIST = 459, // ::= - RULE_NOT_PARAMETER_DECL_LIST_TKSEMICOLON = 460, // ::= tkSemiColon - RULE_NOT_PARAMETER_DECL_TKCOLON = 461, // ::= tkColon - RULE_NOT_PARAMETER_DECL_TKCONST_TKCOLON = 462, // ::= tkConst tkColon - RULE_NOT_PARAMETER_DECL_TKVAR_TKCOLON = 463, // ::= tkVar tkColon - RULE_NOT_PARAMETER_DECL_TKOUT_TKCOLON = 464, // ::= tkOut tkColon - RULE_NOT_PARAMETER_NAME_LIST = 465, // ::= - RULE_OPT_IDENTIFIER = 466, // ::= - RULE_OPT_IDENTIFIER2 = 467, // ::= - RULE_NOT_PROPERTY_SPECIFIERS = 468, // ::= - RULE_NOT_PROPERTY_SPECIFIERS_TKREADONLY = 469, // ::= tkReadOnly - RULE_NOT_PROPERTY_SPECIFIERS_TKWRITEONLY = 470, // ::= tkWriteOnly - RULE_NOT_PROPERTY_SPECIFIERS_TKDEFAULT = 471, // ::= tkDefault - RULE_NOT_PROPERTY_SPECIFIERS_TKREAD = 472, // ::= tkRead - RULE_NOT_PROPERTY_SPECIFIERS_TKWRITE = 473, // ::= tkWrite - RULE_VAR_DECL_TKSEMICOLON = 474, // ::= tkSemiColon - RULE_VAR_DECL_PART = 475, // ::= - RULE_VAR_DECL_PART2 = 476, // ::= - RULE_VAR_DECL_PART_TKCOLON_TKASSIGN = 477, // ::= tkColon tkAssign - RULE_VAR_DECL_PART_IN_STMT = 478, // ::= - RULE_VAR_DECL_PART_ASSIGN_TKASSIGN = 479, // ::= tkAssign - RULE_VAR_DECL_PART_NORMAL_TKCOLON = 480, // ::= tkColon - RULE_VAR_INIT_VALUE = 481, // ::= - RULE_VAR_INIT_VALUE_TYPED = 482, // ::= - RULE_TYPED_CONST_OR_NEW = 483, // ::= - RULE_TYPED_CONST_OR_NEW2 = 484, // ::= - RULE_TYPED_CONST_OR_NEW3 = 485, // ::= - RULE_VAR_NAME_LIST = 486, // ::= - RULE_VAR_NAME_LIST_TKCOMMA = 487, // ::= tkComma - RULE_VAR_NAME = 488, // ::= - RULE_DECLARED_VAR_NAME = 489, // ::= - RULE_CONSTRUCTOR_DECL = 490, // ::= - RULE_ABC_CONSTRUCTOR_DECL = 491, // ::= - RULE_DESTRUCTOR_DECL = 492, // ::= - RULE_ABC_DESTRUCTOR_DECL = 493, // ::= - RULE_NOT_CONSTRUCTOR_BLOCK_DECL = 494, // ::= - RULE_NOT_CONSTRUCTOR_BLOCK_DECL2 = 495, // ::= - RULE_NOT_CONSTRUCTOR_BLOCK_DECL3 = 496, // ::= - RULE_PROC_DECL = 497, // ::= - RULE_PROC_DECL_TKCLASS = 498, // ::= tkClass - RULE_PROC_DECL_NOCLASS = 499, // ::= - RULE_ABC_PROC_DECL = 500, // ::= - RULE_ABC_PROC_DECL_TKCLASS = 501, // ::= tkClass - RULE_ABC_PROC_DECL_NOCLASS = 502, // ::= - RULE_FUNC_DECL = 503, // ::= - RULE_FUNC_DECL_TKCLASS = 504, // ::= tkClass - RULE_FUNC_DECL_NOCLASS = 505, // ::= - RULE_ABC_FUNC_DECL = 506, // ::= - RULE_ABC_FUNC_DECL_TKCLASS = 507, // ::= tkClass - RULE_ABC_FUNC_DECL_NOCLASS = 508, // ::= - RULE_PROC_HEADING_TKPROCEDURE = 509, // ::= tkProcedure - RULE_PROC_NAME = 510, // ::= - RULE_FUNC_NAME = 511, // ::= - RULE_FUNC_NAME_TKPOINT = 512, // ::= tkPoint - RULE_FUNC_NAME_TKPOINT_TKPOINT = 513, // ::= tkPoint tkPoint - RULE_FUNC_CLASS_NAME_IDENT = 514, // ::= - RULE_FUNC_METH_NAME_IDENT = 515, // ::= - RULE_FUNC_METH_NAME_IDENT2 = 516, // ::= - RULE_FUNC_NAME_WITH_TEMPLATE_ARGS = 517, // ::= - RULE_FUNC_NAME_WITH_TEMPLATE_ARGS2 = 518, // ::= - RULE_FUNC_NAME_IDENT = 519, // ::= - RULE_FUNC_NAME_IDENT2 = 520, // ::= - RULE_FUNC_HEADING_TKFUNCTION_TKCOLON = 521, // ::= tkFunction tkColon - RULE_FUNC_HEADING_TKFUNCTION = 522, // ::= tkFunction - RULE_PROC_BLOCK = 523, // ::= - RULE_FUNC_BLOCK = 524, // ::= - RULE_PROC_BLOCK_DECL = 525, // ::= - RULE_PROC_BLOCK_DECL2 = 526, // ::= - RULE_PROC_BLOCK_DECL3 = 527, // ::= - RULE_PROC_BLOCK_DECL_TKFORWARD_TKSEMICOLON = 528, // ::= tkForward tkSemiColon - RULE_ABC_PROC_BLOCK = 529, // ::= - RULE_ABC_PROC_BLOCK2 = 530, // ::= - RULE_EXTERNAL_DIRECTR = 531, // ::= - RULE_EXTERNAL_DIRECTR_TKSEMICOLON = 532, // ::= tkSemiColon - RULE_EXTERNAL_DIRECTR_TKEXTERNAL_TKSEMICOLON = 533, // ::= tkExternal tkSemiColon - RULE_EXTERNAL_DIRECTR_IDENT = 534, // ::= - RULE_EXTERNAL_DIRECTR_IDENT2 = 535, // ::= - RULE_ABC_EXTERNAL_DIRECTR_TKEXTERNAL_TKNAME = 536, // ::= tkExternal tkName - RULE_ABC_EXTERNAL_DIRECTR_TKEXTERNAL = 537, // ::= tkExternal - RULE_ASM_BLOCK_TKASMBODY_TKSEMICOLON = 538, // ::= tkAsmBody tkSemiColon - RULE_BLOCK_TKSEMICOLON = 539, // ::= tkSemiColon - RULE_ABC_BLOCK_TKSEMICOLON = 540, // ::= tkSemiColon - RULE_FP_LIST = 541, // ::= - RULE_FP_LIST_TKROUNDOPEN_TKROUNDCLOSE = 542, // ::= tkRoundOpen tkRoundClose - RULE_FP_SECT_LIST = 543, // ::= - RULE_FP_SECT_LIST2 = 544, // ::= - RULE_FP_SECT_LIST_TKSEMICOLON = 545, // ::= tkSemiColon - RULE_FP_SECT = 546, // ::= - RULE_SIMPLE_FP_SECT_TKCOLON = 547, // ::= tkColon - RULE_SIMPLE_FP_SECT_TKVAR_TKCOLON = 548, // ::= tkVar tkColon - RULE_SIMPLE_FP_SECT_TKOUT_TKCOLON = 549, // ::= tkOut tkColon - RULE_SIMPLE_FP_SECT_TKCONST_TKCOLON = 550, // ::= tkConst tkColon - RULE_SIMPLE_FP_SECT_TKPARAMS_TKCOLON = 551, // ::= tkParams tkColon - RULE_SIMPLE_FP_SECT_TKCOLON_TKASSIGN = 552, // ::= tkColon tkAssign - RULE_SIMPLE_FP_SECT_TKVAR_TKCOLON_TKASSIGN = 553, // ::= tkVar tkColon tkAssign - RULE_SIMPLE_FP_SECT_TKOUT_TKCOLON_TKASSIGN = 554, // ::= tkOut tkColon tkAssign - RULE_SIMPLE_FP_SECT_TKCONST_TKCOLON_TKASSIGN = 555, // ::= tkConst tkColon tkAssign - RULE_PARAM_NAME_LIST = 556, // ::= - RULE_PARAM_NAME_LIST_TKCOMMA = 557, // ::= tkComma - RULE_PARAM_NAME = 558, // ::= - RULE_FPTYPE = 559, // ::= - RULE_FPTYPE_NEW = 560, // ::= - RULE_FPTYPE_NEW_TKARRAY_TKOF_TKCONST = 561, // ::= tkArray tkOf tkConst - RULE_STMT = 562, // ::= - RULE_STMT_TKCOLON = 563, // ::= tkColon - RULE_UNLABELLED_STMT = 564, // ::= - RULE_UNLABELLED_STMT2 = 565, // ::= - RULE_UNLABELLED_STMT3 = 566, // ::= - RULE_UNLABELLED_STMT4 = 567, // ::= - RULE_UNLABELLED_STMT5 = 568, // ::= - RULE_UNLABELLED_STMT6 = 569, // ::= - RULE_UNLABELLED_STMT7 = 570, // ::= - RULE_UNLABELLED_STMT8 = 571, // ::= - RULE_UNLABELLED_STMT9 = 572, // ::= - RULE_UNLABELLED_STMT10 = 573, // ::= - RULE_UNLABELLED_STMT11 = 574, // ::= - RULE_UNLABELLED_STMT12 = 575, // ::= - RULE_UNLABELLED_STMT13 = 576, // ::= - RULE_UNLABELLED_STMT14 = 577, // ::= - RULE_UNLABELLED_STMT15 = 578, // ::= - RULE_UNLABELLED_STMT16 = 579, // ::= - RULE_UNLABELLED_STMT17 = 580, // ::= - RULE_UNLABELLED_STMT18 = 581, // ::= - RULE_UNLABELLED_STMT19 = 582, // ::= - RULE_VAR_STMT_TKVAR = 583, // ::= tkVar - RULE_ASSIGNMENT = 584, // ::= - RULE_PROC_CALL = 585, // ::= - RULE_GOTO_STMT_TKGOTO = 586, // ::= tkGoto - RULE_COMPOUND_STMT_TKBEGIN_TKEND = 587, // ::= tkBegin tkEnd - RULE_STMT_LIST = 588, // ::= - RULE_STMT_LIST_TKSEMICOLON = 589, // ::= tkSemiColon - RULE_IF_STMT_TKIF = 590, // ::= tkIf - RULE_IF_THEN_ELSE_BRANCH_TKTHEN = 591, // ::= tkThen - RULE_IF_THEN_ELSE_BRANCH_TKTHEN_TKELSE = 592, // ::= tkThen tkElse - RULE_THEN_BRANCH = 593, // ::= - RULE_ELSE_BRANCH = 594, // ::= - RULE_CASE_STMT_TKCASE_TKOF_TKEND = 595, // ::= tkCase tkOf tkEnd - RULE_CASE_LIST = 596, // ::= - RULE_CASE_LIST_TKSEMICOLON = 597, // ::= tkSemiColon - RULE_CASE_ITEM = 598, // ::= - RULE_CASE_ITEM_TKCOLON = 599, // ::= tkColon - RULE_CASE_LABEL_LIST = 600, // ::= - RULE_CASE_LABEL_LIST_TKCOMMA = 601, // ::= tkComma - RULE_CASE_LABEL = 602, // ::= - RULE_ELSE_CASE = 603, // ::= - RULE_ELSE_CASE_TKELSE = 604, // ::= tkElse - RULE_REPEAT_STMT_TKREPEAT_TKUNTIL = 605, // ::= tkRepeat tkUntil - RULE_WHILE_STMT_TKWHILE = 606, // ::= tkWhile - RULE_OPT_TK_DO_TKDO = 607, // ::= tkDo - RULE_OPT_TK_DO = 608, // ::= - RULE_LOCK_STMT_TKLOCK_TKDO = 609, // ::= tkLock tkDo - RULE_FOREACH_STMT_TKFOREACH_TKIN_TKDO = 610, // ::= tkForeach tkIn tkDo - RULE_FOREACH_STMT_TKFOREACH_TKVAR_TKCOLON_TKIN_TKDO = 611, // ::= tkForeach tkVar tkColon tkIn tkDo - RULE_FOREACH_STMT_IDENT_DYPE_OPT_TKCOLON = 612, // ::= tkColon - RULE_FOREACH_STMT_IDENT_DYPE_OPT = 613, // ::= - RULE_FOR_STMT_TKFOR = 614, // ::= tkFor - RULE_OPT_VAR_TKVAR = 615, // ::= tkVar - RULE_OPT_VAR = 616, // ::= - RULE_FOR_STMT_DECL_OR_ASSIGN_TKASSIGN = 617, // ::= tkAssign - RULE_FOR_STMT_DECL_OR_ASSIGN_TKCOLON_TKASSIGN = 618, // ::= tkColon tkAssign - RULE_FOR_CYCLE_TYPE_TKTO = 619, // ::= tkTo - RULE_FOR_CYCLE_TYPE_TKDOWNTO = 620, // ::= tkDownto - RULE_WITH_STMT_TKWITH_TKDO = 621, // ::= tkWith tkDo - RULE_INHERITED_MESSAGE_TKINHERITED = 622, // ::= tkInherited - RULE_TRY_STMT_TKTRY = 623, // ::= tkTry - RULE_TRY_HANDLER_TKFINALLY_TKEND = 624, // ::= tkFinally tkEnd - RULE_TRY_HANDLER_TKEXCEPT_TKEND = 625, // ::= tkExcept tkEnd - RULE_EXCEPTION_BLOCK = 626, // ::= - RULE_EXCEPTION_BLOCK_TKSEMICOLON = 627, // ::= tkSemiColon - RULE_EXCEPTION_BLOCK2 = 628, // ::= - RULE_EXCEPTION_HANDLER_LIST = 629, // ::= - RULE_EXCEPTION_HANDLER_LIST_TKSEMICOLON = 630, // ::= tkSemiColon - RULE_EXCEPTION_BLOCK_ELSE_BRANCH = 631, // ::= - RULE_EXCEPTION_BLOCK_ELSE_BRANCH_TKELSE = 632, // ::= tkElse - RULE_EXCEPTION_HANDLER_TKON_TKDO = 633, // ::= tkOn tkDo - RULE_EXCEPTION_IDENTIFIER = 634, // ::= - RULE_EXCEPTION_IDENTIFIER_TKCOLON = 635, // ::= tkColon - RULE_EXCEPTION_CLASS_TYPE_IDENTIFIER = 636, // ::= - RULE_EXCEPTION_VARIABLE = 637, // ::= - RULE_RAISE_STMT_TKRAISE = 638, // ::= tkRaise - RULE_RAISE_STMT_TKRAISE2 = 639, // ::= tkRaise - RULE_RAISE_STMT_TKRAISE_TKAT = 640, // ::= tkRaise tkAt - RULE_ASM_STMT_TKASMBODY = 641, // ::= tkAsmBody - RULE_EXPR_LIST = 642, // ::= - RULE_EXPR_LIST_TKCOMMA = 643, // ::= tkComma - RULE_ATTR_EXPR_LIST = 644, // ::= - RULE_EXPR_AS_STMT = 645, // ::= - RULE_ALLOWABLE_EXPR_AS_STMT = 646, // ::= - RULE_EXPR = 647, // ::= - RULE_EXPR2 = 648, // ::= - RULE_EXPR3 = 649, // ::= - RULE_EXPR_L1 = 650, // ::= - RULE_EXPR_L12 = 651, // ::= - RULE_SIZEOF_EXPR_TKSIZEOF_TKROUNDOPEN_TKROUNDCLOSE = 652, // ::= tkSizeOf tkRoundOpen tkRoundClose - RULE_TYPEOF_EXPR_TKTYPEOF_TKROUNDOPEN_TKROUNDCLOSE = 653, // ::= tkTypeOf tkRoundOpen tkRoundClose - RULE_QUESTION_EXPR_TKQUESTION_TKCOLON = 654, // ::= tkQuestion tkColon - RULE_OPT_AMPERSEND = 655, // ::= - RULE_OPT_AMPERSEND_TKAMPERSEND = 656, // ::= tkAmpersend - RULE_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE = 657, // ::= - RULE_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE2 = 658, // ::= - RULE_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE_TKAMPERSEND = 659, // ::= tkAmpersend - RULE_OPT_ARRAY_INITIALIZER_TKROUNDOPEN_TKROUNDCLOSE = 660, // ::= tkRoundOpen tkRoundClose - RULE_OPT_ARRAY_INITIALIZER = 661, // ::= - RULE_NEW_EXPR = 662, // ::= - RULE_NEW_EXPR_TKSQUAREOPEN_TKSQUARECLOSE = 663, // ::= tkSquareOpen tkSquareClose - RULE_ARRAY_NAME_FOR_NEW_EXPR = 664, // ::= - RULE_ARRAY_NAME_FOR_NEW_EXPR2 = 665, // ::= - RULE_OPT_TEMPLATE_TYPE_PARAMS = 666, // ::= - RULE_OPT_TEMPLATE_TYPE_PARAMS2 = 667, // ::= - RULE_OPT_EXPR_LIST_WITH_BRACKET = 668, // ::= - RULE_OPT_EXPR_LIST_WITH_BRACKET_TKROUNDOPEN_TKROUNDCLOSE = 669, // ::= tkRoundOpen tkRoundClose - RULE_RELOP_EXPR = 670, // ::= - RULE_RELOP_EXPR2 = 671, // ::= - RULE_FORMAT_EXPR_TKCOLON = 672, // ::= tkColon - RULE_FORMAT_EXPR_TKCOLON_TKCOLON = 673, // ::= tkColon tkColon - RULE_RELOP_TKEQUAL = 674, // ::= tkEqual - RULE_RELOP_TKNOTEQUAL = 675, // ::= tkNotEqual - RULE_RELOP_TKLOWER = 676, // ::= tkLower - RULE_RELOP_TKGREATER = 677, // ::= tkGreater - RULE_RELOP_TKLOWEREQUAL = 678, // ::= tkLowerEqual - RULE_RELOP_TKGREATEREQUAL = 679, // ::= tkGreaterEqual - RULE_RELOP_TKIN = 680, // ::= tkIn - RULE_SIMPLE_EXPR = 681, // ::= - RULE_SIMPLE_EXPR2 = 682, // ::= - RULE_ADDOP_TKPLUS = 683, // ::= tkPlus - RULE_ADDOP_TKMINUS = 684, // ::= tkMinus - RULE_ADDOP_TKOR = 685, // ::= tkOr - RULE_ADDOP_TKXOR = 686, // ::= tkXor - RULE_ADDOP_TKCSHARPSTYLEOR = 687, // ::= tkCSharpStyleOr - RULE_TYPECAST_OP_TKAS = 688, // ::= tkAs - RULE_TYPECAST_OP_TKIS = 689, // ::= tkIs - RULE_AS_IS_EXPR = 690, // ::= - RULE_TERM = 691, // ::= - RULE_TERM2 = 692, // ::= - RULE_TERM3 = 693, // ::= - RULE_TERM4 = 694, // ::= - RULE_MULOP_TKSTAR = 695, // ::= tkStar - RULE_MULOP_TKSLASH = 696, // ::= tkSlash - RULE_MULOP_TKDIV = 697, // ::= tkDiv - RULE_MULOP_TKMOD = 698, // ::= tkMod - RULE_MULOP_TKSHL = 699, // ::= tkShl - RULE_MULOP_TKSHR = 700, // ::= tkShr - RULE_MULOP_TKAND = 701, // ::= tkAnd - RULE_DEFAULT_EXPR_TKDEFAULT_TKROUNDOPEN_TKROUNDCLOSE = 702, // ::= tkDefault tkRoundOpen tkRoundClose - RULE_FACTOR_TKNIL = 703, // ::= tkNil - RULE_FACTOR = 704, // ::= - RULE_FACTOR2 = 705, // ::= - RULE_FACTOR_TKSQUAREOPEN_TKSQUARECLOSE = 706, // ::= tkSquareOpen tkSquareClose - RULE_FACTOR_TKNOT = 707, // ::= tkNot - RULE_FACTOR3 = 708, // ::= - RULE_FACTOR_TKDEREF = 709, // ::= tkDeref - RULE_FACTOR4 = 710, // ::= - RULE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE = 711, // ::= tkRoundOpen tkRoundClose tkRoundOpen tkRoundClose - RULE_LITERAL_OR_NUMBER = 712, // ::= - RULE_LITERAL_OR_NUMBER2 = 713, // ::= - RULE_VAR_REFERENCE = 714, // ::= - RULE_VAR_REFERENCE2 = 715, // ::= - RULE_VAR_ADDRESS_TKADDRESSOF = 716, // ::= tkAddressOf - RULE_VAR_ADDRESS_TKADDRESSOF2 = 717, // ::= tkAddressOf - RULE_ATTRIBUTE_VARIABLE = 718, // ::= - RULE_VARIABLE = 719, // ::= - RULE_VARIABLE2 = 720, // ::= - RULE_VARIABLE_TKINHERITED = 721, // ::= tkInherited - RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE = 722, // ::= tkRoundOpen tkRoundClose - RULE_VARIABLE3 = 723, // ::= - RULE_VARIABLE4 = 724, // ::= - RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE2 = 725, // ::= tkRoundOpen tkRoundClose - RULE_VARIABLE_TKPOINT = 726, // ::= tkPoint - RULE_VARIABLE5 = 727, // ::= - RULE_OPT_EXPR_LIST = 728, // ::= - RULE_OPT_EXPR_LIST2 = 729, // ::= - RULE_OPT_ATTR_EXPR_LIST = 730, // ::= - RULE_OPT_ATTR_EXPR_LIST2 = 731, // ::= - RULE_ATTRIBUTE_VAR_SPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE = 732, // ::= tkRoundOpen tkRoundClose - RULE_ATTRIBUTE_VAR_SPECIFIERS_TKPOINT = 733, // ::= tkPoint - RULE_VAR_SPECIFIERS_TKSQUAREOPEN_TKSQUARECLOSE = 734, // ::= tkSquareOpen tkSquareClose - RULE_VAR_SPECIFIERS_TKSQUAREOPEN_TKSQUARECLOSE2 = 735, // ::= tkSquareOpen tkSquareClose - RULE_VAR_SPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE = 736, // ::= tkRoundOpen tkRoundClose - RULE_VAR_SPECIFIERS_TKPOINT = 737, // ::= tkPoint - RULE_VAR_SPECIFIERS_TKDEREF = 738, // ::= tkDeref - RULE_VAR_SPECIFIERS_TKAMPERSEND = 739, // ::= tkAmpersend - RULE_TEMPLATE_TYPE_BACK_VARSPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE = 740, // ::= tkRoundOpen tkRoundClose - RULE_TEMPLATE_TYPE_BACK_VARSPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE2 = 741, // ::= tkRoundOpen tkRoundClose - RULE_ELEM_LIST = 742, // ::= - RULE_ELEM_LIST2 = 743, // ::= - RULE_ELEM_LIST1 = 744, // ::= - RULE_ELEM_LIST1_TKCOMMA = 745, // ::= tkComma - RULE_ELEM = 746, // ::= - RULE_ELEM_TKDOTDOT = 747, // ::= tkDotDot - RULE_ONE_LITERAL_TKSTRINGLITERAL = 748, // ::= tkStringLiteral - RULE_ONE_LITERAL_TKASCIICHAR = 749, // ::= tkAsciiChar - RULE_LITERAL = 750, // ::= - RULE_LITERAL_LIST = 751, // ::= - RULE_LITERAL_LIST2 = 752, // ::= - RULE_OPERATOR_NAME_IDENT_TKOPERATOR = 753, // ::= tkOperator - RULE_OPT_METH_MODIFICATORS_TKSEMICOLON = 754, // ::= tkSemiColon - RULE_OPT_METH_MODIFICATORS_TKSEMICOLON_TKSEMICOLON = 755, // ::= tkSemiColon tkSemiColon - RULE_METH_MODIFICATORS = 756, // ::= - RULE_METH_MODIFICATORS_TKSEMICOLON = 757, // ::= tkSemiColon - RULE_INTEGER_CONST_TKINTEGER = 758, // ::= tkInteger - RULE_INTEGER_CONST_TKINTEGER2 = 759, // ::= tkInteger - RULE_INTEGER_CONST_TKHEX = 760, // ::= tkHex - RULE_INTEGER_CONST_TKHEX2 = 761, // ::= tkHex - RULE_INTEGER_CONST = 762, // ::= - RULE_INTEGER_CONST2 = 763, // ::= - RULE_IDENTIFIER_TKIDENTIFIER = 764, // ::= tkIdentifier - RULE_IDENTIFIER = 765, // ::= - RULE_IDENTIFIER2 = 766, // ::= - RULE_IDENTIFIER3 = 767, // ::= - RULE_IDENTIFIER4 = 768, // ::= - RULE_IDENTIFIER5 = 769, // ::= - RULE_IDENTIFIER6 = 770, // ::= - RULE_IDENTIFIER7 = 771, // ::= - RULE_IDENTIFIER_OR_KEYWORD = 772, // ::= - RULE_IDENTIFIER_OR_KEYWORD2 = 773, // ::= - RULE_IDENTIFIER_OR_KEYWORD3 = 774, // ::= - RULE_IDENTIFIER_KEYWORD_OPERATORNAME = 775, // ::= - RULE_IDENTIFIER_KEYWORD_OPERATORNAME2 = 776, // ::= - RULE_IDENTIFIER_KEYWORD_OPERATORNAME3 = 777, // ::= - RULE_REAL_TYPE_NAME_TKREAL = 778, // ::= tkReal - RULE_REAL_TYPE_NAME_TKSINGLE = 779, // ::= tkSingle - RULE_REAL_TYPE_NAME_TKDOUBLE = 780, // ::= tkDouble - RULE_REAL_TYPE_NAME_TKEXTENDED = 781, // ::= tkExtended - RULE_REAL_TYPE_NAME_TKCOMP = 782, // ::= tkComp - RULE_ORD_TYPE_NAME_TKSHORTINT = 783, // ::= tkShortInt - RULE_ORD_TYPE_NAME_TKSMALLINT = 784, // ::= tkSmallInt - RULE_ORD_TYPE_NAME_TKORDINTEGER = 785, // ::= tkOrdInteger - RULE_ORD_TYPE_NAME_TKBYTE = 786, // ::= tkByte - RULE_ORD_TYPE_NAME_TKLONGINT = 787, // ::= tkLongInt - RULE_ORD_TYPE_NAME_TKINT64 = 788, // ::= tkInt64 - RULE_ORD_TYPE_NAME_TKWORD = 789, // ::= tkWord - RULE_ORD_TYPE_NAME_TKBOOLEAN = 790, // ::= tkBoolean - RULE_ORD_TYPE_NAME_TKCHAR = 791, // ::= tkChar - RULE_ORD_TYPE_NAME_TKWIDECHAR = 792, // ::= tkWideChar - RULE_ORD_TYPE_NAME_TKLONGWORD = 793, // ::= tkLongWord - RULE_ORD_TYPE_NAME_TKPCHAR = 794, // ::= tkPChar - RULE_ORD_TYPE_NAME_TKCARDINAL = 795, // ::= tkCardinal - RULE_VARIANT_TYPE_NAME_TKVARIANT = 796, // ::= tkVariant - RULE_VARIANT_TYPE_NAME_TKOLEVARIANT = 797, // ::= tkOleVariant - RULE_METH_MODIFICATOR_TKABSTRACT = 798, // ::= tkAbstract - RULE_METH_MODIFICATOR_TKOVERLOAD = 799, // ::= tkOverload - RULE_METH_MODIFICATOR_TKREINTRODUCE = 800, // ::= tkReintroduce - RULE_METH_MODIFICATOR_TKOVERRIDE = 801, // ::= tkOverride - RULE_METH_MODIFICATOR_TKVIRTUAL = 802, // ::= tkVirtual - RULE_METH_MODIFICATOR_TKSTATIC = 803, // ::= tkStatic - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKREAD = 804, // ::= tkRead - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKWRITE = 805, // ::= tkWrite - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKSTORED = 806, // ::= tkStored - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKNODEFAULT = 807, // ::= tkNodefault - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKIMPLEMENTS = 808, // ::= tkImplements - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKWRITEONLY = 809, // ::= tkWriteOnly - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKREADONLY = 810, // ::= tkReadOnly - RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKDISPID = 811, // ::= tkDispid - RULE_NON_RESERVED_TKAT = 812, // ::= tkAt - RULE_NON_RESERVED_TKABSOLUTE = 813, // ::= tkAbsolute - RULE_NON_RESERVED_TKON = 814, // ::= tkOn - RULE_NON_RESERVED_TKNAME = 815, // ::= tkName - RULE_NON_RESERVED_TKINDEX = 816, // ::= tkIndex - RULE_NON_RESERVED_TKMESSAGE = 817, // ::= tkMessage - RULE_NON_RESERVED_TKCONTAINS = 818, // ::= tkContains - RULE_NON_RESERVED_TKREQUIRES = 819, // ::= tkRequires - RULE_NON_RESERVED_TKFORWARD = 820, // ::= tkForward - RULE_NON_RESERVED_TKOUT = 821, // ::= tkOut - RULE_VISIBILITY_SPECIFIER_TKINTERNAL = 822, // ::= tkInternal - RULE_VISIBILITY_SPECIFIER_TKPUBLIC = 823, // ::= tkPublic - RULE_VISIBILITY_SPECIFIER_TKPROTECTED = 824, // ::= tkProtected - RULE_VISIBILITY_SPECIFIER_TKPRIVATE = 825, // ::= tkPrivate - RULE_OTHER_TKPACKAGE = 826, // ::= tkPackage - RULE_OTHER_TKUNIT = 827, // ::= tkUnit - RULE_OTHER_TKLIBRARY = 828, // ::= tkLibrary - RULE_OTHER_TKEXTERNAL = 829, // ::= tkExternal - RULE_OTHER_TKPARAMS = 830, // ::= tkParams - RULE_KEYWORD = 831, // ::= - RULE_KEYWORD_TKFINAL = 832, // ::= tkFinal - RULE_KEYWORD_TKTEMPLATE = 833, // ::= tkTemplate - RULE_KEYWORD_TKOR = 834, // ::= tkOr - RULE_KEYWORD_TKTYPEOF = 835, // ::= tkTypeOf - RULE_KEYWORD_TKSIZEOF = 836, // ::= tkSizeOf - RULE_KEYWORD_TKDEFAULT = 837, // ::= tkDefault - RULE_KEYWORD_TKWHERE = 838, // ::= tkWhere - RULE_KEYWORD_TKXOR = 839, // ::= tkXor - RULE_KEYWORD_TKAND = 840, // ::= tkAnd - RULE_KEYWORD_TKDIV = 841, // ::= tkDiv - RULE_KEYWORD_TKMOD = 842, // ::= tkMod - RULE_KEYWORD_TKSHL = 843, // ::= tkShl - RULE_KEYWORD_TKSHR = 844, // ::= tkShr - RULE_KEYWORD_TKNOT = 845, // ::= tkNot - RULE_KEYWORD_TKAS = 846, // ::= tkAs - RULE_KEYWORD_TKIN = 847, // ::= tkIn - RULE_KEYWORD_TKIS = 848, // ::= tkIs - RULE_KEYWORD_TKARRAY = 849, // ::= tkArray - RULE_KEYWORD_TKBEGIN = 850, // ::= tkBegin - RULE_KEYWORD_TKCASE = 851, // ::= tkCase - RULE_KEYWORD_TKCLASS = 852, // ::= tkClass - RULE_KEYWORD_TKCONST = 853, // ::= tkConst - RULE_KEYWORD_TKCONSTRUCTOR = 854, // ::= tkConstructor - RULE_KEYWORD_TKDESTRUCTOR = 855, // ::= tkDestructor - RULE_KEYWORD_TKDOWNTO = 856, // ::= tkDownto - RULE_KEYWORD_TKDO = 857, // ::= tkDo - RULE_KEYWORD_TKELSE = 858, // ::= tkElse - RULE_KEYWORD_TKEXCEPT = 859, // ::= tkExcept - RULE_KEYWORD_TKFILE = 860, // ::= tkFile - RULE_KEYWORD_TKFINALIZATION = 861, // ::= tkFinalization - RULE_KEYWORD_TKFINALLY = 862, // ::= tkFinally - RULE_KEYWORD_TKFOR = 863, // ::= tkFor - RULE_KEYWORD_TKFOREACH = 864, // ::= tkForeach - RULE_KEYWORD_TKFUNCTION = 865, // ::= tkFunction - RULE_KEYWORD_TKIF = 866, // ::= tkIf - RULE_KEYWORD_TKIMPLEMENTATION = 867, // ::= tkImplementation - RULE_KEYWORD_TKINHERITED = 868, // ::= tkInherited - RULE_KEYWORD_TKINITIALIZATION = 869, // ::= tkInitialization - RULE_KEYWORD_TKINTERFACE = 870, // ::= tkInterface - RULE_KEYWORD_TKPROCEDURE = 871, // ::= tkProcedure - RULE_KEYWORD_TKPROPERTY = 872, // ::= tkProperty - RULE_KEYWORD_TKRAISE = 873, // ::= tkRaise - RULE_KEYWORD_TKRECORD = 874, // ::= tkRecord - RULE_KEYWORD_TKREPEAT = 875, // ::= tkRepeat - RULE_KEYWORD_TKSET = 876, // ::= tkSet - RULE_KEYWORD_TKTRY = 877, // ::= tkTry - RULE_KEYWORD_TKTYPE = 878, // ::= tkType - RULE_KEYWORD_TKTHEN = 879, // ::= tkThen - RULE_KEYWORD_TKTO = 880, // ::= tkTo - RULE_KEYWORD_TKUNTIL = 881, // ::= tkUntil - RULE_KEYWORD_TKUSES = 882, // ::= tkUses - RULE_KEYWORD_TKUSING = 883, // ::= tkUsing - RULE_KEYWORD_TKVAR = 884, // ::= tkVar - RULE_KEYWORD_TKWHILE = 885, // ::= tkWhile - RULE_KEYWORD_TKWITH = 886, // ::= tkWith - RULE_KEYWORD_TKNIL = 887, // ::= tkNil - RULE_KEYWORD_TKGOTO = 888, // ::= tkGoto - RULE_KEYWORD_TKOF = 889, // ::= tkOf - RULE_KEYWORD_TKLABEL = 890, // ::= tkLabel - RULE_KEYWORD_TKPROGRAM = 891, // ::= tkProgram - RULE_RESERVED_KEYWORD_TKOPERATOR = 892, // ::= tkOperator - RULE_RESERVED_KEYWORD_TKEND = 893, // ::= tkEnd - RULE_OVERLOAD_OPERATOR_TKMINUS = 894, // ::= tkMinus - RULE_OVERLOAD_OPERATOR_TKPLUS = 895, // ::= tkPlus - RULE_OVERLOAD_OPERATOR_TKSQUAREOPEN_TKSQUARECLOSE = 896, // ::= tkSquareOpen tkSquareClose - RULE_OVERLOAD_OPERATOR_TKROUNDOPEN_TKROUNDCLOSE = 897, // ::= tkRoundOpen tkRoundClose - RULE_OVERLOAD_OPERATOR_TKSLASH = 898, // ::= tkSlash - RULE_OVERLOAD_OPERATOR_TKSTAR = 899, // ::= tkStar - RULE_OVERLOAD_OPERATOR_TKEQUAL = 900, // ::= tkEqual - RULE_OVERLOAD_OPERATOR_TKGREATER = 901, // ::= tkGreater - RULE_OVERLOAD_OPERATOR_TKGREATEREQUAL = 902, // ::= tkGreaterEqual - RULE_OVERLOAD_OPERATOR_TKLOWER = 903, // ::= tkLower - RULE_OVERLOAD_OPERATOR_TKLOWEREQUAL = 904, // ::= tkLowerEqual - RULE_OVERLOAD_OPERATOR_TKNOTEQUAL = 905, // ::= tkNotEqual - RULE_OVERLOAD_OPERATOR_TKOR = 906, // ::= tkOr - RULE_OVERLOAD_OPERATOR_TKXOR = 907, // ::= tkXor - RULE_OVERLOAD_OPERATOR_TKAND = 908, // ::= tkAnd - RULE_OVERLOAD_OPERATOR_TKDIV = 909, // ::= tkDiv - RULE_OVERLOAD_OPERATOR_TKMOD = 910, // ::= tkMod - RULE_OVERLOAD_OPERATOR_TKSHL = 911, // ::= tkShl - RULE_OVERLOAD_OPERATOR_TKSHR = 912, // ::= tkShr - RULE_OVERLOAD_OPERATOR_TKNOT = 913, // ::= tkNot - RULE_OVERLOAD_OPERATOR_TKIN = 914, // ::= tkIn - RULE_OVERLOAD_OPERATOR_TKADDRESSOF = 915, // ::= tkAddressOf - RULE_OVERLOAD_OPERATOR_TKDEREF = 916, // ::= tkDeref - RULE_OVERLOAD_OPERATOR_TKIMPLICIT = 917, // ::= tkImplicit - RULE_OVERLOAD_OPERATOR_TKEXPLICIT = 918, // ::= tkExplicit - RULE_OVERLOAD_OPERATOR = 919, // ::= - RULE_ASSIGN_OPERATOR_TKASSIGN = 920, // ::= tkAssign - RULE_ASSIGN_OPERATOR_TKPLUSEQUAL = 921, // ::= tkPlusEqual - RULE_ASSIGN_OPERATOR_TKMINUSEQUAL = 922, // ::= tkMinusEqual - RULE_ASSIGN_OPERATOR_TKMULTEQUAL = 923, // ::= tkMultEqual - RULE_ASSIGN_OPERATOR_TKDIVEQUAL = 924, // ::= tkDivEqual - RULE_EMPTY = 925, // ::= - RULE_ERROR_TKERROR = 926, // ::= tkError - RULE_FUNC_DECL_LAMBDA_TKARROW = 927, // ::= tkArrow - RULE_FUNC_DECL_LAMBDA_TKARROW2 = 928, // ::= tkArrow - RULE_FUNC_DECL_LAMBDA_TKROUNDOPEN_TKROUNDCLOSE_TKARROW = 929, // ::= tkRoundOpen tkRoundClose tkArrow - RULE_IDENT_LIST1_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE = 930, // ::= tkRoundOpen tkComma tkRoundClose - RULE_IDENT_LIST1 = 931, // ::= - RULE_IDENT_LIST1_TKROUNDOPEN_TKCOLON_TKCOMMA_TKROUNDCLOSE = 932, // ::= tkRoundOpen tkColon tkComma tkRoundClose - RULE_IDENT_LIST1_TKROUNDOPEN_TKCOLON_TKROUNDCLOSE = 933, // ::= tkRoundOpen tkColon tkRoundClose - RULE_IDENT_LIST2_TKCOMMA = 934, // ::= tkComma - RULE_IDENT_LIST2 = 935, // ::= - RULE_VAR_OR_IDENTIFIER = 936, // ::= - RULE_VAR_OR_IDENTIFIER_TKCOLON = 937, // ::= tkColon - RULE_LAMBDA_BODY = 938, // ::= - RULE_LAMBDA_BODY2 = 939 // ::= -}; - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -private Object CreateTerminalObject(int TokenSymbolIndex) -{ -switch (TokenSymbolIndex) -{ - case (int)SymbolConstants.SYMBOL_EOF : - //(EOF) - //TERMINAL:EOF - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ERROR : - //(Error) - //TERMINAL:Error - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHITESPACE : - //(Whitespace) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Whitespace' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTEND : - //(Comment End) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment End' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTLINE : - //(Comment Line) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Line' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_COMMENTSTART : - //(Comment Start) - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'Comment Start' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKABSOLUTE : - //tkAbsolute - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKABSTRACT : - //tkAbstract - - { - procedure_attribute _procedure_attribute=new procedure_attribute(proc_attribute.attr_abstract); - - //_procedure_attribute.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _procedure_attribute.source_context=parsertools.GetTokenSourceContext(); - _procedure_attribute.name=LRParser.TokenText; - return _procedure_attribute; - } - - case (int)SymbolConstants.SYMBOL_TKADDRESSOF : - //tkAddressOf - - { - op_type_node _op_type_node=new op_type_node(Operators.AddressOf); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKAMPERSEND : - //tkAmpersend - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKAND : - //tkAnd - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalAND); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKARRAY : - //tkArray - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKARROW : - //tkArrow -{token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - pascalABC_lambda_definitions.Add(null);//tasha 7.05.2010 - return _token_info;} - case (int)SymbolConstants.SYMBOL_TKAS : - //tkAs - - { - op_type_node _op_type_node=new op_type_node(Operators.As); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKASCIICHAR : - //tkAsciiChar -return parsertools.create_sharp_char_const(this); - case (int)SymbolConstants.SYMBOL_TKASMBODY : - //tkAsmBody - //TERMINAL:tkAsmBody - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKASSEMBLER : - //tkAssembler - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKASSIGN : - //tkAssign - - { - op_type_node _op_type_node=new op_type_node(Operators.Assignment); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKAT : - //tkAt - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKAUTOMATED : - //tkAutomated - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKBEGIN : - //tkBegin - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKBOOLEAN : - //tkBoolean - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKBYTE : - //tkByte - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKCARDINAL : - //tkCardinal - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKCASE : - //tkCase - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCHAR : - //tkChar - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKCLASS : - //tkClass - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCOLON : - //tkColon - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCOMMA : - //tkComma - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCOMP : - //tkComp - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKCONST : - //tkConst - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCONSTRUCTOR : - //tkConstructor - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKCONTAINS : - //tkContains - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKCSHARPSTYLEOR : - //tkCSharpStyleOr - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalOR); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKDEFAULT : - //tkDefault - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDEREF : - //tkDeref - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDESTRUCTOR : - //tkDestructor - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDIRECTIVENAME : - //tkDirectiveName -return parsertools.create_directive_name(this); - case (int)SymbolConstants.SYMBOL_TKDISPID : - //tkDispid - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKDIV : - //tkDiv - - { - op_type_node _op_type_node=new op_type_node(Operators.IntegerDivision); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKDIVEQUAL : - //tkDivEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.AssignmentDivision); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKDO : - //tkDo - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDOTDOT : - //tkDotDot - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKDOUBLE : - //tkDouble - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKDOWNTO : - //tkDownto - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKELSE : - //tkElse - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEND : - //tkEnd - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEQUAL : - //tkEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.Equal); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKERROR : - //tkError - //TERMINAL:tkError - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TKEVENT : - //tkEvent - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEXCEPT : - //tkExcept - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKEXPLICIT : - //tkExplicit - - { - op_type_node _op_type_node=new op_type_node(Operators.Explicit); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKEXPORTS : - //tkExports - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'tkExports' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKEXTENDED : - //tkExtended - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKEXTERNAL : - //tkExternal - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKFILE : - //tkFile - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKFINAL : - //tkFinal - - { - token_taginfo _token_taginfo=new token_taginfo(class_attribute.Sealed); - - //_token_taginfo.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_taginfo.source_context=parsertools.GetTokenSourceContext(); - - return _token_taginfo; - } - - case (int)SymbolConstants.SYMBOL_TKFINALIZATION : - //tkFinalization - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKFINALLY : - //tkFinally - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKFLOAT : - //tkFloat -return parsertools.create_double_const(this); - case (int)SymbolConstants.SYMBOL_TKFOR : - //tkFor - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKFOREACH : - //tkForeach - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKFORWARD : - //tkForward - - { - procedure_attribute _procedure_attribute=new procedure_attribute(proc_attribute.attr_forward); - - //_procedure_attribute.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _procedure_attribute.source_context=parsertools.GetTokenSourceContext(); - _procedure_attribute.name=LRParser.TokenText; - return _procedure_attribute; - } - - case (int)SymbolConstants.SYMBOL_TKFUNCTION : - //tkFunction - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKGOTO : - //tkGoto - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKGREATER : - //tkGreater - - { - op_type_node _op_type_node=new op_type_node(Operators.Greater); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKGREATEREQUAL : - //tkGreaterEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.GreaterEqual); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKHEX : - //tkHex -return parsertools.create_hex_const(this); - case (int)SymbolConstants.SYMBOL_TKIDENTIFIER : - //tkIdentifier -return parsertools.create_ident(this); - case (int)SymbolConstants.SYMBOL_TKIF : - //tkIf - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKILCODE : - //tkILCode - - case (int)SymbolConstants.SYMBOL_TKIMPLEMENTATION : - //tkImplementation - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKIMPLEMENTS : - //tkImplements - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKIMPLICIT : - //tkImplicit - - { - op_type_node _op_type_node=new op_type_node(Operators.Implicit); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKIN : - //tkIn - - { - op_type_node _op_type_node=new op_type_node(Operators.In); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKINDEX : - //tkIndex - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKINHERITED : - //tkInherited - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKINITIALIZATION : - //tkInitialization - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKINLINE : - //tkInline - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'tkInline' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKINT64 : - //tkInt64 - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKINTEGER : - //tkInteger -return parsertools.create_int_const(this); - case (int)SymbolConstants.SYMBOL_TKINTERFACE : - //tkInterface - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKINTERNAL : - //tkInternal - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKIS : - //tkIs - - { - op_type_node _op_type_node=new op_type_node(Operators.Is); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKLABEL : - //tkLabel - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKLIBRARY : - //tkLibrary - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKLOCK : - //tkLock - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKLONGINT : - //tkLongInt - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKLONGWORD : - //tkLongWord - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKLOWER : - //tkLower - - { - op_type_node _op_type_node=new op_type_node(Operators.Less); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKLOWEREQUAL : - //tkLowerEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.LessEqual); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMESSAGE : - //tkMessage - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKMINUS : - //tkMinus - - { - op_type_node _op_type_node=new op_type_node(Operators.Minus); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMINUSEQUAL : - //tkMinusEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.AssignmentSubtraction); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMOD : - //tkMod - - { - op_type_node _op_type_node=new op_type_node(Operators.ModulusRemainder); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKMULTEQUAL : - //tkMultEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.AssignmentMultiplication); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNAME : - //tkName - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKNIL : - //tkNil - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKNODEFAULT : - //tkNodefault - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKNOT : - //tkNot - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalNOT); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKNOTEQUAL : - //tkNotEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.NotEqual); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKOF : - //tkOf - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKOLEVARIANT : - //tkOleVariant - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKON : - //tkOn - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKOPERATOR : - //tkOperator - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKOR : - //tkOr - - { - op_type_node _op_type_node=new op_type_node(Operators.LogicalOR); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKORDINTEGER : - //tkOrdInteger - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKOUT : - //tkOut - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKOVERLOAD : - //tkOverload - - { - procedure_attribute _procedure_attribute=new procedure_attribute(proc_attribute.attr_overload); - - //_procedure_attribute.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _procedure_attribute.source_context=parsertools.GetTokenSourceContext(); - _procedure_attribute.name=LRParser.TokenText; - return _procedure_attribute; - } - - case (int)SymbolConstants.SYMBOL_TKOVERRIDE : - //tkOverride - - { - procedure_attribute _procedure_attribute=new procedure_attribute(proc_attribute.attr_override); - - //_procedure_attribute.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _procedure_attribute.source_context=parsertools.GetTokenSourceContext(); - _procedure_attribute.name=LRParser.TokenText; - return _procedure_attribute; - } - - case (int)SymbolConstants.SYMBOL_TKPACKAGE : - //tkPackage - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKPACKED : - //tkPacked - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'tkPacked' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKPARAMS : - //tkParams - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKPARSEMODEEXPRESSION : - //tkParseModeExpression - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'tkParseModeExpression' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKPARSEMODESTATEMENT : - //tkParseModeStatement - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'tkParseModeStatement' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKPCHAR : - //tkPChar - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKPLUS : - //tkPlus - - { - op_type_node _op_type_node=new op_type_node(Operators.Plus); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKPLUSEQUAL : - //tkPlusEqual - - { - op_type_node _op_type_node=new op_type_node(Operators.AssignmentAddition); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKPOINT : - //tkPoint - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKPRIVATE : - //tkPrivate - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKPROCEDURE : - //tkProcedure - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKPROGRAM : - //tkProgram - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKPROPERTY : - //tkProperty - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKPROTECTED : - //tkProtected - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKPUBLIC : - //tkPublic - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKQUESTION : - //tkQuestion - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKRAISE : - //tkRaise - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKREAD : - //tkRead - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKREADONLY : - //tkReadOnly - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKREAL : - //tkReal - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKRECORD : - //tkRecord - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKREINTRODUCE : - //tkReintroduce - - { - procedure_attribute _procedure_attribute=new procedure_attribute(proc_attribute.attr_reintroduce); - - //_procedure_attribute.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _procedure_attribute.source_context=parsertools.GetTokenSourceContext(); - _procedure_attribute.name=LRParser.TokenText; - return _procedure_attribute; - } - - case (int)SymbolConstants.SYMBOL_TKREPEAT : - //tkRepeat - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKREQUIRES : - //tkRequires - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKRESIDENT : - //tkResident - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKRESOURCESTRING : - //tkResourceString - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'tkResourceString' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKROUNDCLOSE : - //tkRoundClose - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKROUNDOPEN : - //tkRoundOpen - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSEMICOLON : - //tkSemiColon - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSET : - //tkSet - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSHL : - //tkShl - - { - op_type_node _op_type_node=new op_type_node(Operators.BitwiseLeftShift); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSHORTINT : - //tkShortInt - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKSHR : - //tkShr - - { - op_type_node _op_type_node=new op_type_node(Operators.BitwiseRightShift); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSINGLE : - //tkSingle - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKSIZEOF : - //tkSizeOf - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSLASH : - //tkSlash - - { - op_type_node _op_type_node=new op_type_node(Operators.Division); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSMALLINT : - //tkSmallInt - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKSQUARECLOSE : - //tkSquareClose - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSQUAREOPEN : - //tkSquareOpen - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKSTAR : - //tkStar - - { - op_type_node _op_type_node=new op_type_node(Operators.Multiplication); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_TKSTATIC : - //tkStatic - - { - procedure_attribute _procedure_attribute=new procedure_attribute(proc_attribute.attr_static); - - //_procedure_attribute.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _procedure_attribute.source_context=parsertools.GetTokenSourceContext(); - _procedure_attribute.name=LRParser.TokenText; - return _procedure_attribute; - } - - case (int)SymbolConstants.SYMBOL_TKSTORED : - //tkStored - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKSTRINGLITERAL : - //tkStringLiteral -return parsertools.create_string_const(this); - case (int)SymbolConstants.SYMBOL_TKTEMPLATE : - //tkTemplate - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKTHEN : - //tkThen - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKTHREADVAR : - //tkThreadvar - /*Console.Error.WriteLine("\n\rwarning: TerminalToken 'tkThreadvar' return NULL! \n\r");*/return null; - case (int)SymbolConstants.SYMBOL_TKTO : - //tkTo - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKTRY : - //tkTry - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKTYPE : - //tkType - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKTYPEOF : - //tkTypeOf - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKUNIT : - //tkUnit - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKUNTIL : - //tkUntil - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKUSES : - //tkUses - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKUSING : - //tkUsing - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKVAR : - //tkVar - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKVARIANT : - //tkVariant - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKVIRTUAL : - //tkVirtual - - { - procedure_attribute _procedure_attribute=new procedure_attribute(proc_attribute.attr_virtual); - - //_procedure_attribute.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _procedure_attribute.source_context=parsertools.GetTokenSourceContext(); - _procedure_attribute.name=LRParser.TokenText; - return _procedure_attribute; - } - - case (int)SymbolConstants.SYMBOL_TKWHERE : - //tkWhere - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKWHILE : - //tkWhile - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKWIDECHAR : - //tkWideChar - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKWITH : - //tkWith - - { - token_info _token_info=new token_info(LRParser.TokenText); - - //_token_info.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _token_info.source_context=parsertools.GetTokenSourceContext(); - - return _token_info; - } - - case (int)SymbolConstants.SYMBOL_TKWORD : - //tkWord - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKWRITE : - //tkWrite - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKWRITEONLY : - //tkWriteOnly - - { - ident _ident=new ident(LRParser.TokenText); - - //_ident.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _ident.source_context=parsertools.GetTokenSourceContext(); - - return _ident; - } - - case (int)SymbolConstants.SYMBOL_TKXOR : - //tkXor - - { - op_type_node _op_type_node=new op_type_node(Operators.BitwiseXOR); - - //_op_type_node.source_context=new SourceContext(LRParser.TokenLineNumber,LRParser.TokenLinePosition,LRParser.TokenLineNumber,LRParser.TokenLinePosition+LRParser.TokenLength-1); - _op_type_node.source_context=parsertools.GetTokenSourceContext(); - _op_type_node.text=LRParser.TokenText; - return _op_type_node; - } - - case (int)SymbolConstants.SYMBOL_ZKCOMMA : - //zkComma - //TERMINAL:zkComma - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_BLOCK : - // - //TERMINAL:abc_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_CONSTRUCTOR_DECL : - // - //TERMINAL:abc_constructor_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_DECL_SECT : - // - //TERMINAL:abc_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_DECL_SECT_LIST : - // - //TERMINAL:abc_decl_sect_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_DECL_SECT_LIST1 : - // - //TERMINAL:abc_decl_sect_list1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_DESTRUCTOR_DECL : - // - //TERMINAL:abc_destructor_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_EXTERNAL_DIRECTR : - // - //TERMINAL:abc_external_directr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_FUNC_DECL : - // - //TERMINAL:abc_func_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_FUNC_DECL_NOCLASS : - // - //TERMINAL:abc_func_decl_noclass - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_INTERFACE_PART : - // - //TERMINAL:abc_interface_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_METHOD_DECL : - // - //TERMINAL:abc_method_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_PROC_BLOCK : - // - //TERMINAL:abc_proc_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_PROC_DECL : - // - //TERMINAL:abc_proc_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ABC_PROC_DECL_NOCLASS : - // - //TERMINAL:abc_proc_decl_noclass - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ADDOP : - // - //TERMINAL:addop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ALLOWABLE_EXPR_AS_STMT : - // - //TERMINAL:allowable_expr_as_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ARRAY_CONST : - // - //TERMINAL:array_const - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ARRAY_NAME_FOR_NEW_EXPR : - // - //TERMINAL:array_name_for_new_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ARRAY_TYPE : - // - //TERMINAL:array_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_AS_IS_CONSTEXPR : - // - //TERMINAL:as_is_constexpr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_AS_IS_EXPR : - // - //TERMINAL:as_is_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ASM_BLOCK : - // - //TERMINAL:asm_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ASM_STMT : - // - //TERMINAL:asm_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ASSIGN_OPERATOR : - // - //TERMINAL:assign_operator - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ASSIGNMENT : - // - //TERMINAL:assignment - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ATTR_EXPR_LIST : - // - //TERMINAL:attr_expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ATTRIBUTE_DECLARATION : - // - //TERMINAL:attribute_declaration - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ATTRIBUTE_DECLARATIONS : - // - //TERMINAL:attribute_declarations - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ATTRIBUTE_VAR_SPECIFIERS : - // - //TERMINAL:attribute_var_specifiers - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ATTRIBUTE_VARIABLE : - // - //TERMINAL:attribute_variable - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BASE_CLASS_NAME : - // - //TERMINAL:base_class_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BASE_CLASSES_NAMES_LIST : - // - //TERMINAL:base_classes_names_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_BLOCK : - // - //TERMINAL:block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_ITEM : - // - //TERMINAL:case_item - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_LABEL : - // - //TERMINAL:case_label - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_LABEL_LIST : - // - //TERMINAL:case_label_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_LIST : - // - //TERMINAL:case_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_STMT : - // - //TERMINAL:case_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CASE_TAG_LIST : - // - //TERMINAL:case_tag_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CLASS_ATTRIBUTES : - // - //TERMINAL:class_attributes - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CLASS_OR_INTERFACE_KEYWORD : - // - //TERMINAL:class_or_interface_keyword - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_COMPOUND_STMT : - // - //TERMINAL:compound_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_ADDOP : - // - //TERMINAL:const_addop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_DECL : - // - //TERMINAL:const_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_DECL_SECT : - // - //TERMINAL:const_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_ELEM : - // - //TERMINAL:const_elem - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_ELEM_LIST : - // - //TERMINAL:const_elem_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_ELEM_LIST1 : - // - //TERMINAL:const_elem_list1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_EXPR : - // - //TERMINAL:const_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_EXPR_LIST : - // - //TERMINAL:const_expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_FACTOR : - // - //TERMINAL:const_factor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_FIELD : - // - //TERMINAL:const_field - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_FIELD_LIST : - // - //TERMINAL:const_field_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_FIELD_LIST_1 : - // - //TERMINAL:const_field_list_1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_FIELD_NAME : - // - //TERMINAL:const_field_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_FUNC_EXPR_LIST : - // - //TERMINAL:const_func_expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_MULOP : - // - //TERMINAL:const_mulop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_NAME : - // - //TERMINAL:const_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_RELOP : - // - //TERMINAL:const_relop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_SET : - // - //TERMINAL:const_set - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_SIMPLE_EXPR : - // - //TERMINAL:const_simple_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_TERM : - // - //TERMINAL:const_term - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_VARIABLE : - // - //TERMINAL:const_variable - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONST_VARIABLE_2 : - // - //TERMINAL:const_variable_2 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONSTRUCTOR_DECL : - // - //TERMINAL:constructor_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONSTRUCTOR_DECL_WITH_ATTR : - // - //TERMINAL:constructor_decl_with_attr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_CONTAINS_CLAUSE : - // - //TERMINAL:contains_clause - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DECLARED_VAR_NAME : - // - //TERMINAL:declared_var_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DEFAULT_EXPR : - // - //TERMINAL:default_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DESTRUCTOR_DECL : - // - //TERMINAL:destructor_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_DESTRUCTOR_DECL_WITH_ATTR : - // - //TERMINAL:destructor_decl_with_attr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ELEM : - // - //TERMINAL:elem - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ELEM_LIST : - // - //TERMINAL:elem_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ELEM_LIST1 : - // - //TERMINAL:elem_list1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ELSE_BRANCH : - // - //TERMINAL:else_branch - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ELSE_CASE : - // - //TERMINAL:else_case - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EMPTY : - // - //TERMINAL:empty - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ENUMERATION_ID : - // - //TERMINAL:enumeration_id - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ENUMERATION_ID_LIST : - // - //TERMINAL:enumeration_id_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ERROR2 : - // - //TERMINAL:error - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXCEPTION_BLOCK : - // - //TERMINAL:exception_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXCEPTION_BLOCK_ELSE_BRANCH : - // - //TERMINAL:exception_block_else_branch - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXCEPTION_CLASS_TYPE_IDENTIFIER : - // - //TERMINAL:exception_class_type_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXCEPTION_HANDLER : - // - //TERMINAL:exception_handler - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXCEPTION_HANDLER_LIST : - // - //TERMINAL:exception_handler_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXCEPTION_IDENTIFIER : - // - //TERMINAL:exception_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXCEPTION_VARIABLE : - // - //TERMINAL:exception_variable - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPORT_CLAUSE : - // - //TERMINAL:export_clause - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPORTS_ENTRY : - // - //TERMINAL:exports_entry - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPORTS_INDEX : - // - //TERMINAL:exports_index - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPORTS_LIST : - // - //TERMINAL:exports_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPORTS_NAME : - // - //TERMINAL:exports_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPORTS_RESIDENT : - // - //TERMINAL:exports_resident - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR : - // - //TERMINAL:expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR_AS_STMT : - // - //TERMINAL:expr_as_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR_L1 : - // - //TERMINAL:expr_l1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXPR_LIST : - // - //TERMINAL:expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXTERNAL_DIRECTR : - // - //TERMINAL:external_directr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_EXTERNAL_DIRECTR_IDENT : - // - //TERMINAL:external_directr_ident - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FACTOR : - // - //TERMINAL:factor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FIELD_ACCESS_MODIFIER : - // - //TERMINAL:field_access_modifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FIELD_LIST : - // - //TERMINAL:field_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FILE_TYPE : - // - //TERMINAL:file_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FILED_OR_CONST_DEFINITION : - // - //TERMINAL:filed_or_const_definition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FILED_OR_CONST_DEFINITION_OR_AM : - // - //TERMINAL:filed_or_const_definition_or_am - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FIXED_PART : - // - //TERMINAL:fixed_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FIXED_PART_2 : - // - //TERMINAL:fixed_part_2 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FOR_CYCLE_TYPE : - // - //TERMINAL:for_cycle_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FOR_STMT : - // - //TERMINAL:for_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FOR_STMT_DECL_OR_ASSIGN : - // - //TERMINAL:for_stmt_decl_or_assign - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FOREACH_STMT : - // - //TERMINAL:foreach_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FOREACH_STMT_IDENT_DYPE_OPT : - // - //TERMINAL:foreach_stmt_ident_dype_opt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FORMAT_EXPR : - // - //TERMINAL:format_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FP_LIST : - // - //TERMINAL:fp_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FP_SECT : - // - //TERMINAL:fp_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FP_SECT_LIST : - // - //TERMINAL:fp_sect_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FPTYPE : - // - //TERMINAL:fptype - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FPTYPE_NEW : - // - //TERMINAL:fptype_new - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_BLOCK : - // - //TERMINAL:func_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_CLASS_NAME_IDENT : - // - //TERMINAL:func_class_name_ident - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_DECL : - // - //TERMINAL:func_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_DECL_LAMBDA : - // - //TERMINAL:func_decl_lambda - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_DECL_NOCLASS : - // - //TERMINAL:func_decl_noclass - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_DECL_WITH_ATTR : - // - //TERMINAL:func_decl_with_attr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_HEADING : - // - //TERMINAL:func_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_METH_NAME_IDENT : - // - //TERMINAL:func_meth_name_ident - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_NAME : - // - //TERMINAL:func_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_NAME_IDENT : - // - //TERMINAL:func_name_ident - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_FUNC_NAME_WITH_TEMPLATE_ARGS : - // - //TERMINAL:func_name_with_template_args - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_GOTO_STMT : - // - //TERMINAL:goto_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_HEAD_COMPILER_DIRECTIVES : - // - //TERMINAL:head_compiler_directives - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IDENT_LIST : - // - //TERMINAL:ident_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IDENT_LIST1 : - // - //TERMINAL:ident_list1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IDENT_LIST2 : - // - //TERMINAL:ident_list2 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IDENT_OR_KEYWORD_POINTSEPARATOR_LIST : - // - //TERMINAL:ident_or_keyword_pointseparator_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IDENTIFIER : - // - //TERMINAL:identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IDENTIFIER_KEYWORD_OPERATORNAME : - // - //TERMINAL:identifier_keyword_operatorname - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IDENTIFIER_OR_KEYWORD : - // - //TERMINAL:identifier_or_keyword - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IF_STMT : - // - //TERMINAL:if_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IF_THEN_ELSE_BRANCH : - // - //TERMINAL:if_then_else_branch - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPL_DECL_SECT : - // - //TERMINAL:impl_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPL_DECL_SECT_LIST : - // - //TERMINAL:impl_decl_sect_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPL_DECL_SECT_LIST1 : - // - //TERMINAL:impl_decl_sect_list1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_IMPLEMENTATION_PART : - // - //TERMINAL:implementation_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INHERITED_MESSAGE : - // - //TERMINAL:inherited_message - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INIT_CONST_EXPR : - // - //TERMINAL:init_const_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INITIALIZATION_PART : - // - //TERMINAL:initialization_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INT_DECL_SECT : - // - //TERMINAL:int_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INT_DECL_SECT_LIST : - // - //TERMINAL:int_decl_sect_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INT_DECL_SECT_LIST1 : - // - //TERMINAL:int_decl_sect_list1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INT_FUNC_HEADING : - // - //TERMINAL:int_func_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INT_PROC_HEADING : - // - //TERMINAL:int_proc_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INTEGER_CONST : - // - //TERMINAL:integer_const - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_INTERFACE_PART : - // - //TERMINAL:interface_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_KEYWORD : - // - //TERMINAL:keyword - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LABEL_DECL_SECT : - // - //TERMINAL:label_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LABEL_LIST : - // - //TERMINAL:label_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LABEL_NAME : - // - //TERMINAL:label_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LAMBDA_BODY : - // - //TERMINAL:lambda_body - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIBRARY_BLOCK : - // - //TERMINAL:library_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIBRARY_FILE : - // - //TERMINAL:library_file - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIBRARY_HEADING : - // - //TERMINAL:library_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIBRARY_IMPL_DECL_SECT : - // - //TERMINAL:library_impl_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LIBRARY_IMPL_DECL_SECT_LIST : - // - //TERMINAL:library_impl_decl_sect_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LITERAL : - // - //TERMINAL:literal - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LITERAL_LIST : - // - //TERMINAL:literal_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LITERAL_OR_NUMBER : - // - //TERMINAL:literal_or_number - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_LOCK_STMT : - // - //TERMINAL:lock_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MAIN_USED_UNIT_NAME : - // - //TERMINAL:main_used_unit_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MAIN_USED_UNITS_LIST : - // - //TERMINAL:main_used_units_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MAIN_USES_CLAUSE : - // - //TERMINAL:main_uses_clause - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MAYBE_ERROR : - // - //TERMINAL:maybe_error - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_METH_MODIFICATOR : - // - //TERMINAL:meth_modificator - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_METH_MODIFICATORS : - // - //TERMINAL:meth_modificators - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_MULOP : - // - //TERMINAL:mulop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NEW_EXPR : - // - //TERMINAL:new_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NEW_OBJECT_TYPE : - // - //TERMINAL:new_object_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NEW_RECORD_TYPE : - // - //TERMINAL:new_record_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NON_RESERVED : - // - //TERMINAL:non_reserved - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_ARRAY_DEFAULTPROPERTY : - // - //TERMINAL:not_array_defaultproperty - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_COMPONENT_LIST : - // - //TERMINAL:not_component_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_COMPONENT_LIST_1 : - // - //TERMINAL:not_component_list_1 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_COMPONENT_LIST_2 : - // - //TERMINAL:not_component_list_2 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_COMPONENT_LIST_SEQ : - // - //TERMINAL:not_component_list_seq - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_CONSTRUCTOR_BLOCK_DECL : - // - //TERMINAL:not_constructor_block_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_CONSTRUCTOR_HEADING : - // - //TERMINAL:not_constructor_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_CONSTRUCTOR_HEADING_OBJECT : - // - //TERMINAL:not_constructor_heading_object - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_DESTRUCTOR_HEADING : - // - //TERMINAL:not_destructor_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_FIELD_DEFINITION : - // - //TERMINAL:not_field_definition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_GUID : - // - //TERMINAL:not_guid - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_METHOD_DEFINITION : - // - //TERMINAL:not_method_definition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_METHOD_HEADING : - // - //TERMINAL:not_method_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_OBJECT_TYPE : - // - //TERMINAL:not_object_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_OBJECT_TYPE_IDENTIFIER_LIST : - // - //TERMINAL:not_object_type_identifier_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PARAMETER_DECL : - // - //TERMINAL:not_parameter_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PARAMETER_DECL_LIST : - // - //TERMINAL:not_parameter_decl_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PARAMETER_NAME_LIST : - // - //TERMINAL:not_parameter_name_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PROCFUNC_HEADING : - // - //TERMINAL:not_procfunc_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PROCFUNC_HEADING_VARIANTS : - // - //TERMINAL:not_procfunc_heading_variants - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PROPERTY_DEFINITION : - // - //TERMINAL:not_property_definition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PROPERTY_INTERFACE : - // - //TERMINAL:not_property_interface - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PROPERTY_INTERFACE_INDEX : - // - //TERMINAL:not_property_interface_index - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PROPERTY_PARAMETER_LIST : - // - //TERMINAL:not_property_parameter_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_PROPERTY_SPECIFIERS : - // - //TERMINAL:not_property_specifiers - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_NOT_SIMPLE_PROPERTY_DEFINITION : - // - //TERMINAL:not_simple_property_definition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OBJECT_TYPE : - // - //TERMINAL:object_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ONE_ATTRIBUTE : - // - //TERMINAL:one_attribute - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ONE_COMPILER_DIRECTIVE : - // - //TERMINAL:one_compiler_directive - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ONE_LITERAL : - // - //TERMINAL:one_literal - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ONE_OR_SOME_ATTRIBUTE : - // - //TERMINAL:one_or_some_attribute - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ONLY_CONST_DECL : - // - //TERMINAL:only_const_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_COMPONENT_LIST : - // - //TERMINAL:oot_component_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_CONSTRUCTOR_HEAD : - // - //TERMINAL:oot_constructor_head - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_DESTRUCTOR_HEAD : - // - //TERMINAL:oot_destructor_head - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_FIELD : - // - //TERMINAL:oot_field - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_FIELD_IDENTIFIER : - // - //TERMINAL:oot_field_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_FIELD_LIST : - // - //TERMINAL:oot_field_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_ID_LIST : - // - //TERMINAL:oot_id_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_METHOD : - // - //TERMINAL:oot_method - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_METHOD_HEAD : - // - //TERMINAL:oot_method_head - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_METHOD_LIST : - // - //TERMINAL:oot_method_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_PRIVAT_LIST : - // - //TERMINAL:oot_privat_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_SUCCESSOR : - // - //TERMINAL:oot_successor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OOT_TYPEIDENTIFIER : - // - //TERMINAL:oot_typeidentifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPERATOR_NAME_IDENT : - // - //TERMINAL:operator_name_ident - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_AMPERSEND : - // - //TERMINAL:opt_ampersend - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_ARRAY_INITIALIZER : - // - //TERMINAL:opt_array_initializer - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_ATTR_EXPR_LIST : - // - //TERMINAL:opt_attr_expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_ATTRIBUTE_DECLARATIONS : - // - //TERMINAL:opt_attribute_declarations - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_BASE_CLASSES : - // - //TERMINAL:opt_base_classes - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_CONST_FUNC_EXPR_LIST : - // - //TERMINAL:opt_const_func_expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_EXPR_LIST : - // - //TERMINAL:opt_expr_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_EXPR_LIST_WITH_BRACKET : - // - //TERMINAL:opt_expr_list_with_bracket - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_HEAD_COMPILER_DIRECTIVES : - // - //TERMINAL:opt_head_compiler_directives - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_IDENTIFIER : - // - //TERMINAL:opt_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_METH_MODIFICATORS : - // - //TERMINAL:opt_meth_modificators - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_NOT_COMPONENT_LIST_SEQ_END : - // - //TERMINAL:opt_not_component_list_seq_end - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_PROC_NAME : - // - //TERMINAL:opt_proc_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_SEMICOLON : - // - //TERMINAL:opt_semicolon - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_TEMPLATE_ARGUMENTS : - // - //TERMINAL:opt_template_arguments - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_TEMPLATE_TYPE_PARAMS : - // - //TERMINAL:opt_template_type_params - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_TK_DO : - // - //TERMINAL:opt_tk_do - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_TK_POINT : - // - //TERMINAL:opt_tk_point - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_VAR : - // - //TERMINAL:opt_var - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPT_WHERE_SECTION : - // - //TERMINAL:opt_where_section - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OPTIONAL_QUALIFIED_IDENTIFIER : - // - //TERMINAL:optional_qualified_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_ORD_TYPE_NAME : - // - //TERMINAL:ord_type_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OT_VISIBILITY_SPECIFIER : - // - //TERMINAL:ot_visibility_specifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OTHER : - // - //TERMINAL:other - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_OVERLOAD_OPERATOR : - // - //TERMINAL:overload_operator - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PACKAGE_FILE : - // - //TERMINAL:package_file - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PACKAGE_NAME : - // - //TERMINAL:package_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM_NAME : - // - //TERMINAL:param_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARAM_NAME_LIST : - // - //TERMINAL:param_name_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARSE_GOAL : - // - //TERMINAL:parse_goal - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PARTS : - // - //TERMINAL:parts - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_POINTER_TYPE : - // - //TERMINAL:pointer_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_BLOCK : - // - //TERMINAL:proc_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_BLOCK_DECL : - // - //TERMINAL:proc_block_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_CALL : - // - //TERMINAL:proc_call - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_DECL : - // - //TERMINAL:proc_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_DECL_NOCLASS : - // - //TERMINAL:proc_decl_noclass - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_DECL_WITH_ATTR : - // - //TERMINAL:proc_decl_with_attr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_HEADING : - // - //TERMINAL:proc_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROC_NAME : - // - //TERMINAL:proc_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROCEDURAL_TYPE : - // - //TERMINAL:procedural_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROCEDURAL_TYPE_DECL : - // - //TERMINAL:procedural_type_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROCEDURAL_TYPE_KIND : - // - //TERMINAL:procedural_type_kind - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_BLOCK : - // - //TERMINAL:program_block - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_DECL_SECT_LIST : - // - //TERMINAL:program_decl_sect_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_FILE : - // - //TERMINAL:program_file - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_HEADING : - // - //TERMINAL:program_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_HEADING_2 : - // - //TERMINAL:program_heading_2 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_NAME : - // - //TERMINAL:program_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_PARAM : - // - //TERMINAL:program_param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROGRAM_PARAM_LIST : - // - //TERMINAL:program_param_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_PROPERTY_SPECIFIER_DIRECTIVES : - // - //TERMINAL:property_specifier_directives - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_QUALIFIED_IDENTIFIER : - // - //TERMINAL:qualified_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_QUESTION_CONSTEXPR : - // - //TERMINAL:question_constexpr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_QUESTION_EXPR : - // - //TERMINAL:question_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RAISE_STMT : - // - //TERMINAL:raise_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RANGE_EXPR : - // - //TERMINAL:range_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RANGE_FACTOR : - // - //TERMINAL:range_factor - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RANGE_METHODNAME : - // - //TERMINAL:range_methodname - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RANGE_TERM : - // - //TERMINAL:range_term - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_REAL_TYPE_NAME : - // - //TERMINAL:real_type_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RECORD_COMPONENT_LIST : - // - //TERMINAL:record_component_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RECORD_CONST : - // - //TERMINAL:record_const - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RECORD_KEYWORD : - // - //TERMINAL:record_keyword - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RECORD_SECTION : - // - //TERMINAL:record_section - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RECORD_SECTION_ID : - // - //TERMINAL:record_section_id - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RECORD_SECTION_ID_LIST : - // - //TERMINAL:record_section_id_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RECORD_TYPE : - // - //TERMINAL:record_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RELOP : - // - //TERMINAL:relop - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RELOP_EXPR : - // - //TERMINAL:relop_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_REPEAT_STMT : - // - //TERMINAL:repeat_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_REQUIRES_CLAUSE : - // - //TERMINAL:requires_clause - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RES_STR_DECL_SECT : - // - //TERMINAL:res_str_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_RESERVED_KEYWORD : - // - //TERMINAL:reserved_keyword - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SET_TYPE : - // - //TERMINAL:set_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIGN : - // - //TERMINAL:sign - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_EXPR : - // - //TERMINAL:simple_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_FILED_OR_CONST_DEFINITION : - // - //TERMINAL:simple_filed_or_const_definition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_FP_SECT : - // - //TERMINAL:simple_fp_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_NOT_PROPERTY_DEFINITION : - // - //TERMINAL:simple_not_property_definition - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE : - // - //TERMINAL:simple_or_template_type_reference - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE : - // - //TERMINAL:simple_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE_DECL : - // - //TERMINAL:simple_type_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE_IDENTIFIER : - // - //TERMINAL:simple_type_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE_LIST : - // - //TERMINAL:simple_type_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIMPLE_TYPE_OR_EMPTY : - // - //TERMINAL:simple_type_or_empty - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_SIZEOF_EXPR : - // - //TERMINAL:sizeof_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMT : - // - //TERMINAL:stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMT_LIST : - // - //TERMINAL:stmt_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STMT_OR_EXPRESSION : - // - //TERMINAL:stmt_or_expression - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STRING_TYPE : - // - //TERMINAL:string_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_STRUCTURED_TYPE : - // - //TERMINAL:structured_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TAG_FIELD : - // - //TERMINAL:tag_field - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TAG_FIELD_NAME : - // - //TERMINAL:tag_field_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TAG_FIELD_TYPENAME : - // - //TERMINAL:tag_field_typename - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TEMPLATE_ARGUMENTS : - // - //TERMINAL:template_arguments - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TEMPLATE_IDENTIFIER_WITH_EQUAL : - // - //TERMINAL:template_identifier_with_equal - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TEMPLATE_PARAM : - // - //TERMINAL:template_param - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TEMPLATE_PARAM_LIST : - // - //TERMINAL:template_param_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TEMPLATE_TYPE : - // - //TERMINAL:template_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TEMPLATE_TYPE_BACK_VARSPECIFIERS : - // - //TERMINAL:template_type_back_varspecifiers - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TEMPLATE_TYPE_PARAMS : - // - //TERMINAL:template_type_params - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TERM : - // - //TERMINAL:term - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_THEN_BRANCH : - // - //TERMINAL:then_branch - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TRY_HANDLER : - // - //TERMINAL:try_handler - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TRY_STMT : - // - //TERMINAL:try_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPE_DECL : - // - //TERMINAL:type_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPE_DECL_IDENTIFIER : - // - //TERMINAL:type_decl_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPE_DECL_SECT : - // - //TERMINAL:type_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPE_DECL_TYPE : - // - //TERMINAL:type_decl_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPE_REF : - // - //TERMINAL:type_ref - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPE_REF_AND_SECIFIC_LIST : - // - //TERMINAL:type_ref_and_secific_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPE_REF_OR_SECIFIC : - // - //TERMINAL:type_ref_or_secific - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPECAST_OP : - // - //TERMINAL:typecast_op - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPED_CONST : - // - //TERMINAL:typed_const - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPED_CONST_LIST : - // - //TERMINAL:typed_const_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPED_CONST_OR_NEW : - // - //TERMINAL:typed_const_or_new - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_TYPEOF_EXPR : - // - //TERMINAL:typeof_expr - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNIT_FILE : - // - //TERMINAL:unit_file - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNIT_HEADING : - // - //TERMINAL:unit_heading - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNIT_KEY_WORD : - // - //TERMINAL:unit_key_word - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNIT_NAME : - // - //TERMINAL:unit_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNLABELLED_STMT : - // - //TERMINAL:unlabelled_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNPACKED_STRUCTURED_TYPE : - // - //TERMINAL:unpacked_structured_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNSIGNED_NUMBER : - // - //TERMINAL:unsigned_number - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_UNSIZED_ARRAY_TYPE : - // - //TERMINAL:unsized_array_type - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_USES_CLAUSE : - // - //TERMINAL:uses_clause - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_USING_CLAUSE : - // - //TERMINAL:using_clause - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_USING_LIST : - // - //TERMINAL:using_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_USING_ONE : - // - //TERMINAL:using_one - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_ADDRESS : - // - //TERMINAL:var_address - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_DECL : - // - //TERMINAL:var_decl - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_DECL_PART : - // - //TERMINAL:var_decl_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_DECL_PART_ASSIGN : - // - //TERMINAL:var_decl_part_assign - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_DECL_PART_IN_STMT : - // - //TERMINAL:var_decl_part_in_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_DECL_PART_NORMAL : - // - //TERMINAL:var_decl_part_normal - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_DECL_SECT : - // - //TERMINAL:var_decl_sect - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_INIT_VALUE : - // - //TERMINAL:var_init_value - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_INIT_VALUE_TYPED : - // - //TERMINAL:var_init_value_typed - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_NAME : - // - //TERMINAL:var_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_NAME_LIST : - // - //TERMINAL:var_name_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_OR_IDENTIFIER : - // - //TERMINAL:var_or_identifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_REFERENCE : - // - //TERMINAL:var_reference - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_SPECIFIERS : - // - //TERMINAL:var_specifiers - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VAR_STMT : - // - //TERMINAL:var_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIABLE : - // - //TERMINAL:variable - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT : - // - //TERMINAL:variant - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT_FIELD_LIST : - // - //TERMINAL:variant_field_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT_LIST : - // - //TERMINAL:variant_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT_LIST_2 : - // - //TERMINAL:variant_list_2 - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT_PART : - // - //TERMINAL:variant_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VARIANT_TYPE_NAME : - // - //TERMINAL:variant_type_name - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_VISIBILITY_SPECIFIER : - // - //TERMINAL:visibility_specifier - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHERE_PART : - // - //TERMINAL:where_part - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHERE_PART_LIST : - // - //TERMINAL:where_part_list - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WHILE_STMT : - // - //TERMINAL:while_stmt - return null; - //ENDTERMINAL - case (int)SymbolConstants.SYMBOL_WITH_STMT : - // - //TERMINAL:with_stmt - return null; - //ENDTERMINAL -} -throw new SymbolException("Unknown symbol"); -} - - - - - - - - - - - - - - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//CreateNonTerminalObject -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -public Object CreateNonTerminalObject(int ReductionRuleIndex) -{ -switch (ReductionRuleIndex) -{ - case (int)RuleConstants.RULE_PARSE_GOAL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PARSE_GOAL2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PARSE_GOAL3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PARTS_TKPARSEMODEEXPRESSION : - // ::= tkParseModeExpression -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_PARTS_TKPARSEMODESTATEMENT : - // ::= tkParseModeStatement -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_STMT_OR_EXPRESSION : - // ::= - - { - expression_as_statement _expression_as_statement=new expression_as_statement((expression)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_expression_as_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _expression_as_statement; - } - - case (int)RuleConstants.RULE_STMT_OR_EXPRESSION2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_STMT_OR_EXPRESSION3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_HEAD_COMPILER_DIRECTIVES : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_HEAD_COMPILER_DIRECTIVES2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_HEAD_COMPILER_DIRECTIVES : - // ::= -return null; - case (int)RuleConstants.RULE_HEAD_COMPILER_DIRECTIVES2 : - // ::= -return null; - case (int)RuleConstants.RULE_ONE_COMPILER_DIRECTIVE_TKDIRECTIVENAME_TKIDENTIFIER : - // ::= tkDirectiveName tkIdentifier - { - token_info t1 = new token_info(); - t1.text=((ident)LRParser.GetReductionSyntaxNode(0)).name; - t1.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - token_info t2 = new token_info(); - t2.text=((ident)LRParser.GetReductionSyntaxNode(1)).name; - t2.source_context = ((ident)LRParser.GetReductionSyntaxNode(1)).source_context; - compiler_directive cd=new compiler_directive(t1,t2); - parsertools.create_source_context(cd,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - CompilerDirectives.Add(cd); return null; - } - case (int)RuleConstants.RULE_ONE_COMPILER_DIRECTIVE_TKDIRECTIVENAME_TKSTRINGLITERAL : - // ::= tkDirectiveName tkStringLiteral - { - token_info t1 = new token_info(); - t1.text=((ident)LRParser.GetReductionSyntaxNode(0)).name; - t1.source_context = ((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - token_info t2 = new token_info(); - t2.text=((string_const)LRParser.GetReductionSyntaxNode(1)).Value; - t2.source_context = ((string_const)LRParser.GetReductionSyntaxNode(1)).source_context; - compiler_directive cd=new compiler_directive(t1,t2); - parsertools.create_source_context(cd,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - CompilerDirectives.Add(cd); return null; - } - case (int)RuleConstants.RULE_PROGRAM_FILE : - // ::= - - { - program_module _program_module=new program_module(LRParser.GetReductionSyntaxNode(0) as program_name,(uses_list)LRParser.GetReductionSyntaxNode(2),(block)LRParser.GetReductionSyntaxNode(4),LRParser.GetReductionSyntaxNode(3) as using_list); - - _program_module.Language = LanguageId.PascalABCNET; - parsertools.create_source_context(_program_module,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(4)),LRParser.GetReductionSyntaxNode(4)); - if (LRParser.GetReductionSyntaxNode(5) == null && LRParser.GetReductionSyntaxNode(4) != null) - { - file_position fp = (LRParser.GetReductionSyntaxNode(4) as syntax_tree_node).source_context.end_position; - syntax_tree_node err_stn = (syntax_tree_node)LRParser.GetReductionSyntaxNode(4); - if ((LRParser.GetReductionSyntaxNode(4) is block) && (LRParser.GetReductionSyntaxNode(4) as block).program_code != null && (LRParser.GetReductionSyntaxNode(4) as block).program_code.subnodes != null && (LRParser.GetReductionSyntaxNode(4) as block).program_code.subnodes.Count > 0) - err_stn = (LRParser.GetReductionSyntaxNode(4) as block).program_code.subnodes[(LRParser.GetReductionSyntaxNode(4) as block).program_code.subnodes.Count-1]; - errors.Add(new Errors.PABCNETUnexpectedToken(current_file_name, StringResources.Get("TKPOINT"),new SourceContext(fp.line_num, fp.column_num+1, fp.line_num, fp.column_num+1, 0, 0),err_stn)); - } - - return _program_module; - } - - case (int)RuleConstants.RULE_OPT_TK_POINT_TKPOINT : - // ::= tkPoint -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_TK_POINT_TKSEMICOLON : - // ::= tkSemiColon -return null; - case (int)RuleConstants.RULE_OPT_TK_POINT_TKCOLON : - // ::= tkColon -return null; - case (int)RuleConstants.RULE_OPT_TK_POINT_ZKCOMMA : - // ::= zkComma -return null; - case (int)RuleConstants.RULE_OPT_TK_POINT_TKDOTDOT : - // ::= tkDotDot -return null; - case (int)RuleConstants.RULE_OPT_TK_POINT : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PROGRAM_HEADING : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_PROGRAM_HEADING_TKPROGRAM : - // ::= tkProgram - - { - program_name _program_name=new program_name((ident)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_program_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _program_name; - } - - case (int)RuleConstants.RULE_PROGRAM_HEADING_2_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROGRAM_HEADING_2_TKROUNDOPEN_TKROUNDCLOSE_TKSEMICOLON : - // ::= tkRoundOpen tkRoundClose tkSemiColon -return null; - case (int)RuleConstants.RULE_PROGRAM_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROGRAM_PARAM_LIST : - // ::= -return null; - case (int)RuleConstants.RULE_PROGRAM_PARAM_LIST_TKCOMMA : - // ::= tkComma -return null; - case (int)RuleConstants.RULE_PROGRAM_PARAM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROGRAM_BLOCK : - // ::= - - { - block _block=new block(null,LRParser.GetReductionSyntaxNode(1) as statement_list); - - if (LRParser.GetReductionSyntaxNode(0)!=null) { - _block.defs=LRParser.GetReductionSyntaxNode(0) as declarations; - parsertools.create_source_context(_block,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - }else - parsertools.create_source_context(_block,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - //tasha 16.04.2010 - add_lambda_to_program_block(_block); - - return _block; - } - - case (int)RuleConstants.RULE_PROGRAM_DECL_SECT_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_USES_CLAUSE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_USING_CLAUSE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_USING_CLAUSE2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_USING_LIST : - // ::= - - { - using_list _using_list=new using_list(); - - parsertools.create_source_context(_using_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - _using_list.namespaces.Add((unit_or_namespace)LRParser.GetReductionSyntaxNode(0)); - return _using_list; - } - - case (int)RuleConstants.RULE_USING_LIST2 : - // ::= - - { - using_list _using_list=(using_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_using_list,_using_list,LRParser.GetReductionSyntaxNode(1)); - _using_list.namespaces.Add((unit_or_namespace)LRParser.GetReductionSyntaxNode(1)); - return _using_list; - } - - case (int)RuleConstants.RULE_USING_ONE_TKUSING_TKSEMICOLON : - // ::= tkUsing tkSemiColon - - { - unit_or_namespace _unit_or_namespace=new unit_or_namespace((ident_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_unit_or_namespace,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _unit_or_namespace; - } - - case (int)RuleConstants.RULE_IDENT_OR_KEYWORD_POINTSEPARATOR_LIST : - // ::= - - //TemplateList for ident_list (create) - { - ident_list _ident_list=new ident_list(); - _ident_list.source_context=((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _ident_list; - } - - case (int)RuleConstants.RULE_IDENT_OR_KEYWORD_POINTSEPARATOR_LIST_TKPOINT : - // ::= tkPoint - - //TemplateList for ident_list (add) - { - ident_list _ident_list=(ident_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_ident_list,_ident_list,LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(2) as ident); - return _ident_list; - } - - case (int)RuleConstants.RULE_MAIN_USES_CLAUSE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_MAIN_USES_CLAUSE_TKUSES_TKSEMICOLON : - // ::= tkUses tkSemiColon - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2));return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_MAIN_USED_UNITS_LIST_TKCOMMA : - // ::= tkComma - - { - uses_list _uses_list=(uses_list)LRParser.GetReductionSyntaxNode(0); - _uses_list.units.Add((unit_or_namespace)LRParser.GetReductionSyntaxNode(2)); - - return _uses_list; - } - - case (int)RuleConstants.RULE_MAIN_USED_UNITS_LIST : - // ::= - - { - uses_list _uses_list=new uses_list(); - - _uses_list.units.Add((unit_or_namespace)LRParser.GetReductionSyntaxNode(0)); - - return _uses_list; - } - - case (int)RuleConstants.RULE_MAIN_USED_UNIT_NAME : - // ::= - - { - unit_or_namespace _unit_or_namespace=new unit_or_namespace((ident_list)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_unit_or_namespace,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _unit_or_namespace; - } - - case (int)RuleConstants.RULE_MAIN_USED_UNIT_NAME_TKIN_TKSTRINGLITERAL : - // ::= tkIn tkStringLiteral - - { - uses_unit_in _uses_unit_in=new uses_unit_in(); - parsertools.create_source_context(_uses_unit_in,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - _uses_unit_in.name=(ident_list)LRParser.GetReductionSyntaxNode(0); - _uses_unit_in.in_file=(string_const)LRParser.GetReductionSyntaxNode(2); - - return _uses_unit_in; - } - - case (int)RuleConstants.RULE_LIBRARY_FILE_TKPOINT : - // ::= tkPoint - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkPoint"));}return null; - case (int)RuleConstants.RULE_LIBRARY_HEADING_TKLIBRARY_TKSEMICOLON : - // ::= tkLibrary tkSemiColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkLibrary tkSemiColon"));}return null; - case (int)RuleConstants.RULE_LIBRARY_BLOCK : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT_LIST2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT6 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT7 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT8 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT9 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LIBRARY_IMPL_DECL_SECT10 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPORT_CLAUSE_TKEXPORTS_TKSEMICOLON : - // ::= tkExports tkSemiColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkExports tkSemiColon"));}return null; - case (int)RuleConstants.RULE_EXPORTS_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPORTS_LIST_TKCOMMA : - // ::= tkComma - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkComma "));}return null; - case (int)RuleConstants.RULE_EXPORTS_ENTRY : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_EXPORTS_INDEX : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPORTS_INDEX_TKINDEX : - // ::= tkIndex - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkIndex "));}return null; - case (int)RuleConstants.RULE_EXPORTS_NAME : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPORTS_NAME_TKNAME : - // ::= tkName - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkName "));}return null; - case (int)RuleConstants.RULE_EXPORTS_NAME_TKNAME2 : - // ::= tkName - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkName "));}return null; - case (int)RuleConstants.RULE_EXPORTS_RESIDENT : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXPORTS_RESIDENT_TKRESIDENT : - // ::= tkResident -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNIT_FILE_TKPOINT : - // ::= tkPoint - - { - unit_module _unit_module=new unit_module((unit_name)LRParser.GetReductionSyntaxNode(0),(interface_node)LRParser.GetReductionSyntaxNode(1),(implementation_node)LRParser.GetReductionSyntaxNode(2),((initfinal_part)LRParser.GetReductionSyntaxNode(3)).initialization_sect,((initfinal_part)LRParser.GetReductionSyntaxNode(3)).finalization_sect); - - _unit_module.Language = LanguageId.PascalABCNET; - parsertools.create_source_context(_unit_module,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - - return _unit_module; - } - - case (int)RuleConstants.RULE_UNIT_FILE_TKPOINT2 : - // ::= tkPoint - - { - unit_module _unit_module=new unit_module((unit_name)LRParser.GetReductionSyntaxNode(0),(interface_node)LRParser.GetReductionSyntaxNode(1),null,((initfinal_part)LRParser.GetReductionSyntaxNode(2)).initialization_sect,((initfinal_part)LRParser.GetReductionSyntaxNode(2)).finalization_sect); - - _unit_module.Language = LanguageId.PascalABCNET; - parsertools.create_source_context(_unit_module,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - - return _unit_module; - } - - case (int)RuleConstants.RULE_UNIT_HEADING_TKSEMICOLON : - // ::= tkSemiColon - - { - unit_name _unit_name=new unit_name((ident)LRParser.GetReductionSyntaxNode(1),UnitHeaderKeyword.Unit); - - if(((ident)LRParser.GetReductionSyntaxNode(0)).name.ToLower()=="library") - _unit_name.HeaderKeyword=UnitHeaderKeyword.Library; - parsertools.create_source_context(_unit_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _unit_name; - } - - case (int)RuleConstants.RULE_UNIT_KEY_WORD_TKUNIT : - // ::= tkUnit -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNIT_KEY_WORD_TKLIBRARY : - // ::= tkLibrary -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNIT_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INTERFACE_PART_TKINTERFACE : - // ::= tkInterface - - { - interface_node _interface_node=new interface_node(); - - _interface_node.uses_modules=LRParser.GetReductionSyntaxNode(1) as uses_list; - _interface_node.using_namespaces=LRParser.GetReductionSyntaxNode(2) as using_list; - _interface_node.interface_definitions=LRParser.GetReductionSyntaxNode(3) as declarations; - parsertools.create_source_context(_interface_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - - return _interface_node; - } - - case (int)RuleConstants.RULE_IMPLEMENTATION_PART_TKIMPLEMENTATION : - // ::= tkImplementation - - { - implementation_node _implementation_node=new implementation_node(); - - _implementation_node.uses_modules=LRParser.GetReductionSyntaxNode(1) as uses_list; - _implementation_node.using_namespaces=LRParser.GetReductionSyntaxNode(2) as using_list; - _implementation_node.implementation_definitions=LRParser.GetReductionSyntaxNode(3) as declarations; - parsertools.create_source_context(_implementation_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - - return _implementation_node; - } - - case (int)RuleConstants.RULE_ABC_INTERFACE_PART : - // ::= - - { - interface_node _interface_node=new interface_node(); - - _interface_node.uses_modules=LRParser.GetReductionSyntaxNode(0) as uses_list; - _interface_node.using_namespaces=LRParser.GetReductionSyntaxNode(1) as using_list; - _interface_node.interface_definitions=LRParser.GetReductionSyntaxNode(2) as declarations; - object lt=parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(2)); - object rt=parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0)); - if (lt!=null)parsertools.create_source_context(_interface_node,lt,rt); - - return _interface_node; - } - - case (int)RuleConstants.RULE_INITIALIZATION_PART_TKEND : - // ::= tkEnd - - { - initfinal_part _initfinal_part=new initfinal_part(); - - return _initfinal_part; - } - - case (int)RuleConstants.RULE_INITIALIZATION_PART_TKINITIALIZATION_TKEND : - // ::= tkInitialization tkEnd - - { - initfinal_part _initfinal_part=new initfinal_part((statement_list)LRParser.GetReductionSyntaxNode(1),null); - - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).right_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(2); - - return _initfinal_part; - } - - case (int)RuleConstants.RULE_INITIALIZATION_PART_TKINITIALIZATION_TKFINALIZATION_TKEND : - // ::= tkInitialization tkFinalization tkEnd - - { - initfinal_part _initfinal_part=new initfinal_part((statement_list)LRParser.GetReductionSyntaxNode(1),(statement_list)LRParser.GetReductionSyntaxNode(3)); - - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - ((statement_list)LRParser.GetReductionSyntaxNode(3)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(2); - ((statement_list)LRParser.GetReductionSyntaxNode(3)).right_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(4); - - return _initfinal_part; - } - - case (int)RuleConstants.RULE_INITIALIZATION_PART_TKBEGIN_TKEND : - // ::= tkBegin tkEnd - - { - initfinal_part _initfinal_part=new initfinal_part((statement_list)LRParser.GetReductionSyntaxNode(1),null); - - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).right_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(2); - - return _initfinal_part; - } - - case (int)RuleConstants.RULE_PACKAGE_FILE_TKPACKAGE_TKSEMICOLON_TKEND_TKPOINT : - // ::= tkPackage tkSemiColon tkEnd tkPoint - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkPackage tkSemiColon tkEnd tkPoint"));}return null; - case (int)RuleConstants.RULE_PACKAGE_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_REQUIRES_CLAUSE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_REQUIRES_CLAUSE_TKREQUIRES : - // ::= tkRequires -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_REQUIRES_CLAUSE_TKREQUIRES_TKSEMICOLON : - // ::= tkRequires tkSemiColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRequires tkSemiColon"));}return null; - case (int)RuleConstants.RULE_CONTAINS_CLAUSE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONTAINS_CLAUSE_TKCONTAINS : - // ::= tkContains -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONTAINS_CLAUSE_TKCONTAINS_TKSEMICOLON : - // ::= tkContains tkSemiColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkContains tkSemiColon"));}return null; - case (int)RuleConstants.RULE_INT_DECL_SECT_LIST : - // ::= -if (((declarations)LRParser.GetReductionSyntaxNode(0)).defs.Count>0) return LRParser.GetReductionSyntaxNode(0); return null; - case (int)RuleConstants.RULE_INT_DECL_SECT_LIST1 : - // ::= - - { - declarations _declarations=new declarations(); - - return _declarations; - } - - case (int)RuleConstants.RULE_INT_DECL_SECT_LIST12 : - // ::= - - { - declarations _declarations=(declarations)LRParser.GetReductionSyntaxNode(0); - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_declarations,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),LRParser.GetReductionSyntaxNode(1)); - - return _declarations; - } - - case (int)RuleConstants.RULE_IMPL_DECL_SECT_LIST : - // ::= -if (((declarations)LRParser.GetReductionSyntaxNode(0)).defs.Count>0) return LRParser.GetReductionSyntaxNode(0); return null; - case (int)RuleConstants.RULE_IMPL_DECL_SECT_LIST1 : - // ::= - - { - declarations _declarations=new declarations(); - - return _declarations; - } - - case (int)RuleConstants.RULE_IMPL_DECL_SECT_LIST12 : - // ::= - - { - declarations _declarations=(declarations)LRParser.GetReductionSyntaxNode(0); - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_declarations,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),LRParser.GetReductionSyntaxNode(1)); - - return _declarations; - } - - case (int)RuleConstants.RULE_ABC_DECL_SECT_LIST : - // ::= -if (((declarations)LRParser.GetReductionSyntaxNode(0)).defs.Count>0) return LRParser.GetReductionSyntaxNode(0); return null; - case (int)RuleConstants.RULE_ABC_DECL_SECT_LIST1 : - // ::= - - { - declarations _declarations=new declarations(); - - return _declarations; - } - - case (int)RuleConstants.RULE_ABC_DECL_SECT_LIST12 : - // ::= - - { - declarations _declarations=(declarations)LRParser.GetReductionSyntaxNode(0); - _declarations.defs.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_declarations,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),LRParser.GetReductionSyntaxNode(1)); - - return _declarations; - } - - case (int)RuleConstants.RULE_INT_DECL_SECT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INT_DECL_SECT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INT_DECL_SECT3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INT_DECL_SECT4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INT_DECL_SECT5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INT_DECL_SECT6 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT6 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT7 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT8 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IMPL_DECL_SECT9 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROC_DECL_WITH_ATTR : - // ::= - - { - procedure_definition _procedure_definition; - _procedure_definition=(LRParser.GetReductionSyntaxNode(1) as procedure_definition); - if (_procedure_definition.proc_header != null) - _procedure_definition.proc_header.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_FUNC_DECL_WITH_ATTR : - // ::= - - { - procedure_definition _procedure_definition; - _procedure_definition=(LRParser.GetReductionSyntaxNode(1) as procedure_definition); - if (_procedure_definition.proc_header != null) - _procedure_definition.proc_header.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_CONSTRUCTOR_DECL_WITH_ATTR : - // ::= - - { - procedure_definition _procedure_definition; - _procedure_definition=(LRParser.GetReductionSyntaxNode(1) as procedure_definition); - if (_procedure_definition.proc_header != null) - _procedure_definition.proc_header.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_DESTRUCTOR_DECL_WITH_ATTR : - // ::= - - { - procedure_definition _procedure_definition; - _procedure_definition=(LRParser.GetReductionSyntaxNode(1) as procedure_definition); - if (_procedure_definition.proc_header != null) - _procedure_definition.proc_header.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_ABC_DECL_SECT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_DECL_SECT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_DECL_SECT3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_DECL_SECT4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_DECL_SECT5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INT_PROC_HEADING : - // ::= - - { - declaration _declaration; - _declaration=(LRParser.GetReductionSyntaxNode(1) as declaration); - _declaration.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _declaration; - } - - case (int)RuleConstants.RULE_INT_PROC_HEADING_TKFORWARD_TKSEMICOLON : - // ::= tkForward tkSemiColon - - { - procedure_header _procedure_header; - _procedure_header=(LRParser.GetReductionSyntaxNode(1) as procedure_header); - if (_procedure_header.proc_attributes==null) _procedure_header.proc_attributes=new procedure_attributes_list(); - _procedure_header.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(2)); - _procedure_header.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - parsertools.create_source_context(_procedure_header.proc_attributes,parsertools.sc_not_null(_procedure_header.proc_attributes,LRParser.GetReductionSyntaxNode(2)),LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_procedure_header,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(2)); - return _procedure_header; - } - - case (int)RuleConstants.RULE_INT_FUNC_HEADING : - // ::= - - { - declaration _declaration; - _declaration=(LRParser.GetReductionSyntaxNode(1) as declaration); - _declaration.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _declaration; - } - - case (int)RuleConstants.RULE_INT_FUNC_HEADING_TKFORWARD_TKSEMICOLON : - // ::= tkForward tkSemiColon - - { - procedure_header _procedure_header; - _procedure_header=(LRParser.GetReductionSyntaxNode(1) as procedure_header); - if (_procedure_header.proc_attributes==null) _procedure_header.proc_attributes=new procedure_attributes_list(); - _procedure_header.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(2)); - _procedure_header.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - parsertools.create_source_context(_procedure_header.proc_attributes,parsertools.sc_not_null(_procedure_header.proc_attributes,LRParser.GetReductionSyntaxNode(2)),LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_procedure_header,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(2)); - return _procedure_header; - } - - case (int)RuleConstants.RULE_LABEL_DECL_SECT_TKLABEL_TKSEMICOLON : - // ::= tkLabel tkSemiColon - - { - label_definitions _label_definitions=new label_definitions((ident_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_label_definitions,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _label_definitions; - } - - case (int)RuleConstants.RULE_LABEL_LIST : - // ::= - - //TemplateList for ident_list (create) - { - ident_list _ident_list=new ident_list(); - _ident_list.source_context=((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _ident_list; - } - - case (int)RuleConstants.RULE_LABEL_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for ident_list (add) - { - ident_list _ident_list=(ident_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_ident_list,_ident_list,LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(2) as ident); - return _ident_list; - } - - case (int)RuleConstants.RULE_LABEL_NAME_TKINTEGER : - // ::= tkInteger - - { - ident _ident=new ident(); - - if(LRParser.GetReductionSyntaxNode(0) is int32_const) - _ident.name = ((int32_const)LRParser.GetReductionSyntaxNode(0)).val.ToString(); - else - if(LRParser.GetReductionSyntaxNode(0) is int64_const) - _ident.name = ((int64_const)LRParser.GetReductionSyntaxNode(0)).val.ToString(); - else - _ident.name = ((uint64_const)LRParser.GetReductionSyntaxNode(0)).val.ToString(); - parsertools.assign_source_context(_ident,LRParser.GetReductionSyntaxNode(0)); - return _ident; - } - - case (int)RuleConstants.RULE_LABEL_NAME_TKFLOAT : - // ::= tkFloat - - { - ident _ident=new ident(((double_const)LRParser.GetReductionSyntaxNode(0)).val.ToString()); - parsertools.assign_source_context(_ident,LRParser.GetReductionSyntaxNode(0)); - return _ident; - } - - case (int)RuleConstants.RULE_LABEL_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_DECL_SECT_TKCONST : - // ::= tkConst - - { - consts_definitions_list _consts_definitions_list=new consts_definitions_list(); - - _consts_definitions_list.const_defs.Add((const_definition)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_consts_definitions_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _consts_definitions_list; - } - - case (int)RuleConstants.RULE_CONST_DECL_SECT : - // ::= - - { - consts_definitions_list _consts_definitions_list=(consts_definitions_list)LRParser.GetReductionSyntaxNode(0); - _consts_definitions_list.const_defs.Add((const_definition)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_consts_definitions_list,_consts_definitions_list,LRParser.GetReductionSyntaxNode(1)); - return _consts_definitions_list; - } - - case (int)RuleConstants.RULE_RES_STR_DECL_SECT_TKRESOURCESTRING : - // ::= tkResourceString - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkResourceString "));}return null; - case (int)RuleConstants.RULE_RES_STR_DECL_SECT : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_TYPE_DECL_SECT_TKTYPE : - // ::= tkType - - { - type_declarations _type_declarations=new type_declarations(); - - ///////////////tasha 28.04.2010 - pascalABC_type_declarations.Add((type_declaration)LRParser.GetReductionSyntaxNode(1)); - /////////////////////////////// - _type_declarations.types_decl.Add((type_declaration)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_type_declarations,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _type_declarations; - } - - case (int)RuleConstants.RULE_TYPE_DECL_SECT : - // ::= - - { - type_declarations _type_declarations=(type_declarations)LRParser.GetReductionSyntaxNode(0); - _type_declarations.types_decl.Add((type_declaration)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_type_declarations,_type_declarations,LRParser.GetReductionSyntaxNode(1)); - return _type_declarations; - } - - case (int)RuleConstants.RULE_VAR_DECL_SECT_TKVAR : - // ::= tkVar - - { - variable_definitions _variable_definitions=new variable_definitions(); - - ///////////////tasha 28.04.2010 - pascalABC_var_statements.Add((var_def_statement)LRParser.GetReductionSyntaxNode(1)); - /////////////////////////////// - _variable_definitions.var_definitions.Add((var_def_statement)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_variable_definitions,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _variable_definitions; - } - - case (int)RuleConstants.RULE_VAR_DECL_SECT_TKEVENT : - // ::= tkEvent - - { - variable_definitions _variable_definitions=new variable_definitions(); - - _variable_definitions.var_definitions.Add((var_def_statement)LRParser.GetReductionSyntaxNode(1)); - (LRParser.GetReductionSyntaxNode(1) as var_def_statement).is_event = true; - parsertools.create_source_context(_variable_definitions,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _variable_definitions; - } - - case (int)RuleConstants.RULE_VAR_DECL_SECT : - // ::= - - { - variable_definitions _variable_definitions=(variable_definitions)LRParser.GetReductionSyntaxNode(0); - _variable_definitions.var_definitions.Add((var_def_statement)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_variable_definitions,_variable_definitions,LRParser.GetReductionSyntaxNode(1)); - return _variable_definitions; - } - - case (int)RuleConstants.RULE_CONST_DECL_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ONLY_CONST_DECL_TKEQUAL : - // ::= tkEqual - - { - simple_const_definition _simple_const_definition=new simple_const_definition(); - - _simple_const_definition.const_name=(ident)LRParser.GetReductionSyntaxNode(0); - _simple_const_definition.const_value=(expression)LRParser.GetReductionSyntaxNode(2); - parsertools.create_source_context(_simple_const_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _simple_const_definition; - } - - case (int)RuleConstants.RULE_ONLY_CONST_DECL_TKCOLON_TKEQUAL : - // ::= tkColon tkEqual - - { - typed_const_definition _typed_const_definition=new typed_const_definition(); - - _typed_const_definition.const_name=(ident)LRParser.GetReductionSyntaxNode(0); - _typed_const_definition.const_type=(type_definition)LRParser.GetReductionSyntaxNode(2); - _typed_const_definition.const_value=(expression)LRParser.GetReductionSyntaxNode(4); - parsertools.create_source_context(_typed_const_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - return _typed_const_definition; - } - - case (int)RuleConstants.RULE_INIT_CONST_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INIT_CONST_EXPR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_EXPR2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_CONST_EXPR3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_QUESTION_CONSTEXPR_TKQUESTION_TKCOLON : - // ::= tkQuestion tkColon - - { - question_colon_expression _question_colon_expression=new question_colon_expression((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),(expression)LRParser.GetReductionSyntaxNode(4)); - parsertools.create_source_context(_question_colon_expression,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - return _question_colon_expression; - } - - case (int)RuleConstants.RULE_CONST_RELOP_TKEQUAL : - // ::= tkEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_RELOP_TKNOTEQUAL : - // ::= tkNotEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_RELOP_TKLOWER : - // ::= tkLower -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_RELOP_TKGREATER : - // ::= tkGreater -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_RELOP_TKLOWEREQUAL : - // ::= tkLowerEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_RELOP_TKGREATEREQUAL : - // ::= tkGreaterEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_RELOP_TKIN : - // ::= tkIn -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_SIMPLE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_SIMPLE_EXPR2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_CONST_ADDOP_TKPLUS : - // ::= tkPlus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_ADDOP_TKMINUS : - // ::= tkMinus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_ADDOP_TKOR : - // ::= tkOr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_ADDOP_TKXOR : - // ::= tkXor -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_AS_IS_CONSTEXPR : - // ::= - - { - typecast_node _typecast_node=new typecast_node((addressed_value)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),(op_typecast)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_typecast_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - if (!(LRParser.GetReductionSyntaxNode(0) is addressed_value)) - errors.Add(new Errors.bad_operand_type(current_file_name,((syntax_tree_node)LRParser.GetReductionSyntaxNode(0)).source_context,_typecast_node)); - return _typecast_node; - } - - case (int)RuleConstants.RULE_CONST_TERM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_TERM2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_TERM3 : - // ::= - - { - bin_expr _bin_expr=new bin_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_CONST_MULOP_TKSTAR : - // ::= tkStar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_MULOP_TKSLASH : - // ::= tkSlash -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_MULOP_TKDIV : - // ::= tkDiv -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_MULOP_TKMOD : - // ::= tkMod -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_MULOP_TKSHL : - // ::= tkShl -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_MULOP_TKSHR : - // ::= tkShr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_MULOP_TKAND : - // ::= tkAnd -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_FACTOR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_FACTOR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_FACTOR3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_FACTOR4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_FACTOR_TKNIL : - // ::= tkNil - - { - nil_const _nil_const=new nil_const(); - parsertools.create_source_context(_nil_const,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _nil_const; - } - - case (int)RuleConstants.RULE_CONST_FACTOR_TKADDRESSOF : - // ::= tkAddressOf - - { - get_address _get_address=new get_address((addressed_value)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_get_address,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _get_address; - } - - case (int)RuleConstants.RULE_CONST_FACTOR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - bracket_expr _expr = new bracket_expr((expression)LRParser.GetReductionSyntaxNode(1)); parsertools.create_source_context(_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); return _expr; - case (int)RuleConstants.RULE_CONST_FACTOR_TKNOT : - // ::= tkNot - - { - un_expr _un_expr=new un_expr((expression)LRParser.GetReductionSyntaxNode(1),((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_CONST_FACTOR5 : - // ::= - - { - un_expr _un_expr=new un_expr((expression)LRParser.GetReductionSyntaxNode(1),((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_CONST_FACTOR_TKDEREF : - // ::= tkDeref - - { - roof_dereference _roof_dereference=new roof_dereference(); - - _roof_dereference.dereferencing_value=(addressed_value)LRParser.GetReductionSyntaxNode(1); - parsertools.create_source_context(_roof_dereference,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _roof_dereference; - } - - case (int)RuleConstants.RULE_CONST_SET_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose - - { - pascal_set_constant _pascal_set_constant=new pascal_set_constant(LRParser.GetReductionSyntaxNode(1) as expression_list); - - parsertools.create_source_context(_pascal_set_constant,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _pascal_set_constant; - } - - case (int)RuleConstants.RULE_SIGN_TKPLUS : - // ::= tkPlus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIGN_TKMINUS : - // ::= tkMinus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_VARIABLE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_VARIABLE2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_VARIABLE3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_VARIABLE4 : - // ::= -if (LRParser.GetReductionSyntaxNode(1) is dereference) { - ((dereference)LRParser.GetReductionSyntaxNode(1)).dereferencing_value=(addressed_value)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - } - if (LRParser.GetReductionSyntaxNode(1) is dot_node) { - ((dot_node)LRParser.GetReductionSyntaxNode(1)).left=(addressed_value)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),((dot_node)LRParser.GetReductionSyntaxNode(1)).right); - } - return LRParser.GetReductionSyntaxNode(1); - - case (int)RuleConstants.RULE_CONST_VARIABLE_2_TKPOINT : - // ::= tkPoint - - { - dot_node _dot_node=new dot_node(null,(addressed_value)LRParser.GetReductionSyntaxNode(1)); - - return _dot_node; - } - - case (int)RuleConstants.RULE_CONST_VARIABLE_2_TKDEREF : - // ::= tkDeref - - { - roof_dereference _roof_dereference=new roof_dereference(); - parsertools.assign_source_context(_roof_dereference,LRParser.GetReductionSyntaxNode(0)); - return _roof_dereference; - } - - case (int)RuleConstants.RULE_CONST_VARIABLE_2_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - method_call _method_call=new method_call((expression_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_method_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _method_call; - } - - case (int)RuleConstants.RULE_CONST_VARIABLE_2_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose - - { - indexer _indexer=new indexer((expression_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_indexer,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _indexer; - } - - case (int)RuleConstants.RULE_OPT_CONST_FUNC_EXPR_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_CONST_FUNC_EXPR_LIST2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONST_FUNC_EXPR_LIST : - // ::= - - //TemplateList for expression_list (create) - { - expression_list _expression_list=new expression_list(); - _expression_list.source_context=((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - return _expression_list; - } - - case (int)RuleConstants.RULE_CONST_FUNC_EXPR_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for expression_list (add) - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return _expression_list; - } - - case (int)RuleConstants.RULE_CONST_ELEM_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_ELEM_LIST2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CONST_ELEM_LIST1 : - // ::= - - //TemplateList for expression_list (create) - { - expression_list _expression_list=new expression_list(); - _expression_list.source_context=((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - return _expression_list; - } - - case (int)RuleConstants.RULE_CONST_ELEM_LIST1_TKCOMMA : - // ::= tkComma - - //TemplateList for expression_list (add) - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return _expression_list; - } - - case (int)RuleConstants.RULE_CONST_ELEM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_ELEM_TKDOTDOT : - // ::= tkDotDot - - { - diapason_expr _diapason_expr=new diapason_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_diapason_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _diapason_expr; - } - - case (int)RuleConstants.RULE_UNSIGNED_NUMBER_TKINTEGER : - // ::= tkInteger -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNSIGNED_NUMBER_TKHEX : - // ::= tkHex -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNSIGNED_NUMBER_TKFLOAT : - // ::= tkFloat -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPED_CONST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPED_CONST2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPED_CONST3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ARRAY_CONST_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - array_const _array_const=new array_const((expression_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_array_const,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _array_const; - } - - case (int)RuleConstants.RULE_ARRAY_CONST_TKROUNDOPEN_TKROUNDCLOSE2 : - // ::= tkRoundOpen tkRoundClose -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_ARRAY_CONST_TKROUNDOPEN_TKROUNDCLOSE3 : - // ::= tkRoundOpen tkRoundClose -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_TYPED_CONST_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_TYPED_CONST_LIST2 : - // ::= - - { - expression_list _expression_list=new expression_list(); - - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - //_expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(2)); - //parsertools.create_source_context(_expression_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _expression_list; - } - - case (int)RuleConstants.RULE_TYPED_CONST_LIST_TKCOMMA : - // ::= tkComma - - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - if (_expression_list == null) - { - _expression_list = new expression_list(); - errors.Add(new Errors.PABCNETUnexpectedToken(current_file_name, StringResources.Get("TKIDENTIFIER"),((syntax_tree_node)LRParser.GetReductionSyntaxNode(1)).source_context,_expression_list)); - } - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(2)); - return _expression_list; - } - - case (int)RuleConstants.RULE_RECORD_CONST_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose -parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2));return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_CONST_FIELD_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_FIELD_LIST_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_FIELD_LIST_1 : - // ::= - - //TemplateList for record_const (create) - { - record_const _record_const=new record_const(); - _record_const.source_context=((record_const_definition)LRParser.GetReductionSyntaxNode(0)).source_context; - _record_const.rec_consts.Add((record_const_definition)LRParser.GetReductionSyntaxNode(0)); - return _record_const; - } - - case (int)RuleConstants.RULE_CONST_FIELD_LIST_1_TKSEMICOLON : - // ::= tkSemiColon - - //TemplateList for record_const (add) - { - record_const _record_const=(record_const)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_record_const,_record_const,LRParser.GetReductionSyntaxNode(2)); - _record_const.rec_consts.Add(LRParser.GetReductionSyntaxNode(2) as record_const_definition); - return _record_const; - } - - case (int)RuleConstants.RULE_CONST_FIELD_TKCOLON : - // ::= tkColon - - { - record_const_definition _record_const_definition=new record_const_definition((ident)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_record_const_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _record_const_definition; - } - - case (int)RuleConstants.RULE_CONST_FIELD_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_DECL : - // ::= - - { - declaration _declaration; - _declaration=(LRParser.GetReductionSyntaxNode(1) as declaration); - _declaration.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _declaration; - } - - case (int)RuleConstants.RULE_OPT_ATTRIBUTE_DECLARATIONS : - // ::= - return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_ATTRIBUTE_DECLARATIONS2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ATTRIBUTE_DECLARATIONS : - // ::= - - { - attribute_list _attribute_list=new attribute_list(); - - _attribute_list.attributes.Add((simple_attribute_list)LRParser.GetReductionSyntaxNode(0)); - - return _attribute_list; - } - - case (int)RuleConstants.RULE_ATTRIBUTE_DECLARATIONS2 : - // ::= - - { - attribute_list _attribute_list=(attribute_list)LRParser.GetReductionSyntaxNode(0); - _attribute_list.attributes.Add((simple_attribute_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_attribute_list,_attribute_list,LRParser.GetReductionSyntaxNode(1)); - return _attribute_list; - } - - case (int)RuleConstants.RULE_ATTRIBUTE_DECLARATION_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_ONE_OR_SOME_ATTRIBUTE : - // ::= - - //TemplateList for simple_attribute_list (create) - { - simple_attribute_list _simple_attribute_list=new simple_attribute_list(); - _simple_attribute_list.source_context=((attribute)LRParser.GetReductionSyntaxNode(0)).source_context; - _simple_attribute_list.attributes.Add((attribute)LRParser.GetReductionSyntaxNode(0)); - return _simple_attribute_list; - } - - case (int)RuleConstants.RULE_ONE_OR_SOME_ATTRIBUTE_TKCOMMA : - // ::= tkComma - - //TemplateList for simple_attribute_list (add) - { - simple_attribute_list _simple_attribute_list=(simple_attribute_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_simple_attribute_list,_simple_attribute_list,LRParser.GetReductionSyntaxNode(2)); - _simple_attribute_list.attributes.Add(LRParser.GetReductionSyntaxNode(2) as attribute); - return _simple_attribute_list; - } - - case (int)RuleConstants.RULE_ONE_ATTRIBUTE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ONE_ATTRIBUTE_TKCOLON : - // ::= tkColon - - { - attribute _attribute; - _attribute=LRParser.GetReductionSyntaxNode(2) as attribute; - _attribute.qualifier = LRParser.GetReductionSyntaxNode(0) as ident; - - return _attribute; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_DECL_TKEQUAL_TKSEMICOLON : - // ::= tkEqual tkSemiColon - - { - type_declaration _type_declaration=new type_declaration((ident)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_type_declaration,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _type_declaration; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_DECL_TKSEMICOLON : - // ::= tkSemiColon - - { - type_declaration _type_declaration=new type_declaration((ident)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_type_declaration,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _type_declaration; - } - - case (int)RuleConstants.RULE_TYPE_DECL_IDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_DECL_IDENTIFIER2 : - // ::= - - { - template_type_name _template_type_name=new template_type_name((ident_list)LRParser.GetReductionSyntaxNode(1)); - - _template_type_name.name=((ident)LRParser.GetReductionSyntaxNode(0)).name; - parsertools.create_source_context(_template_type_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _template_type_name; - } - - case (int)RuleConstants.RULE_TEMPLATE_IDENTIFIER_WITH_EQUAL_TKLOWER_TKGREATEREQUAL : - // ::= tkLower tkGreaterEqual - - { - template_type_name _template_type_name=new template_type_name((ident_list)LRParser.GetReductionSyntaxNode(2)); - - _template_type_name.name=((ident)LRParser.GetReductionSyntaxNode(0)).name; - parsertools.create_source_context(_template_type_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - - return _template_type_name; - } - - case (int)RuleConstants.RULE_TYPE_DECL_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_DECL_TYPE_TKTYPE : - // ::= tkType -parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1));return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_TYPE_DECL_TYPE2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_REF : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_REF2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_REF3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_REF4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_REF5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_REF6 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TEMPLATE_TYPE : - // ::= - - { - template_type_reference _template_type_reference=new template_type_reference((named_type_reference)LRParser.GetReductionSyntaxNode(0),(template_param_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_template_type_reference,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _template_type_reference; - } - - case (int)RuleConstants.RULE_TEMPLATE_TYPE_PARAMS_TKLOWER_TKGREATER : - // ::= tkLower tkGreater -parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2));return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_TEMPLATE_PARAM_LIST : - // ::= - - //TemplateList for template_param_list (create) - { - template_param_list _template_param_list=new template_param_list(); - _template_param_list.source_context=((type_definition)LRParser.GetReductionSyntaxNode(0)).source_context; - _template_param_list.params_list.Add((type_definition)LRParser.GetReductionSyntaxNode(0)); - return _template_param_list; - } - - case (int)RuleConstants.RULE_TEMPLATE_PARAM_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for template_param_list (add) - { - template_param_list _template_param_list=(template_param_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_template_param_list,_template_param_list,LRParser.GetReductionSyntaxNode(2)); - _template_param_list.params_list.Add(LRParser.GetReductionSyntaxNode(2) as type_definition); - return _template_param_list; - } - - case (int)RuleConstants.RULE_TEMPLATE_PARAM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TEMPLATE_PARAM2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE_TKDOTDOT : - // ::= tkDotDot - - { - diapason _diapason=new diapason((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_diapason,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _diapason; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - enum_type_definition _enum_type_definition=new enum_type_definition((enumerator_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_enum_type_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _enum_type_definition; - } - - case (int)RuleConstants.RULE_RANGE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RANGE_EXPR2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_RANGE_TERM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RANGE_TERM2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_RANGE_FACTOR : - // ::= - if(((named_type_reference)LRParser.GetReductionSyntaxNode(0)).names.Count>0) - return ((named_type_reference)LRParser.GetReductionSyntaxNode(0)).names[0]; - else - return null; - - case (int)RuleConstants.RULE_RANGE_FACTOR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RANGE_FACTOR3 : - // ::= - - { - un_expr _un_expr=new un_expr((expression)LRParser.GetReductionSyntaxNode(1),((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_RANGE_FACTOR4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RANGE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - method_call _method_call=new method_call((expression_list)LRParser.GetReductionSyntaxNode(2)); - - _method_call.dereferencing_value=(addressed_value)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_method_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - - return _method_call; - } - - case (int)RuleConstants.RULE_RANGE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE2 : - // ::= tkRoundOpen tkRoundClose - return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_RANGE_METHODNAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RANGE_METHODNAME_TKPOINT : - // ::= tkPoint - - { - dot_node _dot_node=new dot_node((ident)LRParser.GetReductionSyntaxNode(0),(ident)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_dot_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _dot_node; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_IDENTIFIER : - // ::= - - //TemplateList for named_type_reference (create) - { - named_type_reference _named_type_reference=new named_type_reference(); - _named_type_reference.source_context=((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - _named_type_reference.names.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _named_type_reference; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_IDENTIFIER_TKPOINT : - // ::= tkPoint - - //TemplateList for named_type_reference (add) - { - named_type_reference _named_type_reference=(named_type_reference)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_named_type_reference,_named_type_reference,LRParser.GetReductionSyntaxNode(2)); - _named_type_reference.names.Add(LRParser.GetReductionSyntaxNode(2) as ident); - return _named_type_reference; - } - - case (int)RuleConstants.RULE_ENUMERATION_ID_LIST_TKCOMMA : - // ::= tkComma - - { - enumerator_list _enumerator_list=new enumerator_list(); - - _enumerator_list.enumerators.Add((enumerator)LRParser.GetReductionSyntaxNode(0)); - _enumerator_list.enumerators.Add((enumerator)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_enumerator_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _enumerator_list; - } - - case (int)RuleConstants.RULE_ENUMERATION_ID_LIST_TKCOMMA2 : - // ::= tkComma - - { - enumerator_list _enumerator_list=(enumerator_list)LRParser.GetReductionSyntaxNode(0); - _enumerator_list.enumerators.Add((enumerator)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_enumerator_list,_enumerator_list,LRParser.GetReductionSyntaxNode(2)); - - return _enumerator_list; - } - - case (int)RuleConstants.RULE_ENUMERATION_ID : - // ::= - - { - enumerator _enumerator=new enumerator(LRParser.GetReductionSyntaxNode(0) as ident,null); - parsertools.create_source_context(_enumerator,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _enumerator; - } - - case (int)RuleConstants.RULE_ENUMERATION_ID_TKEQUAL : - // ::= tkEqual - - { - enumerator _enumerator=new enumerator(LRParser.GetReductionSyntaxNode(0) as ident,LRParser.GetReductionSyntaxNode(2) as expression); - parsertools.create_source_context(_enumerator,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _enumerator; - } - - case (int)RuleConstants.RULE_POINTER_TYPE_TKDEREF : - // ::= tkDeref - - { - ref_type _ref_type=new ref_type((type_definition)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_ref_type,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _ref_type; - } - - case (int)RuleConstants.RULE_STRUCTURED_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_STRUCTURED_TYPE_TKPACKED : - // ::= tkPacked - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkPacked "));}return null; - case (int)RuleConstants.RULE_UNPACKED_STRUCTURED_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNPACKED_STRUCTURED_TYPE2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNPACKED_STRUCTURED_TYPE3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNPACKED_STRUCTURED_TYPE4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ARRAY_TYPE_TKARRAY_TKSQUAREOPEN_TKSQUARECLOSE_TKOF : - // ::= tkArray tkSquareOpen tkSquareClose tkOf - - { - array_type _array_type=new array_type((indexers_types)LRParser.GetReductionSyntaxNode(2),(type_definition)LRParser.GetReductionSyntaxNode(5)); - - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_array_type,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(5)); - - return _array_type; - } - - case (int)RuleConstants.RULE_ARRAY_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNSIZED_ARRAY_TYPE_TKARRAY_TKOF : - // ::= tkArray tkOf - - { - array_type _array_type=new array_type(null,(type_definition)LRParser.GetReductionSyntaxNode(2)); - - parsertools.create_source_context(_array_type,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _array_type; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_LIST : - // ::= - - { - indexers_types _indexers_types=new indexers_types(); - - _indexers_types.indexers.Add((type_definition)LRParser.GetReductionSyntaxNode(0)); - - return _indexers_types; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_LIST_TKCOMMA : - // ::= tkComma - - { - indexers_types _indexers_types=(indexers_types)LRParser.GetReductionSyntaxNode(0); - _indexers_types.indexers.Add((type_definition)LRParser.GetReductionSyntaxNode(2)); - - return _indexers_types; - } - - case (int)RuleConstants.RULE_SIMPLE_TYPE_OR_EMPTY : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_TYPE_OR_EMPTY2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_RECORD_TYPE_TKRECORD_TKEND : - // ::= tkRecord tkEnd - - { - record_type _record_type=new record_type((record_type_parts)LRParser.GetReductionSyntaxNode(1),null); - parsertools.create_source_context(_record_type,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _record_type; - } - - case (int)RuleConstants.RULE_RECORD_TYPE_TKRECORD_TKEND2 : - // ::= tkRecord tkEnd - - { - record_type _record_type=new record_type(null,null); - parsertools.create_source_context(_record_type,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _record_type; - } - - case (int)RuleConstants.RULE_FIELD_LIST : - // ::= - - { - record_type_parts _record_type_parts=new record_type_parts((var_def_list)LRParser.GetReductionSyntaxNode(0),null); - parsertools.create_source_context(_record_type_parts,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _record_type_parts; - } - - case (int)RuleConstants.RULE_FIELD_LIST2 : - // ::= - - { - record_type_parts _record_type_parts=new record_type_parts(null,(variant_record_type)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_record_type_parts,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _record_type_parts; - } - - case (int)RuleConstants.RULE_FIELD_LIST_TKSEMICOLON : - // ::= tkSemiColon - - { - record_type_parts _record_type_parts=new record_type_parts((var_def_list)LRParser.GetReductionSyntaxNode(0),(variant_record_type)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_record_type_parts,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _record_type_parts; - } - - case (int)RuleConstants.RULE_FIXED_PART : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FIXED_PART_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FIXED_PART_2 : - // ::= - - //TemplateList for var_def_list (create) - { - var_def_list _var_def_list=new var_def_list(); - _var_def_list.source_context=((var_def_statement)LRParser.GetReductionSyntaxNode(0)).source_context; - _var_def_list.vars.Add((var_def_statement)LRParser.GetReductionSyntaxNode(0)); - return _var_def_list; - } - - case (int)RuleConstants.RULE_FIXED_PART_2_TKSEMICOLON : - // ::= tkSemiColon - - //TemplateList for var_def_list (add) - { - var_def_list _var_def_list=(var_def_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_var_def_list,_var_def_list,LRParser.GetReductionSyntaxNode(2)); - _var_def_list.vars.Add(LRParser.GetReductionSyntaxNode(2) as var_def_statement); - return _var_def_list; - } - - case (int)RuleConstants.RULE_RECORD_SECTION_TKCOLON : - // ::= tkColon - - { - var_def_statement _var_def_statement=new var_def_statement((ident_list)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),null,definition_attribute.None,false); - - parsertools.create_source_context(_var_def_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _var_def_statement; - } - - case (int)RuleConstants.RULE_RECORD_SECTION_ID_LIST : - // ::= - - //TemplateList for ident_list (create) - { - ident_list _ident_list=new ident_list(); - _ident_list.source_context=((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _ident_list; - } - - case (int)RuleConstants.RULE_RECORD_SECTION_ID_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for ident_list (add) - { - ident_list _ident_list=(ident_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_ident_list,_ident_list,LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(2) as ident); - return _ident_list; - } - - case (int)RuleConstants.RULE_RECORD_SECTION_ID : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANT_PART_TKCASE_TKOF : - // ::= tkCase tkOf - - { - variant_record_type _variant_record_type; - _variant_record_type=(variant_record_type)LRParser.GetReductionSyntaxNode(1); - _variant_record_type.vars=LRParser.GetReductionSyntaxNode(3) as variant_types; - parsertools.create_source_context(_variant_record_type,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - - return _variant_record_type; - } - - case (int)RuleConstants.RULE_TAG_FIELD : - // ::= - - { - variant_record_type _variant_record_type=new variant_record_type((ident)LRParser.GetReductionSyntaxNode(0),null,null); - - return _variant_record_type; - } - - case (int)RuleConstants.RULE_TAG_FIELD_TKCOLON : - // ::= tkColon - - { - variant_record_type _variant_record_type=new variant_record_type((ident)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),null); - - return _variant_record_type; - } - - case (int)RuleConstants.RULE_TAG_FIELD_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TAG_FIELD_TYPENAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANT_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANT_LIST_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANT_LIST_2 : - // ::= - - //TemplateList for variant_types (create) - { - variant_types _variant_types=new variant_types(); - _variant_types.source_context=((variant_type)LRParser.GetReductionSyntaxNode(0)).source_context; - _variant_types.vars.Add((variant_type)LRParser.GetReductionSyntaxNode(0)); - return _variant_types; - } - - case (int)RuleConstants.RULE_VARIANT_LIST_2_TKSEMICOLON : - // ::= tkSemiColon - - //TemplateList for variant_types (add) - { - variant_types _variant_types=(variant_types)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_variant_types,_variant_types,LRParser.GetReductionSyntaxNode(2)); - _variant_types.vars.Add(LRParser.GetReductionSyntaxNode(2) as variant_type); - return _variant_types; - } - - case (int)RuleConstants.RULE_VARIANT_TKCOLON_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkColon tkRoundOpen tkRoundClose - - { - variant_type _variant_type=new variant_type((expression_list)LRParser.GetReductionSyntaxNode(0),(record_type_parts)LRParser.GetReductionSyntaxNode(3)); - - parsertools.create_source_context(_variant_type,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - - return _variant_type; - } - - case (int)RuleConstants.RULE_VARIANT_FIELD_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_VARIANT_FIELD_LIST2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CASE_TAG_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONST_EXPR_LIST : - // ::= - - //TemplateList for expression_list (create) - { - expression_list _expression_list=new expression_list(); - _expression_list.source_context=((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - return _expression_list; - } - - case (int)RuleConstants.RULE_CONST_EXPR_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for expression_list (add) - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return _expression_list; - } - - case (int)RuleConstants.RULE_SET_TYPE_TKSET_TKOF : - // ::= tkSet tkOf - - { - set_type_definition _set_type_definition=new set_type_definition((type_definition)LRParser.GetReductionSyntaxNode(2)); - - parsertools.create_source_context(_set_type_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _set_type_definition; - } - - case (int)RuleConstants.RULE_FILE_TYPE_TKFILE_TKOF : - // ::= tkFile tkOf - - { - file_type _file_type=new file_type((type_definition)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_file_type,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _file_type; - } - - case (int)RuleConstants.RULE_FILE_TYPE_TKFILE : - // ::= tkFile - - { - file_type _file_type=new file_type(); - parsertools.assign_source_context(_file_type,LRParser.GetReductionSyntaxNode(0)); - return _file_type; - } - - case (int)RuleConstants.RULE_STRING_TYPE_TKIDENTIFIER_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkIdentifier tkSquareOpen tkSquareClose - - { - string_num_definition _string_num_definition=new string_num_definition((expression)LRParser.GetReductionSyntaxNode(2),(ident)LRParser.GetReductionSyntaxNode(0)); - - parsertools.create_source_context(_string_num_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _string_num_definition; - } - - case (int)RuleConstants.RULE_PROCEDURAL_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROCEDURAL_TYPE_KIND : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROCEDURAL_TYPE_DECL_TKPROCEDURE : - // ::= tkProcedure - - { - procedure_header _procedure_header=new procedure_header((formal_parameters)LRParser.GetReductionSyntaxNode(1),null,null,false,false,null,null); - - object rt=LRParser.GetReductionSyntaxNode(0); - if (LRParser.GetReductionSyntaxNode(1)!=null) rt=LRParser.GetReductionSyntaxNode(1); - parsertools.create_source_context(_procedure_header,LRParser.GetReductionSyntaxNode(0),rt); - if(LRParser.GetReductionSyntaxNode(2)!=null) - (LRParser.GetReductionSyntaxNode(2) as SyntaxError).bad_node=_procedure_header; - - return _procedure_header; - } - - case (int)RuleConstants.RULE_PROCEDURAL_TYPE_DECL_TKFUNCTION_TKCOLON : - // ::= tkFunction tkColon - - { - function_header _function_header=new function_header(); - - if (LRParser.GetReductionSyntaxNode(1)!=null) - _function_header.parameters=(formal_parameters)LRParser.GetReductionSyntaxNode(1); - if (LRParser.GetReductionSyntaxNode(3)!=null) - _function_header.return_type=(type_definition)LRParser.GetReductionSyntaxNode(3); - _function_header.of_object=false; - _function_header.class_keyword=false; - parsertools.create_source_context(_function_header,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - - return _function_header; - } - - case (int)RuleConstants.RULE_MAYBE_ERROR_TKCOLON : - // ::= tkColon - Errors.unexpected_return_value er=new Errors.unexpected_return_value(current_file_name,((syntax_tree_node)LRParser.GetReductionSyntaxNode(1)).source_context,null); errors.Add(er);return er; - case (int)RuleConstants.RULE_MAYBE_ERROR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OBJECT_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_PRIVAT_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OOT_PRIVAT_LIST_TKPRIVATE : - // ::= tkPrivate - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkPrivate "));}return null; - case (int)RuleConstants.RULE_OOT_COMPONENT_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OOT_COMPONENT_LIST2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_COMPONENT_LIST3 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_OOT_COMPONENT_LIST4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_SUCCESSOR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundClose"));}return null; - case (int)RuleConstants.RULE_OOT_TYPEIDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_FIELD_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_FIELD_LIST2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_OOT_FIELD_TKCOLON_TKSEMICOLON : - // ::= tkColon tkSemiColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkColon tkSemiColon"));}return null; - case (int)RuleConstants.RULE_OOT_ID_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_ID_LIST_TKCOMMA : - // ::= tkComma - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkComma "));}return null; - case (int)RuleConstants.RULE_OOT_FIELD_IDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_METHOD_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_METHOD_LIST2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_OOT_METHOD : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_METHOD_HEAD : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_METHOD_HEAD2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_METHOD_HEAD3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_METHOD_HEAD4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OOT_CONSTRUCTOR_HEAD_TKCONSTRUCTOR : - // ::= tkConstructor - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkConstructor "));}return null; - case (int)RuleConstants.RULE_OOT_DESTRUCTOR_HEAD_TKDESTRUCTOR : - // ::= tkDestructor - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkDestructor "));}return null; - case (int)RuleConstants.RULE_NEW_OBJECT_TYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_OBJECT_TYPE : - // ::= - - { - class_definition _class_definition=new class_definition(LRParser.GetReductionSyntaxNode(2) as named_type_reference_list,LRParser.GetReductionSyntaxNode(4) as class_body,class_keyword.Class,null,LRParser.GetReductionSyntaxNode(3) as where_definition_list, class_attribute.None,false); - - string kw=(LRParser.GetReductionSyntaxNode(1) as token_info).text.ToLower(); - if(LRParser.GetReductionSyntaxNode(0)!=null) - _class_definition.attribute=(class_attribute)((LRParser.GetReductionSyntaxNode(0) as token_taginfo).tag); - if (kw=="record") - _class_definition.keyword=class_keyword.Record; - else - if (kw=="interface") - _class_definition.keyword=class_keyword.Interface; - else - if (kw=="i<>") - _class_definition.keyword=class_keyword.TemplateInterface; - else - if (kw=="r<>") - _class_definition.keyword=class_keyword.TemplateRecord; - else - if (kw=="c<>") - _class_definition.keyword=class_keyword.TemplateClass; - if (_class_definition.body!=null && _class_definition.body.class_def_blocks!=null && - _class_definition.body.class_def_blocks.Count>0 && _class_definition.body.class_def_blocks[0].access_mod==null) - { - if(_class_definition.keyword==class_keyword.Class) - _class_definition.body.class_def_blocks[0].access_mod = new access_modifer_node(access_modifer.internal_modifer); - else - _class_definition.body.class_def_blocks[0].access_mod = new access_modifer_node(access_modifer.none); - } - parsertools.create_source_context(_class_definition,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(4),LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - return _class_definition; - } - - case (int)RuleConstants.RULE_NEW_RECORD_TYPE_TKEND : - // ::= tkEnd - - { - class_definition _class_definition=new class_definition(LRParser.GetReductionSyntaxNode(1) as named_type_reference_list,LRParser.GetReductionSyntaxNode(3) as class_body,class_keyword.Record,null,LRParser.GetReductionSyntaxNode(2) as where_definition_list, class_attribute.None,false); - - if (_class_definition.body!=null && _class_definition.body.class_def_blocks!=null && - _class_definition.body.class_def_blocks.Count>0 && _class_definition.body.class_def_blocks[0].access_mod==null) - { - _class_definition.body.class_def_blocks[0].access_mod = new access_modifer_node(access_modifer.public_modifer); - } - parsertools.create_source_context(_class_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - return _class_definition; - } - - case (int)RuleConstants.RULE_CLASS_ATTRIBUTES_TKFINAL : - // ::= tkFinal -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CLASS_ATTRIBUTES : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_CLASS_OR_INTERFACE_KEYWORD_TKCLASS : - // ::= tkClass -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CLASS_OR_INTERFACE_KEYWORD_TKINTERFACE : - // ::= tkInterface -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE : - // ::= tkTemplate - - { - token_info _token_info=(token_info)LRParser.GetReductionSyntaxNode(0);_token_info.text="c<>"; - return _token_info; - } - - case (int)RuleConstants.RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE_TKCLASS : - // ::= tkTemplate tkClass - - { - token_info _token_info=(token_info)LRParser.GetReductionSyntaxNode(0);_token_info.text="c<>";parsertools.create_source_context(_token_info,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _token_info; - } - - case (int)RuleConstants.RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE_TKRECORD : - // ::= tkTemplate tkRecord - - { - token_info _token_info=(token_info)LRParser.GetReductionSyntaxNode(0);_token_info.text="r<>";parsertools.create_source_context(_token_info,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _token_info; - } - - case (int)RuleConstants.RULE_CLASS_OR_INTERFACE_KEYWORD_TKTEMPLATE_TKINTERFACE : - // ::= tkTemplate tkInterface - - { - token_info _token_info=(token_info)LRParser.GetReductionSyntaxNode(0);_token_info.text="i<>";parsertools.create_source_context(_token_info,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _token_info; - } - - case (int)RuleConstants.RULE_RECORD_KEYWORD_TKRECORD : - // ::= tkRecord -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_NOT_COMPONENT_LIST_SEQ_END : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_NOT_COMPONENT_LIST_SEQ_END_TKEND : - // ::= tkEnd -parsertools.create_source_context(LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),LRParser.GetReductionSyntaxNode(1));return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_BASE_CLASSES : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_BASE_CLASSES_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_BASE_CLASSES_NAMES_LIST : - // ::= - - //TemplateList for named_type_reference_list (create) - { - named_type_reference_list _named_type_reference_list=new named_type_reference_list(); - _named_type_reference_list.source_context=((named_type_reference)LRParser.GetReductionSyntaxNode(0)).source_context; - _named_type_reference_list.types.Add((named_type_reference)LRParser.GetReductionSyntaxNode(0)); - return _named_type_reference_list; - } - - case (int)RuleConstants.RULE_BASE_CLASSES_NAMES_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for named_type_reference_list (add) - { - named_type_reference_list _named_type_reference_list=(named_type_reference_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_named_type_reference_list,_named_type_reference_list,LRParser.GetReductionSyntaxNode(2)); - _named_type_reference_list.types.Add(LRParser.GetReductionSyntaxNode(2) as named_type_reference); - return _named_type_reference_list; - } - - case (int)RuleConstants.RULE_BASE_CLASS_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_BASE_CLASS_NAME2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_TEMPLATE_ARGUMENTS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_TEMPLATE_ARGUMENTS2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TEMPLATE_ARGUMENTS_TKLOWER_TKGREATER : - // ::= tkLower tkGreater -parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2));return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_OPT_WHERE_SECTION : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_WHERE_SECTION2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_WHERE_PART_LIST : - // ::= - - { - where_definition_list _where_definition_list=new where_definition_list(); - - parsertools.create_source_context(_where_definition_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - _where_definition_list.defs.Add((where_definition)LRParser.GetReductionSyntaxNode(0)); - return _where_definition_list; - } - - case (int)RuleConstants.RULE_WHERE_PART_LIST2 : - // ::= - - { - where_definition_list _where_definition_list=(where_definition_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_where_definition_list,_where_definition_list,LRParser.GetReductionSyntaxNode(1)); - _where_definition_list.defs.Add((where_definition)LRParser.GetReductionSyntaxNode(1)); - return _where_definition_list; - } - - case (int)RuleConstants.RULE_WHERE_PART_TKWHERE_TKCOLON_TKSEMICOLON : - // ::= tkWhere tkColon tkSemiColon - - { - where_definition _where_definition=new where_definition((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition_list)LRParser.GetReductionSyntaxNode(3)); - - parsertools.create_source_context(_where_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - return _where_definition; - } - - case (int)RuleConstants.RULE_TYPE_REF_AND_SECIFIC_LIST : - // ::= - - //TemplateList for type_definition_list (create) - { - type_definition_list _type_definition_list=new type_definition_list(); - _type_definition_list.source_context=((type_definition)LRParser.GetReductionSyntaxNode(0)).source_context; - _type_definition_list.defs.Add((type_definition)LRParser.GetReductionSyntaxNode(0)); - return _type_definition_list; - } - - case (int)RuleConstants.RULE_TYPE_REF_AND_SECIFIC_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for type_definition_list (add) - { - type_definition_list _type_definition_list=(type_definition_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_type_definition_list,_type_definition_list,LRParser.GetReductionSyntaxNode(2)); - _type_definition_list.defs.Add(LRParser.GetReductionSyntaxNode(2) as type_definition); - return _type_definition_list; - } - - case (int)RuleConstants.RULE_TYPE_REF_OR_SECIFIC : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPE_REF_OR_SECIFIC_TKCLASS : - // ::= tkClass - - { - declaration_specificator _declaration_specificator=new declaration_specificator(DeclarationSpecificator.WhereDefClass, (LRParser.GetReductionSyntaxNode(0) as token_info).text); - - parsertools.assign_source_context(_declaration_specificator,LRParser.GetReductionSyntaxNode(0)); - return _declaration_specificator; - } - - case (int)RuleConstants.RULE_TYPE_REF_OR_SECIFIC_TKRECORD : - // ::= tkRecord - - { - declaration_specificator _declaration_specificator=new declaration_specificator(DeclarationSpecificator.WhereDefValueType, (LRParser.GetReductionSyntaxNode(0) as token_info).text); - - parsertools.assign_source_context(_declaration_specificator,LRParser.GetReductionSyntaxNode(0)); - return _declaration_specificator; - } - - case (int)RuleConstants.RULE_TYPE_REF_OR_SECIFIC_TKCONSTRUCTOR : - // ::= tkConstructor - - { - declaration_specificator _declaration_specificator=new declaration_specificator(DeclarationSpecificator.WhereDefConstructor, (LRParser.GetReductionSyntaxNode(0) as token_info).text); - - parsertools.assign_source_context(_declaration_specificator,LRParser.GetReductionSyntaxNode(0)); - return _declaration_specificator; - } - - case (int)RuleConstants.RULE_RECORD_COMPONENT_LIST : - // ::= - - { - class_body _class_body=new class_body(); - - if (LRParser.GetReductionSyntaxNode(0)!=null) { - access_modifer_node acn=new access_modifer_node(access_modifer.public_modifer); - ((class_members)LRParser.GetReductionSyntaxNode(0)).access_mod = acn; - _class_body.class_def_blocks.Add((class_members)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_class_body,LRParser.GetReductionSyntaxNode(0)); - } - - return _class_body; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_SEQ : - // ::= - - { - class_body _class_body=new class_body(); - - if (LRParser.GetReductionSyntaxNode(0)!=null) { - _class_body.class_def_blocks.Add((class_members)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_class_body,LRParser.GetReductionSyntaxNode(0)); - } - - return _class_body; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_SEQ2 : - // ::= - - { - class_body _class_body=(class_body)LRParser.GetReductionSyntaxNode(0); - class_members cl=(class_members)LRParser.GetReductionSyntaxNode(2); - if (cl==null) - { - cl=new class_members(); - parsertools.create_source_context(cl,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - } - cl.access_mod=(access_modifer_node)LRParser.GetReductionSyntaxNode(1); - _class_body.class_def_blocks.Add(cl); - parsertools.create_source_context(_class_body,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),parsertools.sc_not_null(cl,LRParser.GetReductionSyntaxNode(1))); - - return _class_body; - } - - case (int)RuleConstants.RULE_OT_VISIBILITY_SPECIFIER_TKINTERNAL : - // ::= tkInternal - - { - access_modifer_node _access_modifer_node=new access_modifer_node(access_modifer.internal_modifer); - parsertools.assign_source_context(_access_modifer_node,LRParser.GetReductionSyntaxNode(0)); - return _access_modifer_node; - } - - case (int)RuleConstants.RULE_OT_VISIBILITY_SPECIFIER_TKPUBLIC : - // ::= tkPublic - - { - access_modifer_node _access_modifer_node=new access_modifer_node(access_modifer.public_modifer); - parsertools.assign_source_context(_access_modifer_node,LRParser.GetReductionSyntaxNode(0)); - return _access_modifer_node; - } - - case (int)RuleConstants.RULE_OT_VISIBILITY_SPECIFIER_TKPROTECTED : - // ::= tkProtected - - { - access_modifer_node _access_modifer_node=new access_modifer_node(access_modifer.protected_modifer); - parsertools.assign_source_context(_access_modifer_node,LRParser.GetReductionSyntaxNode(0)); - return _access_modifer_node; - } - - case (int)RuleConstants.RULE_OT_VISIBILITY_SPECIFIER_TKPRIVATE : - // ::= tkPrivate - - { - access_modifer_node _access_modifer_node=new access_modifer_node(access_modifer.private_modifer); - parsertools.assign_source_context(_access_modifer_node,LRParser.GetReductionSyntaxNode(0)); - return _access_modifer_node; - } - - case (int)RuleConstants.RULE_NOT_OBJECT_TYPE_IDENTIFIER_LIST : - // ::= - - //TemplateList for named_type_reference_list (create) - { - named_type_reference_list _named_type_reference_list=new named_type_reference_list(); - _named_type_reference_list.source_context=((named_type_reference)LRParser.GetReductionSyntaxNode(0)).source_context; - _named_type_reference_list.types.Add((named_type_reference)LRParser.GetReductionSyntaxNode(0)); - return _named_type_reference_list; - } - - case (int)RuleConstants.RULE_NOT_OBJECT_TYPE_IDENTIFIER_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for named_type_reference_list (add) - { - named_type_reference_list _named_type_reference_list=(named_type_reference_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_named_type_reference_list,_named_type_reference_list,LRParser.GetReductionSyntaxNode(2)); - _named_type_reference_list.types.Add(LRParser.GetReductionSyntaxNode(2) as named_type_reference); - return _named_type_reference_list; - } - - case (int)RuleConstants.RULE_IDENT_LIST : - // ::= - - //TemplateList for ident_list (create) - { - ident_list _ident_list=new ident_list(); - _ident_list.source_context=((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _ident_list; - } - - case (int)RuleConstants.RULE_IDENT_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for ident_list (add) - { - ident_list _ident_list=(ident_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_ident_list,_ident_list,LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(2) as ident); - return _ident_list; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST2 : - // ::= -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST3 : - // ::= -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_TKSEMICOLON : - // ::= tkSemiColon - - { - class_members _class_members; - _class_members=(class_members)LRParser.GetReductionSyntaxNode(1); - for (int i=0;i<((class_members)LRParser.GetReductionSyntaxNode(3)).members.Count;i++) - _class_members.members.Add(((class_members)LRParser.GetReductionSyntaxNode(3)).members[i]); - parsertools.create_source_context(_class_members,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(3)); - - return _class_members; - } - - case (int)RuleConstants.RULE_OPT_SEMICOLON : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_SEMICOLON_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_GUID : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_1 : - // ::= - - { - class_members _class_members=new class_members(); - - _class_members.members.Add((declaration)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_class_members,LRParser.GetReductionSyntaxNode(0)); - - return _class_members; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_1_TKSEMICOLON : - // ::= tkSemiColon - - { - class_members _class_members=(class_members)LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(2) is declaration) - _class_members.members.Add((declaration)LRParser.GetReductionSyntaxNode(2)); - else - (_class_members.members[_class_members.members.Count-1] as var_def_statement).var_attr=definition_attribute.Static; - parsertools.create_source_context(_class_members,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _class_members; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_2 : - // ::= - - { - class_members _class_members=new class_members(); - - _class_members.members.Add((declaration)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_class_members,LRParser.GetReductionSyntaxNode(0)); - - return _class_members; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_22 : - // ::= - - { - class_members _class_members=new class_members(); - - _class_members.members.Add((declaration)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_class_members,LRParser.GetReductionSyntaxNode(0)); - - return _class_members; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_23 : - // ::= - - { - class_members _class_members=(class_members)LRParser.GetReductionSyntaxNode(0); - _class_members.members.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_class_members,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _class_members; - } - - case (int)RuleConstants.RULE_NOT_COMPONENT_LIST_24 : - // ::= - - { - class_members _class_members=(class_members)LRParser.GetReductionSyntaxNode(0); - _class_members.members.Add((declaration)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_class_members,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _class_members; - } - - case (int)RuleConstants.RULE_FILED_OR_CONST_DEFINITION : - // ::= - - { - declaration _declaration; - _declaration=LRParser.GetReductionSyntaxNode(1) as declaration; - _declaration.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _declaration; - } - - case (int)RuleConstants.RULE_SIMPLE_FILED_OR_CONST_DEFINITION_TKCONST : - // ::= tkConst - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_SIMPLE_FILED_OR_CONST_DEFINITION : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_FILED_OR_CONST_DEFINITION_TKCLASS : - // ::= tkClass - - { - var_def_statement _var_def_statement=(var_def_statement)LRParser.GetReductionSyntaxNode(1); - _var_def_statement.var_attr = definition_attribute.Static; - parsertools.create_source_context(_var_def_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _var_def_statement; - } - - case (int)RuleConstants.RULE_FILED_OR_CONST_DEFINITION_OR_AM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FILED_OR_CONST_DEFINITION_OR_AM2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_FIELD_DEFINITION : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_FIELD_DEFINITION_TKEVENT_TKCOLON : - // ::= tkEvent tkColon - - { - var_def_statement _var_def_statement=new var_def_statement((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),null,definition_attribute.None,true); - - parsertools.create_source_context(_var_def_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - - return _var_def_statement; - } - - case (int)RuleConstants.RULE_FIELD_ACCESS_MODIFIER_TKSTATIC : - // ::= tkStatic -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_METHOD_DEFINITION : - // ::= - - { - declaration _declaration; - _declaration=(LRParser.GetReductionSyntaxNode(1) as declaration); - if (_declaration != null) - _declaration.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _declaration; - } - - case (int)RuleConstants.RULE_NOT_METHOD_DEFINITION2 : - // ::= - - { - procedure_definition _procedure_definition; - _procedure_definition=(LRParser.GetReductionSyntaxNode(1) as procedure_definition); - if (_procedure_definition != null && _procedure_definition.proc_header != null) - _procedure_definition.proc_header.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_ABC_METHOD_DECL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_METHOD_DECL2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_METHOD_DECL3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_METHOD_DECL4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_METHOD_HEADING_TKCLASS : - // ::= tkClass - ((procedure_header)LRParser.GetReductionSyntaxNode(1)).class_keyword=true;return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_NOT_METHOD_HEADING : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_METHOD_HEADING2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_METHOD_HEADING3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_PROCFUNC_HEADING : - // ::= - ((procedure_header)LRParser.GetReductionSyntaxNode(0)).name.explicit_interface_name=((procedure_header)LRParser.GetReductionSyntaxNode(0)).name.class_name; - ((procedure_header)LRParser.GetReductionSyntaxNode(0)).name.class_name=null; - return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_PROCFUNC_HEADING_VARIANTS : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_PROCFUNC_HEADING_VARIANTS2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPTIONAL_QUALIFIED_IDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPTIONAL_QUALIFIED_IDENTIFIER2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_CONSTRUCTOR_HEADING : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_CONSTRUCTOR_HEADING_TKCLASS : - // ::= tkClass - ((procedure_header)LRParser.GetReductionSyntaxNode(1)).class_keyword=true;return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_OPT_PROC_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_PROC_NAME2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_CONSTRUCTOR_HEADING_OBJECT_TKCONSTRUCTOR : - // ::= tkConstructor - - { - constructor _constructor=new constructor(); - - object rt=LRParser.GetReductionSyntaxNode(1); - _constructor.name=LRParser.GetReductionSyntaxNode(1) as method_name; - if (LRParser.GetReductionSyntaxNode(2)!=null) { - rt=LRParser.GetReductionSyntaxNode(2); - _constructor.parameters=(formal_parameters)LRParser.GetReductionSyntaxNode(2); - } - if (LRParser.GetReductionSyntaxNode(3)!=null) { - rt=LRParser.GetReductionSyntaxNode(3); - if (((procedure_attributes_list)LRParser.GetReductionSyntaxNode(3)).proc_attributes.Count>0) - _constructor.proc_attributes=(procedure_attributes_list)LRParser.GetReductionSyntaxNode(3); - } - parsertools.create_source_context(_constructor,LRParser.GetReductionSyntaxNode(0),rt); - - return _constructor; - } - - case (int)RuleConstants.RULE_NOT_DESTRUCTOR_HEADING_TKDESTRUCTOR : - // ::= tkDestructor - - { - destructor _destructor=new destructor(); - - object rt=LRParser.GetReductionSyntaxNode(1); - _destructor.name=LRParser.GetReductionSyntaxNode(1) as method_name; - if (LRParser.GetReductionSyntaxNode(2)!=null) { - rt=LRParser.GetReductionSyntaxNode(2); - _destructor.parameters=(formal_parameters)LRParser.GetReductionSyntaxNode(2); - } - if (LRParser.GetReductionSyntaxNode(3)!=null) { - rt=LRParser.GetReductionSyntaxNode(3); - if (((procedure_attributes_list)LRParser.GetReductionSyntaxNode(3)).proc_attributes.Count>0) - _destructor.proc_attributes=(procedure_attributes_list)LRParser.GetReductionSyntaxNode(3); - } - parsertools.create_source_context(_destructor,LRParser.GetReductionSyntaxNode(0),rt); - - return _destructor; - } - - case (int)RuleConstants.RULE_QUALIFIED_IDENTIFIER : - // ::= - - { - method_name _method_name=new method_name(null,null,(ident)LRParser.GetReductionSyntaxNode(0),null); - parsertools.create_source_context(_method_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _method_name; - } - - case (int)RuleConstants.RULE_QUALIFIED_IDENTIFIER2 : - // ::= - - { - method_name _method_name=new method_name(null,null,(ident)LRParser.GetReductionSyntaxNode(0),null); - parsertools.create_source_context(_method_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _method_name; - } - - case (int)RuleConstants.RULE_QUALIFIED_IDENTIFIER_TKPOINT : - // ::= tkPoint -{ - method_name mn=(method_name)LRParser.GetReductionSyntaxNode(0); - mn.class_name=mn.meth_name; - mn.meth_name=(ident)LRParser.GetReductionSyntaxNode(2); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return LRParser.GetReductionSyntaxNode(0); - } - case (int)RuleConstants.RULE_QUALIFIED_IDENTIFIER_TKPOINT2 : - // ::= tkPoint -{ - method_name mn=(method_name)LRParser.GetReductionSyntaxNode(0); - mn.class_name=mn.meth_name; - mn.meth_name=(ident)LRParser.GetReductionSyntaxNode(2); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return LRParser.GetReductionSyntaxNode(0); - } - case (int)RuleConstants.RULE_NOT_PROPERTY_DEFINITION : - // ::= - - { - declaration _declaration; - _declaration=LRParser.GetReductionSyntaxNode(1) as declaration; - _declaration.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _declaration; - } - - case (int)RuleConstants.RULE_SIMPLE_NOT_PROPERTY_DEFINITION : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_NOT_PROPERTY_DEFINITION_TKCLASS : - // ::= tkClass - - { - simple_property _simple_property=(simple_property)LRParser.GetReductionSyntaxNode(1); - _simple_property.attr=definition_attribute.Static; - parsertools.create_source_context(_simple_property,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _simple_property; - } - - case (int)RuleConstants.RULE_NOT_SIMPLE_PROPERTY_DEFINITION_TKPROPERTY_TKSEMICOLON : - // ::= tkProperty tkSemiColon - - { - simple_property _simple_property=new simple_property(); - - _simple_property.property_name=((method_name)LRParser.GetReductionSyntaxNode(1)).meth_name; - if (LRParser.GetReductionSyntaxNode(2)!=null){ - _simple_property.parameter_list=((property_interface)LRParser.GetReductionSyntaxNode(2)).parameter_list; - _simple_property.property_type=((property_interface)LRParser.GetReductionSyntaxNode(2)).property_type; - _simple_property.index_expression=((property_interface)LRParser.GetReductionSyntaxNode(2)).index_expression; - } - if (LRParser.GetReductionSyntaxNode(3)!=null) _simple_property.accessors=(property_accessors)LRParser.GetReductionSyntaxNode(3); - if (LRParser.GetReductionSyntaxNode(5)!=null) _simple_property.array_default=(property_array_default)LRParser.GetReductionSyntaxNode(5); - parsertools.create_source_context(_simple_property,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(5),LRParser.GetReductionSyntaxNode(4),LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - - return _simple_property; - } - - case (int)RuleConstants.RULE_NOT_ARRAY_DEFAULTPROPERTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_ARRAY_DEFAULTPROPERTY_TKDEFAULT_TKSEMICOLON : - // ::= tkDefault tkSemiColon - - { - property_array_default _property_array_default=new property_array_default(); - parsertools.create_source_context(_property_array_default,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _property_array_default; - } - - case (int)RuleConstants.RULE_NOT_PROPERTY_INTERFACE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_PROPERTY_INTERFACE_TKCOLON : - // ::= tkColon - - { - property_interface _property_interface=new property_interface(); - - _property_interface.parameter_list=(property_parameter_list)LRParser.GetReductionSyntaxNode(0); - _property_interface.property_type=(type_definition)LRParser.GetReductionSyntaxNode(2); - _property_interface.index_expression=(expression)LRParser.GetReductionSyntaxNode(3); - parsertools.create_source_context(_property_interface,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(3)),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - - return _property_interface; - } - - case (int)RuleConstants.RULE_NOT_PROPERTY_INTERFACE_INDEX : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_PROPERTY_INTERFACE_INDEX_TKINDEX : - // ::= tkIndex -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_NOT_PROPERTY_PARAMETER_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_PROPERTY_PARAMETER_LIST_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_NOT_PARAMETER_DECL_LIST : - // ::= - - //TemplateList for property_parameter_list (create) - { - property_parameter_list _property_parameter_list=new property_parameter_list(); - _property_parameter_list.source_context=((property_parameter)LRParser.GetReductionSyntaxNode(0)).source_context; - _property_parameter_list.parameters.Add((property_parameter)LRParser.GetReductionSyntaxNode(0)); - return _property_parameter_list; - } - - case (int)RuleConstants.RULE_NOT_PARAMETER_DECL_LIST_TKSEMICOLON : - // ::= tkSemiColon - - //TemplateList for property_parameter_list (add) - { - property_parameter_list _property_parameter_list=(property_parameter_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_property_parameter_list,_property_parameter_list,LRParser.GetReductionSyntaxNode(2)); - _property_parameter_list.parameters.Add(LRParser.GetReductionSyntaxNode(2) as property_parameter); - return _property_parameter_list; - } - - case (int)RuleConstants.RULE_NOT_PARAMETER_DECL_TKCOLON : - // ::= tkColon - - { - property_parameter _property_parameter=new property_parameter((ident_list)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_property_parameter,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _property_parameter; - } - - case (int)RuleConstants.RULE_NOT_PARAMETER_DECL_TKCONST_TKCOLON : - // ::= tkConst tkColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkConst tkColon "));}return null; - case (int)RuleConstants.RULE_NOT_PARAMETER_DECL_TKVAR_TKCOLON : - // ::= tkVar tkColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkVar tkColon "));}return null; - case (int)RuleConstants.RULE_NOT_PARAMETER_DECL_TKOUT_TKCOLON : - // ::= tkOut tkColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkOut tkColon "));}return null; - case (int)RuleConstants.RULE_NOT_PARAMETER_NAME_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_IDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_IDENTIFIER2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_PROPERTY_SPECIFIERS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NOT_PROPERTY_SPECIFIERS_TKREADONLY : - // ::= tkReadOnly - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkReadOnly "));}return null; - case (int)RuleConstants.RULE_NOT_PROPERTY_SPECIFIERS_TKWRITEONLY : - // ::= tkWriteOnly - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkWriteOnly "));}return null; - case (int)RuleConstants.RULE_NOT_PROPERTY_SPECIFIERS_TKDEFAULT : - // ::= tkDefault - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkDefault "));}return null; - case (int)RuleConstants.RULE_NOT_PROPERTY_SPECIFIERS_TKREAD : - // ::= tkRead - - { - property_accessors _property_accessors; - - property_accessors _pa=LRParser.GetReductionSyntaxNode(2) as property_accessors; - if (_pa==null) { - _pa=new property_accessors();parsertools.create_source_context(_pa,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - } - _property_accessors=_pa; - if(LRParser.GetReductionSyntaxNode(1)!=null && ((ident)LRParser.GetReductionSyntaxNode(1)).name.ToLower()=="write") - { - _property_accessors.read_accessor=new read_accessor_name(null); - _property_accessors.write_accessor=new write_accessor_name(null); - parsertools.create_source_context(_property_accessors.read_accessor,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_property_accessors.write_accessor,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_property_accessors,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - } - else - { - _property_accessors.read_accessor=new read_accessor_name((ident)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_property_accessors.read_accessor,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - parsertools.create_source_context(_property_accessors,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - } - - return _property_accessors; - } - - case (int)RuleConstants.RULE_NOT_PROPERTY_SPECIFIERS_TKWRITE : - // ::= tkWrite - - { - property_accessors _property_accessors; - - property_accessors _pa=LRParser.GetReductionSyntaxNode(2) as property_accessors; - if (_pa==null) { - _pa=new property_accessors();parsertools.create_source_context(_pa,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - } - _property_accessors=_pa; - _property_accessors.write_accessor=new write_accessor_name((ident)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_property_accessors.write_accessor,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - parsertools.create_source_context(_property_accessors,LRParser.GetReductionSyntaxNode(0),_pa); - - return _property_accessors; - } - - case (int)RuleConstants.RULE_VAR_DECL_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_DECL_PART : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_DECL_PART2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_DECL_PART_TKCOLON_TKASSIGN : - // ::= tkColon tkAssign - - { - var_def_statement _var_def_statement=new var_def_statement((ident_list)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),(expression)LRParser.GetReductionSyntaxNode(4),definition_attribute.None,false); - parsertools.create_source_context(_var_def_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - - return _var_def_statement; - } - - case (int)RuleConstants.RULE_VAR_DECL_PART_IN_STMT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_DECL_PART_ASSIGN_TKASSIGN : - // ::= tkAssign - - { - var_def_statement _var_def_statement=new var_def_statement((ident_list)LRParser.GetReductionSyntaxNode(0),null,(expression)LRParser.GetReductionSyntaxNode(2),definition_attribute.None,false); - parsertools.create_source_context(_var_def_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _var_def_statement; - } - - case (int)RuleConstants.RULE_VAR_DECL_PART_NORMAL_TKCOLON : - // ::= tkColon - - { - var_def_statement _var_def_statement=new var_def_statement((ident_list)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),null,definition_attribute.None,false); - parsertools.create_source_context(_var_def_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _var_def_statement; - } - - case (int)RuleConstants.RULE_VAR_INIT_VALUE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_INIT_VALUE_TYPED : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPED_CONST_OR_NEW : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPED_CONST_OR_NEW2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPED_CONST_OR_NEW3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_NAME_LIST : - // ::= - - { - ident_list _ident_list=new ident_list(); - parsertools.create_source_context(_ident_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _ident_list; - } - - case (int)RuleConstants.RULE_VAR_NAME_LIST_TKCOMMA : - // ::= tkComma - - { - ident_list _ident_list=(ident_list)LRParser.GetReductionSyntaxNode(0); - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_ident_list,_ident_list,LRParser.GetReductionSyntaxNode(2)); - return _ident_list; - } - - case (int)RuleConstants.RULE_VAR_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_DECLARED_VAR_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CONSTRUCTOR_DECL : - // ::= - - //procedure_definition create - { - procedure_definition _procedure_definition=new procedure_definition((procedure_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is proc_block) _procedure_definition.proc_body=(proc_block)LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_ABC_CONSTRUCTOR_DECL : - // ::= - - //procedure_definition create - { - procedure_definition _procedure_definition=new procedure_definition((procedure_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is proc_block) _procedure_definition.proc_body=(proc_block)LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_DESTRUCTOR_DECL : - // ::= - - //procedure_definition create - { - procedure_definition _procedure_definition=new procedure_definition((procedure_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is proc_block) _procedure_definition.proc_body=(proc_block)LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_ABC_DESTRUCTOR_DECL : - // ::= - - //procedure_definition create - { - procedure_definition _procedure_definition=new procedure_definition((procedure_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is proc_block) _procedure_definition.proc_body=(proc_block)LRParser.GetReductionSyntaxNode(1); - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition; - } - - case (int)RuleConstants.RULE_NOT_CONSTRUCTOR_BLOCK_DECL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_CONSTRUCTOR_BLOCK_DECL2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NOT_CONSTRUCTOR_BLOCK_DECL3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROC_DECL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROC_DECL_TKCLASS : - // ::= tkClass - ((LRParser.GetReductionSyntaxNode(1) as procedure_definition).proc_header as procedure_header).class_keyword=true;return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_PROC_DECL_NOCLASS : - // ::= -{ - procedure_definition _procedure_definition=new procedure_definition((procedure_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if (LRParser.GetReductionSyntaxNode(1) is proc_block) - { - add_lambda(LRParser.GetReductionSyntaxNode(1), _procedure_definition);//tasha 16.04.2010 - } - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition; - } - case (int)RuleConstants.RULE_ABC_PROC_DECL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_PROC_DECL_TKCLASS : - // ::= tkClass - ((LRParser.GetReductionSyntaxNode(1) as procedure_definition).proc_header as procedure_header).class_keyword=true;return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_ABC_PROC_DECL_NOCLASS : - // ::= -{procedure_definition _procedure_definition=new procedure_definition((procedure_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if (LRParser.GetReductionSyntaxNode(1) is proc_block) - { - add_lambda(LRParser.GetReductionSyntaxNode(1), _procedure_definition);//tasha 16.04.2010 - } - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition;} - case (int)RuleConstants.RULE_FUNC_DECL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_DECL_TKCLASS : - // ::= tkClass - ((LRParser.GetReductionSyntaxNode(1) as procedure_definition).proc_header as procedure_header).class_keyword=true;return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_FUNC_DECL_NOCLASS : - // ::= -{ - procedure_definition _procedure_definition=new procedure_definition((function_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if (LRParser.GetReductionSyntaxNode(1) is proc_block) - { - add_lambda(LRParser.GetReductionSyntaxNode(1), _procedure_definition);//tasha 16.04.2010 - } - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition;} - case (int)RuleConstants.RULE_ABC_FUNC_DECL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_FUNC_DECL_TKCLASS : - // ::= tkClass - ((LRParser.GetReductionSyntaxNode(1) as procedure_definition).proc_header as procedure_header).class_keyword=true;return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_ABC_FUNC_DECL_NOCLASS : - // ::= -{ - procedure_definition _procedure_definition=new procedure_definition((function_header)LRParser.GetReductionSyntaxNode(0),null); - object rt=LRParser.GetReductionSyntaxNode(0); - if(LRParser.GetReductionSyntaxNode(1)!=null) { - rt=LRParser.GetReductionSyntaxNode(1); - if (LRParser.GetReductionSyntaxNode(1) is proc_block) - { - add_lambda(LRParser.GetReductionSyntaxNode(1), _procedure_definition);//tasha 16.04.2010 - } - if(LRParser.GetReductionSyntaxNode(1) is procedure_attribute) { - procedure_header ph=_procedure_definition.proc_header; - if(ph.proc_attributes==null) { - ph.proc_attributes=new procedure_attributes_list(); - parsertools.assign_source_context(ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - ph.proc_attributes.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(ph.proc_attributes,ph.proc_attributes,LRParser.GetReductionSyntaxNode(1)); - } - } - parsertools.create_source_context(_procedure_definition,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_definition; - } - case (int)RuleConstants.RULE_PROC_HEADING_TKPROCEDURE : - // ::= tkProcedure - - { - procedure_header _procedure_header=new procedure_header(null,null,(method_name)LRParser.GetReductionSyntaxNode(1),false,false,null,null); - - object rt=LRParser.GetReductionSyntaxNode(1); - if(_procedure_header.name.meth_name is template_type_name) - { - _procedure_header.template_args=(_procedure_header.name.meth_name as template_type_name).template_args; - ident id = new ident(_procedure_header.name.meth_name.name); - parsertools.create_source_context(id,_procedure_header.name.meth_name,_procedure_header.name.meth_name); - _procedure_header.name.meth_name=id; - } - if (LRParser.GetReductionSyntaxNode(2)!=null) { - rt=LRParser.GetReductionSyntaxNode(2); - _procedure_header.parameters=(formal_parameters)LRParser.GetReductionSyntaxNode(2); - } - if(LRParser.GetReductionSyntaxNode(3)!=null) - (LRParser.GetReductionSyntaxNode(3) as SyntaxError).bad_node=_procedure_header; - if (LRParser.GetReductionSyntaxNode(4)!=null) { - rt=LRParser.GetReductionSyntaxNode(4); - if (((procedure_attributes_list)LRParser.GetReductionSyntaxNode(4)).proc_attributes.Count>0) - _procedure_header.proc_attributes=(procedure_attributes_list)LRParser.GetReductionSyntaxNode(4); - } - if (LRParser.GetReductionSyntaxNode(5)!=null) { - rt=LRParser.GetReductionSyntaxNode(5); - _procedure_header.where_defs = (where_definition_list)LRParser.GetReductionSyntaxNode(5); - } - parsertools.create_source_context(_procedure_header,LRParser.GetReductionSyntaxNode(0),rt); - - return _procedure_header; - } - - case (int)RuleConstants.RULE_PROC_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_NAME : - // ::= - - { - method_name _method_name=new method_name(null,null,(ident)LRParser.GetReductionSyntaxNode(0),null); - parsertools.create_source_context(_method_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _method_name; - } - - case (int)RuleConstants.RULE_FUNC_NAME_TKPOINT : - // ::= tkPoint - - { - method_name _method_name=new method_name(null,(ident)LRParser.GetReductionSyntaxNode(0),(ident)LRParser.GetReductionSyntaxNode(2),null); - parsertools.create_source_context(_method_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _method_name; - } - - case (int)RuleConstants.RULE_FUNC_NAME_TKPOINT_TKPOINT : - // ::= tkPoint tkPoint - - { - method_name _method_name=new method_name(null,(ident)LRParser.GetReductionSyntaxNode(0),(ident)LRParser.GetReductionSyntaxNode(4),(ident)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_method_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - - return _method_name; - } - - case (int)RuleConstants.RULE_FUNC_CLASS_NAME_IDENT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_METH_NAME_IDENT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_METH_NAME_IDENT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_NAME_WITH_TEMPLATE_ARGS : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_NAME_WITH_TEMPLATE_ARGS2 : - // ::= - - { - template_type_name _template_type_name=new template_type_name((ident_list)LRParser.GetReductionSyntaxNode(1)); - - _template_type_name.name=((ident)LRParser.GetReductionSyntaxNode(0)).name; - parsertools.create_source_context(_template_type_name,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _template_type_name; - } - - case (int)RuleConstants.RULE_FUNC_NAME_IDENT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_NAME_IDENT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_HEADING_TKFUNCTION_TKCOLON : - // ::= tkFunction tkColon - - { - function_header _function_header=new function_header(); - - object rt=LRParser.GetReductionSyntaxNode(1); - _function_header.name=(method_name)LRParser.GetReductionSyntaxNode(1); - if(_function_header.name.meth_name is template_type_name) - { - _function_header.template_args=(_function_header.name.meth_name as template_type_name).template_args; - ident id = new ident(_function_header.name.meth_name.name); - parsertools.create_source_context(id,_function_header.name.meth_name,_function_header.name.meth_name); - _function_header.name.meth_name=id; - } - //_function_header.template_args=(ident_list)LRParser.GetReductionSyntaxNode(2); - if (LRParser.GetReductionSyntaxNode(2)!=null) { - rt=LRParser.GetReductionSyntaxNode(2); - _function_header.parameters=(formal_parameters)LRParser.GetReductionSyntaxNode(2); - } - if (LRParser.GetReductionSyntaxNode(4)!=null) { - rt=LRParser.GetReductionSyntaxNode(4); - _function_header.return_type=(type_definition)LRParser.GetReductionSyntaxNode(4); - } - if (LRParser.GetReductionSyntaxNode(5)!=null) { - rt=LRParser.GetReductionSyntaxNode(5); - if (((procedure_attributes_list)LRParser.GetReductionSyntaxNode(5)).proc_attributes.Count>0) - _function_header.proc_attributes=(procedure_attributes_list)LRParser.GetReductionSyntaxNode(5); - } - if (LRParser.GetReductionSyntaxNode(6)!=null) { - rt=LRParser.GetReductionSyntaxNode(6); - _function_header.where_defs = (where_definition_list)LRParser.GetReductionSyntaxNode(6); - } - _function_header.of_object=false; - _function_header.class_keyword=false; - parsertools.create_source_context(_function_header,LRParser.GetReductionSyntaxNode(0),rt); - - return _function_header; - } - - case (int)RuleConstants.RULE_FUNC_HEADING_TKFUNCTION : - // ::= tkFunction - - { - function_header _function_header=new function_header(); - - object rt=LRParser.GetReductionSyntaxNode(1); - _function_header.name=(method_name)LRParser.GetReductionSyntaxNode(1); - if (LRParser.GetReductionSyntaxNode(2)!=null) { - rt=LRParser.GetReductionSyntaxNode(2); - if (((procedure_attributes_list)LRParser.GetReductionSyntaxNode(2)).proc_attributes.Count>0) - _function_header.proc_attributes=(procedure_attributes_list)LRParser.GetReductionSyntaxNode(2); - } - _function_header.of_object=false; - _function_header.class_keyword=false; - parsertools.create_source_context(_function_header,LRParser.GetReductionSyntaxNode(0),rt); - - return _function_header; - } - - case (int)RuleConstants.RULE_PROC_BLOCK : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_BLOCK : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROC_BLOCK_DECL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROC_BLOCK_DECL2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROC_BLOCK_DECL3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROC_BLOCK_DECL_TKFORWARD_TKSEMICOLON : - // ::= tkForward tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_PROC_BLOCK : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_PROC_BLOCK2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXTERNAL_DIRECTR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXTERNAL_DIRECTR_TKSEMICOLON : - // ::= tkSemiColon -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXTERNAL_DIRECTR_TKEXTERNAL_TKSEMICOLON : - // ::= tkExternal tkSemiColon - - { - external_directive _external_directive=new external_directive(null,null); - - parsertools.create_source_context(_external_directive,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _external_directive; - } - - case (int)RuleConstants.RULE_EXTERNAL_DIRECTR_IDENT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXTERNAL_DIRECTR_IDENT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ABC_EXTERNAL_DIRECTR_TKEXTERNAL_TKNAME : - // ::= tkExternal tkName - - { - external_directive _external_directive=new external_directive((expression)LRParser.GetReductionSyntaxNode(1),(expression)LRParser.GetReductionSyntaxNode(3)); - - parsertools.create_source_context(_external_directive,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _external_directive; - } - - case (int)RuleConstants.RULE_ABC_EXTERNAL_DIRECTR_TKEXTERNAL : - // ::= tkExternal - - { - external_directive _external_directive=new external_directive((expression)LRParser.GetReductionSyntaxNode(1),null); - - parsertools.create_source_context(_external_directive,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _external_directive; - } - - case (int)RuleConstants.RULE_ASM_BLOCK_TKASMBODY_TKSEMICOLON : - // ::= tkAsmBody tkSemiColon - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkAsmBody tkSemiColon"));}return null; - case (int)RuleConstants.RULE_BLOCK_TKSEMICOLON : - // ::= tkSemiColon - - { - block _block=new block((declarations)LRParser.GetReductionSyntaxNode(0),(statement_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_block,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),LRParser.GetReductionSyntaxNode(2)); - return _block; - } - - case (int)RuleConstants.RULE_ABC_BLOCK_TKSEMICOLON : - // ::= tkSemiColon - - { - block _block=new block((declarations)LRParser.GetReductionSyntaxNode(0),(statement_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_block,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),LRParser.GetReductionSyntaxNode(2)); - return _block; - } - - case (int)RuleConstants.RULE_FP_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_FP_LIST_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - if(LRParser.GetReductionSyntaxNode(1)!=null) parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_FP_SECT_LIST : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_FP_SECT_LIST2 : - // ::= - - { - formal_parameters _formal_parameters=new formal_parameters(); - - _formal_parameters.params_list.Add((typed_parameters)LRParser.GetReductionSyntaxNode(0)); - - return _formal_parameters; - } - - case (int)RuleConstants.RULE_FP_SECT_LIST_TKSEMICOLON : - // ::= tkSemiColon - - { - formal_parameters _formal_parameters=(formal_parameters)LRParser.GetReductionSyntaxNode(0); - _formal_parameters.params_list.Add((typed_parameters)LRParser.GetReductionSyntaxNode(2)); - - return _formal_parameters; - } - - case (int)RuleConstants.RULE_FP_SECT : - // ::= - - { - declaration _declaration; - _declaration=LRParser.GetReductionSyntaxNode(1) as declaration; - _declaration.attributes = LRParser.GetReductionSyntaxNode(0) as attribute_list; - - return _declaration; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKCOLON : - // ::= tkColon - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),parametr_kind.none,null); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKVAR_TKCOLON : - // ::= tkVar tkColon - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),parametr_kind.var_parametr,null); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKOUT_TKCOLON : - // ::= tkOut tkColon - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),parametr_kind.out_parametr,null); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKCONST_TKCOLON : - // ::= tkConst tkColon - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),parametr_kind.const_parametr,null); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKPARAMS_TKCOLON : - // ::= tkParams tkColon - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),parametr_kind.params_parametr,null); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKCOLON_TKASSIGN : - // ::= tkColon tkAssign - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),parametr_kind.none,(expression)LRParser.GetReductionSyntaxNode(4)); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKVAR_TKCOLON_TKASSIGN : - // ::= tkVar tkColon tkAssign - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),parametr_kind.var_parametr,(expression)LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(5)); - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKOUT_TKCOLON_TKASSIGN : - // ::= tkOut tkColon tkAssign - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),parametr_kind.out_parametr,(expression)LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(5)); - return _typed_parameters; - } - - case (int)RuleConstants.RULE_SIMPLE_FP_SECT_TKCONST_TKCOLON_TKASSIGN : - // ::= tkConst tkColon tkAssign - - { - typed_parameters _typed_parameters=new typed_parameters((ident_list)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(3),parametr_kind.const_parametr,(expression)LRParser.GetReductionSyntaxNode(5)); - parsertools.create_source_context(_typed_parameters,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(5)); - return _typed_parameters; - } - - case (int)RuleConstants.RULE_PARAM_NAME_LIST : - // ::= - - //TemplateList for ident_list (create) - { - ident_list _ident_list=new ident_list(); - _ident_list.source_context=((ident)LRParser.GetReductionSyntaxNode(0)).source_context; - _ident_list.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - return _ident_list; - } - - case (int)RuleConstants.RULE_PARAM_NAME_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for ident_list (add) - { - ident_list _ident_list=(ident_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_ident_list,_ident_list,LRParser.GetReductionSyntaxNode(2)); - _ident_list.idents.Add(LRParser.GetReductionSyntaxNode(2) as ident); - return _ident_list; - } - - case (int)RuleConstants.RULE_PARAM_NAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FPTYPE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FPTYPE_NEW : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FPTYPE_NEW_TKARRAY_TKOF_TKCONST : - // ::= tkArray tkOf tkConst - - { - array_of_const_type_definition _array_of_const_type_definition=new array_of_const_type_definition(); - parsertools.create_source_context(_array_of_const_type_definition,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _array_of_const_type_definition; - } - - case (int)RuleConstants.RULE_STMT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_STMT_TKCOLON : - // ::= tkColon - - { - labeled_statement _labeled_statement=new labeled_statement((ident)LRParser.GetReductionSyntaxNode(0),(statement)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_labeled_statement,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - return _labeled_statement; - } - - case (int)RuleConstants.RULE_UNLABELLED_STMT : - // ::= - - { - empty_statement _empty_statement=new empty_statement(); - - return _empty_statement; - } - - case (int)RuleConstants.RULE_UNLABELLED_STMT2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT6 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT7 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT8 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT9 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT10 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT11 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT12 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT13 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT14 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT15 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT16 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT17 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT18 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_UNLABELLED_STMT19 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_STMT_TKVAR : - // ::= tkVar - - { - var_statement _var_statement=new var_statement(LRParser.GetReductionSyntaxNode(1) as var_def_statement); - - ///////////////tasha 28.04.2010 - pascalABC_var_statements.Add((var_def_statement)LRParser.GetReductionSyntaxNode(1)); - /////////////////////////////// - parsertools.create_source_context(_var_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _var_statement; - } - - case (int)RuleConstants.RULE_ASSIGNMENT : - // ::= -{ - ///////////////tasha 28.04.2010 - for_assignment(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2)); - /////////////////////////////// - - assign _assign=new assign(LRParser.GetReductionSyntaxNode(0) as addressed_value,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_assign,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _assign; - } - case (int)RuleConstants.RULE_PROC_CALL : - // ::= - - { - procedure_call _procedure_call=new procedure_call(LRParser.GetReductionSyntaxNode(0) as addressed_value); - parsertools.create_source_context(_procedure_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _procedure_call; - } - - case (int)RuleConstants.RULE_GOTO_STMT_TKGOTO : - // ::= tkGoto - - { - goto_statement _goto_statement=new goto_statement((ident)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_goto_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_goto_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _goto_statement; - } - - case (int)RuleConstants.RULE_COMPOUND_STMT_TKBEGIN_TKEND : - // ::= tkBegin tkEnd - - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).right_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(2); - return LRParser.GetReductionSyntaxNode(1); - - case (int)RuleConstants.RULE_STMT_LIST : - // ::= - - { - statement_list _statement_list=new statement_list(); - - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(0)); - parsertools.assign_source_context(_statement_list,LRParser.GetReductionSyntaxNode(0)); - - return _statement_list; - } - - case (int)RuleConstants.RULE_STMT_LIST_TKSEMICOLON : - // ::= tkSemiColon - - { - statement_list _statement_list; - _statement_list=(statement_list)LRParser.GetReductionSyntaxNode(0); - if(_statement_list!=LRParser.GetReductionSyntaxNode(2)){ - _statement_list.subnodes.Add((statement)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_statement_list,_statement_list,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - } - - return _statement_list; - } - - case (int)RuleConstants.RULE_IF_STMT_TKIF : - // ::= tkIf -((if_node)LRParser.GetReductionSyntaxNode(2)).condition=(expression)LRParser.GetReductionSyntaxNode(1); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return LRParser.GetReductionSyntaxNode(2); - - case (int)RuleConstants.RULE_IF_THEN_ELSE_BRANCH_TKTHEN : - // ::= tkThen - - { - if_node _if_node=new if_node(null,(statement)LRParser.GetReductionSyntaxNode(1),null); - - parsertools.create_source_context(_if_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - - return _if_node; - } - - case (int)RuleConstants.RULE_IF_THEN_ELSE_BRANCH_TKTHEN_TKELSE : - // ::= tkThen tkElse - - { - if_node _if_node=new if_node(null,(statement)LRParser.GetReductionSyntaxNode(1),(statement)LRParser.GetReductionSyntaxNode(3)); - - parsertools.create_source_context(_if_node,LRParser.GetReductionSyntaxNode(2),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - - return _if_node; - } - - case (int)RuleConstants.RULE_THEN_BRANCH : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ELSE_BRANCH : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_CASE_STMT_TKCASE_TKOF_TKEND : - // ::= tkCase tkOf tkEnd - - { - case_node _case_node=new case_node((expression)LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(3) as case_variants,LRParser.GetReductionSyntaxNode(4) as statement); - - parsertools.create_source_context(_case_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(5)); - return _case_node; - } - - case (int)RuleConstants.RULE_CASE_LIST : - // ::= - - { - case_variants _case_variants=new case_variants(); - - if (LRParser.GetReductionSyntaxNode(0) is case_variant) - { - _case_variants.variants.Add((case_variant)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_case_variants,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - } - return _case_variants; - } - - case (int)RuleConstants.RULE_CASE_LIST_TKSEMICOLON : - // ::= tkSemiColon - - { - case_variants _case_variants=(case_variants)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_case_variants,parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - if (LRParser.GetReductionSyntaxNode(2) is case_variant) _case_variants.variants.Add((case_variant)LRParser.GetReductionSyntaxNode(2)); - return _case_variants; - } - - case (int)RuleConstants.RULE_CASE_ITEM : - // ::= - - { - empty_statement _empty_statement=new empty_statement(); - - return _empty_statement; - } - - case (int)RuleConstants.RULE_CASE_ITEM_TKCOLON : - // ::= tkColon - - { - case_variant _case_variant=new case_variant((expression_list)LRParser.GetReductionSyntaxNode(0),(statement)LRParser.GetReductionSyntaxNode(2)); - - parsertools.create_source_context(_case_variant,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - return _case_variant; - } - - case (int)RuleConstants.RULE_CASE_LABEL_LIST : - // ::= - - //TemplateList for expression_list (create) - { - expression_list _expression_list=new expression_list(); - _expression_list.source_context=((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - return _expression_list; - } - - case (int)RuleConstants.RULE_CASE_LABEL_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for expression_list (add) - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return _expression_list; - } - - case (int)RuleConstants.RULE_CASE_LABEL : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ELSE_CASE : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ELSE_CASE_TKELSE : - // ::= tkElse -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_REPEAT_STMT_TKREPEAT_TKUNTIL : - // ::= tkRepeat tkUntil - - { - repeat_node _repeat_node=new repeat_node((statement)LRParser.GetReductionSyntaxNode(1),(expression)LRParser.GetReductionSyntaxNode(3)); - - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).right_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(2); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_repeat_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - - return _repeat_node; - } - - case (int)RuleConstants.RULE_WHILE_STMT_TKWHILE : - // ::= tkWhile - - { - while_node _while_node=new while_node((expression)LRParser.GetReductionSyntaxNode(1),(statement)LRParser.GetReductionSyntaxNode(3),WhileCycleType.While); - - if (LRParser.GetReductionSyntaxNode(2) == null) - { - file_position fp = (LRParser.GetReductionSyntaxNode(1) as syntax_tree_node).source_context.end_position; - syntax_tree_node err_stn = (syntax_tree_node)LRParser.GetReductionSyntaxNode(3); - if (err_stn == null) - err_stn = (syntax_tree_node)LRParser.GetReductionSyntaxNode(1); - errors.Add(new Errors.PABCNETUnexpectedToken(current_file_name, StringResources.Get("TKDO"),new SourceContext(fp.line_num, fp.column_num+1, fp.line_num, fp.column_num+1, 0, 0),err_stn)); - parsertools.create_source_context(_while_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(3))); - } - else - parsertools.create_source_context(_while_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - - return _while_node; - } - - case (int)RuleConstants.RULE_OPT_TK_DO_TKDO : - // ::= tkDo -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_TK_DO : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_LOCK_STMT_TKLOCK_TKDO : - // ::= tkLock tkDo - - { - lock_stmt _lock_stmt=new lock_stmt((expression)LRParser.GetReductionSyntaxNode(1),(statement)LRParser.GetReductionSyntaxNode(3)); - - parsertools.create_source_context(_lock_stmt,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - - return _lock_stmt; - } - - case (int)RuleConstants.RULE_FOREACH_STMT_TKFOREACH_TKIN_TKDO : - // ::= tkForeach tkIn tkDo - - { - foreach_stmt _foreach_stmt=new foreach_stmt((ident)LRParser.GetReductionSyntaxNode(1),(type_definition)LRParser.GetReductionSyntaxNode(2),(expression)LRParser.GetReductionSyntaxNode(4),(statement)LRParser.GetReductionSyntaxNode(6)); - - parsertools.create_source_context(_foreach_stmt,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(6),LRParser.GetReductionSyntaxNode(5))); - - return _foreach_stmt; - } - - case (int)RuleConstants.RULE_FOREACH_STMT_TKFOREACH_TKVAR_TKCOLON_TKIN_TKDO : - // ::= tkForeach tkVar tkColon tkIn tkDo - - { - foreach_stmt _foreach_stmt=new foreach_stmt((ident)LRParser.GetReductionSyntaxNode(2),(type_definition)LRParser.GetReductionSyntaxNode(4),(expression)LRParser.GetReductionSyntaxNode(6),(statement)LRParser.GetReductionSyntaxNode(8)); - - parsertools.create_source_context(_foreach_stmt,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(8),LRParser.GetReductionSyntaxNode(7))); - - return _foreach_stmt; - } - - case (int)RuleConstants.RULE_FOREACH_STMT_IDENT_DYPE_OPT_TKCOLON : - // ::= tkColon - return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_FOREACH_STMT_IDENT_DYPE_OPT : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_FOR_STMT_TKFOR : - // ::= tkFor - - { - for_node _for_node=new for_node((ident)LRParser.GetReductionSyntaxNode(2),(expression)LRParser.GetReductionSyntaxNode(4),(expression)LRParser.GetReductionSyntaxNode(6),(statement)LRParser.GetReductionSyntaxNode(8),(for_cycle_type)LRParser.GetReductionSyntaxNode(5),null,LRParser.GetReductionSyntaxNode(3) as type_definition, LRParser.GetReductionSyntaxNode(1)!=null); - - if (LRParser.GetReductionSyntaxNode(7) == null) - { - file_position fp = (LRParser.GetReductionSyntaxNode(6) as syntax_tree_node).source_context.end_position; - syntax_tree_node err_stn = (syntax_tree_node)LRParser.GetReductionSyntaxNode(8); - if (err_stn == null) - err_stn = (syntax_tree_node)LRParser.GetReductionSyntaxNode(6); - errors.Add(new Errors.PABCNETUnexpectedToken(current_file_name, StringResources.Get("TKDO"),new SourceContext(fp.line_num, fp.column_num+1, fp.line_num, fp.column_num+1, 0, 0),err_stn)); - parsertools.create_source_context(_for_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(8),LRParser.GetReductionSyntaxNode(6))); - } - else - parsertools.create_source_context(_for_node,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(8),LRParser.GetReductionSyntaxNode(7))); - - return _for_node; - } - - case (int)RuleConstants.RULE_OPT_VAR_TKVAR : - // ::= tkVar -return true; - case (int)RuleConstants.RULE_OPT_VAR : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_FOR_STMT_DECL_OR_ASSIGN_TKASSIGN : - // ::= tkAssign -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FOR_STMT_DECL_OR_ASSIGN_TKCOLON_TKASSIGN : - // ::= tkColon tkAssign -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_FOR_CYCLE_TYPE_TKTO : - // ::= tkTo - return for_cycle_type.to; - case (int)RuleConstants.RULE_FOR_CYCLE_TYPE_TKDOWNTO : - // ::= tkDownto - return for_cycle_type.downto; - case (int)RuleConstants.RULE_WITH_STMT_TKWITH_TKDO : - // ::= tkWith tkDo - - { - with_statement _with_statement=new with_statement((statement)LRParser.GetReductionSyntaxNode(3),(expression_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_with_statement,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - return _with_statement; - } - - case (int)RuleConstants.RULE_INHERITED_MESSAGE_TKINHERITED : - // ::= tkInherited - - { - inherited_message _inherited_message=new inherited_message(); - parsertools.assign_source_context(_inherited_message,LRParser.GetReductionSyntaxNode(0)); - return _inherited_message; - } - - case (int)RuleConstants.RULE_TRY_STMT_TKTRY : - // ::= tkTry - - { - try_stmt _try_stmt=new try_stmt(((statement_list)LRParser.GetReductionSyntaxNode(1)),(try_handler)LRParser.GetReductionSyntaxNode(2)); - - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_try_stmt,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _try_stmt; - } - - case (int)RuleConstants.RULE_TRY_HANDLER_TKFINALLY_TKEND : - // ::= tkFinally tkEnd - - { - try_handler_finally _try_handler_finally=new try_handler_finally((statement_list)LRParser.GetReductionSyntaxNode(1)); - - ((statement_list)LRParser.GetReductionSyntaxNode(1)).left_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(0); - ((statement_list)LRParser.GetReductionSyntaxNode(1)).right_logical_bracket=(syntax_tree_node)LRParser.GetReductionSyntaxNode(2); - parsertools.create_source_context(_try_handler_finally,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _try_handler_finally; - } - - case (int)RuleConstants.RULE_TRY_HANDLER_TKEXCEPT_TKEND : - // ::= tkExcept tkEnd - - { - try_handler_except _try_handler_except=new try_handler_except((exception_block)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_try_handler_except,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _try_handler_except; - } - - case (int)RuleConstants.RULE_EXCEPTION_BLOCK : - // ::= - - { - exception_block _exception_block=new exception_block(null,(exception_handler_list)LRParser.GetReductionSyntaxNode(0),(statement_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_exception_block,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0))); - return _exception_block; - } - - case (int)RuleConstants.RULE_EXCEPTION_BLOCK_TKSEMICOLON : - // ::= tkSemiColon - - { - exception_block _exception_block=new exception_block(null,(exception_handler_list)LRParser.GetReductionSyntaxNode(0),(statement_list)LRParser.GetReductionSyntaxNode(2)); - - parsertools.create_source_context(_exception_block,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - return _exception_block; - } - - case (int)RuleConstants.RULE_EXCEPTION_BLOCK2 : - // ::= - - { - exception_block _exception_block=new exception_block((statement_list)LRParser.GetReductionSyntaxNode(0),null,null); - - if (((syntax_tree_node)LRParser.GetReductionSyntaxNode(0)).source_context!=null) parsertools.assign_source_context(_exception_block,LRParser.GetReductionSyntaxNode(0)); - return _exception_block; - } - - case (int)RuleConstants.RULE_EXCEPTION_HANDLER_LIST : - // ::= - - //TemplateList for exception_handler_list (create) - { - exception_handler_list _exception_handler_list=new exception_handler_list(); - _exception_handler_list.source_context=((exception_handler)LRParser.GetReductionSyntaxNode(0)).source_context; - _exception_handler_list.handlers.Add((exception_handler)LRParser.GetReductionSyntaxNode(0)); - return _exception_handler_list; - } - - case (int)RuleConstants.RULE_EXCEPTION_HANDLER_LIST_TKSEMICOLON : - // ::= tkSemiColon - - //TemplateList for exception_handler_list (add) - { - exception_handler_list _exception_handler_list=(exception_handler_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_exception_handler_list,_exception_handler_list,LRParser.GetReductionSyntaxNode(2)); - _exception_handler_list.handlers.Add(LRParser.GetReductionSyntaxNode(2) as exception_handler); - return _exception_handler_list; - } - - case (int)RuleConstants.RULE_EXCEPTION_BLOCK_ELSE_BRANCH : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_EXCEPTION_BLOCK_ELSE_BRANCH_TKELSE : - // ::= tkElse -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_EXCEPTION_HANDLER_TKON_TKDO : - // ::= tkOn tkDo - - { - exception_handler _exception_handler=new exception_handler(((exception_ident)LRParser.GetReductionSyntaxNode(1)).variable,((exception_ident)LRParser.GetReductionSyntaxNode(1)).type_name,(statement)LRParser.GetReductionSyntaxNode(3)); - - parsertools.create_source_context(_exception_handler,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(3),LRParser.GetReductionSyntaxNode(2))); - return _exception_handler; - } - - case (int)RuleConstants.RULE_EXCEPTION_IDENTIFIER : - // ::= - - { - exception_ident _exception_ident=new exception_ident(null,(named_type_reference)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_exception_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _exception_ident; - } - - case (int)RuleConstants.RULE_EXCEPTION_IDENTIFIER_TKCOLON : - // ::= tkColon - - { - exception_ident _exception_ident=new exception_ident((ident)LRParser.GetReductionSyntaxNode(0),(named_type_reference)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_exception_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _exception_ident; - } - - case (int)RuleConstants.RULE_EXCEPTION_CLASS_TYPE_IDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXCEPTION_VARIABLE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RAISE_STMT_TKRAISE : - // ::= tkRaise - - { - raise_stmt _raise_stmt=new raise_stmt(); - parsertools.assign_source_context(_raise_stmt,LRParser.GetReductionSyntaxNode(0)); - return _raise_stmt; - } - - case (int)RuleConstants.RULE_RAISE_STMT_TKRAISE2 : - // ::= tkRaise - - { - raise_stmt _raise_stmt=new raise_stmt((expression)LRParser.GetReductionSyntaxNode(1),null); - parsertools.create_source_context(_raise_stmt,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _raise_stmt; - } - - case (int)RuleConstants.RULE_RAISE_STMT_TKRAISE_TKAT : - // ::= tkRaise tkAt - - { - raise_stmt _raise_stmt=new raise_stmt((expression)LRParser.GetReductionSyntaxNode(1),(expression)LRParser.GetReductionSyntaxNode(3)); - parsertools.create_source_context(_raise_stmt,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _raise_stmt; - } - - case (int)RuleConstants.RULE_ASM_STMT_TKASMBODY : - // ::= tkAsmBody -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPR_LIST : - // ::= - - //TemplateList for expression_list (create) - { - expression_list _expression_list=new expression_list(); - _expression_list.source_context=((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - return _expression_list; - } - - case (int)RuleConstants.RULE_EXPR_LIST_TKCOMMA : - // ::= tkComma - - //TemplateList for expression_list (add) - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return _expression_list; - } - - case (int)RuleConstants.RULE_ATTR_EXPR_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPR_AS_STMT : - // ::= - - { - expression_as_statement _expression_as_statement=new expression_as_statement((expression)LRParser.GetReductionSyntaxNode(0)); - parsertools.create_source_context(_expression_as_statement,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _expression_as_statement; - } - - case (int)RuleConstants.RULE_ALLOWABLE_EXPR_AS_STMT : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPR3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPR_L1 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EXPR_L12 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIZEOF_EXPR_TKSIZEOF_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkSizeOf tkRoundOpen tkRoundClose - - { - sizeof_operator _sizeof_operator=new sizeof_operator((named_type_reference)LRParser.GetReductionSyntaxNode(2),null); - parsertools.create_source_context(_sizeof_operator,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _sizeof_operator; - } - - case (int)RuleConstants.RULE_TYPEOF_EXPR_TKTYPEOF_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkTypeOf tkRoundOpen tkRoundClose - - { - typeof_operator _typeof_operator=new typeof_operator((named_type_reference)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_typeof_operator,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _typeof_operator; - } - - case (int)RuleConstants.RULE_QUESTION_EXPR_TKQUESTION_TKCOLON : - // ::= tkQuestion tkColon - - { - question_colon_expression _question_colon_expression=new question_colon_expression((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),(expression)LRParser.GetReductionSyntaxNode(4)); - parsertools.create_source_context(_question_colon_expression,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - return _question_colon_expression; - } - - case (int)RuleConstants.RULE_OPT_AMPERSEND : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_AMPERSEND_TKAMPERSEND : - // ::= tkAmpersend -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE2 : - // ::= - - { - template_type_reference _template_type_reference=new template_type_reference((named_type_reference)LRParser.GetReductionSyntaxNode(0),(template_param_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_template_type_reference,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _template_type_reference; - } - - case (int)RuleConstants.RULE_SIMPLE_OR_TEMPLATE_TYPE_REFERENCE_TKAMPERSEND : - // ::= tkAmpersend - - { - template_type_reference _template_type_reference=new template_type_reference((named_type_reference)LRParser.GetReductionSyntaxNode(0),(template_param_list)LRParser.GetReductionSyntaxNode(2)); - - parsertools.create_source_context(_template_type_reference,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _template_type_reference; - } - - case (int)RuleConstants.RULE_OPT_ARRAY_INITIALIZER_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - array_const _array_const=new array_const((expression_list)LRParser.GetReductionSyntaxNode(1)); - - parsertools.create_source_context(_array_const,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _array_const; - } - - case (int)RuleConstants.RULE_OPT_ARRAY_INITIALIZER : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_NEW_EXPR : - // ::= - - { - named_type_reference ntr=(named_type_reference)LRParser.GetReductionSyntaxNode(1); - new_expr newexpr=new new_expr(ntr,LRParser.GetReductionSyntaxNode(2) as expression_list,false,null); - parsertools.create_source_context(newexpr,LRParser.GetReductionSyntaxNode(0),parsertools.sc_not_null(LRParser.GetReductionSyntaxNode(2),LRParser.GetReductionSyntaxNode(1))); - if ((LRParser.GetReductionSyntaxNode(0) as ident).name.ToLower()!="new") - errors.Add(new Errors.PABCNETUnexpectedToken(current_file_name,";",((syntax_tree_node)LRParser.GetReductionSyntaxNode(0)).source_context,newexpr)); - return newexpr; - } - - case (int)RuleConstants.RULE_NEW_EXPR_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose - - { - new_expr newexpr=new new_expr((type_definition)LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(3) as expression_list,true,LRParser.GetReductionSyntaxNode(5) as array_const); - if (LRParser.GetReductionSyntaxNode(5) != null) - parsertools.create_source_context(newexpr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(5)); - else - parsertools.create_source_context(newexpr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - if ((LRParser.GetReductionSyntaxNode(0) as ident).name.ToLower()!="new") - errors.Add(new Errors.PABCNETUnexpectedToken(current_file_name,";",((syntax_tree_node)LRParser.GetReductionSyntaxNode(0)).source_context,newexpr)); - return newexpr; - } - - case (int)RuleConstants.RULE_ARRAY_NAME_FOR_NEW_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ARRAY_NAME_FOR_NEW_EXPR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_TEMPLATE_TYPE_PARAMS : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_TEMPLATE_TYPE_PARAMS2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_EXPR_LIST_WITH_BRACKET : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_EXPR_LIST_WITH_BRACKET_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose -return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_RELOP_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_EXPR2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_FORMAT_EXPR_TKCOLON : - // ::= tkColon - - { - format_expr _format_expr=new format_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),null); - parsertools.create_source_context(_format_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _format_expr; - } - - case (int)RuleConstants.RULE_FORMAT_EXPR_TKCOLON_TKCOLON : - // ::= tkColon tkColon - - { - format_expr _format_expr=new format_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2),(expression)LRParser.GetReductionSyntaxNode(4)); - parsertools.create_source_context(_format_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(4)); - - return _format_expr; - } - - case (int)RuleConstants.RULE_RELOP_TKEQUAL : - // ::= tkEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKNOTEQUAL : - // ::= tkNotEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKLOWER : - // ::= tkLower -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKGREATER : - // ::= tkGreater -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKLOWEREQUAL : - // ::= tkLowerEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKGREATEREQUAL : - // ::= tkGreaterEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RELOP_TKIN : - // ::= tkIn -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_SIMPLE_EXPR2 : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_ADDOP_TKPLUS : - // ::= tkPlus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKMINUS : - // ::= tkMinus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKOR : - // ::= tkOr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKXOR : - // ::= tkXor -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ADDOP_TKCSHARPSTYLEOR : - // ::= tkCSharpStyleOr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TYPECAST_OP_TKAS : - // ::= tkAs - return op_typecast.as_op; - case (int)RuleConstants.RULE_TYPECAST_OP_TKIS : - // ::= tkIs - return op_typecast.is_op; - case (int)RuleConstants.RULE_AS_IS_EXPR : - // ::= - - { - typecast_node _typecast_node=new typecast_node((addressed_value)LRParser.GetReductionSyntaxNode(0),(type_definition)LRParser.GetReductionSyntaxNode(2),(op_typecast)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_typecast_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - if (!(LRParser.GetReductionSyntaxNode(0) is addressed_value)) - errors.Add(new Errors.bad_operand_type(current_file_name,((syntax_tree_node)LRParser.GetReductionSyntaxNode(0)).source_context,_typecast_node)); - - return _typecast_node; - } - - case (int)RuleConstants.RULE_TERM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TERM2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_TERM3 : - // ::= - - { - bin_expr _bin_expr=new bin_expr(LRParser.GetReductionSyntaxNode(0) as expression,LRParser.GetReductionSyntaxNode(2) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - parsertools.create_source_context(_bin_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _bin_expr; - } - - case (int)RuleConstants.RULE_TERM4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKSTAR : - // ::= tkStar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKSLASH : - // ::= tkSlash -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKDIV : - // ::= tkDiv -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKMOD : - // ::= tkMod -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKSHL : - // ::= tkShl -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKSHR : - // ::= tkShr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_MULOP_TKAND : - // ::= tkAnd -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_DEFAULT_EXPR_TKDEFAULT_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkDefault tkRoundOpen tkRoundClose - - { - default_operator _default_operator=new default_operator(LRParser.GetReductionSyntaxNode(2) as named_type_reference); - parsertools.create_source_context(_default_operator,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(3)); - return _default_operator; - } - - case (int)RuleConstants.RULE_FACTOR_TKNIL : - // ::= tkNil - - { - nil_const _nil_const=new nil_const(); - parsertools.create_source_context(_nil_const,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _nil_const; - } - - case (int)RuleConstants.RULE_FACTOR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FACTOR2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FACTOR_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose - - { - pascal_set_constant _pascal_set_constant=new pascal_set_constant(LRParser.GetReductionSyntaxNode(1) as expression_list); - parsertools.create_source_context(_pascal_set_constant,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _pascal_set_constant; - } - - case (int)RuleConstants.RULE_FACTOR_TKNOT : - // ::= tkNot - - { - un_expr _un_expr=new un_expr(LRParser.GetReductionSyntaxNode(1) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_FACTOR3 : - // ::= - - { - un_expr _un_expr=new un_expr(LRParser.GetReductionSyntaxNode(1) as expression,((op_type_node)LRParser.GetReductionSyntaxNode(0)).type); - parsertools.create_source_context(_un_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - return _un_expr; - } - - case (int)RuleConstants.RULE_FACTOR_TKDEREF : - // ::= tkDeref - - { - roof_dereference _roof_dereference=new roof_dereference(); - - _roof_dereference.dereferencing_value=(addressed_value)LRParser.GetReductionSyntaxNode(1); - parsertools.create_source_context(_roof_dereference,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _roof_dereference; - } - - case (int)RuleConstants.RULE_FACTOR4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FACTOR_TKROUNDOPEN_TKROUNDCLOSE_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose tkRoundOpen tkRoundClose -{ function_lambda_definition fld = find_pascalABC_lambda_name(((ident)LRParser.GetReductionSyntaxNode(1)).name); - expression_list _expression_list = (expression_list)LRParser.GetReductionSyntaxNode(4); - function_lambda_definition _lambda_definition = fld; - function_lambda_call _lambda_call = new function_lambda_call(_lambda_definition, _expression_list); - _lambda_call.source_context = ((ident)LRParser.GetReductionSyntaxNode(1)).source_context; - return _lambda_call;} - case (int)RuleConstants.RULE_LITERAL_OR_NUMBER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LITERAL_OR_NUMBER2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_REFERENCE : - // ::= -((get_address)LRParser.GetReductionSyntaxNode(0)).address_of=(addressed_value)LRParser.GetReductionSyntaxNode(1);parsertools.create_source_context(NodesStack.Peek(),NodesStack.Peek(),LRParser.GetReductionSyntaxNode(1));return NodesStack.Pop(); - case (int)RuleConstants.RULE_VAR_REFERENCE2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_ADDRESS_TKADDRESSOF : - // ::= tkAddressOf - - { - get_address _get_address=new get_address(); - parsertools.assign_source_context(_get_address,LRParser.GetReductionSyntaxNode(0)); NodesStack.Push(_get_address); - return _get_address; - } - - case (int)RuleConstants.RULE_VAR_ADDRESS_TKADDRESSOF2 : - // ::= tkAddressOf - - { - get_address _get_address=new get_address(); - ((get_address)LRParser.GetReductionSyntaxNode(0)).address_of=(addressed_value)_get_address;parsertools.create_source_context(_get_address,LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(1)); - return _get_address; - } - - case (int)RuleConstants.RULE_ATTRIBUTE_VARIABLE : - // ::= - - { - attribute _attribute=new attribute(null,(named_type_reference)LRParser.GetReductionSyntaxNode(0),(expression_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_attribute,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - - if (LRParser.GetReductionSyntaxNode(1) == null) - parsertools.create_source_context(_attribute,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - return _attribute; - } - - case (int)RuleConstants.RULE_VARIABLE : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIABLE2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIABLE_TKINHERITED : - // ::= tkInherited - - { - inherited_ident _inherited_ident=new inherited_ident(); - _inherited_ident.name=((ident)LRParser.GetReductionSyntaxNode(1)).name; parsertools.create_source_context(_inherited_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _inherited_ident; - } - - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose -if (!build_tree_for_brackets) { parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2));return LRParser.GetReductionSyntaxNode(1);} else - { - expression br_exp = new bracket_expr(LRParser.GetReductionSyntaxNode(1) as expression); - parsertools.create_source_context(br_exp,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return br_exp; - } - - case (int)RuleConstants.RULE_VARIABLE3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIABLE4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIABLE_TKROUNDOPEN_TKROUNDCLOSE2 : - // ::= tkRoundOpen tkRoundClose - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundClose"));}return null; - case (int)RuleConstants.RULE_VARIABLE_TKPOINT : - // ::= tkPoint - - { - dot_node _dot_node=new dot_node((addressed_value)LRParser.GetReductionSyntaxNode(0),(addressed_value)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_dot_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _dot_node; - } - - case (int)RuleConstants.RULE_VARIABLE5 : - // ::= - - if (LRParser.GetReductionSyntaxNode(1) is dot_node) - { - ((dot_node)LRParser.GetReductionSyntaxNode(1)).left=(addressed_value)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),((dot_node)LRParser.GetReductionSyntaxNode(1)).right); - } - else - if (LRParser.GetReductionSyntaxNode(1) is template_param_list) - { - ((dot_node)(((template_param_list)LRParser.GetReductionSyntaxNode(1)).dereferencing_value)).left=(addressed_value)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(((template_param_list)LRParser.GetReductionSyntaxNode(1)).dereferencing_value,LRParser.GetReductionSyntaxNode(0),((template_param_list)LRParser.GetReductionSyntaxNode(1)).dereferencing_value); - } - else - if (LRParser.GetReductionSyntaxNode(1) is dereference) - { - ((dereference)LRParser.GetReductionSyntaxNode(1)).dereferencing_value=(addressed_value)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - } - else - if (LRParser.GetReductionSyntaxNode(1) is ident_with_templateparams) - { - ((ident_with_templateparams)LRParser.GetReductionSyntaxNode(1)).name=(addressed_value_funcname)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(LRParser.GetReductionSyntaxNode(1),LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - } - return LRParser.GetReductionSyntaxNode(1); - - case (int)RuleConstants.RULE_OPT_EXPR_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_EXPR_LIST2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_OPT_ATTR_EXPR_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OPT_ATTR_EXPR_LIST2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ATTRIBUTE_VAR_SPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - method_call _method_call=new method_call(LRParser.GetReductionSyntaxNode(1) as expression_list); - parsertools.create_source_context(_method_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _method_call; - } - - case (int)RuleConstants.RULE_ATTRIBUTE_VAR_SPECIFIERS_TKPOINT : - // ::= tkPoint - - { - dot_node _dot_node=new dot_node(null,(addressed_value)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_dot_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _dot_node; - } - - case (int)RuleConstants.RULE_VAR_SPECIFIERS_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose - - { - indexer _indexer=new indexer((expression_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_indexer,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _indexer; - } - - case (int)RuleConstants.RULE_VAR_SPECIFIERS_TKSQUAREOPEN_TKSQUARECLOSE2 : - // ::= tkSquareOpen tkSquareClose - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSquareOpen tkSquareClose"));}return null; - case (int)RuleConstants.RULE_VAR_SPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - method_call _method_call=new method_call(LRParser.GetReductionSyntaxNode(1) as expression_list); - parsertools.create_source_context(_method_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _method_call; - } - - case (int)RuleConstants.RULE_VAR_SPECIFIERS_TKPOINT : - // ::= tkPoint - - { - dot_node _dot_node=new dot_node(null,(addressed_value)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_dot_node,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _dot_node; - } - - case (int)RuleConstants.RULE_VAR_SPECIFIERS_TKDEREF : - // ::= tkDeref - - { - roof_dereference _roof_dereference=new roof_dereference(); - parsertools.assign_source_context(_roof_dereference,LRParser.GetReductionSyntaxNode(0)); - return _roof_dereference; - } - - case (int)RuleConstants.RULE_VAR_SPECIFIERS_TKAMPERSEND : - // ::= tkAmpersend - - { - ident_with_templateparams _ident_with_templateparams=new ident_with_templateparams(null,(template_param_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_ident_with_templateparams,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _ident_with_templateparams; - } - - case (int)RuleConstants.RULE_TEMPLATE_TYPE_BACK_VARSPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - - { - method_call _method_call=new method_call((expression_list)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_method_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - return _method_call; - } - - case (int)RuleConstants.RULE_TEMPLATE_TYPE_BACK_VARSPECIFIERS_TKROUNDOPEN_TKROUNDCLOSE2 : - // ::= tkRoundOpen tkRoundClose - - { - method_call _method_call=new method_call(); - parsertools.create_source_context(_method_call,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _method_call; - } - - case (int)RuleConstants.RULE_ELEM_LIST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ELEM_LIST2 : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ELEM_LIST1 : - // ::= - - //TemplateList for expression_list (create) - { - expression_list _expression_list=new expression_list(); - _expression_list.source_context=((expression)LRParser.GetReductionSyntaxNode(0)).source_context; - _expression_list.expressions.Add((expression)LRParser.GetReductionSyntaxNode(0)); - return _expression_list; - } - - case (int)RuleConstants.RULE_ELEM_LIST1_TKCOMMA : - // ::= tkComma - - //TemplateList for expression_list (add) - { - expression_list _expression_list=(expression_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_expression_list,_expression_list,LRParser.GetReductionSyntaxNode(2)); - _expression_list.expressions.Add(LRParser.GetReductionSyntaxNode(2) as expression); - return _expression_list; - } - - case (int)RuleConstants.RULE_ELEM : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ELEM_TKDOTDOT : - // ::= tkDotDot - - { - diapason_expr _diapason_expr=new diapason_expr((expression)LRParser.GetReductionSyntaxNode(0),(expression)LRParser.GetReductionSyntaxNode(2)); - parsertools.create_source_context(_diapason_expr,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(2)); - - return _diapason_expr; - } - - case (int)RuleConstants.RULE_ONE_LITERAL_TKSTRINGLITERAL : - // ::= tkStringLiteral -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ONE_LITERAL_TKASCIICHAR : - // ::= tkAsciiChar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_LITERAL : - // ::= - literal_const_line lcl=(literal_const_line)LRParser.GetReductionSyntaxNode(0); - if (lcl.literals.Count==1) return lcl.literals[0]; - return lcl; - - case (int)RuleConstants.RULE_LITERAL_LIST : - // ::= - - { - literal_const_line _literal_const_line=new literal_const_line(); - parsertools.create_source_context(_literal_const_line,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - - _literal_const_line.literals.Add((literal)LRParser.GetReductionSyntaxNode(0)); - - return _literal_const_line; - } - - case (int)RuleConstants.RULE_LITERAL_LIST2 : - // ::= - - { - literal_const_line _literal_const_line=(literal_const_line)LRParser.GetReductionSyntaxNode(0); - _literal_const_line.literals.Add((literal)LRParser.GetReductionSyntaxNode(1)); - parsertools.create_source_context(_literal_const_line,_literal_const_line,LRParser.GetReductionSyntaxNode(1)); - - return _literal_const_line; - } - - case (int)RuleConstants.RULE_OPERATOR_NAME_IDENT_TKOPERATOR : - // ::= tkOperator - - { - operator_name_ident _operator_name_ident=new operator_name_ident(((op_type_node)LRParser.GetReductionSyntaxNode(1)).type); - - _operator_name_ident.name=((op_type_node)LRParser.GetReductionSyntaxNode(1)).text; - parsertools.create_source_context(_operator_name_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(1)); - return _operator_name_ident; - } - - case (int)RuleConstants.RULE_OPT_METH_MODIFICATORS_TKSEMICOLON : - // ::= tkSemiColon - - { - procedure_attributes_list _procedure_attributes_list=new procedure_attributes_list(); - parsertools.AddModifier(_procedure_attributes_list,proc_attribute.attr_overload); parsertools.create_source_context(_procedure_attributes_list,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _procedure_attributes_list; - } - - case (int)RuleConstants.RULE_OPT_METH_MODIFICATORS_TKSEMICOLON_TKSEMICOLON : - // ::= tkSemiColon tkSemiColon - parsertools.AddModifier((procedure_attributes_list)LRParser.GetReductionSyntaxNode(1),proc_attribute.attr_overload); return LRParser.GetReductionSyntaxNode(1); - case (int)RuleConstants.RULE_METH_MODIFICATORS : - // ::= - - //TemplateList for procedure_attributes_list (create) - { - procedure_attributes_list _procedure_attributes_list=new procedure_attributes_list(); - _procedure_attributes_list.source_context=((procedure_attribute)LRParser.GetReductionSyntaxNode(0)).source_context; - _procedure_attributes_list.proc_attributes.Add((procedure_attribute)LRParser.GetReductionSyntaxNode(0)); - return _procedure_attributes_list; - } - - case (int)RuleConstants.RULE_METH_MODIFICATORS_TKSEMICOLON : - // ::= tkSemiColon - - //TemplateList for procedure_attributes_list (add) - { - procedure_attributes_list _procedure_attributes_list=(procedure_attributes_list)LRParser.GetReductionSyntaxNode(0); - parsertools.create_source_context(_procedure_attributes_list,_procedure_attributes_list,LRParser.GetReductionSyntaxNode(2)); - _procedure_attributes_list.proc_attributes.Add(LRParser.GetReductionSyntaxNode(2) as procedure_attribute); - return _procedure_attributes_list; - } - - case (int)RuleConstants.RULE_INTEGER_CONST_TKINTEGER : - // ::= tkInteger - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkInteger"));}return null; - case (int)RuleConstants.RULE_INTEGER_CONST_TKINTEGER2 : - // ::= tkInteger -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INTEGER_CONST_TKHEX : - // ::= tkHex - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkHex"));}return null; - case (int)RuleConstants.RULE_INTEGER_CONST_TKHEX2 : - // ::= tkHex -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INTEGER_CONST : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_INTEGER_CONST2 : - // ::= - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= "));}return null; - case (int)RuleConstants.RULE_IDENTIFIER_TKIDENTIFIER : - // ::= tkIdentifier -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER4 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER5 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER6 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER7 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER_OR_KEYWORD : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER_OR_KEYWORD2 : - // ::= - - { - ident _ident=new ident((LRParser.GetReductionSyntaxNode(0) as token_info).text); - parsertools.create_source_context(_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _ident; - } - - case (int)RuleConstants.RULE_IDENTIFIER_OR_KEYWORD3 : - // ::= - - { - ident _ident=new ident((LRParser.GetReductionSyntaxNode(0) as token_info).text); - parsertools.create_source_context(_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _ident; - } - - case (int)RuleConstants.RULE_IDENTIFIER_KEYWORD_OPERATORNAME : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_IDENTIFIER_KEYWORD_OPERATORNAME2 : - // ::= - - { - ident _ident=new ident((LRParser.GetReductionSyntaxNode(0) as token_info).text); - parsertools.create_source_context(_ident,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _ident; - } - - case (int)RuleConstants.RULE_IDENTIFIER_KEYWORD_OPERATORNAME3 : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_REAL_TYPE_NAME_TKREAL : - // ::= tkReal -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_REAL_TYPE_NAME_TKSINGLE : - // ::= tkSingle -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_REAL_TYPE_NAME_TKDOUBLE : - // ::= tkDouble -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_REAL_TYPE_NAME_TKEXTENDED : - // ::= tkExtended -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_REAL_TYPE_NAME_TKCOMP : - // ::= tkComp -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKSHORTINT : - // ::= tkShortInt -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKSMALLINT : - // ::= tkSmallInt -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKORDINTEGER : - // ::= tkOrdInteger -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKBYTE : - // ::= tkByte -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKLONGINT : - // ::= tkLongInt -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKINT64 : - // ::= tkInt64 -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKWORD : - // ::= tkWord -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKBOOLEAN : - // ::= tkBoolean -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKCHAR : - // ::= tkChar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKWIDECHAR : - // ::= tkWideChar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKLONGWORD : - // ::= tkLongWord -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKPCHAR : - // ::= tkPChar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ORD_TYPE_NAME_TKCARDINAL : - // ::= tkCardinal -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANT_TYPE_NAME_TKVARIANT : - // ::= tkVariant -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VARIANT_TYPE_NAME_TKOLEVARIANT : - // ::= tkOleVariant -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_METH_MODIFICATOR_TKABSTRACT : - // ::= tkAbstract -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_METH_MODIFICATOR_TKOVERLOAD : - // ::= tkOverload -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_METH_MODIFICATOR_TKREINTRODUCE : - // ::= tkReintroduce -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_METH_MODIFICATOR_TKOVERRIDE : - // ::= tkOverride -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_METH_MODIFICATOR_TKVIRTUAL : - // ::= tkVirtual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_METH_MODIFICATOR_TKSTATIC : - // ::= tkStatic -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKREAD : - // ::= tkRead -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKWRITE : - // ::= tkWrite -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKSTORED : - // ::= tkStored -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKNODEFAULT : - // ::= tkNodefault -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKIMPLEMENTS : - // ::= tkImplements -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKWRITEONLY : - // ::= tkWriteOnly -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKREADONLY : - // ::= tkReadOnly -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_PROPERTY_SPECIFIER_DIRECTIVES_TKDISPID : - // ::= tkDispid -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKAT : - // ::= tkAt -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKABSOLUTE : - // ::= tkAbsolute -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKON : - // ::= tkOn -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKNAME : - // ::= tkName -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKINDEX : - // ::= tkIndex -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKMESSAGE : - // ::= tkMessage -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKCONTAINS : - // ::= tkContains -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKREQUIRES : - // ::= tkRequires -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKFORWARD : - // ::= tkForward -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_NON_RESERVED_TKOUT : - // ::= tkOut -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VISIBILITY_SPECIFIER_TKINTERNAL : - // ::= tkInternal -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VISIBILITY_SPECIFIER_TKPUBLIC : - // ::= tkPublic -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VISIBILITY_SPECIFIER_TKPROTECTED : - // ::= tkProtected -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VISIBILITY_SPECIFIER_TKPRIVATE : - // ::= tkPrivate -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OTHER_TKPACKAGE : - // ::= tkPackage -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OTHER_TKUNIT : - // ::= tkUnit -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OTHER_TKLIBRARY : - // ::= tkLibrary -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OTHER_TKEXTERNAL : - // ::= tkExternal -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OTHER_TKPARAMS : - // ::= tkParams -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD : - // ::= - - { - token_info _token_info=new token_info((LRParser.GetReductionSyntaxNode(0) as ident).name); - parsertools.create_source_context(_token_info,LRParser.GetReductionSyntaxNode(0),LRParser.GetReductionSyntaxNode(0)); - return _token_info; - } - - case (int)RuleConstants.RULE_KEYWORD_TKFINAL : - // ::= tkFinal -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKTEMPLATE : - // ::= tkTemplate -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKOR : - // ::= tkOr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKTYPEOF : - // ::= tkTypeOf -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKSIZEOF : - // ::= tkSizeOf -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKDEFAULT : - // ::= tkDefault -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKWHERE : - // ::= tkWhere -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKXOR : - // ::= tkXor -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKAND : - // ::= tkAnd -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKDIV : - // ::= tkDiv -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKMOD : - // ::= tkMod -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKSHL : - // ::= tkShl -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKSHR : - // ::= tkShr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKNOT : - // ::= tkNot -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKAS : - // ::= tkAs -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKIN : - // ::= tkIn -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKIS : - // ::= tkIs -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKARRAY : - // ::= tkArray -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKBEGIN : - // ::= tkBegin -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKCASE : - // ::= tkCase -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKCLASS : - // ::= tkClass -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKCONST : - // ::= tkConst -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKCONSTRUCTOR : - // ::= tkConstructor -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKDESTRUCTOR : - // ::= tkDestructor -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKDOWNTO : - // ::= tkDownto -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKDO : - // ::= tkDo -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKELSE : - // ::= tkElse -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKEXCEPT : - // ::= tkExcept -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKFILE : - // ::= tkFile -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKFINALIZATION : - // ::= tkFinalization -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKFINALLY : - // ::= tkFinally -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKFOR : - // ::= tkFor -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKFOREACH : - // ::= tkForeach -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKFUNCTION : - // ::= tkFunction -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKIF : - // ::= tkIf -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKIMPLEMENTATION : - // ::= tkImplementation -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKINHERITED : - // ::= tkInherited -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKINITIALIZATION : - // ::= tkInitialization -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKINTERFACE : - // ::= tkInterface -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKPROCEDURE : - // ::= tkProcedure -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKPROPERTY : - // ::= tkProperty -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKRAISE : - // ::= tkRaise -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKRECORD : - // ::= tkRecord -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKREPEAT : - // ::= tkRepeat -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKSET : - // ::= tkSet -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKTRY : - // ::= tkTry -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKTYPE : - // ::= tkType -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKTHEN : - // ::= tkThen -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKTO : - // ::= tkTo -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKUNTIL : - // ::= tkUntil -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKUSES : - // ::= tkUses -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKUSING : - // ::= tkUsing -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKVAR : - // ::= tkVar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKWHILE : - // ::= tkWhile -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKWITH : - // ::= tkWith -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKNIL : - // ::= tkNil -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKGOTO : - // ::= tkGoto -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKOF : - // ::= tkOf -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKLABEL : - // ::= tkLabel -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_KEYWORD_TKPROGRAM : - // ::= tkProgram -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RESERVED_KEYWORD_TKOPERATOR : - // ::= tkOperator -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_RESERVED_KEYWORD_TKEND : - // ::= tkEnd -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKMINUS : - // ::= tkMinus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKPLUS : - // ::= tkPlus -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKSQUAREOPEN_TKSQUARECLOSE : - // ::= tkSquareOpen tkSquareClose - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkSquareOpen tkSquareClose"));}return null; - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKROUNDOPEN_TKROUNDCLOSE : - // ::= tkRoundOpen tkRoundClose - {errors.Add(new nonterminal_token_return_null(current_file_name,parsertools.GetTokenSourceContext(),(syntax_tree_node)prev_node," ::= tkRoundOpen tkRoundClose"));}return null; - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKSLASH : - // ::= tkSlash -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKSTAR : - // ::= tkStar -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKEQUAL : - // ::= tkEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKGREATER : - // ::= tkGreater -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKGREATEREQUAL : - // ::= tkGreaterEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKLOWER : - // ::= tkLower -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKLOWEREQUAL : - // ::= tkLowerEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKNOTEQUAL : - // ::= tkNotEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKOR : - // ::= tkOr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKXOR : - // ::= tkXor -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKAND : - // ::= tkAnd -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKDIV : - // ::= tkDiv -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKMOD : - // ::= tkMod -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKSHL : - // ::= tkShl -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKSHR : - // ::= tkShr -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKNOT : - // ::= tkNot -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKIN : - // ::= tkIn -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKADDRESSOF : - // ::= tkAddressOf -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKDEREF : - // ::= tkDeref -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKIMPLICIT : - // ::= tkImplicit -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR_TKEXPLICIT : - // ::= tkExplicit -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_OVERLOAD_OPERATOR : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ASSIGN_OPERATOR_TKASSIGN : - // ::= tkAssign -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ASSIGN_OPERATOR_TKPLUSEQUAL : - // ::= tkPlusEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ASSIGN_OPERATOR_TKMINUSEQUAL : - // ::= tkMinusEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ASSIGN_OPERATOR_TKMULTEQUAL : - // ::= tkMultEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_ASSIGN_OPERATOR_TKDIVEQUAL : - // ::= tkDivEqual -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_EMPTY : - // ::= - //NONTERMINAL: ::= - return null; - //ENDNONTERMINAL - case (int)RuleConstants.RULE_ERROR_TKERROR : - // ::= tkError -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_FUNC_DECL_LAMBDA_TKARROW : - // ::= tkArrow -{return func_decl_lambda(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2));} - case (int)RuleConstants.RULE_FUNC_DECL_LAMBDA_TKARROW2 : - // ::= tkArrow -{return func_decl_lambda(null, LRParser.GetReductionSyntaxNode(1));} - case (int)RuleConstants.RULE_FUNC_DECL_LAMBDA_TKROUNDOPEN_TKROUNDCLOSE_TKARROW : - // ::= tkRoundOpen tkRoundClose tkArrow -{return func_decl_lambda(null, LRParser.GetReductionSyntaxNode(3));} - case (int)RuleConstants.RULE_IDENT_LIST1_TKROUNDOPEN_TKCOMMA_TKROUNDCLOSE : - // ::= tkRoundOpen tkComma tkRoundClose -{return ident_list11(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3));} - case (int)RuleConstants.RULE_IDENT_LIST1 : - // ::= -{return ident_list12(LRParser.GetReductionSyntaxNode(0));} - case (int)RuleConstants.RULE_IDENT_LIST1_TKROUNDOPEN_TKCOLON_TKCOMMA_TKROUNDCLOSE : - // ::= tkRoundOpen tkColon tkComma tkRoundClose -{return ident_list13(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3), LRParser.GetReductionSyntaxNode(5));} - case (int)RuleConstants.RULE_IDENT_LIST1_TKROUNDOPEN_TKCOLON_TKROUNDCLOSE : - // ::= tkRoundOpen tkColon tkRoundClose -{return ident_list14(LRParser.GetReductionSyntaxNode(1), LRParser.GetReductionSyntaxNode(3));} - case (int)RuleConstants.RULE_IDENT_LIST2_TKCOMMA : - // ::= tkComma -{return ident_list21(LRParser.GetReductionSyntaxNode(0), LRParser.GetReductionSyntaxNode(2));} - case (int)RuleConstants.RULE_IDENT_LIST2 : - // ::= -{return ident_list12(LRParser.GetReductionSyntaxNode(0));} - case (int)RuleConstants.RULE_VAR_OR_IDENTIFIER : - // ::= -return LRParser.GetReductionSyntaxNode(0); - case (int)RuleConstants.RULE_VAR_OR_IDENTIFIER_TKCOLON : - // ::= tkColon -{ - named_type_reference n_t_r = (named_type_reference)LRParser.GetReductionSyntaxNode(2); - var_def_statement vds = new var_def_statement(); - vds.vars = new ident_list(); - vds.vars.idents.Add((ident)LRParser.GetReductionSyntaxNode(0)); - vds.vars_type = n_t_r; - return vds; - } - case (int)RuleConstants.RULE_LAMBDA_BODY : - // ::= -{ -statement_list _statement_list = new statement_list(); - ident id = new ident("result"); - op_type_node _op_type_node = new op_type_node(Operators.Assignment); - _op_type_node.source_context = parsertools.GetTokenSourceContext(); - assign _assign = new assign((addressed_value)id, LRParser.GetReductionSyntaxNode(0) as expression, _op_type_node.type); - parsertools.create_source_context(_assign, id, LRParser.GetReductionSyntaxNode(0)); - _statement_list.subnodes.Add((statement)_assign); - parsertools.assign_source_context(_statement_list, _assign); - parsertools.create_source_context(_statement_list, null, null); - //block _block = new block(null, _statement_list); - return _statement_list; -} - - case (int)RuleConstants.RULE_LAMBDA_BODY2 : - // ::= -return LRParser.GetReductionSyntaxNode(0); -} -throw new RuleException("Unknown rule"); -} - - - - - -} -} diff --git a/ReleaseGenerators/License.txt b/ReleaseGenerators/License.txt index 0e6f1e4e9..f8b4b6ee1 100644 --- a/ReleaseGenerators/License.txt +++ b/ReleaseGenerators/License.txt @@ -3,7 +3,7 @@ В�Ж�ЕЙШИЕ УСЛОВИЯ Р�СПРОСТР��Е�ИЯ ПРОДУКТ� PascalABC.NET -Copyright (C) 2005-2015 by Ivan Bondarev, Stanislav Mihalkovich +Copyright (C) 2005-2016 by Ivan Bondarev, Stanislav Mihalkovich Это программное обе�печение �вл�ет�� �вободным; вы можете ра�про�тран�ть и/или модифицировать его на у�лови�х GNU LGPL вер�ии 3 � разъ��нени�ми и и�ключени�ми, данными ниже. diff --git a/ReleaseGenerators/License_en.txt b/ReleaseGenerators/License_en.txt index 14712ba6b..d64ab94a7 100644 --- a/ReleaseGenerators/License_en.txt +++ b/ReleaseGenerators/License_en.txt @@ -3,7 +3,7 @@ A copy of the GNU GPL is appended to this file. IMPORTANT PascalABC.NET LICENSE TERMS -Copyright (C) 2005-2015 by Ivan Bondarev, Stanislav Mihalkovich +Copyright (C) 2005-2016 by Ivan Bondarev, Stanislav Mihalkovich This program is free software; you may redistribute and/or modify it under the terms of the GNU LGPL version 3 with the clarifications and exceptions described below. PascalABC.NET can be linked with non-free modules and libraries. This condition is mainly concerned with possibility of adding foreign modules and libraries to PascalABC.NET, aimed at education. In particular, PascalABC.NET includes as a part PROGRAMMING TASKBOOK FOR PASCALABC.NET (in agreement with the author of this product), which is distributed under the terms of proprietary license (see \bin\PT4) diff --git a/ReleaseGenerators/copyright.txt b/ReleaseGenerators/copyright.txt index 2e31eb551..50e7cd2d8 100644 --- a/ReleaseGenerators/copyright.txt +++ b/ReleaseGenerators/copyright.txt @@ -1 +1 @@ -Copyright (C) 2005-2015 by Ivan Bondarev, Stanislav Mihalkovich \ No newline at end of file +Copyright (C) 2005-2016 by Ivan Bondarev, Stanislav Mihalkovich \ No newline at end of file diff --git a/doc/License_en.txt b/doc/License_en.txt index 199150c82..59715cc53 100644 --- a/doc/License_en.txt +++ b/doc/License_en.txt @@ -3,7 +3,7 @@ A copy of the GNU GPL is appended to this file. IMPORTANT PascalABC.NET LICENSE TERMS -Copyright (C) 2005-2015 by Ivan Bondarev, Stanislav Mihalkovich +Copyright (C) 2005-2016 by Ivan Bondarev, Stanislav Mihalkovich This program is free software; you may redistribute and/or modify it under the terms of the GNU LGPL version 3 with the clarifications and exceptions described below. PascalABC.NET can be linked with non-free modules and libraries. This condition is mainly concerned with possibility of adding foreign modules and libraries to PascalABC.NET, aimed at education. In particular, PascalABC.NET includes as a part PROGRAMMING TASKBOOK FOR PASCALABC.NET (in agreement with the author of this product), which is distributed under the terms of proprietary license (see \bin\PT4) diff --git a/doc/copyright.txt b/doc/copyright.txt index 2e31eb551..50e7cd2d8 100644 --- a/doc/copyright.txt +++ b/doc/copyright.txt @@ -1 +1 @@ -Copyright (C) 2005-2015 by Ivan Bondarev, Stanislav Mihalkovich \ No newline at end of file +Copyright (C) 2005-2016 by Ivan Bondarev, Stanislav Mihalkovich \ No newline at end of file diff --git a/doc/license.txt b/doc/license.txt index 5b02558dd..e6d8c521e 100644 --- a/doc/license.txt +++ b/doc/license.txt @@ -3,7 +3,7 @@ В�Ж�ЕЙШИЕ УСЛОВИЯ Р�СПРОСТР��Е�ИЯ ПРОДУКТ� PascalABC.NET -Copyright (C) 2005-2015 by Ivan Bondarev, Stanislav Mihalkovich +Copyright (C) 2005-2016 by Ivan Bondarev, Stanislav Mihalkovich Это программное обе�печение �вл�ет�� �вободным; вы можете ра�про�тран�ть и/или модифицировать его на у�лови�х GNU LGPL вер�ии 3 � разъ��нени�ми и и�ключени�ми, данными ниже.