diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index d6c0d6503..236fb8380 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "2"; public const string Minor = "2"; public const string Build = "0"; - public const string Revision = "961"; + public const string Revision = "965"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 92b78ff54..998cccb48 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=2 -%REVISION%=961 +%REVISION%=965 %MAJOR%=2 %COREVERSION%=0 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 8d7ea4cff..73f4f6114 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: SSM -// DateTime: 07.06.2015 8:49:49 +// DateTime: 14.06.2015 0:11:32 // UserName: ????????? // GPLEX input file // GPLEX frame file @@ -957,6 +957,8 @@ string cur_yytext = yytext; case (int)Tokens.tkUnit: case (int)Tokens.tkLibrary: case (int)Tokens.tkExternal: + case (int)Tokens.tkYield: + case (int)Tokens.tkSequence: yylval = new Union(); yylval.ti = new token_info(cur_yytext,currentLexLocation); break; @@ -1452,6 +1454,7 @@ public static class Keywords keywords.Add("new",(int)Tokens.tkNew); keywords.Add("auto",(int)Tokens.tkAuto); keywords.Add("sequence",(int)Tokens.tkSequence); + keywords.Add("yield",(int)Tokens.tkYield); } public static int KeywordOrIDToken(string s) diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex index a38309add..27ee2a09f 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex @@ -344,6 +344,8 @@ ALPHABET [^ a-zA-Z_0-9\r\n\t\'$#&,:.;@\+\-\*/=<>\^()\[\]\x01] case (int)Tokens.tkUnit: case (int)Tokens.tkLibrary: case (int)Tokens.tkExternal: + case (int)Tokens.tkYield: + case (int)Tokens.tkSequence: yylval = new Union(); yylval.ti = new token_info(cur_yytext,currentLexLocation); break; @@ -605,6 +607,7 @@ public static class Keywords keywords.Add("new",(int)Tokens.tkNew); keywords.Add("auto",(int)Tokens.tkAuto); keywords.Add("sequence",(int)Tokens.tkSequence); + keywords.Add("yield",(int)Tokens.tkYield); } public static int KeywordOrIDToken(string s) diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 56b263758..33d84b5ce 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -32,7 +32,7 @@ %token tkSizeOf tkTypeOf tkWhere tkArray tkCase tkClass tkAuto tkConst tkConstructor tkDestructor tkElse tkExcept tkFile tkFor tkForeach tkFunction %token tkIf tkImplementation tkInherited tkInterface tkProcedure tkOperator tkProperty tkRaise tkRecord tkSet tkType tkThen tkUses tkVar tkWhile tkWith tkNil %token tkGoto tkOf tkLabel tkLock tkProgram tkEvent tkDefault tkTemplate tkPacked tkExports tkResourceString tkThreadvar tkSealed tkPartial tkTo tkDownto -%token tkCycle tkSequence +%token tkCycle tkSequence tkYield %token tkNew %token tkOn %token tkName tkPrivate tkProtected tkPublic tkInternal tkRead tkWrite @@ -81,7 +81,7 @@ %type for_cycle_type %type format_expr %type foreach_stmt -%type for_stmt +%type for_stmt yield_stmt %type fp_list fp_sect_list %type file_type sequence_type %type var_address @@ -2227,8 +2227,17 @@ unlabelled_stmt { $$ = $1; } | my_stmt { $$ = $1; } + | yield_stmt + { $$ = $1; } ; +yield_stmt + : tkYield expr_l1 + { + $$ = new yield_node($2,@$); + } + ; + my_stmt : tkCycle expr unlabelled_stmt { diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 046a036b4..ee0353302 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: SSM -// DateTime: 07.06.2015 8:49:50 +// DateTime: 14.06.2015 0:11:33 // UserName: ????????? // Input file @@ -32,20 +32,20 @@ public enum Tokens { tkUses=43,tkVar=44,tkWhile=45,tkWith=46,tkNil=47,tkGoto=48, tkOf=49,tkLabel=50,tkLock=51,tkProgram=52,tkEvent=53,tkDefault=54, tkTemplate=55,tkPacked=56,tkExports=57,tkResourceString=58,tkThreadvar=59,tkSealed=60, - tkPartial=61,tkTo=62,tkDownto=63,tkCycle=64,tkSequence=65,tkNew=66, - tkOn=67,tkName=68,tkPrivate=69,tkProtected=70,tkPublic=71,tkInternal=72, - tkRead=73,tkWrite=74,tkParseModeExpression=75,tkParseModeStatement=76,tkParseModeType=77,tkBegin=78, - tkEnd=79,tkAsmBody=80,tkILCode=81,tkError=82,INVISIBLE=83,tkRepeat=84, - tkUntil=85,tkDo=86,tkComma=87,tkFinally=88,tkTry=89,tkInitialization=90, - tkFinalization=91,tkUnit=92,tkLibrary=93,tkExternal=94,tkParams=95,tkAssign=96, - tkPlusEqual=97,tkMinusEqual=98,tkMultEqual=99,tkDivEqual=100,tkMinus=101,tkPlus=102, - tkSlash=103,tkStar=104,tkEqual=105,tkGreater=106,tkGreaterEqual=107,tkLower=108, - tkLowerEqual=109,tkNotEqual=110,tkCSharpStyleOr=111,tkArrow=112,tkOr=113,tkXor=114, - tkAnd=115,tkDiv=116,tkMod=117,tkShl=118,tkShr=119,tkNot=120, - tkAs=121,tkIn=122,tkIs=123,tkImplicit=124,tkExplicit=125,tkAddressOf=126, - tkDeref=127,tkIdentifier=128,tkStringLiteral=129,tkAsciiChar=130,tkAbstract=131,tkForward=132, - tkOverload=133,tkReintroduce=134,tkOverride=135,tkVirtual=136,tkInteger=137,tkFloat=138, - tkHex=139}; + tkPartial=61,tkTo=62,tkDownto=63,tkCycle=64,tkSequence=65,tkYield=66, + tkNew=67,tkOn=68,tkName=69,tkPrivate=70,tkProtected=71,tkPublic=72, + tkInternal=73,tkRead=74,tkWrite=75,tkParseModeExpression=76,tkParseModeStatement=77,tkParseModeType=78, + tkBegin=79,tkEnd=80,tkAsmBody=81,tkILCode=82,tkError=83,INVISIBLE=84, + tkRepeat=85,tkUntil=86,tkDo=87,tkComma=88,tkFinally=89,tkTry=90, + tkInitialization=91,tkFinalization=92,tkUnit=93,tkLibrary=94,tkExternal=95,tkParams=96, + tkAssign=97,tkPlusEqual=98,tkMinusEqual=99,tkMultEqual=100,tkDivEqual=101,tkMinus=102, + tkPlus=103,tkSlash=104,tkStar=105,tkEqual=106,tkGreater=107,tkGreaterEqual=108, + tkLower=109,tkLowerEqual=110,tkNotEqual=111,tkCSharpStyleOr=112,tkArrow=113,tkOr=114, + tkXor=115,tkAnd=116,tkDiv=117,tkMod=118,tkShl=119,tkShr=120, + tkNot=121,tkAs=122,tkIn=123,tkIs=124,tkImplicit=125,tkExplicit=126, + tkAddressOf=127,tkDeref=128,tkIdentifier=129,tkStringLiteral=130,tkAsciiChar=131,tkAbstract=132, + tkForward=133,tkOverload=134,tkReintroduce=135,tkOverride=136,tkVirtual=137,tkInteger=138, + tkFloat=139,tkHex=140}; // Abstract base class for GPLEX scanners public abstract class ScanBase : AbstractScanner { @@ -73,8 +73,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[766]; - private static State[] states = new State[1233]; + private static Rule[] rules = new Rule[768]; + private static State[] states = new State[1236]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -99,41 +99,42 @@ public partial class GPPGParser: ShiftReduceParser my_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 456: // my_stmt -> tkCycle, expr, unlabelled_stmt + case 456: // unlabelled_stmt -> yield_stmt +{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } + break; + case 457: // yield_stmt -> tkYield, expr_l1 +{ + CurrentSemanticValue.stn = new yield_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); + } + break; + case 458: // my_stmt -> tkCycle, expr, unlabelled_stmt { CurrentSemanticValue.stn = parsertools.MyStmt(ValueStack[ValueStack.Depth-2].ex,ValueStack[ValueStack.Depth-1].stn as statement); } break; - case 457: // var_stmt -> tkVar, var_decl_part + case 459: // var_stmt -> tkVar, var_decl_part { CurrentSemanticValue.stn = new var_statement(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 458: // assignment -> var_reference, assign_operator, expr + case 460: // assignment -> var_reference, assign_operator, expr { CurrentSemanticValue.stn = new assign(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 459: // proc_call -> var_reference + case 461: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 460: // goto_stmt -> tkGoto, label_name + case 462: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 461: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 463: // compound_stmt -> tkBegin, stmt_list, tkEnd { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; (CurrentSemanticValue.stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; @@ -4146,73 +4160,73 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 464: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 463: // stmt_list -> stmt_list, tkSemiColon, stmt + case 465: // stmt_list -> stmt_list, tkSemiColon, stmt { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as statement_list).Add(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 464: // if_stmt -> tkIf, expr, tkThen, stmt + case 466: // if_stmt -> tkIf, expr, tkThen, stmt { CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 465: // if_stmt -> tkIf, expr, tkThen, stmt, tkElse, stmt + case 467: // if_stmt -> tkIf, expr, tkThen, stmt, tkElse, stmt { CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as statement, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 466: // case_stmt -> tkCase, expr, tkOf, case_list, else_case, tkEnd + case 468: // case_stmt -> tkCase, expr, tkOf, case_list, else_case, tkEnd { CurrentSemanticValue.stn = new case_node(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as case_variants, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 467: // case_list -> case_item + case 469: // case_list -> case_item { if (ValueStack[ValueStack.Depth-1].stn is empty_statement) CurrentSemanticValue.stn = NewCaseItem(ValueStack[ValueStack.Depth-1].stn, null); else CurrentSemanticValue.stn = NewCaseItem(ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 468: // case_list -> case_list, tkSemiColon, case_item + case 470: // case_list -> case_list, tkSemiColon, case_item { CurrentSemanticValue.stn = AddCaseItem(ValueStack[ValueStack.Depth-3].stn as case_variants, ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 469: // case_item -> /* empty */ + case 471: // case_item -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); } break; - case 470: // case_item -> case_label_list, tkColon, stmt + case 472: // case_item -> case_label_list, tkColon, stmt { CurrentSemanticValue.stn = new case_variant(ValueStack[ValueStack.Depth-3].stn as expression_list, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 471: // case_label_list -> case_label + case 473: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 472: // case_label_list -> case_label_list, tkComma, case_label + case 474: // case_label_list -> case_label_list, tkComma, case_label { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 473: // case_label -> const_elem + case 475: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 474: // else_case -> /* empty */ + case 476: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 475: // else_case -> tkElse, stmt_list + case 477: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 476: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 478: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr { CurrentSemanticValue.stn = new repeat_node(ValueStack[ValueStack.Depth-3].stn as statement_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); (ValueStack[ValueStack.Depth-3].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-4].ti; @@ -4220,89 +4234,89 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr, optional_tk_do, stmt + case 479: // while_stmt -> tkWhile, expr, optional_tk_do, stmt { CurrentSemanticValue.stn = NewWhileStmt(ValueStack[ValueStack.Depth-4].ti, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-2].ti, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 478: // optional_tk_do -> tkDo + case 480: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 479: // optional_tk_do -> /* empty */ + case 481: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 480: // lock_stmt -> tkLock, expr, tkDo, stmt + case 482: // lock_stmt -> tkLock, expr, tkDo, stmt { CurrentSemanticValue.stn = new lock_stmt(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 481: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, expr, + case 483: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, expr, // tkDo, stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-6].id, ValueStack[ValueStack.Depth-5].td, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 482: // foreach_stmt -> tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr, + case 484: // foreach_stmt -> tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr, // tkDo, stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-7].id, ValueStack[ValueStack.Depth-5].td, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 483: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr, tkDo, stmt + case 485: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr, tkDo, stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-5].id, new no_type_foreach(), ValueStack[ValueStack.Depth-3].ex, (statement)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 484: // foreach_stmt_ident_dype_opt -> tkColon, type_ref + case 486: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 486: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr, + case 488: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr, // for_cycle_type, expr, optional_tk_do, stmt { CurrentSemanticValue.stn = NewForStmt(ValueStack[ValueStack.Depth-9].ti, (bool)ValueStack[ValueStack.Depth-8].ob, ValueStack[ValueStack.Depth-7].id, ValueStack[ValueStack.Depth-6].td, ValueStack[ValueStack.Depth-5].ex, (for_cycle_type)ValueStack[ValueStack.Depth-4].ob, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-2].ti, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 487: // optional_var -> tkVar + case 489: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 488: // optional_var -> /* empty */ + case 490: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 490: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 492: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 491: // for_cycle_type -> tkTo + case 493: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 492: // for_cycle_type -> tkDownto + case 494: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 493: // with_stmt -> tkWith, expr_list, tkDo, stmt + case 495: // with_stmt -> tkWith, expr_list, tkDo, stmt { CurrentSemanticValue.stn = new with_statement(ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].stn as expression_list, CurrentLocationSpan); } break; - case 494: // inherited_message -> tkInherited + case 496: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 495: // try_stmt -> tkTry, stmt_list, try_handler + case 497: // try_stmt -> tkTry, stmt_list, try_handler { CurrentSemanticValue.stn = new try_stmt(ValueStack[ValueStack.Depth-2].stn as statement_list, ValueStack[ValueStack.Depth-1].stn as try_handler, CurrentLocationSpan); (ValueStack[ValueStack.Depth-2].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; ValueStack[ValueStack.Depth-2].stn.source_context = LocationStack[LocationStack.Depth-3].Merge(LocationStack[LocationStack.Depth-2]); } break; - case 496: // try_handler -> tkFinally, stmt_list, tkEnd + case 498: // try_handler -> tkFinally, stmt_list, tkEnd { CurrentSemanticValue.stn = new try_handler_finally(ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); (ValueStack[ValueStack.Depth-2].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; (ValueStack[ValueStack.Depth-2].stn as statement_list).right_logical_bracket = ValueStack[ValueStack.Depth-1].ti; } break; - case 497: // try_handler -> tkExcept, exception_block, tkEnd + case 499: // try_handler -> tkExcept, exception_block, tkEnd { CurrentSemanticValue.stn = new try_handler_except((exception_block)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); if ((ValueStack[ValueStack.Depth-2].stn as exception_block).stmt_list != null) @@ -4312,151 +4326,151 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 500: // exception_block -> exception_handler_list, exception_block_else_branch { CurrentSemanticValue.stn = new exception_block(null, (exception_handler_list)ValueStack[ValueStack.Depth-2].stn, (statement_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 499: // exception_block -> exception_handler_list, tkSemiColon, + case 501: // exception_block -> exception_handler_list, tkSemiColon, // exception_block_else_branch { CurrentSemanticValue.stn = new exception_block(null, (exception_handler_list)ValueStack[ValueStack.Depth-3].stn, (statement_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 500: // exception_block -> stmt_list + case 502: // exception_block -> stmt_list { CurrentSemanticValue.stn = new exception_block(ValueStack[ValueStack.Depth-1].stn as statement_list, null, null, LocationStack[LocationStack.Depth-1]); } break; - case 501: // exception_handler_list -> exception_handler + case 503: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 502: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 504: // exception_handler_list -> exception_handler_list, tkSemiColon, // exception_handler { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as exception_handler_list).Add(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 503: // exception_block_else_branch -> /* empty */ + case 505: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 504: // exception_block_else_branch -> tkElse, stmt_list + case 506: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 505: // exception_handler -> tkOn, exception_identifier, tkDo, stmt + case 507: // exception_handler -> tkOn, exception_identifier, tkDo, stmt { CurrentSemanticValue.stn = new exception_handler((ValueStack[ValueStack.Depth-3].stn as exception_ident).variable, (ValueStack[ValueStack.Depth-3].stn as exception_ident).type_name, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 506: // exception_identifier -> exception_class_type_identifier + case 508: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 507: // exception_identifier -> exception_variable, tkColon, + case 509: // exception_identifier -> exception_variable, tkColon, // exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(ValueStack[ValueStack.Depth-3].id, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 508: // exception_class_type_identifier -> simple_type_identifier + case 510: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 509: // exception_variable -> identifier + case 511: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 510: // raise_stmt -> tkRaise + case 512: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 511: // raise_stmt -> tkRaise, expr + case 513: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 512: // expr_list -> expr + case 514: // expr_list -> expr { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 513: // expr_list -> expr_list, tkComma, expr + case 515: // expr_list -> expr_list, tkComma, expr { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 514: // expr_as_stmt -> allowable_expr_as_stmt + case 516: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 515: // allowable_expr_as_stmt -> new_expr + case 517: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 516: // expr -> expr_l1 + case 518: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 517: // expr -> format_expr + case 519: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 518: // expr -> func_decl_lambda + case 520: // expr -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 519: // expr_l1 -> relop_expr + case 521: // expr_l1 -> relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 520: // expr_l1 -> question_expr + case 522: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 521: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 523: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new sizeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, null, CurrentLocationSpan); } break; - case 522: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 524: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new typeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 523: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 + case 525: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 { CurrentSemanticValue.ex = new question_colon_expression(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 524: // simple_or_template_type_reference -> simple_type_identifier + case 526: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 525: // simple_or_template_type_reference -> simple_type_identifier, + case 527: // simple_or_template_type_reference -> simple_type_identifier, // template_type_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-2].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 526: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 528: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, // template_type_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-3].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 527: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 529: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 529: // new_expr -> tkNew, simple_or_template_type_reference, + case 531: // new_expr -> tkNew, simple_or_template_type_reference, // optional_expr_list_with_bracket { CurrentSemanticValue.ex = new new_expr(ValueStack[ValueStack.Depth-2].td, ValueStack[ValueStack.Depth-1].stn as expression_list, false, null, CurrentLocationSpan); } break; - case 530: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, + case 532: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, // tkSquareClose, optional_array_initializer { var el = ValueStack[ValueStack.Depth-3].stn as expression_list; @@ -4472,7 +4486,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 533: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -4487,12 +4501,12 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 534: // field_in_unnamed_object -> identifier, tkAssign, relop_expr { CurrentSemanticValue.ob = new name_assign_expr(ValueStack[ValueStack.Depth-3].id,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 533: // field_in_unnamed_object -> relop_expr + case 535: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -4512,13 +4526,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 536: // list_fields_in_unnamed_object -> field_in_unnamed_object { var l = new name_assign_expr_list(); CurrentSemanticValue.ob = l.Add(ValueStack[ValueStack.Depth-1].ob as name_assign_expr); } break; - case 535: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 537: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, // field_in_unnamed_object { var nel = ValueStack[ValueStack.Depth-3].ob as name_assign_expr_list; @@ -4529,230 +4543,230 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier + case 538: // array_name_for_new_expr -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 537: // array_name_for_new_expr -> unsized_array_type + case 539: // array_name_for_new_expr -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 538: // optional_expr_list_with_bracket -> /* empty */ + case 540: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 539: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 541: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 540: // relop_expr -> simple_expr + case 542: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 541: // relop_expr -> relop_expr, relop, simple_expr + case 543: // relop_expr -> relop_expr, relop, simple_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 542: // relop_expr -> relop_expr, tkMatching, simple_expr + case 544: // relop_expr -> relop_expr, tkMatching, simple_expr { CurrentSemanticValue.ex = new matching_expression(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 543: // format_expr -> simple_expr, tkColon, simple_expr + case 545: // format_expr -> simple_expr, tkColon, simple_expr { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 544: // format_expr -> simple_expr, tkColon, simple_expr, tkColon, simple_expr + case 546: // format_expr -> simple_expr, tkColon, simple_expr, tkColon, simple_expr { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 545: // relop -> tkEqual + case 547: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 546: // relop -> tkNotEqual + case 548: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 547: // relop -> tkLower + case 549: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 548: // relop -> tkGreater + case 550: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 549: // relop -> tkLowerEqual + case 551: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 550: // relop -> tkGreaterEqual + case 552: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 551: // relop -> tkIn + case 553: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 552: // simple_expr -> term + case 554: // simple_expr -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 553: // simple_expr -> simple_expr, addop, term + case 555: // simple_expr -> simple_expr, addop, term { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 554: // addop -> tkPlus + case 556: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 555: // addop -> tkMinus + case 557: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 556: // addop -> tkOr + case 558: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 557: // addop -> tkXor + case 559: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 558: // addop -> tkCSharpStyleOr + case 560: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 559: // typecast_op -> tkAs + case 561: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 560: // typecast_op -> tkIs + case 562: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 561: // as_is_expr -> term, typecast_op, simple_or_template_type_reference + case 563: // as_is_expr -> term, typecast_op, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, (op_typecast)ValueStack[ValueStack.Depth-2].ob, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 562: // term -> factor + case 564: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 563: // term -> new_expr + case 565: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 564: // term -> term, mulop, factor + case 566: // term -> term, mulop, factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 565: // term -> as_is_expr + case 567: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 566: // mulop -> tkStar + case 568: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 567: // mulop -> tkSlash + case 569: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 568: // mulop -> tkDiv + case 570: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 569: // mulop -> tkMod + case 571: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 570: // mulop -> tkShl + case 572: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 571: // mulop -> tkShr + case 573: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 572: // mulop -> tkAnd + case 574: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 573: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 575: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new default_operator(ValueStack[ValueStack.Depth-2].td as named_type_reference, CurrentLocationSpan); } break; - case 574: // factor -> tkNil + case 576: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 575: // factor -> literal_or_number + case 577: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 576: // factor -> default_expr + case 578: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 577: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 579: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 578: // factor -> tkNot, factor + case 580: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 579: // factor -> sign, factor + case 581: // factor -> sign, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 580: // factor -> tkDeref, factor + case 582: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 581: // factor -> var_reference + case 583: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 582: // literal_or_number -> literal + case 584: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 583: // literal_or_number -> unsigned_number + case 585: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 584: // var_reference -> var_address, variable + case 586: // var_reference -> var_address, variable { CurrentSemanticValue.ex = NewVarReference(ValueStack[ValueStack.Depth-2].stn as get_address, ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 585: // var_reference -> variable + case 587: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 586: // var_address -> tkAddressOf + case 588: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 587: // var_address -> var_address, tkAddressOf + case 589: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 588: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 590: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket { CurrentSemanticValue.stn = new attribute(null, ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as expression_list, CurrentLocationSpan); } break; - case 589: // dotted_identifier -> identifier + case 591: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 590: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 592: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 591: // variable_as_type -> dotted_identifier + case 593: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 592: // variable_as_type -> dotted_identifier, template_type_params + case 594: // variable_as_type -> dotted_identifier, template_type_params { CurrentSemanticValue.ex = new ident_with_templateparams(ValueStack[ValueStack.Depth-2].ex as addressed_value, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 593: // variable -> identifier + case 595: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 594: // variable -> operator_name_ident + case 596: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 595: // variable -> tkInherited, identifier + case 597: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 596: // variable -> tkRoundOpen, expr, tkRoundClose + case 598: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_brackets) { @@ -4762,501 +4776,501 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 599: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 598: // variable -> typeof_expr + case 600: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 599: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 601: // variable -> literal_or_number, tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 600: // variable -> variable, var_specifiers + case 602: // variable -> variable, var_specifiers { CurrentSemanticValue.ex = NewVariable(ValueStack[ValueStack.Depth-2].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 601: // var_specifiers -> tkSquareOpen, expr_list, tkSquareClose + case 603: // var_specifiers -> tkSquareOpen, expr_list, tkSquareClose { CurrentSemanticValue.ex = new indexer(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 602: // var_specifiers -> tkRoundOpen, optional_expr_list, tkRoundClose + case 604: // var_specifiers -> tkRoundOpen, optional_expr_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 603: // var_specifiers -> tkPoint, identifier_keyword_operatorname + case 605: // var_specifiers -> tkPoint, identifier_keyword_operatorname { CurrentSemanticValue.ex = new dot_node(null, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 604: // var_specifiers -> tkDeref + case 606: // var_specifiers -> tkDeref { CurrentSemanticValue.ex = new roof_dereference(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 605: // var_specifiers -> tkAmpersend, template_type_params + case 607: // var_specifiers -> tkAmpersend, template_type_params { CurrentSemanticValue.ex = new ident_with_templateparams(null, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 606: // optional_expr_list -> expr_list + case 608: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 607: // optional_expr_list -> /* empty */ + case 609: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 608: // elem_list -> elem_list1 + case 610: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 609: // elem_list -> /* empty */ + case 611: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 610: // elem_list1 -> elem + case 612: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 611: // elem_list1 -> elem_list1, tkComma, elem + case 613: // elem_list1 -> elem_list1, tkComma, elem { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 612: // elem -> expr + case 614: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 613: // elem -> expr, tkDotDot, expr + case 615: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 614: // one_literal -> tkStringLiteral + case 616: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 615: // one_literal -> tkAsciiChar + case 617: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 616: // literal -> literal_list + case 618: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 617: // literal_list -> one_literal + case 619: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 618: // literal_list -> literal_list, one_literal + case 620: // literal_list -> literal_list, one_literal { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as literal_const_line).Add(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 619: // operator_name_ident -> tkOperator, overload_operator + case 621: // operator_name_ident -> tkOperator, overload_operator { CurrentSemanticValue.ex = new operator_name_ident((ValueStack[ValueStack.Depth-1].op as op_type_node).text, (ValueStack[ValueStack.Depth-1].op as op_type_node).type, CurrentLocationSpan); } break; - case 620: // optional_method_modificators -> tkSemiColon + case 622: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new procedure_attribute(proc_attribute.attr_overload),CurrentLocationSpan); } break; - case 621: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 623: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon { parsertools.AddModifier((procedure_attributes_list)ValueStack[ValueStack.Depth-2].stn, proc_attribute.attr_overload); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 622: // optional_method_modificators1 -> /* empty */ + case 624: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new procedure_attribute(proc_attribute.attr_overload),CurrentLocationSpan); } break; - case 623: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 625: // optional_method_modificators1 -> tkSemiColon, meth_modificators { parsertools.AddModifier((procedure_attributes_list)ValueStack[ValueStack.Depth-1].stn, proc_attribute.attr_overload); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 624: // meth_modificators -> meth_modificator + case 626: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 625: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 627: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as procedure_attributes_list).Add(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 626: // identifier -> tkIdentifier + case 628: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 627: // identifier -> property_specifier_directives + case 629: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 628: // identifier -> non_reserved + case 630: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 629: // identifier_or_keyword -> identifier + case 631: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 630: // identifier_or_keyword -> keyword + case 632: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 631: // identifier_or_keyword -> reserved_keyword + case 633: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 632: // identifier_keyword_operatorname -> identifier + case 634: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 633: // identifier_keyword_operatorname -> keyword + case 635: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 634: // identifier_keyword_operatorname -> operator_name_ident + case 636: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 635: // meth_modificator -> tkAbstract + case 637: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 636: // meth_modificator -> tkOverload + case 638: // meth_modificator -> tkOverload { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 637: // meth_modificator -> tkReintroduce + case 639: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 638: // meth_modificator -> tkOverride + case 640: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 639: // meth_modificator -> tkVirtual + case 641: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 640: // property_specifier_directives -> tkRead + case 642: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 641: // property_specifier_directives -> tkWrite + case 643: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 642: // non_reserved -> tkName + case 644: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 643: // non_reserved -> tkNew + case 645: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 644: // visibility_specifier -> tkInternal + case 646: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 645: // visibility_specifier -> tkPublic + case 647: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 646: // visibility_specifier -> tkProtected + case 648: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 647: // visibility_specifier -> tkPrivate + case 649: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 648: // keyword -> visibility_specifier + case 650: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 649: // keyword -> tkSealed + case 651: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 650: // keyword -> tkTemplate + case 652: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 651: // keyword -> tkOr + case 653: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 652: // keyword -> tkTypeOf + case 654: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 653: // keyword -> tkSizeOf + case 655: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 654: // keyword -> tkDefault + case 656: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 655: // keyword -> tkWhere + case 657: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 656: // keyword -> tkXor + case 658: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 657: // keyword -> tkAnd + case 659: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 658: // keyword -> tkDiv + case 660: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 659: // keyword -> tkMod + case 661: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 660: // keyword -> tkShl + case 662: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 661: // keyword -> tkShr + case 663: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 662: // keyword -> tkNot + case 664: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 663: // keyword -> tkAs + case 665: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 664: // keyword -> tkIn + case 666: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 665: // keyword -> tkIs + case 667: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 666: // keyword -> tkArray + case 668: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 667: // keyword -> tkSequence + case 669: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 668: // keyword -> tkBegin + case 670: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 669: // keyword -> tkCase + case 671: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 670: // keyword -> tkClass + case 672: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 671: // keyword -> tkConst + case 673: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 672: // keyword -> tkConstructor + case 674: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 673: // keyword -> tkDestructor + case 675: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 674: // keyword -> tkDownto + case 676: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 675: // keyword -> tkDo + case 677: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 676: // keyword -> tkElse + case 678: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 677: // keyword -> tkExcept + case 679: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 678: // keyword -> tkFile + case 680: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 679: // keyword -> tkAuto + case 681: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 680: // keyword -> tkFinalization + case 682: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 681: // keyword -> tkFinally + case 683: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 682: // keyword -> tkFor + case 684: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 683: // keyword -> tkForeach + case 685: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 684: // keyword -> tkFunction + case 686: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 685: // keyword -> tkIf + case 687: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 686: // keyword -> tkImplementation + case 688: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 687: // keyword -> tkInherited + case 689: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 688: // keyword -> tkInitialization + case 690: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 689: // keyword -> tkInterface + case 691: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 690: // keyword -> tkProcedure + case 692: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 691: // keyword -> tkProperty + case 693: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 692: // keyword -> tkRaise + case 694: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 693: // keyword -> tkRecord + case 695: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 694: // keyword -> tkRepeat + case 696: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 695: // keyword -> tkSet + case 697: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 696: // keyword -> tkTry + case 698: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 697: // keyword -> tkType + case 699: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 698: // keyword -> tkThen + case 700: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 699: // keyword -> tkTo + case 701: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 700: // keyword -> tkUntil + case 702: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 701: // keyword -> tkUses + case 703: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 702: // keyword -> tkVar + case 704: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 703: // keyword -> tkWhile + case 705: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 704: // keyword -> tkWith + case 706: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 705: // keyword -> tkNil + case 707: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 706: // keyword -> tkGoto + case 708: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 707: // keyword -> tkOf + case 709: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 708: // keyword -> tkLabel + case 710: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 709: // keyword -> tkProgram + case 711: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 710: // keyword -> tkUnit + case 712: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 711: // keyword -> tkLibrary + case 713: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 712: // keyword -> tkExternal + case 714: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 713: // keyword -> tkParams + case 715: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 714: // reserved_keyword -> tkOperator + case 716: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 715: // reserved_keyword -> tkEnd + case 717: // reserved_keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 716: // overload_operator -> tkMinus + case 718: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 717: // overload_operator -> tkPlus + case 719: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 718: // overload_operator -> tkSlash + case 720: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 719: // overload_operator -> tkStar + case 721: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 720: // overload_operator -> tkEqual + case 722: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 721: // overload_operator -> tkGreater + case 723: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 722: // overload_operator -> tkGreaterEqual + case 724: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 723: // overload_operator -> tkLower + case 725: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 724: // overload_operator -> tkLowerEqual + case 726: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 725: // overload_operator -> tkNotEqual + case 727: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 726: // overload_operator -> tkOr + case 728: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 727: // overload_operator -> tkXor + case 729: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 728: // overload_operator -> tkAnd + case 730: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 729: // overload_operator -> tkDiv + case 731: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 730: // overload_operator -> tkMod + case 732: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 731: // overload_operator -> tkShl + case 733: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 732: // overload_operator -> tkShr + case 734: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 733: // overload_operator -> tkNot + case 735: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 734: // overload_operator -> tkIn + case 736: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 735: // overload_operator -> tkImplicit + case 737: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 736: // overload_operator -> tkExplicit + case 738: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 737: // overload_operator -> assign_operator + case 739: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 738: // assign_operator -> tkAssign + case 740: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 739: // assign_operator -> tkPlusEqual + case 741: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 740: // assign_operator -> tkMinusEqual + case 742: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 741: // assign_operator -> tkMultEqual + case 743: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 742: // assign_operator -> tkDivEqual + case 744: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 743: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 745: // func_decl_lambda -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), formalPars, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 744: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref, tkArrow, + case 746: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 745: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 747: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, // lambda_type_ref, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-7].id, LocationStack[LocationStack.Depth-7]); @@ -5265,7 +5279,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 748: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref, tkArrow, // lambda_function_body { @@ -5276,7 +5290,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 749: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { @@ -5288,7 +5302,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkComma, lambda_simple_fp_sect, + case 750: // func_decl_lambda -> tkRoundOpen, identifier, tkComma, lambda_simple_fp_sect, // tkRoundClose, lambda_type_ref, tkArrow, // lambda_function_body { @@ -5322,7 +5336,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkComma, lambda_simple_fp_sect, + case 751: // func_decl_lambda -> tkRoundOpen, identifier, tkComma, lambda_simple_fp_sect, // tkSemiColon, full_lambda_fp_list, tkRoundClose, // lambda_type_ref, tkArrow, lambda_function_body { @@ -5361,48 +5375,48 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 752: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 751: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 753: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 752: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 754: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 753: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 755: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 754: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 756: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, null, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 755: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 757: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, // lambda_procedure_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, null, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 756: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 758: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, tkArrow, lambda_procedure_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-4].stn as formal_parameters, null, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 757: // full_lambda_fp_list -> lambda_simple_fp_sect + case 759: // full_lambda_fp_list -> lambda_simple_fp_sect { var typed_pars = ValueStack[ValueStack.Depth-1].stn as typed_parameters; if (typed_pars.vars_type is lambda_inferred_type) @@ -5422,42 +5436,42 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 760: // full_lambda_fp_list -> full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect { CurrentSemanticValue.stn =(ValueStack[ValueStack.Depth-3].stn as formal_parameters).Add(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 759: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 761: // lambda_simple_fp_sect -> ident_list, lambda_type_ref { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-2].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.none, null, CurrentLocationSpan); } break; - case 760: // lambda_type_ref -> /* empty */ + case 762: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 761: // lambda_type_ref -> tkColon, fptype + case 763: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 762: // lambda_function_body -> expr_l1 + case 764: // lambda_function_body -> expr_l1 { CurrentSemanticValue.stn = NewLambdaBody(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 763: // lambda_function_body -> compound_stmt + case 765: // lambda_function_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 764: // lambda_procedure_body -> proc_call + case 766: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 765: // lambda_procedure_body -> compound_stmt + case 767: // lambda_procedure_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.tags b/Parsers/PascalABCParserNewSaushkin/PABC.tags index a58d825e2..917fe9dde 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.tags +++ b/Parsers/PascalABCParserNewSaushkin/PABC.tags @@ -202,7 +202,6 @@ - diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index 557b371a9..2dbd9b81b 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -1,11 +1,9 @@ -useLex=True lex=ABCPascal.lex yacc=ABCPascal.y -lexGen=D:\PascalABC.NET\!PABC_SVN1\Parsers\PascalABCParserNewSaushkin\GPLex_GPPG\gplex.exe -yaccGen=D:\PascalABC.NET\!PABC_SVN1\Parsers\PascalABCParserNewSaushkin\GPLex_GPPG\gppg.exe +lexGen=D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\GPLex_GPPG\Gplex.exe +yaccGen=D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\GPLex_GPPG\gppg.exe lexGenOpt=/unicode yaccGenOpt=/gplex -useGenOpt=False scriptWorkingDir=D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin script= "D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\GPLex_GPPG\gplex.exe" /unicode "D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.lex" @@ -71,6 +69,8 @@ script= + + diff --git a/Parsers/PascalABCParserNewSaushkin/generateParserScanner.bat b/Parsers/PascalABCParserNewSaushkin/generateParserScanner.bat index 076ecd432..4f1d3ea2c 100644 --- a/Parsers/PascalABCParserNewSaushkin/generateParserScanner.bat +++ b/Parsers/PascalABCParserNewSaushkin/generateParserScanner.bat @@ -1,5 +1,5 @@ cls GPLex_GPPG\gplex.exe /unicode ABCPascal.lex -GPLex_GPPG\gppg.exe /no-lines /gplex /report ABCPascal.y +GPLex_GPPG\gppg.exe /no-lines /gplex ABCPascal.y convert4.exe pause \ No newline at end of file diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 316856e71..c53ec0b55 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '2.2.0.961' \ No newline at end of file +!define VERSION '2.2.0.965' \ No newline at end of file diff --git a/SyntaxTree/tree/AbstractVisitor.cs b/SyntaxTree/tree/AbstractVisitor.cs index 44f9c0b3c..4afabcbde 100644 --- a/SyntaxTree/tree/AbstractVisitor.cs +++ b/SyntaxTree/tree/AbstractVisitor.cs @@ -864,6 +864,10 @@ namespace PascalABCCompiler.SyntaxTree public virtual void visit(modern_proc_type _modern_proc_type) { } + + public virtual void visit(yield_node _yield_node) + { + } } diff --git a/SyntaxTree/tree/HierarchyVisitor.cs b/SyntaxTree/tree/HierarchyVisitor.cs index 3eea2c4c7..315959ca1 100644 --- a/SyntaxTree/tree/HierarchyVisitor.cs +++ b/SyntaxTree/tree/HierarchyVisitor.cs @@ -1725,6 +1725,14 @@ namespace PascalABCCompiler.SyntaxTree { } + public virtual void pre_do_visit(yield_node _yield_node) + { + } + + public virtual void post_do_visit(yield_node _yield_node) + { + } + public override void visit(syntax_tree_node _syntax_tree_node) { pre_do_visit(_syntax_tree_node); @@ -3363,6 +3371,13 @@ namespace PascalABCCompiler.SyntaxTree visit(modern_proc_type.res); post_do_visit(_modern_proc_type); } + + public override void visit(yield_node _yield_node) + { + pre_do_visit(_yield_node); + visit(yield_node.ex); + post_do_visit(_yield_node); + } } diff --git a/SyntaxTree/tree/SyntaxTreeStreamReader.cs b/SyntaxTree/tree/SyntaxTreeStreamReader.cs index c15747dcc..07fc933ff 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamReader.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamReader.cs @@ -450,6 +450,8 @@ namespace PascalABCCompiler.SyntaxTree return new sequence_type(); case 214: return new modern_proc_type(); + case 215: + return new yield_node(); } return null; } @@ -3821,6 +3823,18 @@ namespace PascalABCCompiler.SyntaxTree _modern_proc_type.res = _read_node() as type_definition; } + + public void visit(yield_node _yield_node) + { + read_yield_node(_yield_node); + } + + public void read_yield_node(yield_node _yield_node) + { + read_statement(_yield_node); + _yield_node.ex = _read_node() as expression; + } + } diff --git a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs index d5a7e791d..58cf6ec34 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs @@ -6056,6 +6056,27 @@ namespace PascalABCCompiler.SyntaxTree } } + + public void visit(yield_node _yield_node) + { + bw.Write((Int16)215); + write_yield_node(_yield_node); + } + + public void write_yield_node(yield_node _yield_node) + { + write_statement(_yield_node); + if (_yield_node.ex == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _yield_node.ex.visit(this); + } + } + } diff --git a/SyntaxTree/tree/Tree.cs b/SyntaxTree/tree/Tree.cs index 3ad1553b8..67d1131b2 100644 --- a/SyntaxTree/tree/Tree.cs +++ b/SyntaxTree/tree/Tree.cs @@ -3818,11 +3818,6 @@ namespace PascalABCCompiler.SyntaxTree } - public override string ToString() - { - return "while " + expr.ToString() + " do\n" + statements.ToString(); - } - /// ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List /// @@ -4666,7 +4661,7 @@ namespace PascalABCCompiler.SyntaxTree public override string ToString() { - return "label "+labels.ToString(); + return "label "+labels.ToString() + ";"; } /// @@ -8943,6 +8938,20 @@ namespace PascalABCCompiler.SyntaxTree } + public goto_statement(string name) + { + label = new ident(name); + } + public goto_statement(string name, SourceContext sc) + { + label = new ident(name); + source_context = sc; + } + public override string ToString() + { + return "goto " + label; + } + /// ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List /// @@ -9062,9 +9071,16 @@ namespace PascalABCCompiler.SyntaxTree } - public override string ToString() + public labeled_statement(string name, statement st) { - return label_name.ToString() + ": "+to_statement.ToString(); + label_name = new ident(name); + to_statement = st; + } + public labeled_statement(string name, statement st, SourceContext sc) + { + label_name = new ident(name); + to_statement = st; + source_context = sc; } /// @@ -28463,6 +28479,112 @@ namespace PascalABCCompiler.SyntaxTree } + /// + /// + /// + [Serializable] + public class yield_node : statement + { + + /// + ///Конструктор без параметров. + /// + public yield_node() + { + + } + + /// + ///Конструктор с параметрами. + /// + public yield_node(expression _ex) + { + this._ex=_ex; + } + + /// + ///Конструктор с параметрами. + /// + public yield_node(expression _ex,SourceContext sc) + { + this._ex=_ex; + source_context = sc; + } + + protected expression _ex; + + /// + /// + /// + public expression ex + { + get + { + return _ex; + } + set + { + _ex=value; + } + } + + + public override string ToString() + { + return "yield "+ex.ToString(); + } + + /// + ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List + /// + public override Int32 subnodes_count + { + get + { + return 1; + } + } + /// + ///Индексатор для получения всех подузлов + /// + public override object this[Int32 ind] + { + get + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + return ex; + } + return null; + } + set + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + ex = (expression)value; + break; + } + } + } + /// + ///Метод для обхода дерева посетителем + /// + ///Объект-посетитель. + ///Return value is void + public override void visit(IVisitor visitor) + { + visitor.visit(this); + } + + } + + } diff --git a/SyntaxTree/tree/Visitor.cs b/SyntaxTree/tree/Visitor.cs index 4f28b3f6d..9515bcad0 100644 --- a/SyntaxTree/tree/Visitor.cs +++ b/SyntaxTree/tree/Visitor.cs @@ -1294,6 +1294,12 @@ namespace PascalABCCompiler.SyntaxTree ///Node to visit /// Return value is void void visit(modern_proc_type _modern_proc_type); + /// + ///Method to visit yield_node. + /// + ///Node to visit + /// Return value is void + void visit(yield_node _yield_node); } diff --git a/SyntaxTree/tree/tree.nin b/SyntaxTree/tree/tree.nin index a459d09f8..055e8bd9b 100644 Binary files a/SyntaxTree/tree/tree.nin and b/SyntaxTree/tree/tree.nin differ diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index 6ff05c790..1aa0a2e12 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -671,7 +671,7 @@ namespace PascalABCCompiler.TreeConverter convertion_data_and_alghoritms.check_node_parser_error(st); - st = prepare_statement(st); + //st = prepare_statement(st); statement_node sn = ret.visit(st); //sn.loc=get_location(st); @@ -742,7 +742,7 @@ namespace PascalABCCompiler.TreeConverter }*/ //(ssyy) DS, сделай нормальное дерево! // 2015 год - проблема по-прежнему актуальна: expression не должно быть потомком statement - private SyntaxTree.statement prepare_statement(SyntaxTree.statement st) // логика: если это вызов функции, то сделать из него вызов процедуры. И это - единственное место для преобразования + /*private SyntaxTree.statement prepare_statement(SyntaxTree.statement st) // логика: если это вызов функции, то сделать из него вызов процедуры. И это - единственное место для преобразования { SyntaxTree.method_call mc = null; // st as SyntaxTree.method_call; if (mc == null) @@ -753,7 +753,7 @@ namespace PascalABCCompiler.TreeConverter { return new SyntaxTree.procedure_call(mc); } - } + } */ internal statement_node convert_strong(SyntaxTree.statement st) { @@ -779,7 +779,7 @@ namespace PascalABCCompiler.TreeConverter convertion_data_and_alghoritms.check_node_parser_error(st); - st = prepare_statement(st); + //st = prepare_statement(st); statement_node sn = null; //try { diff --git a/Utils/NodesGeneratorNew/NodesGenerator.v12.suo b/Utils/NodesGeneratorNew/NodesGenerator.v12.suo index 805a62f5f..8ad7a4f8b 100644 Binary files a/Utils/NodesGeneratorNew/NodesGenerator.v12.suo and b/Utils/NodesGeneratorNew/NodesGenerator.v12.suo differ diff --git a/bin/Highlighting/PascalABCNET.xshd b/bin/Highlighting/PascalABCNET.xshd index 15772f37a..d893cb92d 100644 --- a/bin/Highlighting/PascalABCNET.xshd +++ b/bin/Highlighting/PascalABCNET.xshd @@ -50,6 +50,7 @@ + diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index 797d7527b..275a32b07 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ