diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index fb2d4218b..ba5430de2 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: IVAN-PC -// DateTime: 25.03.2018 18:30:28 -// UserName: Ivan +// Machine: OBERON +// DateTime: 4/5/2018 7:25:13 PM +// UserName: voganesyan // GPLEX input file // GPLEX frame file // @@ -1952,6 +1952,8 @@ string cur_yytext = yytext; case (int)Tokens.tkExternal: case (int)Tokens.tkYield: case (int)Tokens.tkSequence: + case (int)Tokens.tkTypeclass: + case (int)Tokens.tkInstance: yylval = new Union(); yylval.ti = new token_info(cur_yytext,currentLexLocation); break; diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex index 3ac6dd6bb..034e6f9f9 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex @@ -360,6 +360,8 @@ UNICODEARROW \x890 case (int)Tokens.tkExternal: case (int)Tokens.tkYield: case (int)Tokens.tkSequence: + case (int)Tokens.tkTypeclass: + case (int)Tokens.tkInstance: yylval = new Union(); yylval.ti = new token_info(cur_yytext,currentLexLocation); break; diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 7f4fd6610..f218fab5e 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -33,7 +33,7 @@ %token tkDirectiveName tkAmpersend tkColon tkDotDot tkPoint tkRoundOpen tkRoundClose tkSemiColon tkSquareOpen tkSquareClose tkQuestion tkQuestionPoint tkDoubleQuestion tkQuestionSquareOpen %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 tkIf tkImplementation tkInherited tkInterface tkTypeclass tkInstance 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 tkLoop %token tkSequence tkYield @@ -93,6 +93,7 @@ %type func_name_ident param_name const_field_name func_name_with_template_args identifier_or_keyword unit_name exception_variable const_name func_meth_name_ident label_name type_decl_identifier template_identifier_with_equal %type program_param identifier identifier_keyword_operatorname func_class_name_ident optional_identifier visibility_specifier %type property_specifier_directives non_reserved +%type typeclass_restriction %type if_stmt %type initialization_part %type template_arguments label_list ident_or_keyword_pointseparator_list ident_list param_name_list @@ -1072,8 +1073,23 @@ simple_type_decl { $$ = new type_declaration($1, $2, @$); } + | typeclass_restriction tkEqual tkTypeclass optional_base_classes optional_component_list_seq_end tkSemiColon + { + $$ = new type_declaration($1 as typeclass_restriction, new typeclass_definition($4 as named_type_reference_list, $5 as class_body_list, @$), @$); + } + | typeclass_restriction tkEqual tkInstance optional_component_list_seq_end tkSemiColon + { + $$ = new type_declaration($1 as typeclass_restriction, new instance_definition($4 as class_body_list, @$), @$); + } ; +typeclass_restriction + : simple_type_identifier tkSquareOpen template_param_list tkSquareClose + { + $$ = new typeclass_restriction(($1 as named_type_reference).ToString(), $3 as template_param_list, @$); + } + ; + type_decl_identifier : identifier { $$ = $1; } @@ -1550,6 +1566,10 @@ where_part { $$ = new where_definition($2 as ident_list, $4 as where_type_specificator_list, @$); } + | tkWhere typeclass_restriction tkSemiColon + { + $$ = $1; + } ; type_ref_and_secific_list diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 9761aaa4b..2260b118e 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,9 +1,9 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: IVAN-PC -// DateTime: 25.03.2018 18:30:29 -// UserName: Ivan +// Machine: OBERON +// DateTime: 4/5/2018 7:25:14 PM +// UserName: voganesyan // Input file // options: no-lines gplex @@ -28,25 +28,25 @@ public enum Tokens { tkWhere=19,tkArray=20,tkCase=21,tkClass=22,tkAuto=23,tkConst=24, tkConstructor=25,tkDestructor=26,tkElse=27,tkExcept=28,tkFile=29,tkFor=30, tkForeach=31,tkFunction=32,tkIf=33,tkImplementation=34,tkInherited=35,tkInterface=36, - tkProcedure=37,tkOperator=38,tkProperty=39,tkRaise=40,tkRecord=41,tkSet=42, - tkType=43,tkThen=44,tkUses=45,tkVar=46,tkWhile=47,tkWith=48, - tkNil=49,tkGoto=50,tkOf=51,tkLabel=52,tkLock=53,tkProgram=54, - tkEvent=55,tkDefault=56,tkTemplate=57,tkPacked=58,tkExports=59,tkResourceString=60, - tkThreadvar=61,tkSealed=62,tkPartial=63,tkTo=64,tkDownto=65,tkLoop=66, - tkSequence=67,tkYield=68,tkNew=69,tkOn=70,tkName=71,tkPrivate=72, - tkProtected=73,tkPublic=74,tkInternal=75,tkRead=76,tkWrite=77,tkParseModeExpression=78, - tkParseModeStatement=79,tkParseModeType=80,tkBegin=81,tkEnd=82,tkAsmBody=83,tkILCode=84, - tkError=85,INVISIBLE=86,tkRepeat=87,tkUntil=88,tkDo=89,tkComma=90, - tkFinally=91,tkTry=92,tkInitialization=93,tkFinalization=94,tkUnit=95,tkLibrary=96, - tkExternal=97,tkParams=98,tkNamespace=99,tkAssign=100,tkPlusEqual=101,tkMinusEqual=102, - tkMultEqual=103,tkDivEqual=104,tkMinus=105,tkPlus=106,tkSlash=107,tkStar=108, - tkStarStar=109,tkEqual=110,tkGreater=111,tkGreaterEqual=112,tkLower=113,tkLowerEqual=114, - tkNotEqual=115,tkCSharpStyleOr=116,tkArrow=117,tkOr=118,tkXor=119,tkAnd=120, - tkDiv=121,tkMod=122,tkShl=123,tkShr=124,tkNot=125,tkAs=126, - tkIn=127,tkIs=128,tkImplicit=129,tkExplicit=130,tkAddressOf=131,tkDeref=132, - tkIdentifier=133,tkStringLiteral=134,tkFormatStringLiteral=135,tkAsciiChar=136,tkAbstract=137,tkForward=138, - tkOverload=139,tkReintroduce=140,tkOverride=141,tkVirtual=142,tkExtensionMethod=143,tkInteger=144, - tkFloat=145,tkHex=146}; + tkTypeclass=37,tkInstance=38,tkProcedure=39,tkOperator=40,tkProperty=41,tkRaise=42, + tkRecord=43,tkSet=44,tkType=45,tkThen=46,tkUses=47,tkVar=48, + tkWhile=49,tkWith=50,tkNil=51,tkGoto=52,tkOf=53,tkLabel=54, + tkLock=55,tkProgram=56,tkEvent=57,tkDefault=58,tkTemplate=59,tkPacked=60, + tkExports=61,tkResourceString=62,tkThreadvar=63,tkSealed=64,tkPartial=65,tkTo=66, + tkDownto=67,tkLoop=68,tkSequence=69,tkYield=70,tkNew=71,tkOn=72, + tkName=73,tkPrivate=74,tkProtected=75,tkPublic=76,tkInternal=77,tkRead=78, + tkWrite=79,tkParseModeExpression=80,tkParseModeStatement=81,tkParseModeType=82,tkBegin=83,tkEnd=84, + tkAsmBody=85,tkILCode=86,tkError=87,INVISIBLE=88,tkRepeat=89,tkUntil=90, + tkDo=91,tkComma=92,tkFinally=93,tkTry=94,tkInitialization=95,tkFinalization=96, + tkUnit=97,tkLibrary=98,tkExternal=99,tkParams=100,tkNamespace=101,tkAssign=102, + tkPlusEqual=103,tkMinusEqual=104,tkMultEqual=105,tkDivEqual=106,tkMinus=107,tkPlus=108, + tkSlash=109,tkStar=110,tkStarStar=111,tkEqual=112,tkGreater=113,tkGreaterEqual=114, + tkLower=115,tkLowerEqual=116,tkNotEqual=117,tkCSharpStyleOr=118,tkArrow=119,tkOr=120, + tkXor=121,tkAnd=122,tkDiv=123,tkMod=124,tkShl=125,tkShr=126, + tkNot=127,tkAs=128,tkIn=129,tkIs=130,tkImplicit=131,tkExplicit=132, + tkAddressOf=133,tkDeref=134,tkIdentifier=135,tkStringLiteral=136,tkFormatStringLiteral=137,tkAsciiChar=138, + tkAbstract=139,tkForward=140,tkOverload=141,tkReintroduce=142,tkOverride=143,tkVirtual=144, + tkExtensionMethod=145,tkInteger=146,tkFloat=147,tkHex=148}; // Abstract base class for GPLEX scanners public abstract class ScanBase : AbstractScanner { @@ -74,8 +74,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[851]; - private static State[] states = new State[1378]; + private static Rule[] rules = new Rule[855]; + private static State[] states = new State[1394]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -108,39 +108,40 @@ public partial class GPPGParser: ShiftReduceParser identifier + case 207: // simple_type_decl -> typeclass_restriction, tkEqual, tkTypeclass, + // optional_base_classes, optional_component_list_seq_end, + // tkSemiColon +{ + CurrentSemanticValue.stn = new type_declaration(ValueStack[ValueStack.Depth-6].id as typeclass_restriction, new typeclass_definition(ValueStack[ValueStack.Depth-3].stn as named_type_reference_list, ValueStack[ValueStack.Depth-2].stn as class_body_list, CurrentLocationSpan), CurrentLocationSpan); + } + break; + case 208: // simple_type_decl -> typeclass_restriction, tkEqual, tkInstance, + // optional_component_list_seq_end, tkSemiColon +{ + CurrentSemanticValue.stn = new type_declaration(ValueStack[ValueStack.Depth-5].id as typeclass_restriction, new instance_definition(ValueStack[ValueStack.Depth-2].stn as class_body_list, CurrentLocationSpan), CurrentLocationSpan); + } + break; + case 209: // typeclass_restriction -> simple_type_identifier, tkSquareOpen, + // template_param_list, tkSquareClose +{ + CurrentSemanticValue.id = new typeclass_restriction((ValueStack[ValueStack.Depth-4].td as named_type_reference).ToString(), ValueStack[ValueStack.Depth-2].stn as template_param_list, CurrentLocationSpan); + } + break; + case 210: // type_decl_identifier -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 208: // type_decl_identifier -> identifier, template_arguments + case 211: // type_decl_identifier -> identifier, template_arguments { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan); } break; - case 209: // template_identifier_with_equal -> identifier, tkLower, ident_list, + case 212: // template_identifier_with_equal -> identifier, tkLower, ident_list, // tkGreaterEqual { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-4].id.name, ValueStack[ValueStack.Depth-2].stn as ident_list, CurrentLocationSpan); } break; - case 210: // type_decl_type -> type_ref + case 213: // type_decl_type -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 211: // type_decl_type -> object_type + case 214: // type_decl_type -> object_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 212: // type_ref -> simple_type + case 215: // type_ref -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 213: // type_ref -> simple_type, tkQuestion + case 216: // type_ref -> simple_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3284,46 +3324,46 @@ public partial class GPPGParser: ShiftReduceParser string_type + case 217: // type_ref -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 215: // type_ref -> pointer_type + case 218: // type_ref -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 216: // type_ref -> structured_type + case 219: // type_ref -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 217: // type_ref -> procedural_type + case 220: // type_ref -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 218: // type_ref -> template_type + case 221: // type_ref -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 219: // template_type -> simple_type_identifier, template_type_params + case 222: // template_type -> simple_type_identifier, template_type_params { CurrentSemanticValue.td = new template_type_reference(ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 220: // template_type_params -> tkLower, template_param_list, tkGreater + case 223: // template_type_params -> tkLower, template_param_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 221: // template_param_list -> template_param + case 224: // template_param_list -> template_param { CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 222: // template_param_list -> template_param_list, tkComma, template_param + case 225: // template_param_list -> template_param_list, tkComma, template_param { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as template_param_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 223: // template_param -> simple_type + case 226: // template_param -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 224: // template_param -> simple_type, tkQuestion + case 227: // template_param -> simple_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3338,407 +3378,412 @@ public partial class GPPGParser: ShiftReduceParser structured_type + case 228: // template_param -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 226: // template_param -> procedural_type + case 229: // template_param -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 227: // template_param -> template_type + case 230: // template_param -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 228: // simple_type -> range_expr + case 231: // simple_type -> range_expr { CurrentSemanticValue.td = parsertools.ConvertDotNodeOrIdentToNamedTypeReference(ValueStack[ValueStack.Depth-1].ex); } break; - case 229: // simple_type -> range_expr, tkDotDot, range_expr + case 232: // simple_type -> range_expr, tkDotDot, range_expr { CurrentSemanticValue.td = new diapason(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 230: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose + case 233: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose { CurrentSemanticValue.td = new enum_type_definition(ValueStack[ValueStack.Depth-2].stn as enumerator_list, CurrentLocationSpan); } break; - case 231: // range_expr -> range_term + case 234: // range_expr -> range_term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 232: // range_expr -> range_expr, const_addop, range_term + case 235: // range_expr -> range_expr, const_addop, range_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 233: // range_term -> range_factor + case 236: // range_term -> range_factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 234: // range_term -> range_term, const_mulop, range_factor + case 237: // range_term -> range_term, const_mulop, range_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 235: // range_factor -> simple_type_identifier + case 238: // range_factor -> simple_type_identifier { CurrentSemanticValue.ex = parsertools.ConvertNamedTypeReferenceToDotNodeOrIdent(ValueStack[ValueStack.Depth-1].td as named_type_reference); } break; - case 236: // range_factor -> unsigned_number + case 239: // range_factor -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 237: // range_factor -> sign, range_factor + case 240: // range_factor -> sign, range_factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 238: // range_factor -> literal + case 241: // range_factor -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 239: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose + case 242: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value, ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 240: // simple_type_identifier -> identifier + case 243: // simple_type_identifier -> identifier { CurrentSemanticValue.td = new named_type_reference(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 241: // simple_type_identifier -> simple_type_identifier, tkPoint, + case 244: // simple_type_identifier -> simple_type_identifier, tkPoint, // identifier_or_keyword { CurrentSemanticValue.td = (ValueStack[ValueStack.Depth-3].td as named_type_reference).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 242: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id + case 245: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id { CurrentSemanticValue.stn = new enumerator_list(ValueStack[ValueStack.Depth-3].stn as enumerator, CurrentLocationSpan); (CurrentSemanticValue.stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 243: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id + case 246: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 244: // enumeration_id -> type_ref + case 247: // enumeration_id -> type_ref { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 245: // enumeration_id -> type_ref, tkEqual, expr + case 248: // enumeration_id -> type_ref, tkEqual, expr { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 246: // pointer_type -> tkDeref, fptype + case 249: // pointer_type -> tkDeref, fptype { CurrentSemanticValue.td = new ref_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 247: // structured_type -> unpacked_structured_type + case 250: // structured_type -> unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 248: // structured_type -> tkPacked, unpacked_structured_type + case 251: // structured_type -> tkPacked, unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 249: // unpacked_structured_type -> array_type + case 252: // unpacked_structured_type -> array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 250: // unpacked_structured_type -> record_type + case 253: // unpacked_structured_type -> record_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 251: // unpacked_structured_type -> set_type + case 254: // unpacked_structured_type -> set_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 252: // unpacked_structured_type -> file_type + case 255: // unpacked_structured_type -> file_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 253: // unpacked_structured_type -> sequence_type + case 256: // unpacked_structured_type -> sequence_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 254: // sequence_type -> tkSequence, tkOf, type_ref + case 257: // sequence_type -> tkSequence, tkOf, type_ref { CurrentSemanticValue.td = new sequence_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 255: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, + case 258: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, // type_ref { CurrentSemanticValue.td = new array_type(ValueStack[ValueStack.Depth-4].stn as indexers_types, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 256: // array_type -> unsized_array_type + case 259: // array_type -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 257: // unsized_array_type -> tkArray, tkOf, type_ref + case 260: // unsized_array_type -> tkArray, tkOf, type_ref { CurrentSemanticValue.td = new array_type(null, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 258: // simple_type_list -> simple_type_or_ + case 261: // simple_type_list -> simple_type_or_ { CurrentSemanticValue.stn = new indexers_types(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 259: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ + case 262: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as indexers_types).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 260: // simple_type_or_ -> simple_type + case 263: // simple_type_or_ -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 261: // simple_type_or_ -> /* empty */ + case 264: // simple_type_or_ -> /* empty */ { CurrentSemanticValue.td = null; } break; - case 262: // set_type -> tkSet, tkOf, simple_type + case 265: // set_type -> tkSet, tkOf, simple_type { CurrentSemanticValue.td = new set_type_definition(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 263: // file_type -> tkFile, tkOf, type_ref + case 266: // file_type -> tkFile, tkOf, type_ref { CurrentSemanticValue.td = new file_type(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 264: // file_type -> tkFile + case 267: // file_type -> tkFile { CurrentSemanticValue.td = new file_type(); CurrentSemanticValue.td.source_context = CurrentLocationSpan; } break; - case 265: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose + case 268: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose { CurrentSemanticValue.td = new string_num_definition(ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-4].id, CurrentLocationSpan); } break; - case 266: // procedural_type -> procedural_type_kind + case 269: // procedural_type -> procedural_type_kind { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 267: // procedural_type_kind -> proc_type_decl + case 270: // procedural_type_kind -> proc_type_decl { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 268: // proc_type_decl -> tkProcedure, fp_list + case 271: // proc_type_decl -> tkProcedure, fp_list { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-1].stn as formal_parameters,null,null,false,false,null,null,CurrentLocationSpan); } break; - case 269: // proc_type_decl -> tkFunction, fp_list + case 272: // proc_type_decl -> tkFunction, fp_list { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-1].stn as formal_parameters, null, null, null, null, CurrentLocationSpan); } break; - case 270: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype + case 273: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, null, null, null, ValueStack[ValueStack.Depth-1].td as type_definition, CurrentLocationSpan); } break; - case 271: // proc_type_decl -> simple_type_identifier, tkArrow, template_param + case 274: // proc_type_decl -> simple_type_identifier, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 272: // proc_type_decl -> template_type, tkArrow, template_param + case 275: // proc_type_decl -> template_type, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 273: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param + case 276: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(null,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 274: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 277: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // template_param { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-4].stn as enumerator_list,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 275: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose + case 278: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 276: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose + case 279: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 277: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose + case 280: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,null,null,CurrentLocationSpan); } break; - case 278: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 281: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-5].stn as enumerator_list,null,CurrentLocationSpan); } break; - case 279: // object_type -> class_attributes, class_or_interface_keyword, + case 282: // object_type -> class_attributes, class_or_interface_keyword, // optional_base_classes, optional_where_section, // optional_component_list_seq_end { CurrentSemanticValue.td = NewObjectType((class_attribute)ValueStack[ValueStack.Depth-5].ob, ValueStack[ValueStack.Depth-4].ti, ValueStack[ValueStack.Depth-3].stn as named_type_reference_list, ValueStack[ValueStack.Depth-2].stn as where_definition_list, ValueStack[ValueStack.Depth-1].stn as class_body_list, CurrentLocationSpan); } break; - case 280: // record_type -> tkRecord, optional_base_classes, optional_where_section, + case 283: // record_type -> tkRecord, optional_base_classes, optional_where_section, // member_list_section, tkEnd { CurrentSemanticValue.td = NewRecordType(ValueStack[ValueStack.Depth-4].stn as named_type_reference_list, ValueStack[ValueStack.Depth-3].stn as where_definition_list, ValueStack[ValueStack.Depth-2].stn as class_body_list, CurrentLocationSpan); } break; - case 281: // class_attribute -> tkSealed + case 284: // class_attribute -> tkSealed { CurrentSemanticValue.ob = class_attribute.Sealed; } break; - case 282: // class_attribute -> tkPartial + case 285: // class_attribute -> tkPartial { CurrentSemanticValue.ob = class_attribute.Partial; } break; - case 283: // class_attribute -> tkAbstract + case 286: // class_attribute -> tkAbstract { CurrentSemanticValue.ob = class_attribute.Abstract; } break; - case 284: // class_attribute -> tkAuto + case 287: // class_attribute -> tkAuto { CurrentSemanticValue.ob = class_attribute.Auto; } break; - case 285: // class_attributes -> /* empty */ + case 288: // class_attributes -> /* empty */ { CurrentSemanticValue.ob = class_attribute.None; } break; - case 286: // class_attributes -> class_attributes1 + case 289: // class_attributes -> class_attributes1 { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 287: // class_attributes1 -> class_attribute + case 290: // class_attributes1 -> class_attribute { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 288: // class_attributes1 -> class_attributes1, class_attribute + case 291: // class_attributes1 -> class_attributes1, class_attribute { ValueStack[ValueStack.Depth-2].ob = ((class_attribute)ValueStack[ValueStack.Depth-2].ob) | ((class_attribute)ValueStack[ValueStack.Depth-1].ob); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-2].ob; } break; - case 289: // class_or_interface_keyword -> tkClass + case 292: // class_or_interface_keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 290: // class_or_interface_keyword -> tkInterface + case 293: // class_or_interface_keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 291: // class_or_interface_keyword -> tkTemplate + case 294: // class_or_interface_keyword -> tkTemplate { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-1].ti); } break; - case 292: // class_or_interface_keyword -> tkTemplate, tkClass + case 295: // class_or_interface_keyword -> tkTemplate, tkClass { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "c", CurrentLocationSpan); } break; - case 293: // class_or_interface_keyword -> tkTemplate, tkRecord + case 296: // class_or_interface_keyword -> tkTemplate, tkRecord { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "r", CurrentLocationSpan); } break; - case 294: // class_or_interface_keyword -> tkTemplate, tkInterface + case 297: // class_or_interface_keyword -> tkTemplate, tkInterface { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "i", CurrentLocationSpan); } break; - case 295: // optional_component_list_seq_end -> /* empty */ + case 298: // optional_component_list_seq_end -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 296: // optional_component_list_seq_end -> member_list_section, tkEnd + case 299: // optional_component_list_seq_end -> member_list_section, tkEnd { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 298: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose + case 301: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 299: // base_classes_names_list -> base_class_name + case 302: // base_classes_names_list -> base_class_name { CurrentSemanticValue.stn = new named_type_reference_list(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 300: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name + case 303: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as named_type_reference_list).Add(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 301: // base_class_name -> simple_type_identifier + case 304: // base_class_name -> simple_type_identifier { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 302: // base_class_name -> template_type + case 305: // base_class_name -> template_type { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 303: // template_arguments -> tkLower, ident_list, tkGreater + case 306: // template_arguments -> tkLower, ident_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 304: // optional_where_section -> /* empty */ + case 307: // optional_where_section -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 305: // optional_where_section -> where_part_list + case 308: // optional_where_section -> where_part_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 306: // where_part_list -> where_part + case 309: // where_part_list -> where_part { CurrentSemanticValue.stn = new where_definition_list(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 307: // where_part_list -> where_part_list, where_part + case 310: // where_part_list -> where_part_list, where_part { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as where_definition_list).Add(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 308: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, + case 311: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, // tkSemiColon { CurrentSemanticValue.stn = new where_definition(ValueStack[ValueStack.Depth-4].stn as ident_list, ValueStack[ValueStack.Depth-2].stn as where_type_specificator_list, CurrentLocationSpan); } break; - case 309: // type_ref_and_secific_list -> type_ref_or_secific + case 312: // where_part -> tkWhere, typeclass_restriction, tkSemiColon +{ + CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-3].ti; + } + break; + case 313: // type_ref_and_secific_list -> type_ref_or_secific { CurrentSemanticValue.stn = new where_type_specificator_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 310: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, + case 314: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, // type_ref_or_secific { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as where_type_specificator_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 311: // type_ref_or_secific -> type_ref + case 315: // type_ref_or_secific -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 312: // type_ref_or_secific -> tkClass + case 316: // type_ref_or_secific -> tkClass { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefClass, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 313: // type_ref_or_secific -> tkRecord + case 317: // type_ref_or_secific -> tkRecord { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefValueType, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 314: // type_ref_or_secific -> tkConstructor + case 318: // type_ref_or_secific -> tkConstructor { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefConstructor, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 315: // member_list_section -> member_list + case 319: // member_list_section -> member_list { CurrentSemanticValue.stn = new class_body_list(ValueStack[ValueStack.Depth-1].stn as class_members, CurrentLocationSpan); } break; - case 316: // member_list_section -> member_list_section, ot_visibility_specifier, + case 320: // member_list_section -> member_list_section, ot_visibility_specifier, // member_list { (ValueStack[ValueStack.Depth-1].stn as class_members).access_mod = ValueStack[ValueStack.Depth-2].stn as access_modifer_node; @@ -3750,210 +3795,210 @@ public partial class GPPGParser: ShiftReduceParser tkInternal + case 321: // ot_visibility_specifier -> tkInternal { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.internal_modifer, CurrentLocationSpan); } break; - case 318: // ot_visibility_specifier -> tkPublic + case 322: // ot_visibility_specifier -> tkPublic { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.public_modifer, CurrentLocationSpan); } break; - case 319: // ot_visibility_specifier -> tkProtected + case 323: // ot_visibility_specifier -> tkProtected { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.protected_modifer, CurrentLocationSpan); } break; - case 320: // ot_visibility_specifier -> tkPrivate + case 324: // ot_visibility_specifier -> tkPrivate { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.private_modifer, CurrentLocationSpan); } break; - case 321: // member_list -> /* empty */ + case 325: // member_list -> /* empty */ { CurrentSemanticValue.stn = new class_members(); } break; - case 322: // member_list -> field_or_const_definition_list, optional_semicolon + case 326: // member_list -> field_or_const_definition_list, optional_semicolon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 323: // member_list -> method_decl_list + case 327: // member_list -> method_decl_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 324: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list + case 328: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list { (ValueStack[ValueStack.Depth-3].stn as class_members).members.AddRange((ValueStack[ValueStack.Depth-1].stn as class_members).members); (ValueStack[ValueStack.Depth-3].stn as class_members).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-3].stn; } break; - case 325: // ident_list -> identifier + case 329: // ident_list -> identifier { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 326: // ident_list -> ident_list, tkComma, identifier + case 330: // ident_list -> ident_list, tkComma, identifier { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 327: // optional_semicolon -> /* empty */ + case 331: // optional_semicolon -> /* empty */ { CurrentSemanticValue.ob = null; } break; - case 328: // optional_semicolon -> tkSemiColon + case 332: // optional_semicolon -> tkSemiColon { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti; } break; - case 329: // field_or_const_definition_list -> field_or_const_definition + case 333: // field_or_const_definition_list -> field_or_const_definition { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 330: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, + case 334: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, // field_or_const_definition { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 331: // field_or_const_definition -> attribute_declarations, + case 335: // field_or_const_definition -> attribute_declarations, // simple_field_or_const_definition { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 332: // method_decl_list -> method_or_property_decl + case 336: // method_decl_list -> method_or_property_decl { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 333: // method_decl_list -> method_decl_list, method_or_property_decl + case 337: // method_decl_list -> method_decl_list, method_or_property_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 334: // method_or_property_decl -> method_decl_withattr + case 338: // method_or_property_decl -> method_decl_withattr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 335: // method_or_property_decl -> property_definition + case 339: // method_or_property_decl -> property_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 336: // simple_field_or_const_definition -> tkConst, only_const_decl + case 340: // simple_field_or_const_definition -> tkConst, only_const_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 337: // simple_field_or_const_definition -> field_definition + case 341: // simple_field_or_const_definition -> field_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 338: // simple_field_or_const_definition -> tkClass, field_definition + case 342: // simple_field_or_const_definition -> tkClass, field_definition { (ValueStack[ValueStack.Depth-1].stn as var_def_statement).var_attr = definition_attribute.Static; (ValueStack[ValueStack.Depth-1].stn as var_def_statement).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 339: // field_definition -> var_decl_part + case 343: // field_definition -> var_decl_part { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 340: // field_definition -> tkEvent, ident_list, tkColon, type_ref + case 344: // field_definition -> tkEvent, ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, true, CurrentLocationSpan); } break; - case 341: // method_decl_withattr -> attribute_declarations, method_header + case 345: // method_decl_withattr -> attribute_declarations, method_header { (ValueStack[ValueStack.Depth-1].td as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 342: // method_decl_withattr -> attribute_declarations, method_decl + case 346: // method_decl_withattr -> attribute_declarations, method_decl { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 343: // method_decl -> inclass_proc_func_decl + case 347: // method_decl -> inclass_proc_func_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 344: // method_decl -> inclass_constr_destr_decl + case 348: // method_decl -> inclass_constr_destr_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 345: // method_header -> tkClass, method_procfunc_header + case 349: // method_header -> tkClass, method_procfunc_header { (ValueStack[ValueStack.Depth-1].td as procedure_header).class_keyword = true; CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 346: // method_header -> method_procfunc_header + case 350: // method_header -> method_procfunc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 347: // method_header -> constr_destr_header + case 351: // method_header -> constr_destr_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 348: // method_procfunc_header -> proc_func_header + case 352: // method_procfunc_header -> proc_func_header { CurrentSemanticValue.td = NewProcfuncHeading(ValueStack[ValueStack.Depth-1].td as procedure_header); } break; - case 349: // proc_func_header -> proc_header + case 353: // proc_func_header -> proc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 350: // proc_func_header -> func_header + case 354: // proc_func_header -> func_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 351: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, + case 355: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,false,null,null,CurrentLocationSpan); } break; - case 352: // constr_destr_header -> tkClass, tkConstructor, optional_proc_name, fp_list, + case 356: // constr_destr_header -> tkClass, tkConstructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,true,null,null,CurrentLocationSpan); } break; - case 353: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, + case 357: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new destructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name, false,false,null,null,CurrentLocationSpan); } break; - case 354: // optional_proc_name -> proc_name + case 358: // optional_proc_name -> proc_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 355: // optional_proc_name -> /* empty */ + case 359: // optional_proc_name -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 356: // qualified_identifier -> identifier + case 360: // qualified_identifier -> identifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 357: // qualified_identifier -> visibility_specifier + case 361: // qualified_identifier -> visibility_specifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 358: // qualified_identifier -> qualified_identifier, tkPoint, identifier + case 362: // qualified_identifier -> qualified_identifier, tkPoint, identifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 359: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier + case 363: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 360: // property_definition -> attribute_declarations, simple_prim_property_definition + case 364: // property_definition -> attribute_declarations, simple_prim_property_definition { CurrentSemanticValue.stn = NewPropertyDefinition(ValueStack[ValueStack.Depth-2].stn as attribute_list, ValueStack[ValueStack.Depth-1].stn as declaration, LocationStack[LocationStack.Depth-1]); } break; - case 361: // simple_prim_property_definition -> simple_property_definition + case 365: // simple_prim_property_definition -> simple_property_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 362: // simple_prim_property_definition -> tkClass, simple_property_definition + case 366: // simple_prim_property_definition -> tkClass, simple_property_definition { CurrentSemanticValue.stn = NewSimplePrimPropertyDefinition(ValueStack[ValueStack.Depth-1].stn as simple_property, CurrentLocationSpan); } break; - case 363: // simple_property_definition -> tkProperty, qualified_identifier, + case 367: // simple_property_definition -> tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, array_defaultproperty { CurrentSemanticValue.stn = NewSimplePropertyDefinition(ValueStack[ValueStack.Depth-5].stn as method_name, ValueStack[ValueStack.Depth-4].stn as property_interface, ValueStack[ValueStack.Depth-3].stn as property_accessors, proc_attribute.attr_none, ValueStack[ValueStack.Depth-1].stn as property_array_default, CurrentLocationSpan); } break; - case 364: // simple_property_definition -> tkProperty, qualified_identifier, + case 368: // simple_property_definition -> tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, property_modificator, tkSemiColon, // array_defaultproperty @@ -3966,109 +4011,109 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 369: // array_defaultproperty -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 366: // array_defaultproperty -> tkDefault, tkSemiColon + case 370: // array_defaultproperty -> tkDefault, tkSemiColon { CurrentSemanticValue.stn = new property_array_default(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 367: // property_interface -> /* empty */ + case 371: // property_interface -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 368: // property_interface -> property_parameter_list, tkColon, fptype + case 372: // property_interface -> property_parameter_list, tkColon, fptype { CurrentSemanticValue.stn = new property_interface(ValueStack[ValueStack.Depth-3].stn as property_parameter_list, ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 369: // property_parameter_list -> /* empty */ + case 373: // property_parameter_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 370: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose + case 374: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 371: // parameter_decl_list -> parameter_decl + case 375: // parameter_decl_list -> parameter_decl { CurrentSemanticValue.stn = new property_parameter_list(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 372: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl + case 376: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as property_parameter_list).Add(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 373: // parameter_decl -> ident_list, tkColon, fptype + case 377: // parameter_decl -> ident_list, tkColon, fptype { CurrentSemanticValue.stn = new property_parameter(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 374: // optional_identifier -> identifier + case 378: // optional_identifier -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 375: // optional_identifier -> /* empty */ + case 379: // optional_identifier -> /* empty */ { CurrentSemanticValue.id = null; } break; - case 377: // property_specifiers -> tkRead, optional_identifier, write_property_specifiers + case 381: // property_specifiers -> tkRead, optional_identifier, write_property_specifiers { CurrentSemanticValue.stn = NewPropertySpecifiersRead(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-1].stn as property_accessors, CurrentLocationSpan); } break; - case 378: // property_specifiers -> tkWrite, optional_identifier, read_property_specifiers + case 382: // property_specifiers -> tkWrite, optional_identifier, read_property_specifiers { CurrentSemanticValue.stn = NewPropertySpecifiersWrite(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-1].stn as property_accessors, CurrentLocationSpan); } break; - case 380: // write_property_specifiers -> tkWrite, optional_identifier + case 384: // write_property_specifiers -> tkWrite, optional_identifier { CurrentSemanticValue.stn = NewPropertySpecifiersWrite(ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 382: // read_property_specifiers -> tkRead, optional_identifier + case 386: // read_property_specifiers -> tkRead, optional_identifier { CurrentSemanticValue.stn = NewPropertySpecifiersRead(ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 383: // var_decl -> var_decl_part, tkSemiColon + case 387: // var_decl -> var_decl_part, tkSemiColon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 386: // var_decl_part -> ident_list, tkColon, type_ref + case 390: // var_decl_part -> ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, false, CurrentLocationSpan); } break; - case 387: // var_decl_part -> ident_list, tkAssign, expr + case 391: // var_decl_part -> ident_list, tkAssign, expr { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, null, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 388: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, + case 392: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, // typed_var_init_expression { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 389: // typed_var_init_expression -> typed_const_plus + case 393: // typed_var_init_expression -> typed_const_plus { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 390: // typed_var_init_expression -> expl_func_decl_lambda + case 394: // typed_var_init_expression -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 391: // typed_var_init_expression -> identifier, tkArrow, lambda_function_body + case 395: // typed_var_init_expression -> 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(), LocationStack[LocationStack.Depth-3]), 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(), LocationStack[LocationStack.Depth-3]), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 392: // typed_var_init_expression -> tkRoundOpen, tkRoundClose, lambda_type_ref, + case 396: // typed_var_init_expression -> 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 393: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, + case 397: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, // tkArrow, lambda_function_body { var el = ValueStack[ValueStack.Depth-4].stn as expression_list; @@ -4090,18 +4135,18 @@ public partial class GPPGParser: ShiftReduceParser typed_const + case 398: // typed_const_plus -> typed_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 395: // typed_const_plus -> default_expr + case 399: // typed_const_plus -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 396: // constr_destr_decl -> constr_destr_header, block + case 400: // constr_destr_decl -> constr_destr_header, block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 397: // constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, tkAssign, + case 401: // constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, tkAssign, // unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4112,12 +4157,12 @@ public partial class GPPGParser: ShiftReduceParser constr_destr_header, inclass_block + case 402: // inclass_constr_destr_decl -> constr_destr_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 399: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, + case 403: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, // tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4128,49 +4173,49 @@ public partial class GPPGParser: ShiftReduceParser proc_func_decl_noclass + case 404: // proc_func_decl -> proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 401: // proc_func_decl -> tkClass, proc_func_decl_noclass + case 405: // proc_func_decl -> tkClass, proc_func_decl_noclass { (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 402: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block + case 406: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 403: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 407: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 404: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 408: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, null, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-7].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 405: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 409: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 406: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 410: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, null, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-7].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 407: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, + case 411: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4179,30 +4224,30 @@ public partial class GPPGParser: ShiftReduceParser proc_func_header, tkForward, tkSemiColon + case 412: // proc_func_decl_noclass -> proc_func_header, tkForward, tkSemiColon { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-3].td as procedure_header, null, CurrentLocationSpan); (CurrentSemanticValue.stn as procedure_definition).proc_header.proc_attributes.Add((procedure_attribute)ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-2].id.source_context); } break; - case 409: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass + case 413: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 410: // inclass_proc_func_decl -> tkClass, inclass_proc_func_decl_noclass + case 414: // inclass_proc_func_decl -> tkClass, inclass_proc_func_decl_noclass { if ((ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header != null) (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 411: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block + case 415: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 412: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, + case 416: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, // fptype, optional_method_modificators1, // tkAssign, expr_l1, tkSemiColon { @@ -4211,7 +4256,7 @@ public partial class GPPGParser: ShiftReduceParser tkFunction, func_name, fp_list, + case 417: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // expr_l1, tkSemiColon { @@ -4220,7 +4265,7 @@ public partial class GPPGParser: ShiftReduceParser tkProcedure, proc_name, fp_list, + case 418: // inclass_proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4229,21 +4274,21 @@ public partial class GPPGParser: ShiftReduceParser block + case 419: // proc_func_external_block -> block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 416: // proc_func_external_block -> external_block + case 420: // proc_func_external_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 417: // proc_name -> func_name + case 421: // proc_name -> func_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 418: // func_name -> func_meth_name_ident + case 422: // func_name -> func_meth_name_ident { CurrentSemanticValue.stn = new method_name(null,null, ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 419: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident + case 423: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident { var ln = ValueStack[ValueStack.Depth-3].ob as List; var cnt = ln.Count; @@ -4253,288 +4298,288 @@ public partial class GPPGParser: ShiftReduceParser func_name_with_template_args + case 424: // func_class_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 421: // func_class_name_ident_list -> func_class_name_ident + case 425: // func_class_name_ident_list -> func_class_name_ident { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].id); } break; - case 422: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, + case 426: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, // func_class_name_ident { (ValueStack[ValueStack.Depth-3].ob as List).Add(ValueStack[ValueStack.Depth-1].id); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 423: // func_meth_name_ident -> func_name_with_template_args + case 427: // func_meth_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 424: // func_meth_name_ident -> operator_name_ident + case 428: // func_meth_name_ident -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 425: // func_meth_name_ident -> operator_name_ident, template_arguments + case 429: // func_meth_name_ident -> operator_name_ident, template_arguments { CurrentSemanticValue.id = new template_operator_name(null, ValueStack[ValueStack.Depth-1].stn as ident_list, ValueStack[ValueStack.Depth-2].ex as operator_name_ident, CurrentLocationSpan); } break; - case 426: // func_name_with_template_args -> func_name_ident + case 430: // func_name_with_template_args -> func_name_ident { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 427: // func_name_with_template_args -> func_name_ident, template_arguments + case 431: // func_name_with_template_args -> func_name_ident, template_arguments { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan); } break; - case 428: // func_name_ident -> identifier + case 432: // func_name_ident -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 429: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, + case 433: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, CurrentLocationSpan); } break; - case 430: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, + case 434: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, null, CurrentLocationSpan); } break; - case 431: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, + case 435: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators, optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, ValueStack[ValueStack.Depth-3].td as type_definition, CurrentLocationSpan); } break; - case 432: // external_block -> tkExternal, external_directive_ident, tkName, + case 436: // external_block -> tkExternal, external_directive_ident, tkName, // external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-4].ex, ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan); } break; - case 433: // external_block -> tkExternal, external_directive_ident, tkSemiColon + case 437: // external_block -> tkExternal, external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-2].ex, null, CurrentLocationSpan); } break; - case 434: // external_block -> tkExternal, tkSemiColon + case 438: // external_block -> tkExternal, tkSemiColon { CurrentSemanticValue.stn = new external_directive(null, null, CurrentLocationSpan); } break; - case 435: // external_directive_ident -> identifier + case 439: // external_directive_ident -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 436: // external_directive_ident -> literal + case 440: // external_directive_ident -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 437: // block -> decl_sect_list, compound_stmt, tkSemiColon + case 441: // block -> decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 438: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon + case 442: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 439: // inclass_block -> external_block + case 443: // inclass_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 440: // fp_list -> /* empty */ + case 444: // fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 441: // fp_list -> tkRoundOpen, tkRoundClose + case 445: // fp_list -> tkRoundOpen, tkRoundClose { CurrentSemanticValue.stn = null; } break; - case 442: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose + case 446: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; if (CurrentSemanticValue.stn != null) CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 443: // fp_sect_list -> fp_sect + case 447: // fp_sect_list -> fp_sect { CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 444: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect + case 448: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as formal_parameters).Add(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 445: // fp_sect -> attribute_declarations, simple_fp_sect + case 449: // fp_sect -> attribute_declarations, simple_fp_sect { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 446: // simple_fp_sect -> param_name_list, tkColon, fptype + case 450: // simple_fp_sect -> param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.none, null, CurrentLocationSpan); } break; - case 447: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype + case 451: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.var_parametr, null, CurrentLocationSpan); } break; - case 448: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype + case 452: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.const_parametr, null, CurrentLocationSpan); } break; - case 449: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype + case 453: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td,parametr_kind.params_parametr,null, CurrentLocationSpan); } break; - case 450: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, const_expr + case 454: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, const_expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.none, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 451: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, const_expr + case 455: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, const_expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.var_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 452: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, + case 456: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, // const_expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.const_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 453: // param_name_list -> param_name + case 457: // param_name_list -> param_name { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 454: // param_name_list -> param_name_list, tkComma, param_name + case 458: // param_name_list -> param_name_list, tkComma, param_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 455: // param_name -> identifier + case 459: // param_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 456: // fptype -> type_ref + case 460: // fptype -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 457: // fptype_noproctype -> simple_type + case 461: // fptype_noproctype -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 458: // fptype_noproctype -> string_type + case 462: // fptype_noproctype -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 459: // fptype_noproctype -> pointer_type + case 463: // fptype_noproctype -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 460: // fptype_noproctype -> structured_type + case 464: // fptype_noproctype -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 461: // fptype_noproctype -> template_type + case 465: // fptype_noproctype -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 462: // stmt -> unlabelled_stmt + case 466: // stmt -> unlabelled_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 463: // stmt -> label_name, tkColon, stmt + case 467: // stmt -> label_name, tkColon, stmt { CurrentSemanticValue.stn = new labeled_statement(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 464: // unlabelled_stmt -> /* empty */ + case 468: // unlabelled_stmt -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); CurrentSemanticValue.stn.source_context = null; } break; - case 465: // unlabelled_stmt -> assignment + case 469: // unlabelled_stmt -> assignment { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 466: // unlabelled_stmt -> proc_call + case 470: // unlabelled_stmt -> proc_call { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 467: // unlabelled_stmt -> goto_stmt + case 471: // unlabelled_stmt -> goto_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 468: // unlabelled_stmt -> compound_stmt + case 472: // unlabelled_stmt -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 469: // unlabelled_stmt -> if_stmt + case 473: // unlabelled_stmt -> if_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 470: // unlabelled_stmt -> case_stmt + case 474: // unlabelled_stmt -> case_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 471: // unlabelled_stmt -> repeat_stmt + case 475: // unlabelled_stmt -> repeat_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 472: // unlabelled_stmt -> while_stmt + case 476: // unlabelled_stmt -> while_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 473: // unlabelled_stmt -> for_stmt + case 477: // unlabelled_stmt -> for_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 474: // unlabelled_stmt -> with_stmt + case 478: // unlabelled_stmt -> with_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 475: // unlabelled_stmt -> inherited_message + case 479: // unlabelled_stmt -> inherited_message { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 476: // unlabelled_stmt -> try_stmt + case 480: // unlabelled_stmt -> try_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 477: // unlabelled_stmt -> raise_stmt + case 481: // unlabelled_stmt -> raise_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 478: // unlabelled_stmt -> foreach_stmt + case 482: // unlabelled_stmt -> foreach_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 479: // unlabelled_stmt -> var_stmt + case 483: // unlabelled_stmt -> var_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 480: // unlabelled_stmt -> expr_as_stmt + case 484: // unlabelled_stmt -> expr_as_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 481: // unlabelled_stmt -> lock_stmt + case 485: // unlabelled_stmt -> lock_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 482: // unlabelled_stmt -> yield_stmt + case 486: // unlabelled_stmt -> yield_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 483: // unlabelled_stmt -> yield_sequence_stmt + case 487: // unlabelled_stmt -> yield_sequence_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 484: // unlabelled_stmt -> loop_stmt + case 488: // unlabelled_stmt -> loop_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 485: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt + case 489: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new loop_stmt(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].stn as statement,CurrentLocationSpan); } break; - case 486: // yield_stmt -> tkYield, expr_l1 + case 490: // yield_stmt -> tkYield, expr_l1 { CurrentSemanticValue.stn = new yield_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 487: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 + case 491: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 { CurrentSemanticValue.stn = new yield_sequence_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 488: // var_stmt -> tkVar, var_decl_part + case 492: // var_stmt -> tkVar, var_decl_part { CurrentSemanticValue.stn = new var_statement(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 489: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, + case 493: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, // tkRoundClose, tkAssign, expr { (ValueStack[ValueStack.Depth-4].ob as ident_list).Insert(0,ValueStack[ValueStack.Depth-6].id); @@ -4542,7 +4587,7 @@ public partial class GPPGParser: ShiftReduceParser tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, + case 494: // var_stmt -> tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, // tkAssign, expr { (ValueStack[ValueStack.Depth-4].stn as ident_list).Insert(0,ValueStack[ValueStack.Depth-6].id); @@ -4550,12 +4595,12 @@ public partial class GPPGParser: ShiftReduceParser var_reference, assign_operator, expr_with_func_decl_lambda + case 495: // assignment -> var_reference, assign_operator, expr_with_func_decl_lambda { 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 492: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, + case 496: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, // assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -4565,41 +4610,41 @@ public partial class GPPGParser: ShiftReduceParser variable + case 497: // variable_list -> variable { CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]); } break; - case 494: // variable_list -> variable_list, tkComma, variable + case 498: // variable_list -> variable_list, tkComma, variable { (ValueStack[ValueStack.Depth-3].ob as addressed_value_list).Add(ValueStack[ValueStack.Depth-1].ex as addressed_value); (ValueStack[ValueStack.Depth-3].ob as syntax_tree_node).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 495: // var_ident_list -> tkVar, identifier + case 499: // var_ident_list -> tkVar, identifier { CurrentSemanticValue.ob = new ident_list(ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); } break; - case 496: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier + case 500: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier { (ValueStack[ValueStack.Depth-4].ob as ident_list).Add(ValueStack[ValueStack.Depth-1].id); (ValueStack[ValueStack.Depth-4].ob as ident_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-4].ob; } break; - case 497: // proc_call -> var_reference + case 501: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 498: // goto_stmt -> tkGoto, label_name + case 502: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 499: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 503: // 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; @@ -4607,73 +4652,73 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 504: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 501: // stmt_list -> stmt_list, tkSemiColon, stmt + case 505: // 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 502: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt + case 506: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt { CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 503: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt + case 507: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_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 504: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd + case 508: // case_stmt -> tkCase, expr_l1, 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 505: // case_list -> case_item + case 509: // 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 506: // case_list -> case_list, tkSemiColon, case_item + case 510: // 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 507: // case_item -> /* empty */ + case 511: // case_item -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); } break; - case 508: // case_item -> case_label_list, tkColon, unlabelled_stmt + case 512: // case_item -> case_label_list, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new case_variant(ValueStack[ValueStack.Depth-3].stn as expression_list, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 509: // case_label_list -> case_label + case 513: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 510: // case_label_list -> case_label_list, tkComma, case_label + case 514: // 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 511: // case_label -> const_elem + case 515: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 512: // else_case -> /* empty */ + case 516: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 513: // else_case -> tkElse, stmt_list + case 517: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 514: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 518: // 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; @@ -4681,23 +4726,23 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr_l1, optional_tk_do, unlabelled_stmt + case 519: // while_stmt -> tkWhile, expr_l1, optional_tk_do, unlabelled_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 516: // optional_tk_do -> tkDo + case 520: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 517: // optional_tk_do -> /* empty */ + case 521: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 518: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt + case 522: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new lock_stmt(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 519: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, + case 523: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, // expr_l1, tkDo, unlabelled_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); @@ -4705,68 +4750,68 @@ public partial class GPPGParser: ShiftReduceParser tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, + case 524: // foreach_stmt -> tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, // tkDo, unlabelled_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 521: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, + case 525: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, // unlabelled_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 522: // foreach_stmt_ident_dype_opt -> tkColon, type_ref + case 526: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 524: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, + case 528: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, // for_cycle_type, expr_l1, optional_tk_do, unlabelled_stmt { CurrentSemanticValue.stn = NewForStmt((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 525: // optional_var -> tkVar + case 529: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 526: // optional_var -> /* empty */ + case 530: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 528: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 532: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 529: // for_cycle_type -> tkTo + case 533: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 530: // for_cycle_type -> tkDownto + case 534: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 531: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt + case 535: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new with_statement(ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].stn as expression_list, CurrentLocationSpan); } break; - case 532: // inherited_message -> tkInherited + case 536: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 533: // try_stmt -> tkTry, stmt_list, try_handler + case 537: // 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 534: // try_handler -> tkFinally, stmt_list, tkEnd + case 538: // 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 535: // try_handler -> tkExcept, exception_block, tkEnd + case 539: // 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) @@ -4776,160 +4821,160 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 540: // 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 537: // exception_block -> exception_handler_list, tkSemiColon, + case 541: // 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 538: // exception_block -> stmt_list + case 542: // 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 539: // exception_handler_list -> exception_handler + case 543: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 540: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 544: // 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 541: // exception_block_else_branch -> /* empty */ + case 545: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 542: // exception_block_else_branch -> tkElse, stmt_list + case 546: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 543: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt + case 547: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_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 544: // exception_identifier -> exception_class_type_identifier + case 548: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 545: // exception_identifier -> exception_variable, tkColon, + case 549: // 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 546: // exception_class_type_identifier -> simple_type_identifier + case 550: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 547: // exception_variable -> identifier + case 551: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 548: // raise_stmt -> tkRaise + case 552: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 549: // raise_stmt -> tkRaise, expr + case 553: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 550: // expr_list -> expr_with_func_decl_lambda + case 554: // expr_list -> expr_with_func_decl_lambda { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 551: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda + case 555: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 552: // expr_as_stmt -> allowable_expr_as_stmt + case 556: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 553: // allowable_expr_as_stmt -> new_expr + case 557: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 554: // expr_with_func_decl_lambda -> expr + case 558: // expr_with_func_decl_lambda -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 555: // expr_with_func_decl_lambda -> func_decl_lambda + case 559: // expr_with_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 556: // expr -> expr_l1 + case 560: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 557: // expr -> format_expr + case 561: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 558: // expr_l1 -> expr_dq + case 562: // expr_l1 -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 559: // expr_l1 -> question_expr + case 563: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 560: // expr_dq -> relop_expr + case 564: // expr_dq -> relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 561: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr + case 565: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr { CurrentSemanticValue.ex = new double_question_node(ValueStack[ValueStack.Depth-3].ex as expression, ValueStack[ValueStack.Depth-1].ex as expression, CurrentLocationSpan);} break; - case 562: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 566: // 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 563: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 567: // 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 564: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 + case 568: // 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 565: // simple_or_template_type_reference -> simple_type_identifier + case 569: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 566: // simple_or_template_type_reference -> simple_type_identifier, + case 570: // 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 567: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 571: // 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 568: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 572: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 570: // new_expr -> tkNew, simple_or_template_type_reference, + case 574: // 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 571: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, + case 575: // 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; @@ -4945,7 +4990,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 576: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -4960,12 +5005,12 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 577: // 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 574: // field_in_unnamed_object -> relop_expr + case 578: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -4985,13 +5030,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 579: // 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 576: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 580: // 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; @@ -5002,169 +5047,169 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier + case 581: // array_name_for_new_expr -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 578: // array_name_for_new_expr -> unsized_array_type + case 582: // array_name_for_new_expr -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 579: // optional_expr_list_with_bracket -> /* empty */ + case 583: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 580: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 584: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 581: // relop_expr -> simple_expr + case 585: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 582: // relop_expr -> relop_expr, relop, simple_expr + case 586: // 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 583: // simple_expr_or_nothing -> simple_expr + case 587: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 584: // simple_expr_or_nothing -> /* empty */ + case 588: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 585: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 589: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 586: // format_expr -> tkColon, simple_expr_or_nothing + case 590: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 587: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 591: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, 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 588: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 592: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 589: // relop -> tkEqual + case 593: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 590: // relop -> tkNotEqual + case 594: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 591: // relop -> tkLower + case 595: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 592: // relop -> tkGreater + case 596: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 593: // relop -> tkLowerEqual + case 597: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 594: // relop -> tkGreaterEqual + case 598: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 595: // relop -> tkIn + case 599: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 596: // simple_expr -> term + case 600: // simple_expr -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 597: // simple_expr -> simple_expr, addop, term + case 601: // 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 598: // addop -> tkPlus + case 602: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 599: // addop -> tkMinus + case 603: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 600: // addop -> tkOr + case 604: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 601: // addop -> tkXor + case 605: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 602: // addop -> tkCSharpStyleOr + case 606: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 603: // typecast_op -> tkAs + case 607: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 604: // typecast_op -> tkIs + case 608: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 605: // as_is_expr -> term, typecast_op, simple_or_template_type_reference + case 609: // 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 606: // simple_term -> factor + case 610: // simple_term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 607: // power_expr -> simple_term, tkStarStar, factor + case 611: // power_expr -> simple_term, tkStarStar, 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 608: // term -> factor + case 612: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 609: // term -> new_expr + case 613: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 610: // term -> power_expr + case 614: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 611: // term -> term, mulop, factor + case 615: // 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 612: // term -> term, mulop, power_expr + case 616: // term -> term, mulop, power_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 613: // term -> as_is_expr + case 617: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 614: // mulop -> tkStar + case 618: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 615: // mulop -> tkSlash + case 619: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 616: // mulop -> tkDiv + case 620: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 617: // mulop -> tkMod + case 621: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 618: // mulop -> tkShl + case 622: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 619: // mulop -> tkShr + case 623: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 620: // mulop -> tkAnd + case 624: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 621: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 625: // 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 622: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 626: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -5178,112 +5223,112 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 627: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 624: // factor -> literal_or_number + case 628: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 625: // factor -> default_expr + case 629: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 626: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 630: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 627: // factor -> tkNot, factor + case 631: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 628: // factor -> sign, factor + case 632: // factor -> sign, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 629: // factor -> tkDeref, factor + case 633: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 630: // factor -> var_reference + case 634: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 631: // factor -> tuple + case 635: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 632: // literal_or_number -> literal + case 636: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 633: // literal_or_number -> unsigned_number + case 637: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 634: // var_question_point -> variable, tkQuestionPoint, variable + case 638: // var_question_point -> variable, tkQuestionPoint, variable { CurrentSemanticValue.ex = new dot_question_node(ValueStack[ValueStack.Depth-3].ex as addressed_value,ValueStack[ValueStack.Depth-1].ex as addressed_value,CurrentLocationSpan); } break; - case 635: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 639: // var_question_point -> variable, tkQuestionPoint, var_question_point { CurrentSemanticValue.ex = new dot_question_node(ValueStack[ValueStack.Depth-3].ex as addressed_value,ValueStack[ValueStack.Depth-1].ex as addressed_value,CurrentLocationSpan); } break; - case 636: // var_reference -> var_address, variable + case 640: // 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 637: // var_reference -> variable + case 641: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 638: // var_reference -> var_question_point + case 642: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 639: // var_address -> tkAddressOf + case 643: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 640: // var_address -> var_address, tkAddressOf + case 644: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 641: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 645: // 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 642: // dotted_identifier -> identifier + case 646: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 643: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 647: // 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 644: // variable_as_type -> dotted_identifier + case 648: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 645: // variable_as_type -> dotted_identifier, template_type_params + case 649: // 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 646: // variable -> identifier + case 650: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 647: // variable -> operator_name_ident + case 651: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 648: // variable -> tkInherited, identifier + case 652: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 649: // variable -> tkRoundOpen, expr, tkRoundClose + case 653: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -5293,18 +5338,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 654: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 651: // variable -> typeof_expr + case 655: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 652: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 656: // 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 653: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose + case 657: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 if (el.Count==1 && el.expressions[0] is format_expr) @@ -5319,7 +5364,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 658: // variable -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 if (fe.expr == null) @@ -5329,71 +5374,71 @@ public partial class GPPGParser: ShiftReduceParser variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 659: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value,ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 656: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 660: // variable -> variable, tkPoint, identifier_keyword_operatorname { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 657: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 661: // variable -> tuple, tkPoint, identifier_keyword_operatorname { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 658: // variable -> variable, tkDeref + case 662: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 659: // variable -> variable, tkAmpersend, template_type_params + case 663: // variable -> variable, tkAmpersend, template_type_params { CurrentSemanticValue.ex = new ident_with_templateparams(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 660: // optional_expr_list -> expr_list + case 664: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 661: // optional_expr_list -> /* empty */ + case 665: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 662: // elem_list -> elem_list1 + case 666: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 663: // elem_list -> /* empty */ + case 667: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 664: // elem_list1 -> elem + case 668: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 665: // elem_list1 -> elem_list1, tkComma, elem + case 669: // 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 666: // elem -> expr + case 670: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 667: // elem -> expr, tkDotDot, expr + case 671: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 668: // one_literal -> tkStringLiteral + case 672: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 669: // one_literal -> tkAsciiChar + case 673: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 670: // literal -> literal_list + case 674: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 671: // literal -> tkFormatStringLiteral + case 675: // literal -> tkFormatStringLiteral { if (parsertools.build_tree_for_formatter) { @@ -5405,444 +5450,444 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 676: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 673: // literal_list -> literal_list, one_literal + case 677: // 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 674: // operator_name_ident -> tkOperator, overload_operator + case 678: // 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 675: // optional_method_modificators -> tkSemiColon + case 679: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 676: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 680: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon { //parsertools.AddModifier((procedure_attributes_list)$2, proc_attribute.attr_overload); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 677: // optional_method_modificators1 -> /* empty */ + case 681: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 678: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 682: // optional_method_modificators1 -> tkSemiColon, meth_modificators { //parsertools.AddModifier((procedure_attributes_list)$2, proc_attribute.attr_overload); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 679: // meth_modificators -> meth_modificator + case 683: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 680: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 684: // 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 681: // identifier -> tkIdentifier + case 685: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 682: // identifier -> property_specifier_directives + case 686: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 683: // identifier -> non_reserved + case 687: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 684: // identifier_or_keyword -> identifier + case 688: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 685: // identifier_or_keyword -> keyword + case 689: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 686: // identifier_or_keyword -> reserved_keyword + case 690: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 687: // identifier_keyword_operatorname -> identifier + case 691: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 688: // identifier_keyword_operatorname -> keyword + case 692: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 689: // identifier_keyword_operatorname -> operator_name_ident + case 693: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 690: // meth_modificator -> tkAbstract + case 694: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 691: // meth_modificator -> tkOverload + case 695: // meth_modificator -> tkOverload { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; parsertools.AddWarningFromResource("OVERLOAD_IS_NOT_USED", ValueStack[ValueStack.Depth-1].id.source_context); } break; - case 692: // meth_modificator -> tkReintroduce + case 696: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 693: // meth_modificator -> tkOverride + case 697: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 694: // meth_modificator -> tkExtensionMethod + case 698: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 695: // meth_modificator -> tkVirtual + case 699: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 696: // property_modificator -> tkVirtual + case 700: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 697: // property_modificator -> tkOverride + case 701: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 698: // property_specifier_directives -> tkRead + case 702: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 699: // property_specifier_directives -> tkWrite + case 703: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 700: // non_reserved -> tkName + case 704: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 701: // non_reserved -> tkNew + case 705: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 702: // visibility_specifier -> tkInternal + case 706: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 703: // visibility_specifier -> tkPublic + case 707: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 704: // visibility_specifier -> tkProtected + case 708: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 705: // visibility_specifier -> tkPrivate + case 709: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 706: // keyword -> visibility_specifier + case 710: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 707: // keyword -> tkSealed + case 711: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 708: // keyword -> tkTemplate + case 712: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 709: // keyword -> tkOr + case 713: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 710: // keyword -> tkTypeOf + case 714: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 711: // keyword -> tkSizeOf + case 715: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 712: // keyword -> tkDefault + case 716: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 713: // keyword -> tkWhere + case 717: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 714: // keyword -> tkXor + case 718: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 715: // keyword -> tkAnd + case 719: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 716: // keyword -> tkDiv + case 720: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 717: // keyword -> tkMod + case 721: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 718: // keyword -> tkShl + case 722: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 719: // keyword -> tkShr + case 723: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 720: // keyword -> tkNot + case 724: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 721: // keyword -> tkAs + case 725: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 722: // keyword -> tkIn + case 726: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 723: // keyword -> tkIs + case 727: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 724: // keyword -> tkArray + case 728: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 725: // keyword -> tkSequence + case 729: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 726: // keyword -> tkBegin + case 730: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 727: // keyword -> tkCase + case 731: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 728: // keyword -> tkClass + case 732: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 729: // keyword -> tkConst + case 733: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 730: // keyword -> tkConstructor + case 734: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 731: // keyword -> tkDestructor + case 735: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 732: // keyword -> tkDownto + case 736: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 733: // keyword -> tkDo + case 737: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 734: // keyword -> tkElse + case 738: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 735: // keyword -> tkExcept + case 739: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 736: // keyword -> tkFile + case 740: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 737: // keyword -> tkAuto + case 741: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 738: // keyword -> tkFinalization + case 742: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 739: // keyword -> tkFinally + case 743: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 740: // keyword -> tkFor + case 744: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 741: // keyword -> tkForeach + case 745: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 742: // keyword -> tkFunction + case 746: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 743: // keyword -> tkIf + case 747: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 744: // keyword -> tkImplementation + case 748: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 745: // keyword -> tkInherited + case 749: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 746: // keyword -> tkInitialization + case 750: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 747: // keyword -> tkInterface + case 751: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 748: // keyword -> tkProcedure + case 752: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 749: // keyword -> tkProperty + case 753: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 750: // keyword -> tkRaise + case 754: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 751: // keyword -> tkRecord + case 755: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 752: // keyword -> tkRepeat + case 756: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 753: // keyword -> tkSet + case 757: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 754: // keyword -> tkTry + case 758: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 755: // keyword -> tkType + case 759: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 756: // keyword -> tkThen + case 760: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 757: // keyword -> tkTo + case 761: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 758: // keyword -> tkUntil + case 762: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 759: // keyword -> tkUses + case 763: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 760: // keyword -> tkVar + case 764: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 761: // keyword -> tkWhile + case 765: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 762: // keyword -> tkWith + case 766: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 763: // keyword -> tkNil + case 767: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 764: // keyword -> tkGoto + case 768: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 765: // keyword -> tkOf + case 769: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 766: // keyword -> tkLabel + case 770: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 767: // keyword -> tkProgram + case 771: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 768: // keyword -> tkUnit + case 772: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 769: // keyword -> tkLibrary + case 773: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 770: // keyword -> tkNamespace + case 774: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 771: // keyword -> tkExternal + case 775: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 772: // keyword -> tkParams + case 776: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 773: // keyword -> tkEvent + case 777: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 774: // keyword -> tkYield + case 778: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 775: // reserved_keyword -> tkOperator + case 779: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 776: // reserved_keyword -> tkEnd + case 780: // reserved_keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 777: // overload_operator -> tkMinus + case 781: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 778: // overload_operator -> tkPlus + case 782: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 779: // overload_operator -> tkSlash + case 783: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 780: // overload_operator -> tkStar + case 784: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 781: // overload_operator -> tkEqual + case 785: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 782: // overload_operator -> tkGreater + case 786: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 783: // overload_operator -> tkGreaterEqual + case 787: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 784: // overload_operator -> tkLower + case 788: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 785: // overload_operator -> tkLowerEqual + case 789: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 786: // overload_operator -> tkNotEqual + case 790: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 787: // overload_operator -> tkOr + case 791: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 788: // overload_operator -> tkXor + case 792: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 789: // overload_operator -> tkAnd + case 793: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 790: // overload_operator -> tkDiv + case 794: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 791: // overload_operator -> tkMod + case 795: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 792: // overload_operator -> tkShl + case 796: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 793: // overload_operator -> tkShr + case 797: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 794: // overload_operator -> tkNot + case 798: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 795: // overload_operator -> tkIn + case 799: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 796: // overload_operator -> tkImplicit + case 800: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 797: // overload_operator -> tkExplicit + case 801: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 798: // overload_operator -> assign_operator + case 802: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 799: // overload_operator -> tkStarStar + case 803: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 800: // assign_operator -> tkAssign + case 804: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 801: // assign_operator -> tkPlusEqual + case 805: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 802: // assign_operator -> tkMinusEqual + case 806: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 803: // assign_operator -> tkMultEqual + case 807: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 804: // assign_operator -> tkDivEqual + case 808: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 805: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 809: // 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(), LocationStack[LocationStack.Depth-3]), 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(), LocationStack[LocationStack.Depth-3]), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 806: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 810: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // 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 807: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 811: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-7].id, LocationStack[LocationStack.Depth-7]); @@ -5851,7 +5896,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 812: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -5862,7 +5907,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 813: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -5874,7 +5919,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 814: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -5936,61 +5981,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 815: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 812: // optional_full_lambda_fp_list -> /* empty */ + case 816: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 813: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 817: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 814: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 818: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body { CurrentSemanticValue.ob = new pair_type_stlist(ValueStack[ValueStack.Depth-3].td,ValueStack[ValueStack.Depth-1].stn as statement_list); } break; - case 815: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 819: // 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, 1, CurrentLocationSpan); } break; - case 816: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 820: // 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, 1, CurrentLocationSpan); } break; - case 817: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 821: // 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, 1, CurrentLocationSpan); } break; - case 818: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 822: // 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, 2, CurrentLocationSpan); } break; - case 819: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 823: // 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, 2, CurrentLocationSpan); } break; - case 820: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 824: // 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, 2, CurrentLocationSpan); } break; - case 821: // full_lambda_fp_list -> lambda_simple_fp_sect + case 825: // 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) @@ -6010,147 +6055,147 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 826: // 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 823: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 827: // 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 824: // lambda_type_ref -> /* empty */ + case 828: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 825: // lambda_type_ref -> tkColon, fptype + case 829: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 826: // lambda_type_ref_noproctype -> /* empty */ + case 830: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 827: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 831: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 828: // lambda_function_body -> expr_l1 + case 832: // lambda_function_body -> expr_l1 { CurrentSemanticValue.stn = NewLambdaBody(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 829: // lambda_function_body -> compound_stmt + case 833: // lambda_function_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 830: // lambda_function_body -> if_stmt + case 834: // lambda_function_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 831: // lambda_function_body -> while_stmt + case 835: // lambda_function_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 832: // lambda_function_body -> repeat_stmt + case 836: // lambda_function_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 833: // lambda_function_body -> for_stmt + case 837: // lambda_function_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 834: // lambda_function_body -> foreach_stmt + case 838: // lambda_function_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 835: // lambda_function_body -> case_stmt + case 839: // lambda_function_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 836: // lambda_function_body -> try_stmt + case 840: // lambda_function_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 837: // lambda_function_body -> lock_stmt + case 841: // lambda_function_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 838: // lambda_function_body -> yield_stmt + case 842: // lambda_function_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 839: // lambda_procedure_body -> proc_call + case 843: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 840: // lambda_procedure_body -> compound_stmt + case 844: // lambda_procedure_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 841: // lambda_procedure_body -> if_stmt + case 845: // lambda_procedure_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 842: // lambda_procedure_body -> while_stmt + case 846: // lambda_procedure_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 843: // lambda_procedure_body -> repeat_stmt + case 847: // lambda_procedure_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 844: // lambda_procedure_body -> for_stmt + case 848: // lambda_procedure_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 845: // lambda_procedure_body -> foreach_stmt + case 849: // lambda_procedure_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 846: // lambda_procedure_body -> case_stmt + case 850: // lambda_procedure_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 847: // lambda_procedure_body -> try_stmt + case 851: // lambda_procedure_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 848: // lambda_procedure_body -> lock_stmt + case 852: // lambda_procedure_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 849: // lambda_procedure_body -> yield_stmt + case 853: // lambda_procedure_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 850: // lambda_procedure_body -> assignment + case 854: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } diff --git a/Parsers/PascalABCParserNewSaushkin/Keywords.cs b/Parsers/PascalABCParserNewSaushkin/Keywords.cs index 12054d32d..c6b483691 100644 --- a/Parsers/PascalABCParserNewSaushkin/Keywords.cs +++ b/Parsers/PascalABCParserNewSaushkin/Keywords.cs @@ -142,6 +142,8 @@ namespace GPPGParserScanner keywords.Add(Convert("sequence"), (int)Tokens.tkSequence); keywords.Add(Convert("yield"), (int)Tokens.tkYield); keywords.Add(Convert("namespace"), (int)Tokens.tkNamespace); + keywords.Add(Convert("typeclass"), (int)Tokens.tkTypeclass); + keywords.Add(Convert("instance"), (int)Tokens.tkInstance); } static Keywords() diff --git a/SyntaxTree/tree/AbstractVisitor.cs b/SyntaxTree/tree/AbstractVisitor.cs index 738e559a0..ee687e854 100644 --- a/SyntaxTree/tree/AbstractVisitor.cs +++ b/SyntaxTree/tree/AbstractVisitor.cs @@ -8,16 +8,16 @@ namespace PascalABCCompiler.SyntaxTree { } - public virtual void visit(syntax_tree_node _syntax_tree_node) - { - DefaultVisit(_syntax_tree_node); - } - public virtual void visit(expression _expression) { DefaultVisit(_expression); } + public virtual void visit(syntax_tree_node _syntax_tree_node) + { + DefaultVisit(_syntax_tree_node); + } + public virtual void visit(statement _statement) { DefaultVisit(_statement); @@ -1118,7 +1118,21 @@ namespace PascalABCCompiler.SyntaxTree DefaultVisit(_double_question_node); } - } + public virtual void visit(typeclass_restriction _typeclass_restriction) + { + DefaultVisit(_typeclass_restriction); + } + + public virtual void visit(instance_definition _instance_definition) + { + DefaultVisit(_instance_definition); + } + + public virtual void visit(typeclass_definition _typeclass_definition) + { + DefaultVisit(_typeclass_definition); + } + } } diff --git a/SyntaxTree/tree/HierarchyVisitor.cs b/SyntaxTree/tree/HierarchyVisitor.cs index ec5e042e9..83c8ddbba 100644 --- a/SyntaxTree/tree/HierarchyVisitor.cs +++ b/SyntaxTree/tree/HierarchyVisitor.cs @@ -5,14 +5,6 @@ namespace PascalABCCompiler.SyntaxTree public class HierarchyVisitor: AbstractVisitor { - public virtual void pre_do_visit(syntax_tree_node _syntax_tree_node) - { - } - - public virtual void post_do_visit(syntax_tree_node _syntax_tree_node) - { - } - public virtual void pre_do_visit(expression _expression) { } @@ -21,6 +13,14 @@ namespace PascalABCCompiler.SyntaxTree { } + public virtual void pre_do_visit(syntax_tree_node _syntax_tree_node) + { + } + + public virtual void post_do_visit(syntax_tree_node _syntax_tree_node) + { + } + public virtual void pre_do_visit(statement _statement) { } @@ -1781,11 +1781,28 @@ namespace PascalABCCompiler.SyntaxTree { } - public override void visit(syntax_tree_node _syntax_tree_node) + public virtual void pre_do_visit(typeclass_restriction _typeclass_restriction) + { + } + + public virtual void post_do_visit(typeclass_restriction _typeclass_restriction) + { + } + + public virtual void pre_do_visit(instance_definition _instance_definition) + { + } + + public virtual void post_do_visit(instance_definition _instance_definition) + { + } + + public virtual void pre_do_visit(typeclass_definition _typeclass_definition) + { + } + + public virtual void post_do_visit(typeclass_definition _typeclass_definition) { - DefaultVisit(_syntax_tree_node); - pre_do_visit(_syntax_tree_node); - post_do_visit(_syntax_tree_node); } public override void visit(expression _expression) @@ -1795,6 +1812,13 @@ namespace PascalABCCompiler.SyntaxTree post_do_visit(_expression); } + public override void visit(syntax_tree_node _syntax_tree_node) + { + DefaultVisit(_syntax_tree_node); + pre_do_visit(_syntax_tree_node); + post_do_visit(_syntax_tree_node); + } + public override void visit(statement _statement) { DefaultVisit(_statement); @@ -3683,6 +3707,31 @@ namespace PascalABCCompiler.SyntaxTree visit(double_question_node.right); post_do_visit(_double_question_node); } + + public override void visit(typeclass_restriction _typeclass_restriction) + { + DefaultVisit(_typeclass_restriction); + pre_do_visit(_typeclass_restriction); + visit(typeclass_restriction.restriction_args); + post_do_visit(_typeclass_restriction); + } + + public override void visit(instance_definition _instance_definition) + { + DefaultVisit(_instance_definition); + pre_do_visit(_instance_definition); + visit(instance_definition.body); + post_do_visit(_instance_definition); + } + + public override void visit(typeclass_definition _typeclass_definition) + { + DefaultVisit(_typeclass_definition); + pre_do_visit(_typeclass_definition); + visit(typeclass_definition.additional_restrictions); + visit(typeclass_definition.body); + post_do_visit(_typeclass_definition); + } } diff --git a/SyntaxTree/tree/SyntaxTreeStreamReader.cs b/SyntaxTree/tree/SyntaxTreeStreamReader.cs index 5d6ae75d3..4671319b2 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamReader.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamReader.cs @@ -21,9 +21,9 @@ namespace PascalABCCompiler.SyntaxTree switch(node_class_number) { case 0: - return new syntax_tree_node(); - case 1: return new expression(); + case 1: + return new syntax_tree_node(); case 2: return new statement(); case 3: @@ -464,6 +464,12 @@ namespace PascalABCCompiler.SyntaxTree return new sugared_addressed_value(); case 221: return new double_question_node(); + case 222: + return new typeclass_restriction(); + case 223: + return new instance_definition(); + case 224: + return new typeclass_definition(); } return null; } @@ -481,6 +487,17 @@ namespace PascalABCCompiler.SyntaxTree } } + public void visit(expression _expression) + { + read_expression(_expression); + } + + public void read_expression(expression _expression) + { + read_declaration(_expression); + } + + public void visit(syntax_tree_node _syntax_tree_node) { read_syntax_tree_node(_syntax_tree_node); @@ -509,17 +526,6 @@ namespace PascalABCCompiler.SyntaxTree } - public void visit(expression _expression) - { - read_expression(_expression); - } - - public void read_expression(expression _expression) - { - read_declaration(_expression); - } - - public void visit(statement _statement) { read_statement(_statement); @@ -3920,6 +3926,43 @@ namespace PascalABCCompiler.SyntaxTree _double_question_node.right = _read_node() as expression; } + + public void visit(typeclass_restriction _typeclass_restriction) + { + read_typeclass_restriction(_typeclass_restriction); + } + + public void read_typeclass_restriction(typeclass_restriction _typeclass_restriction) + { + read_ident(_typeclass_restriction); + _typeclass_restriction.restriction_args = _read_node() as template_param_list; + } + + + public void visit(instance_definition _instance_definition) + { + read_instance_definition(_instance_definition); + } + + public void read_instance_definition(instance_definition _instance_definition) + { + read_type_definition(_instance_definition); + _instance_definition.body = _read_node() as class_body_list; + } + + + public void visit(typeclass_definition _typeclass_definition) + { + read_typeclass_definition(_typeclass_definition); + } + + public void read_typeclass_definition(typeclass_definition _typeclass_definition) + { + read_type_definition(_typeclass_definition); + _typeclass_definition.additional_restrictions = _read_node() as named_type_reference_list; + _typeclass_definition.body = _read_node() as class_body_list; + } + } diff --git a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs index 454a25607..64a4f2709 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs @@ -16,9 +16,21 @@ namespace PascalABCCompiler.SyntaxTree public BinaryWriter bw; - public void visit(syntax_tree_node _syntax_tree_node) + public void visit(expression _expression) { bw.Write((Int16)0); + write_expression(_expression); + } + + public void write_expression(expression _expression) + { + write_declaration(_expression); + } + + + public void visit(syntax_tree_node _syntax_tree_node) + { + bw.Write((Int16)1); write_syntax_tree_node(_syntax_tree_node); } @@ -55,18 +67,6 @@ namespace PascalABCCompiler.SyntaxTree } - public void visit(expression _expression) - { - bw.Write((Int16)1); - write_expression(_expression); - } - - public void write_expression(expression _expression) - { - write_declaration(_expression); - } - - public void visit(statement _statement) { bw.Write((Int16)2); @@ -6139,6 +6139,78 @@ namespace PascalABCCompiler.SyntaxTree } } + + public void visit(typeclass_restriction _typeclass_restriction) + { + bw.Write((Int16)222); + write_typeclass_restriction(_typeclass_restriction); + } + + public void write_typeclass_restriction(typeclass_restriction _typeclass_restriction) + { + write_ident(_typeclass_restriction); + if (_typeclass_restriction.restriction_args == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _typeclass_restriction.restriction_args.visit(this); + } + } + + + public void visit(instance_definition _instance_definition) + { + bw.Write((Int16)223); + write_instance_definition(_instance_definition); + } + + public void write_instance_definition(instance_definition _instance_definition) + { + write_type_definition(_instance_definition); + if (_instance_definition.body == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _instance_definition.body.visit(this); + } + } + + + public void visit(typeclass_definition _typeclass_definition) + { + bw.Write((Int16)224); + write_typeclass_definition(_typeclass_definition); + } + + public void write_typeclass_definition(typeclass_definition _typeclass_definition) + { + write_type_definition(_typeclass_definition); + if (_typeclass_definition.additional_restrictions == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _typeclass_definition.additional_restrictions.visit(this); + } + if (_typeclass_definition.body == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _typeclass_definition.body.visit(this); + } + } + } diff --git a/SyntaxTree/tree/Tree.cs b/SyntaxTree/tree/Tree.cs index 219ff5578..1b6ce6530 100644 --- a/SyntaxTree/tree/Tree.cs +++ b/SyntaxTree/tree/Tree.cs @@ -5,6 +5,106 @@ using System.Collections.Generic; namespace PascalABCCompiler.SyntaxTree { + /// + ///Выражение + /// + [Serializable] + public partial class expression : declaration + { + + /// + ///Конструктор без параметров. + /// + public expression() + { + + } + + /// Создает копию узла + public override syntax_tree_node Clone() + { + expression copy = new expression(); + copy.Parent = this.Parent; + if (source_context != null) + copy.source_context = new SourceContext(source_context); + if (attributes != null) + { + copy.attributes = (attribute_list)attributes.Clone(); + copy.attributes.Parent = copy; + } + return copy; + } + + /// Получает копию данного узла корректного типа + public new expression TypedClone() + { + return Clone() as expression; + } + + /// Заполняет поля Parent в непосредственных дочерних узлах + public override void FillParentsInDirectChilds() + { + if (attributes != null) + attributes.Parent = this; + } + + /// Заполняет поля Parent во всем поддереве + public override void FillParentsInAllChilds() + { + FillParentsInDirectChilds(); + attributes?.FillParentsInAllChilds(); + } + + /// + ///Свойство для получения количества всех подузлов без элементов поля типа List + /// + public override Int32 subnodes_without_list_elements_count + { + get + { + return 0; + } + } + /// + ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List + /// + public override Int32 subnodes_count + { + get + { + return 0; + } + } + /// + ///Индексатор для получения всех подузлов + /// + public override syntax_tree_node this[Int32 ind] + { + get + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + return null; + } + set + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + } + } + /// + ///Метод для обхода дерева посетителем + /// + ///Объект-посетитель. + ///Return value is void + public override void visit(IVisitor visitor) + { + visitor.visit(this); + } + + } + + /// ///Базовый класс для всех классов синтаксического дерева /// @@ -133,106 +233,6 @@ namespace PascalABCCompiler.SyntaxTree } - /// - ///Выражение - /// - [Serializable] - public partial class expression : declaration - { - - /// - ///Конструктор без параметров. - /// - public expression() - { - - } - - /// Создает копию узла - public override syntax_tree_node Clone() - { - expression copy = new expression(); - copy.Parent = this.Parent; - if (source_context != null) - copy.source_context = new SourceContext(source_context); - if (attributes != null) - { - copy.attributes = (attribute_list)attributes.Clone(); - copy.attributes.Parent = copy; - } - return copy; - } - - /// Получает копию данного узла корректного типа - public new expression TypedClone() - { - return Clone() as expression; - } - - /// Заполняет поля Parent в непосредственных дочерних узлах - public override void FillParentsInDirectChilds() - { - if (attributes != null) - attributes.Parent = this; - } - - /// Заполняет поля Parent во всем поддереве - public override void FillParentsInAllChilds() - { - FillParentsInDirectChilds(); - attributes?.FillParentsInAllChilds(); - } - - /// - ///Свойство для получения количества всех подузлов без элементов поля типа List - /// - public override Int32 subnodes_without_list_elements_count - { - get - { - return 0; - } - } - /// - ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List - /// - public override Int32 subnodes_count - { - get - { - return 0; - } - } - /// - ///Индексатор для получения всех подузлов - /// - public override syntax_tree_node this[Int32 ind] - { - get - { - if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) - throw new IndexOutOfRangeException(); - return null; - } - set - { - if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) - throw new IndexOutOfRangeException(); - } - } - /// - ///Метод для обхода дерева посетителем - /// - ///Объект-посетитель. - ///Return value is void - public override void visit(IVisitor visitor) - { - visitor.visit(this); - } - - } - - /// ///Оператор /// @@ -47404,6 +47404,594 @@ namespace PascalABCCompiler.SyntaxTree } + /// + ///Представляет конструкцию вида Typeclass[T], где Typleclass это ограничение, которое накладывается на тип T + /// + [Serializable] + public partial class typeclass_restriction : ident + { + + /// + ///Конструктор без параметров. + /// + public typeclass_restriction() + { + + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_restriction(template_param_list _restriction_args) + { + this._restriction_args=_restriction_args; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_restriction(template_param_list _restriction_args,SourceContext sc) + { + this._restriction_args=_restriction_args; + source_context = sc; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_restriction(string _name,template_param_list _restriction_args) + { + this._name=_name; + this._restriction_args=_restriction_args; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_restriction(string _name,template_param_list _restriction_args,SourceContext sc) + { + this._name=_name; + this._restriction_args=_restriction_args; + source_context = sc; + FillParentsInDirectChilds(); + } + protected template_param_list _restriction_args; + + /// + /// + /// + public template_param_list restriction_args + { + get + { + return _restriction_args; + } + set + { + _restriction_args=value; + } + } + + + /// Создает копию узла + public override syntax_tree_node Clone() + { + typeclass_restriction copy = new typeclass_restriction(); + copy.Parent = this.Parent; + if (source_context != null) + copy.source_context = new SourceContext(source_context); + if (attributes != null) + { + copy.attributes = (attribute_list)attributes.Clone(); + copy.attributes.Parent = copy; + } + copy.name = name; + if (restriction_args != null) + { + copy.restriction_args = (template_param_list)restriction_args.Clone(); + copy.restriction_args.Parent = copy; + } + return copy; + } + + /// Получает копию данного узла корректного типа + public new typeclass_restriction TypedClone() + { + return Clone() as typeclass_restriction; + } + + /// Заполняет поля Parent в непосредственных дочерних узлах + public override void FillParentsInDirectChilds() + { + if (attributes != null) + attributes.Parent = this; + if (restriction_args != null) + restriction_args.Parent = this; + } + + /// Заполняет поля Parent во всем поддереве + public override void FillParentsInAllChilds() + { + FillParentsInDirectChilds(); + attributes?.FillParentsInAllChilds(); + restriction_args?.FillParentsInAllChilds(); + } + + /// + ///Свойство для получения количества всех подузлов без элементов поля типа List + /// + public override Int32 subnodes_without_list_elements_count + { + get + { + return 1; + } + } + /// + ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List + /// + public override Int32 subnodes_count + { + get + { + return 1; + } + } + /// + ///Индексатор для получения всех подузлов + /// + public override syntax_tree_node this[Int32 ind] + { + get + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + return restriction_args; + } + return null; + } + set + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + restriction_args = (template_param_list)value; + break; + } + } + } + /// + ///Метод для обхода дерева посетителем + /// + ///Объект-посетитель. + ///Return value is void + public override void visit(IVisitor visitor) + { + visitor.visit(this); + } + + } + + + /// + ///Определение того как конкретный тип удовлетворяет классу типов. + /// + [Serializable] + public partial class instance_definition : type_definition + { + + /// + ///Конструктор без параметров. + /// + public instance_definition() + { + + } + + /// + ///Конструктор с параметрами. + /// + public instance_definition(class_body_list _body) + { + this._body=_body; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public instance_definition(class_body_list _body,SourceContext sc) + { + this._body=_body; + source_context = sc; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public instance_definition(type_definition_attr_list _attr_list,class_body_list _body) + { + this._attr_list=_attr_list; + this._body=_body; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public instance_definition(type_definition_attr_list _attr_list,class_body_list _body,SourceContext sc) + { + this._attr_list=_attr_list; + this._body=_body; + source_context = sc; + FillParentsInDirectChilds(); + } + protected class_body_list _body; + + /// + /// + /// + public class_body_list body + { + get + { + return _body; + } + set + { + _body=value; + } + } + + + /// Создает копию узла + public override syntax_tree_node Clone() + { + instance_definition copy = new instance_definition(); + copy.Parent = this.Parent; + if (source_context != null) + copy.source_context = new SourceContext(source_context); + if (attributes != null) + { + copy.attributes = (attribute_list)attributes.Clone(); + copy.attributes.Parent = copy; + } + if (attr_list != null) + { + copy.attr_list = (type_definition_attr_list)attr_list.Clone(); + copy.attr_list.Parent = copy; + } + if (body != null) + { + copy.body = (class_body_list)body.Clone(); + copy.body.Parent = copy; + } + return copy; + } + + /// Получает копию данного узла корректного типа + public new instance_definition TypedClone() + { + return Clone() as instance_definition; + } + + /// Заполняет поля Parent в непосредственных дочерних узлах + public override void FillParentsInDirectChilds() + { + if (attributes != null) + attributes.Parent = this; + if (attr_list != null) + attr_list.Parent = this; + if (body != null) + body.Parent = this; + } + + /// Заполняет поля Parent во всем поддереве + public override void FillParentsInAllChilds() + { + FillParentsInDirectChilds(); + attributes?.FillParentsInAllChilds(); + attr_list?.FillParentsInAllChilds(); + body?.FillParentsInAllChilds(); + } + + /// + ///Свойство для получения количества всех подузлов без элементов поля типа List + /// + public override Int32 subnodes_without_list_elements_count + { + get + { + return 2; + } + } + /// + ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List + /// + public override Int32 subnodes_count + { + get + { + return 2; + } + } + /// + ///Индексатор для получения всех подузлов + /// + public override syntax_tree_node this[Int32 ind] + { + get + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + return attr_list; + case 1: + return body; + } + return null; + } + set + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + attr_list = (type_definition_attr_list)value; + break; + case 1: + body = (class_body_list)value; + break; + } + } + } + /// + ///Метод для обхода дерева посетителем + /// + ///Объект-посетитель. + ///Return value is void + public override void visit(IVisitor visitor) + { + visitor.visit(this); + } + + } + + + /// + ///Определение класса типов + /// + [Serializable] + public partial class typeclass_definition : type_definition + { + + /// + ///Конструктор без параметров. + /// + public typeclass_definition() + { + + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_definition(named_type_reference_list _additional_restrictions,class_body_list _body) + { + this._additional_restrictions=_additional_restrictions; + this._body=_body; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_definition(named_type_reference_list _additional_restrictions,class_body_list _body,SourceContext sc) + { + this._additional_restrictions=_additional_restrictions; + this._body=_body; + source_context = sc; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_definition(type_definition_attr_list _attr_list,named_type_reference_list _additional_restrictions,class_body_list _body) + { + this._attr_list=_attr_list; + this._additional_restrictions=_additional_restrictions; + this._body=_body; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public typeclass_definition(type_definition_attr_list _attr_list,named_type_reference_list _additional_restrictions,class_body_list _body,SourceContext sc) + { + this._attr_list=_attr_list; + this._additional_restrictions=_additional_restrictions; + this._body=_body; + source_context = sc; + FillParentsInDirectChilds(); + } + protected named_type_reference_list _additional_restrictions; + protected class_body_list _body; + + /// + /// + /// + public named_type_reference_list additional_restrictions + { + get + { + return _additional_restrictions; + } + set + { + _additional_restrictions=value; + } + } + + /// + /// + /// + public class_body_list body + { + get + { + return _body; + } + set + { + _body=value; + } + } + + + /// Создает копию узла + public override syntax_tree_node Clone() + { + typeclass_definition copy = new typeclass_definition(); + copy.Parent = this.Parent; + if (source_context != null) + copy.source_context = new SourceContext(source_context); + if (attributes != null) + { + copy.attributes = (attribute_list)attributes.Clone(); + copy.attributes.Parent = copy; + } + if (attr_list != null) + { + copy.attr_list = (type_definition_attr_list)attr_list.Clone(); + copy.attr_list.Parent = copy; + } + if (additional_restrictions != null) + { + copy.additional_restrictions = (named_type_reference_list)additional_restrictions.Clone(); + copy.additional_restrictions.Parent = copy; + } + if (body != null) + { + copy.body = (class_body_list)body.Clone(); + copy.body.Parent = copy; + } + return copy; + } + + /// Получает копию данного узла корректного типа + public new typeclass_definition TypedClone() + { + return Clone() as typeclass_definition; + } + + /// Заполняет поля Parent в непосредственных дочерних узлах + public override void FillParentsInDirectChilds() + { + if (attributes != null) + attributes.Parent = this; + if (attr_list != null) + attr_list.Parent = this; + if (additional_restrictions != null) + additional_restrictions.Parent = this; + if (body != null) + body.Parent = this; + } + + /// Заполняет поля Parent во всем поддереве + public override void FillParentsInAllChilds() + { + FillParentsInDirectChilds(); + attributes?.FillParentsInAllChilds(); + attr_list?.FillParentsInAllChilds(); + additional_restrictions?.FillParentsInAllChilds(); + body?.FillParentsInAllChilds(); + } + + /// + ///Свойство для получения количества всех подузлов без элементов поля типа List + /// + public override Int32 subnodes_without_list_elements_count + { + get + { + return 3; + } + } + /// + ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List + /// + public override Int32 subnodes_count + { + get + { + return 3; + } + } + /// + ///Индексатор для получения всех подузлов + /// + public override syntax_tree_node this[Int32 ind] + { + get + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + return attr_list; + case 1: + return additional_restrictions; + case 2: + return body; + } + return null; + } + set + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + attr_list = (type_definition_attr_list)value; + break; + case 1: + additional_restrictions = (named_type_reference_list)value; + break; + case 2: + body = (class_body_list)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 0dba6f75e..7a2900a9c 100644 --- a/SyntaxTree/tree/Visitor.cs +++ b/SyntaxTree/tree/Visitor.cs @@ -4,12 +4,6 @@ namespace PascalABCCompiler.SyntaxTree public interface IVisitor { - /// - ///Method to visit syntax_tree_node. - /// - ///Node to visit - /// Return value is void - void visit(syntax_tree_node _syntax_tree_node); /// ///Method to visit expression. /// @@ -17,6 +11,12 @@ namespace PascalABCCompiler.SyntaxTree /// Return value is void void visit(expression _expression); /// + ///Method to visit syntax_tree_node. + /// + ///Node to visit + /// Return value is void + void visit(syntax_tree_node _syntax_tree_node); + /// ///Method to visit statement. /// ///Node to visit @@ -1336,6 +1336,24 @@ namespace PascalABCCompiler.SyntaxTree ///Node to visit /// Return value is void void visit(double_question_node _double_question_node); + /// + ///Method to visit typeclass_restriction. + /// + ///Node to visit + /// Return value is void + void visit(typeclass_restriction _typeclass_restriction); + /// + ///Method to visit instance_definition. + /// + ///Node to visit + /// Return value is void + void visit(instance_definition _instance_definition); + /// + ///Method to visit typeclass_definition. + /// + ///Node to visit + /// Return value is void + void visit(typeclass_definition _typeclass_definition); } diff --git a/SyntaxTree/tree/tree.xml b/SyntaxTree/tree/tree.xml index c54c4bbf5..c0d2c1630 100644 --- a/SyntaxTree/tree/tree.xml +++ b/SyntaxTree/tree/tree.xml @@ -2855,6 +2855,57 @@ + + + + + + + + 0 + + + 9 + + + + + + + + + + + 0 + 0 + 0 + + + 4 + 9 + 5 + + + + + + + + + + + + 0 + 0 + 0 + + + 9 + 4 + 5 + + + Tree.cs @@ -2875,11 +2926,12 @@ - - + + + @@ -2895,9 +2947,11 @@ + + @@ -2927,6 +2981,7 @@ + @@ -3463,6 +3518,8 @@ + + @@ -4064,6 +4121,11 @@ + + + + + diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 6d6ae8ece..b96743ebc 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -3125,7 +3125,7 @@ begin while t<>typeof(Object) do begin meth := t.GetMethod('ToString',System.Reflection.BindingFlags.Public or - System.Reflection.BindingFlags.Instance or + System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly,nil,new System.Type[0],nil); if meth<>nil then break; @@ -3209,8 +3209,8 @@ begin else while t<>typeof(object) do begin - var ff := t.GetFields(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.Instance or System.Reflection.BindingFlags.DeclaredOnly); - var pp := t.GetProperties(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.Instance or System.Reflection.BindingFlags.DeclaredOnly); + var ff := t.GetFields(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly); + var pp := t.GetProperties(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly); for var i:=ff.Length-1 downto 0 do sb.Insert(1,StructuredObjectToString(ff[i].GetValue(o),n+1)+','); @@ -10667,7 +10667,7 @@ begin begin variable.GetType.InvokeMember('$Init$', System.Reflection.BindingFlags.InvokeMethod or - System.Reflection.BindingFlags.Instance or + System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.Public, nil, variable, nil); result := variable; end; diff --git a/TestSuite/CompilationSamples/Reflection.pas b/TestSuite/CompilationSamples/Reflection.pas index 99deddba5..3e9de8d69 100644 --- a/TestSuite/CompilationSamples/Reflection.pas +++ b/TestSuite/CompilationSamples/Reflection.pas @@ -2,7 +2,7 @@ uses System,System.Reflection; begin - var bf := BindingFlags.Public or BindingFlags.NonPublic or BindingFlags.Instance or BindingFlags.Static; + var bf := BindingFlags.Public or BindingFlags.NonPublic or BindingFlags.&Instance or BindingFlags.Static; var t: &Type := typeof(DateTime); var mi := t.GetMembers(bf); foreach m: MemberInfo in mi do diff --git a/TestSuite/formatter_tests/input/PABCSystem.pas b/TestSuite/formatter_tests/input/PABCSystem.pas index 07985ce1d..d27a5405f 100644 --- a/TestSuite/formatter_tests/input/PABCSystem.pas +++ b/TestSuite/formatter_tests/input/PABCSystem.pas @@ -3043,7 +3043,7 @@ begin while t<>typeof(Object) do begin meth := t.GetMethod('ToString',System.Reflection.BindingFlags.Public or - System.Reflection.BindingFlags.Instance or + System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly,nil,new System.Type[0],nil); if meth<>nil then break; @@ -3127,8 +3127,8 @@ begin else while t<>typeof(object) do begin - var ff := t.GetFields(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.Instance or System.Reflection.BindingFlags.DeclaredOnly); - var pp := t.GetProperties(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.Instance or System.Reflection.BindingFlags.DeclaredOnly); + var ff := t.GetFields(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly); + var pp := t.GetProperties(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly); for var i:=ff.Length-1 downto 0 do sb.Insert(1,StructuredObjectToString(ff[i].GetValue(o),n+1)+','); @@ -10427,7 +10427,7 @@ begin begin variable.GetType.InvokeMember('$Init$', System.Reflection.BindingFlags.InvokeMethod or - System.Reflection.BindingFlags.Instance or + System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.Public, nil, variable, nil); result := variable; end; diff --git a/TestSuite/formatter_tests/input/Reflection.pas b/TestSuite/formatter_tests/input/Reflection.pas index 99deddba5..3e9de8d69 100644 --- a/TestSuite/formatter_tests/input/Reflection.pas +++ b/TestSuite/formatter_tests/input/Reflection.pas @@ -2,7 +2,7 @@ uses System,System.Reflection; begin - var bf := BindingFlags.Public or BindingFlags.NonPublic or BindingFlags.Instance or BindingFlags.Static; + var bf := BindingFlags.Public or BindingFlags.NonPublic or BindingFlags.&Instance or BindingFlags.Static; var t: &Type := typeof(DateTime); var mi := t.GetMembers(bf); foreach m: MemberInfo in mi do diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 6d6ae8ece..b96743ebc 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -3125,7 +3125,7 @@ begin while t<>typeof(Object) do begin meth := t.GetMethod('ToString',System.Reflection.BindingFlags.Public or - System.Reflection.BindingFlags.Instance or + System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly,nil,new System.Type[0],nil); if meth<>nil then break; @@ -3209,8 +3209,8 @@ begin else while t<>typeof(object) do begin - var ff := t.GetFields(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.Instance or System.Reflection.BindingFlags.DeclaredOnly); - var pp := t.GetProperties(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.Instance or System.Reflection.BindingFlags.DeclaredOnly); + var ff := t.GetFields(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly); + var pp := t.GetProperties(System.Reflection.BindingFlags.Public or System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.DeclaredOnly); for var i:=ff.Length-1 downto 0 do sb.Insert(1,StructuredObjectToString(ff[i].GetValue(o),n+1)+','); @@ -10667,7 +10667,7 @@ begin begin variable.GetType.InvokeMember('$Init$', System.Reflection.BindingFlags.InvokeMethod or - System.Reflection.BindingFlags.Instance or + System.Reflection.BindingFlags.&Instance or System.Reflection.BindingFlags.Public, nil, variable, nil); result := variable; end;