diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 2e8ad911b..66d39b4fd 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "3"; public const string Build = "0"; - public const string Revision = "1613"; + public const string Revision = "1615"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index e5e66036c..46430cd04 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=0 -%REVISION%=1613 +%REVISION%=1615 %MINOR%=3 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index e8fd2b9c3..02a68f084 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: DESKTOP-A6LT9RI -// DateTime: 08.01.2018 18:30:37 +// DateTime: 08.01.2018 23:03:48 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index d97d31406..edfd5b6e2 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -1989,6 +1989,13 @@ constr_destr_decl { $$ = new procedure_definition($1 as procedure_header, $2 as block, @$); } + | tkConstructor optional_proc_name fp_list tkAssign unlabelled_stmt tkSemiColon + { + if ($5 is empty_statement) + parsertools.AddErrorFromResource("EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION",@6); + var tmp = new constructor(null,$3 as formal_parameters,new procedure_attributes_list(new List(),@$),$2 as method_name,false,false,null,null,@$); + $$ = new procedure_definition(tmp as procedure_header, new block(null,new statement_list($5 as statement,@5),@5), @$); + } ; inclass_constr_destr_decl diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index a28aa1d26..5dfaedb4c 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-A6LT9RI -// DateTime: 08.01.2018 18:30:37 +// DateTime: 08.01.2018 23:03:49 // UserName: ????????? // Input file @@ -74,8 +74,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[847]; - private static State[] states = new State[1371]; + private static Rule[] rules = new Rule[848]; + private static State[] states = new State[1374]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -155,11 +155,11 @@ public partial class GPPGParser: ShiftReduceParser constr_destr_header, inclass_block + case 396: // constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, tkAssign, + // unlabelled_stmt, tkSemiColon +{ + if (ValueStack[ValueStack.Depth-2].stn is empty_statement) + parsertools.AddErrorFromResource("EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION",LocationStack[LocationStack.Depth-1]); + var tmp = new constructor(null,ValueStack[ValueStack.Depth-4].stn as formal_parameters,new procedure_attributes_list(new List(),CurrentLocationSpan),ValueStack[ValueStack.Depth-5].stn as method_name,false,false,null,null,CurrentLocationSpan); + CurrentSemanticValue.stn = new procedure_definition(tmp as procedure_header, new block(null,new statement_list(ValueStack[ValueStack.Depth-2].stn as statement,LocationStack[LocationStack.Depth-2]),LocationStack[LocationStack.Depth-2]), CurrentLocationSpan); + } + break; + case 397: // 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 397: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, + case 398: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, // tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4099,49 +4112,49 @@ public partial class GPPGParser: ShiftReduceParser proc_func_decl_noclass + case 399: // proc_func_decl -> proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 399: // proc_func_decl -> tkClass, proc_func_decl_noclass + case 400: // 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 400: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block + case 401: // 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 401: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 402: // 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 402: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 403: // 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 403: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 404: // 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 404: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 405: // 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 405: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, + case 406: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4150,28 +4163,28 @@ public partial class GPPGParser: ShiftReduceParser proc_func_header, tkForward, tkSemiColon + case 407: // 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 407: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass + case 408: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 408: // inclass_proc_func_decl -> tkClass, inclass_proc_func_decl_noclass + case 409: // 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 409: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block + case 410: // 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 410: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, + case 411: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, // fptype, optional_method_modificators1, // tkAssign, expr_l1, tkSemiColon { @@ -4180,7 +4193,7 @@ public partial class GPPGParser: ShiftReduceParser tkFunction, func_name, fp_list, + case 412: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // expr_l1, tkSemiColon { @@ -4189,7 +4202,7 @@ public partial class GPPGParser: ShiftReduceParser tkProcedure, proc_name, fp_list, + case 413: // inclass_proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4198,21 +4211,21 @@ public partial class GPPGParser: ShiftReduceParser block + case 414: // proc_func_external_block -> block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 414: // proc_func_external_block -> external_block + case 415: // proc_func_external_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 415: // proc_name -> func_name + case 416: // proc_name -> func_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 416: // func_name -> func_meth_name_ident + case 417: // func_name -> func_meth_name_ident { CurrentSemanticValue.stn = new method_name(null,null, ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 417: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident + case 418: // 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; @@ -4222,285 +4235,285 @@ public partial class GPPGParser: ShiftReduceParser func_name_with_template_args + case 419: // func_class_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 419: // func_class_name_ident_list -> func_class_name_ident + case 420: // 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 420: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, + case 421: // 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 421: // func_meth_name_ident -> func_name_with_template_args + case 422: // func_meth_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 422: // func_meth_name_ident -> operator_name_ident + case 423: // func_meth_name_ident -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 423: // func_meth_name_ident -> operator_name_ident, template_arguments + case 424: // 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 424: // func_name_with_template_args -> func_name_ident + case 425: // func_name_with_template_args -> func_name_ident { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 425: // func_name_with_template_args -> func_name_ident, template_arguments + case 426: // 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 426: // func_name_ident -> identifier + case 427: // func_name_ident -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 427: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, + case 428: // 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 428: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, + case 429: // 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 429: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, + case 430: // 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 430: // external_block -> tkExternal, external_directive_ident, tkName, + case 431: // 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 431: // external_block -> tkExternal, external_directive_ident, tkSemiColon + case 432: // external_block -> tkExternal, external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-2].ex, null, CurrentLocationSpan); } break; - case 432: // external_block -> tkExternal, tkSemiColon + case 433: // external_block -> tkExternal, tkSemiColon { CurrentSemanticValue.stn = new external_directive(null, null, CurrentLocationSpan); } break; - case 433: // external_directive_ident -> identifier + case 434: // external_directive_ident -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 434: // external_directive_ident -> literal + case 435: // external_directive_ident -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 435: // block -> decl_sect_list, compound_stmt, tkSemiColon + case 436: // 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 436: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon + case 437: // 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 437: // fp_list -> /* empty */ + case 438: // fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 438: // fp_list -> tkRoundOpen, tkRoundClose + case 439: // fp_list -> tkRoundOpen, tkRoundClose { CurrentSemanticValue.stn = null; } break; - case 439: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose + case 440: // 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 440: // fp_sect_list -> fp_sect + case 441: // fp_sect_list -> fp_sect { CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 441: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect + case 442: // 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 442: // fp_sect -> attribute_declarations, simple_fp_sect + case 443: // 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 443: // simple_fp_sect -> param_name_list, tkColon, fptype + case 444: // 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 444: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype + case 445: // 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 445: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype + case 446: // 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 446: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype + case 447: // 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 447: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, const_expr + case 448: // 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 448: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, const_expr + case 449: // 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 449: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, + case 450: // 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 450: // param_name_list -> param_name + case 451: // param_name_list -> param_name { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 451: // param_name_list -> param_name_list, tkComma, param_name + case 452: // 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 452: // param_name -> identifier + case 453: // param_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 453: // fptype -> type_ref + case 454: // fptype -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 454: // fptype_noproctype -> simple_type + case 455: // fptype_noproctype -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 455: // fptype_noproctype -> string_type + case 456: // fptype_noproctype -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 456: // fptype_noproctype -> pointer_type + case 457: // fptype_noproctype -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 457: // fptype_noproctype -> structured_type + case 458: // fptype_noproctype -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 458: // fptype_noproctype -> template_type + case 459: // fptype_noproctype -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 459: // stmt -> unlabelled_stmt + case 460: // stmt -> unlabelled_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 460: // stmt -> label_name, tkColon, stmt + case 461: // 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 461: // unlabelled_stmt -> /* empty */ + case 462: // unlabelled_stmt -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); CurrentSemanticValue.stn.source_context = null; } break; - case 462: // unlabelled_stmt -> assignment + case 463: // unlabelled_stmt -> assignment { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 463: // unlabelled_stmt -> proc_call + case 464: // unlabelled_stmt -> proc_call { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 464: // unlabelled_stmt -> goto_stmt + case 465: // unlabelled_stmt -> goto_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 465: // unlabelled_stmt -> compound_stmt + case 466: // unlabelled_stmt -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 466: // unlabelled_stmt -> if_stmt + case 467: // unlabelled_stmt -> if_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 467: // unlabelled_stmt -> case_stmt + case 468: // unlabelled_stmt -> case_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 468: // unlabelled_stmt -> repeat_stmt + case 469: // unlabelled_stmt -> repeat_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 469: // unlabelled_stmt -> while_stmt + case 470: // unlabelled_stmt -> while_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 470: // unlabelled_stmt -> for_stmt + case 471: // unlabelled_stmt -> for_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 471: // unlabelled_stmt -> with_stmt + case 472: // unlabelled_stmt -> with_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 472: // unlabelled_stmt -> inherited_message + case 473: // unlabelled_stmt -> inherited_message { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 473: // unlabelled_stmt -> try_stmt + case 474: // unlabelled_stmt -> try_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 474: // unlabelled_stmt -> raise_stmt + case 475: // unlabelled_stmt -> raise_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 475: // unlabelled_stmt -> foreach_stmt + case 476: // unlabelled_stmt -> foreach_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 476: // unlabelled_stmt -> var_stmt + case 477: // unlabelled_stmt -> var_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 477: // unlabelled_stmt -> expr_as_stmt + case 478: // unlabelled_stmt -> expr_as_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 478: // unlabelled_stmt -> lock_stmt + case 479: // unlabelled_stmt -> lock_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 479: // unlabelled_stmt -> yield_stmt + case 480: // unlabelled_stmt -> yield_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 480: // unlabelled_stmt -> yield_sequence_stmt + case 481: // unlabelled_stmt -> yield_sequence_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 481: // unlabelled_stmt -> loop_stmt + case 482: // unlabelled_stmt -> loop_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 482: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt + case 483: // 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 483: // yield_stmt -> tkYield, expr_l1 + case 484: // yield_stmt -> tkYield, expr_l1 { CurrentSemanticValue.stn = new yield_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 484: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 + case 485: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 { CurrentSemanticValue.stn = new yield_sequence_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 485: // var_stmt -> tkVar, var_decl_part + case 486: // var_stmt -> tkVar, var_decl_part { CurrentSemanticValue.stn = new var_statement(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 486: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, + case 487: // 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); @@ -4508,7 +4521,7 @@ public partial class GPPGParser: ShiftReduceParser tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, + case 488: // 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); @@ -4516,12 +4529,12 @@ public partial class GPPGParser: ShiftReduceParser var_reference, assign_operator, expr_with_func_decl_lambda + case 489: // 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 489: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, + case 490: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, // assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -4531,41 +4544,41 @@ public partial class GPPGParser: ShiftReduceParser variable + case 491: // variable_list -> variable { CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]); } break; - case 491: // variable_list -> variable_list, tkComma, variable + case 492: // 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 492: // var_ident_list -> tkVar, identifier + case 493: // var_ident_list -> tkVar, identifier { CurrentSemanticValue.ob = new ident_list(ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); } break; - case 493: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier + case 494: // 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 494: // proc_call -> var_reference + case 495: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 495: // goto_stmt -> tkGoto, label_name + case 496: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 496: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 497: // 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; @@ -4573,73 +4586,73 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 498: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 498: // stmt_list -> stmt_list, tkSemiColon, stmt + case 499: // 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 499: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt + case 500: // 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 500: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt + case 501: // 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 501: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd + case 502: // 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 502: // case_list -> case_item + case 503: // 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 503: // case_list -> case_list, tkSemiColon, case_item + case 504: // 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 504: // case_item -> /* empty */ + case 505: // case_item -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); } break; - case 505: // case_item -> case_label_list, tkColon, unlabelled_stmt + case 506: // 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 506: // case_label_list -> case_label + case 507: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 507: // case_label_list -> case_label_list, tkComma, case_label + case 508: // 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 508: // case_label -> const_elem + case 509: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 509: // else_case -> /* empty */ + case 510: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 510: // else_case -> tkElse, stmt_list + case 511: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 511: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 512: // 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; @@ -4647,23 +4660,23 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr_l1, optional_tk_do, unlabelled_stmt + case 513: // 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 513: // optional_tk_do -> tkDo + case 514: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 514: // optional_tk_do -> /* empty */ + case 515: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 515: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt + case 516: // 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 516: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, + case 517: // 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); @@ -4671,68 +4684,68 @@ public partial class GPPGParser: ShiftReduceParser tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, + case 518: // 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 518: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, + case 519: // 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 519: // foreach_stmt_ident_dype_opt -> tkColon, type_ref + case 520: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 521: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, + case 522: // 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 522: // optional_var -> tkVar + case 523: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 523: // optional_var -> /* empty */ + case 524: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 525: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 526: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 526: // for_cycle_type -> tkTo + case 527: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 527: // for_cycle_type -> tkDownto + case 528: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 528: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt + case 529: // 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 529: // inherited_message -> tkInherited + case 530: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 530: // try_stmt -> tkTry, stmt_list, try_handler + case 531: // 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 531: // try_handler -> tkFinally, stmt_list, tkEnd + case 532: // 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 532: // try_handler -> tkExcept, exception_block, tkEnd + case 533: // 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) @@ -4742,160 +4755,160 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 534: // 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 534: // exception_block -> exception_handler_list, tkSemiColon, + case 535: // 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 535: // exception_block -> stmt_list + case 536: // 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 536: // exception_handler_list -> exception_handler + case 537: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 537: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 538: // 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 538: // exception_block_else_branch -> /* empty */ + case 539: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 539: // exception_block_else_branch -> tkElse, stmt_list + case 540: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 540: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt + case 541: // 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 541: // exception_identifier -> exception_class_type_identifier + case 542: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 542: // exception_identifier -> exception_variable, tkColon, + case 543: // 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 543: // exception_class_type_identifier -> simple_type_identifier + case 544: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 544: // exception_variable -> identifier + case 545: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 545: // raise_stmt -> tkRaise + case 546: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 546: // raise_stmt -> tkRaise, expr + case 547: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 547: // expr_list -> expr_with_func_decl_lambda + case 548: // expr_list -> expr_with_func_decl_lambda { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 548: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda + case 549: // 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 549: // expr_as_stmt -> allowable_expr_as_stmt + case 550: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 550: // allowable_expr_as_stmt -> new_expr + case 551: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 551: // expr_with_func_decl_lambda -> expr + case 552: // expr_with_func_decl_lambda -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 552: // expr_with_func_decl_lambda -> func_decl_lambda + case 553: // expr_with_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 553: // expr -> expr_l1 + case 554: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 554: // expr -> format_expr + case 555: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 555: // expr_l1 -> expr_dq + case 556: // expr_l1 -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 556: // expr_l1 -> question_expr + case 557: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 557: // expr_dq -> relop_expr + case 558: // expr_dq -> relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 558: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr + case 559: // 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 559: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 560: // 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 560: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 561: // 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 561: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 + case 562: // 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 562: // simple_or_template_type_reference -> simple_type_identifier + case 563: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 563: // simple_or_template_type_reference -> simple_type_identifier, + case 564: // 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 564: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 565: // 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 565: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 566: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 567: // new_expr -> tkNew, simple_or_template_type_reference, + case 568: // 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 568: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, + case 569: // 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; @@ -4911,7 +4924,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 570: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -4926,12 +4939,12 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 571: // 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 571: // field_in_unnamed_object -> relop_expr + case 572: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -4951,13 +4964,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 573: // 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 573: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 574: // 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; @@ -4968,169 +4981,169 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier + case 575: // array_name_for_new_expr -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 575: // array_name_for_new_expr -> unsized_array_type + case 576: // array_name_for_new_expr -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 576: // optional_expr_list_with_bracket -> /* empty */ + case 577: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 577: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 578: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 578: // relop_expr -> simple_expr + case 579: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 579: // relop_expr -> relop_expr, relop, simple_expr + case 580: // 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 580: // simple_expr_or_nothing -> simple_expr + case 581: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 581: // simple_expr_or_nothing -> /* empty */ + case 582: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 582: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 583: // 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 583: // format_expr -> tkColon, simple_expr_or_nothing + case 584: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 584: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 585: // 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 585: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 586: // 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 586: // relop -> tkEqual + case 587: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 587: // relop -> tkNotEqual + case 588: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 588: // relop -> tkLower + case 589: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 589: // relop -> tkGreater + case 590: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 590: // relop -> tkLowerEqual + case 591: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 591: // relop -> tkGreaterEqual + case 592: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 592: // relop -> tkIn + case 593: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 593: // simple_expr -> term + case 594: // simple_expr -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 594: // simple_expr -> simple_expr, addop, term + case 595: // 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 595: // addop -> tkPlus + case 596: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 596: // addop -> tkMinus + case 597: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 597: // addop -> tkOr + case 598: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 598: // addop -> tkXor + case 599: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 599: // addop -> tkCSharpStyleOr + case 600: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 600: // typecast_op -> tkAs + case 601: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 601: // typecast_op -> tkIs + case 602: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 602: // as_is_expr -> term, typecast_op, simple_or_template_type_reference + case 603: // 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 603: // simple_term -> factor + case 604: // simple_term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 604: // power_expr -> simple_term, tkStarStar, factor + case 605: // 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 605: // term -> factor + case 606: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 606: // term -> new_expr + case 607: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 607: // term -> power_expr + case 608: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 608: // term -> term, mulop, factor + case 609: // 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 609: // term -> term, mulop, power_expr + case 610: // 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 610: // term -> as_is_expr + case 611: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 611: // mulop -> tkStar + case 612: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 612: // mulop -> tkSlash + case 613: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 613: // mulop -> tkDiv + case 614: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 614: // mulop -> tkMod + case 615: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 615: // mulop -> tkShl + case 616: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 616: // mulop -> tkShr + case 617: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 617: // mulop -> tkAnd + case 618: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 618: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 619: // 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 619: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 620: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -5144,112 +5157,112 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 621: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 621: // factor -> literal_or_number + case 622: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 622: // factor -> default_expr + case 623: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 623: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 624: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 624: // factor -> tkNot, factor + case 625: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 625: // factor -> sign, factor + case 626: // factor -> sign, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 626: // factor -> tkDeref, factor + case 627: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 627: // factor -> var_reference + case 628: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 628: // factor -> tuple + case 629: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 629: // literal_or_number -> literal + case 630: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 630: // literal_or_number -> unsigned_number + case 631: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 631: // var_question_point -> variable, tkQuestionPoint, variable + case 632: // 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 632: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 633: // 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 633: // var_reference -> var_address, variable + case 634: // 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 634: // var_reference -> variable + case 635: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 635: // var_reference -> var_question_point + case 636: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 636: // var_address -> tkAddressOf + case 637: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 637: // var_address -> var_address, tkAddressOf + case 638: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 638: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 639: // 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 639: // dotted_identifier -> identifier + case 640: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 640: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 641: // 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 641: // variable_as_type -> dotted_identifier + case 642: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 642: // variable_as_type -> dotted_identifier, template_type_params + case 643: // 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 643: // variable -> identifier + case 644: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 644: // variable -> operator_name_ident + case 645: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 645: // variable -> tkInherited, identifier + case 646: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 646: // variable -> tkRoundOpen, expr, tkRoundClose + case 647: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -5259,18 +5272,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 648: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 648: // variable -> typeof_expr + case 649: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 649: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 650: // 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 650: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose + case 651: // 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) @@ -5285,7 +5298,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 652: // variable -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 if (fe.expr == null) @@ -5295,508 +5308,508 @@ public partial class GPPGParser: ShiftReduceParser variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 653: // 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 653: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 654: // 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 654: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 655: // 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 655: // variable -> variable, tkDeref + case 656: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 656: // variable -> variable, tkAmpersend, template_type_params + case 657: // 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 657: // optional_expr_list -> expr_list + case 658: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 658: // optional_expr_list -> /* empty */ + case 659: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 659: // elem_list -> elem_list1 + case 660: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 660: // elem_list -> /* empty */ + case 661: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 661: // elem_list1 -> elem + case 662: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 662: // elem_list1 -> elem_list1, tkComma, elem + case 663: // 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 663: // elem -> expr + case 664: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 664: // elem -> expr, tkDotDot, expr + case 665: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 665: // one_literal -> tkStringLiteral + case 666: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 666: // one_literal -> tkAsciiChar + case 667: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 667: // literal -> literal_list + case 668: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 668: // literal_list -> one_literal + case 669: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 669: // literal_list -> literal_list, one_literal + case 670: // 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 670: // operator_name_ident -> tkOperator, overload_operator + case 671: // 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 671: // optional_method_modificators -> tkSemiColon + case 672: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 672: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 673: // 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 673: // optional_method_modificators1 -> /* empty */ + case 674: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 674: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 675: // 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 675: // meth_modificators -> meth_modificator + case 676: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 676: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 677: // 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 677: // identifier -> tkIdentifier + case 678: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 678: // identifier -> property_specifier_directives + case 679: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 679: // identifier -> non_reserved + case 680: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 680: // identifier_or_keyword -> identifier + case 681: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 681: // identifier_or_keyword -> keyword + case 682: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 682: // identifier_or_keyword -> reserved_keyword + case 683: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 683: // identifier_keyword_operatorname -> identifier + case 684: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 684: // identifier_keyword_operatorname -> keyword + case 685: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 685: // identifier_keyword_operatorname -> operator_name_ident + case 686: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 686: // meth_modificator -> tkAbstract + case 687: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 687: // meth_modificator -> tkOverload + case 688: // 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 688: // meth_modificator -> tkReintroduce + case 689: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 689: // meth_modificator -> tkOverride + case 690: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 690: // meth_modificator -> tkExtensionMethod + case 691: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 691: // meth_modificator -> tkVirtual + case 692: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 692: // property_modificator -> tkVirtual + case 693: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 693: // property_modificator -> tkOverride + case 694: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 694: // property_specifier_directives -> tkRead + case 695: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 695: // property_specifier_directives -> tkWrite + case 696: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 696: // non_reserved -> tkName + case 697: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 697: // non_reserved -> tkNew + case 698: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 698: // visibility_specifier -> tkInternal + case 699: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 699: // visibility_specifier -> tkPublic + case 700: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 700: // visibility_specifier -> tkProtected + case 701: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 701: // visibility_specifier -> tkPrivate + case 702: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 702: // keyword -> visibility_specifier + case 703: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 703: // keyword -> tkSealed + case 704: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 704: // keyword -> tkTemplate + case 705: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 705: // keyword -> tkOr + case 706: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 706: // keyword -> tkTypeOf + case 707: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 707: // keyword -> tkSizeOf + case 708: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 708: // keyword -> tkDefault + case 709: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 709: // keyword -> tkWhere + case 710: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 710: // keyword -> tkXor + case 711: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 711: // keyword -> tkAnd + case 712: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 712: // keyword -> tkDiv + case 713: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 713: // keyword -> tkMod + case 714: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 714: // keyword -> tkShl + case 715: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 715: // keyword -> tkShr + case 716: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 716: // keyword -> tkNot + case 717: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 717: // keyword -> tkAs + case 718: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 718: // keyword -> tkIn + case 719: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 719: // keyword -> tkIs + case 720: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 720: // keyword -> tkArray + case 721: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 721: // keyword -> tkSequence + case 722: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 722: // keyword -> tkBegin + case 723: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 723: // keyword -> tkCase + case 724: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 724: // keyword -> tkClass + case 725: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 725: // keyword -> tkConst + case 726: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 726: // keyword -> tkConstructor + case 727: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 727: // keyword -> tkDestructor + case 728: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 728: // keyword -> tkDownto + case 729: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 729: // keyword -> tkDo + case 730: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 730: // keyword -> tkElse + case 731: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 731: // keyword -> tkExcept + case 732: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 732: // keyword -> tkFile + case 733: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 733: // keyword -> tkAuto + case 734: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 734: // keyword -> tkFinalization + case 735: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 735: // keyword -> tkFinally + case 736: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 736: // keyword -> tkFor + case 737: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 737: // keyword -> tkForeach + case 738: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 738: // keyword -> tkFunction + case 739: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 739: // keyword -> tkIf + case 740: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 740: // keyword -> tkImplementation + case 741: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 741: // keyword -> tkInherited + case 742: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 742: // keyword -> tkInitialization + case 743: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 743: // keyword -> tkInterface + case 744: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 744: // keyword -> tkProcedure + case 745: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 745: // keyword -> tkProperty + case 746: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 746: // keyword -> tkRaise + case 747: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 747: // keyword -> tkRecord + case 748: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 748: // keyword -> tkRepeat + case 749: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 749: // keyword -> tkSet + case 750: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 750: // keyword -> tkTry + case 751: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 751: // keyword -> tkType + case 752: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 752: // keyword -> tkThen + case 753: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 753: // keyword -> tkTo + case 754: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 754: // keyword -> tkUntil + case 755: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 755: // keyword -> tkUses + case 756: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 756: // keyword -> tkVar + case 757: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 757: // keyword -> tkWhile + case 758: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 758: // keyword -> tkWith + case 759: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 759: // keyword -> tkNil + case 760: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 760: // keyword -> tkGoto + case 761: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 761: // keyword -> tkOf + case 762: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 762: // keyword -> tkLabel + case 763: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 763: // keyword -> tkProgram + case 764: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 764: // keyword -> tkUnit + case 765: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 765: // keyword -> tkLibrary + case 766: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 766: // keyword -> tkNamespace + case 767: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 767: // keyword -> tkExternal + case 768: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 768: // keyword -> tkParams + case 769: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 769: // keyword -> tkEvent + case 770: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 770: // keyword -> tkYield + case 771: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 771: // reserved_keyword -> tkOperator + case 772: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 772: // reserved_keyword -> tkEnd + case 773: // reserved_keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 773: // overload_operator -> tkMinus + case 774: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 774: // overload_operator -> tkPlus + case 775: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 775: // overload_operator -> tkSlash + case 776: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 776: // overload_operator -> tkStar + case 777: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 777: // overload_operator -> tkEqual + case 778: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 778: // overload_operator -> tkGreater + case 779: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 779: // overload_operator -> tkGreaterEqual + case 780: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 780: // overload_operator -> tkLower + case 781: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 781: // overload_operator -> tkLowerEqual + case 782: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 782: // overload_operator -> tkNotEqual + case 783: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 783: // overload_operator -> tkOr + case 784: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 784: // overload_operator -> tkXor + case 785: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 785: // overload_operator -> tkAnd + case 786: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 786: // overload_operator -> tkDiv + case 787: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 787: // overload_operator -> tkMod + case 788: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 788: // overload_operator -> tkShl + case 789: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 789: // overload_operator -> tkShr + case 790: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 790: // overload_operator -> tkNot + case 791: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 791: // overload_operator -> tkIn + case 792: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 792: // overload_operator -> tkImplicit + case 793: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 793: // overload_operator -> tkExplicit + case 794: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 794: // overload_operator -> assign_operator + case 795: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 795: // overload_operator -> tkStarStar + case 796: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 796: // assign_operator -> tkAssign + case 797: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 797: // assign_operator -> tkPlusEqual + case 798: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 798: // assign_operator -> tkMinusEqual + case 799: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 799: // assign_operator -> tkMultEqual + case 800: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 800: // assign_operator -> tkDivEqual + case 801: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 801: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 802: // 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 802: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 803: // 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 803: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 804: // 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]); @@ -5805,7 +5818,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 805: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -5816,7 +5829,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 806: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -5828,7 +5841,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 807: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -5890,61 +5903,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 808: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 808: // optional_full_lambda_fp_list -> /* empty */ + case 809: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 809: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 810: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 810: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 811: // 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 811: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 812: // 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 812: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 813: // 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 813: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 814: // 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 814: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 815: // 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 815: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 816: // 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 816: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 817: // 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 817: // full_lambda_fp_list -> lambda_simple_fp_sect + case 818: // 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) @@ -5964,147 +5977,147 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 819: // 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 819: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 820: // 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 820: // lambda_type_ref -> /* empty */ + case 821: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 821: // lambda_type_ref -> tkColon, fptype + case 822: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 822: // lambda_type_ref_noproctype -> /* empty */ + case 823: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 823: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 824: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 824: // lambda_function_body -> expr_l1 + case 825: // lambda_function_body -> expr_l1 { CurrentSemanticValue.stn = NewLambdaBody(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 825: // lambda_function_body -> compound_stmt + case 826: // lambda_function_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 826: // lambda_function_body -> if_stmt + case 827: // lambda_function_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 827: // lambda_function_body -> while_stmt + case 828: // lambda_function_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 828: // lambda_function_body -> repeat_stmt + case 829: // lambda_function_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 829: // lambda_function_body -> for_stmt + case 830: // lambda_function_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 830: // lambda_function_body -> foreach_stmt + case 831: // lambda_function_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 831: // lambda_function_body -> case_stmt + case 832: // lambda_function_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 832: // lambda_function_body -> try_stmt + case 833: // lambda_function_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 833: // lambda_function_body -> lock_stmt + case 834: // lambda_function_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 834: // lambda_function_body -> yield_stmt + case 835: // lambda_function_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 835: // lambda_procedure_body -> proc_call + case 836: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 836: // lambda_procedure_body -> compound_stmt + case 837: // lambda_procedure_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 837: // lambda_procedure_body -> if_stmt + case 838: // lambda_procedure_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 838: // lambda_procedure_body -> while_stmt + case 839: // lambda_procedure_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 839: // lambda_procedure_body -> repeat_stmt + case 840: // lambda_procedure_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 840: // lambda_procedure_body -> for_stmt + case 841: // lambda_procedure_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 841: // lambda_procedure_body -> foreach_stmt + case 842: // lambda_procedure_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 842: // lambda_procedure_body -> case_stmt + case 843: // lambda_procedure_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 843: // lambda_procedure_body -> try_stmt + case 844: // lambda_procedure_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 844: // lambda_procedure_body -> lock_stmt + case 845: // lambda_procedure_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 845: // lambda_procedure_body -> yield_stmt + case 846: // lambda_procedure_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 846: // lambda_procedure_body -> assignment + case 847: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index 644f745ca..ea907fe3c 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -187,5 +187,6 @@ script= + diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 5060efa40..f6960dff2 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.3.0.1613' +!define VERSION '3.3.0.1615' diff --git a/TestSuite/CompilationSamples/graph3d.pas b/TestSuite/CompilationSamples/graph3d.pas index 2adb3ad52..9827b98b7 100644 --- a/TestSuite/CompilationSamples/graph3d.pas +++ b/TestSuite/CompilationSamples/graph3d.pas @@ -117,7 +117,11 @@ procedure Invoke(d: System.Delegate; params args: array of object) := app.Dispat procedure Invoke(d: ()->()) := app.Dispatcher.Invoke(d); -function Invoke(d: Func0) := app.Dispatcher.Invoke&(d); +function Invoke(d: Func0): T := app.Dispatcher.Invoke&(d); +function InvokeString(d: Func0): string := Invoke&(d); +function InvokeReal(d: Func0): real := Invoke&(d); +function InvokeBoolean(d: Func0): boolean := Invoke&(d); +function InvokeInteger(d: Func0): integer := Invoke&(d); function wplus := SystemParameters.WindowResizeBorderThickness.Left + SystemParameters.WindowResizeBorderThickness.Right; @@ -239,27 +243,27 @@ type private procedure SetSCSP(v: boolean) := hvp.ShowCoordinateSystem := v; procedure SetSCS(v: boolean) := Invoke(SetSCSP, v); - function GetSCS: boolean := Invoke&(()->hvp.ShowCoordinateSystem); + function GetSCS: boolean := InvokeBoolean(()->hvp.ShowCoordinateSystem); procedure SetSGLP(v: boolean) := gvl.Visible := v; procedure SetSGL(v: boolean) := Invoke(SetSGLP, v); - function GetSGL: boolean := Invoke&(()->gvl.Visible); + function GetSGL: boolean := InvokeBoolean(()->gvl.Visible); procedure SetSCIP(v: boolean) := hvp.ShowCameraInfo := v; procedure SetSCI(v: boolean) := Invoke(SetSCIP, v); - function GetSCI: boolean := Invoke&(()->hvp.ShowCameraInfo); + function GetSCI: boolean := InvokeBoolean(()->hvp.ShowCameraInfo); procedure SetSVCP(v: boolean) := hvp.ShowViewCube := v; procedure SetSVC(v: boolean) := Invoke(SetSVCP, v); - function GetSVC: boolean := Invoke&(()->hvp.ShowViewCube); + function GetSVC: boolean := InvokeBoolean(()->hvp.ShowViewCube); procedure SetTP(v: string) := hvp.Title := v; procedure SetT(v: string) := Invoke(SetTP, v); - function GetT: string := Invoke&(()->hvp.Title); + function GetT: string := InvokeString(()->hvp.Title); procedure SetSTP(v: string) := hvp.SubTitle := v; procedure SetST(v: string) := Invoke(SetSTP, v); - function GetST: string := Invoke&(()->hvp.SubTitle); + function GetST: string := InvokeString(()->hvp.SubTitle); procedure SetCMP(v: HelixToolkit.Wpf.CameraMode) := hvp.CameraMode := v; procedure SetCM(v: HelixToolkit.Wpf.CameraMode) := Invoke(SetCMP, v); @@ -348,7 +352,7 @@ type end; procedure SetD(d: real) := Invoke(SetDP, d); - function GetD: real := Invoke&(()->Cam.Position.DistanceTo(P3D(0, 0, 0))); + function GetD: real := InvokeReal(()->Cam.Position.DistanceTo(P3D(0, 0, 0))); public property Position: Point3D read GetP write SetP; property LookDirection: Vector3D read GetLD write SetLD; @@ -414,11 +418,11 @@ type end; procedure SetX(xx: real) := Invoke(()->begin transltransform.OffsetX := xx; end); - function GetX: real := Invoke&(()->transltransform.OffsetX); + function GetX: real := InvokeReal(()->transltransform.OffsetX); procedure SetY(yy: real) := Invoke(()->begin transltransform.OffsetY := yy; end); - function GetY: real := Invoke&(()->transltransform.OffsetY); + function GetY: real := InvokeReal(()->transltransform.OffsetY); procedure SetZ(zz: real) := Invoke(()->begin transltransform.OffsetZ := zz; end); - function GetZ: real := Invoke&(()->transltransform.OffsetZ); + function GetZ: real := InvokeReal(()->transltransform.OffsetZ); function GetPos: Point3D := Invoke&(()->P3D(transltransform.OffsetX, transltransform.OffsetY, transltransform.OffsetZ)); protected @@ -648,57 +652,10 @@ type end; GroupT = class(ObjectWithChildren3D) - //l := new List; - private - {procedure AddT(obj: Object3D); - begin - var p: Object3D := Self; - while p <> nil do - begin - if obj = p then - raise new System.ArgumentException('Group.Add: Нельзя в дочерние элементы группы добавить себя или своего предка'); - p := p.Parent - end; - if obj.Parent = Self then - exit; - if obj.Parent = nil then - hvp.Children.Remove(obj.model) - else - begin - var q := obj.Parent.model as MeshVisual3D; - q.Children.Remove(obj.model); - obj.Parent.l.Remove(obj); - end; - (model as ModelVisual3D).Children.Add(obj.model); - l.Add(obj); - obj.Parent := Self; - end; - - procedure RemoveT(obj: Object3D); - begin - var b := (model as MeshVisual3D).Children.Remove(obj.model); - if not b then exit; - l.Remove(obj); - hvp.Children.Add(obj.model); - obj.Parent := nil; - end; - - function GetObj(i: integer): Object3D := l[i]; - function CountT: integer := (model as ModelVisual3D).Children.Count;} protected - function CreateObject: Object3D; override; - begin - var g := new GroupT(X, Y, Z); - {foreach var xx in l do - g.AddChild(xx.Clone);} - Result := g; - end; - + function CreateObject: Object3D; override := new GroupT(X, Y, Z); public - constructor(x, y, z: real); - begin - CreateBase0(new ModelVisual3D, x, y, z); - end; + constructor(x, y, z: real) := CreateBase0(new ModelVisual3D, x, y, z); constructor(x, y, z: real; lst: sequence of Object3D); begin @@ -706,16 +663,6 @@ type foreach var xx in lst do AddChild(xx); end; - - {function Add(obj: Object3D): GroupT; - begin - Invoke(AddT, obj); - Result := Self - end; - - function Count: integer := Invoke&(CountT); - procedure Remove(obj: Object3D) := Invoke(RemoveT, obj);} - //property Items[i: integer]: Object3D read GetObj; default; function Clone := (inherited Clone) as GroupT; end; @@ -746,22 +693,9 @@ type begin end; - protected - sb: StoryBoard; - class function AddDoubleAnimByName(sb: StoryBoard; toValue, seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; + private + class function AddDoubleAnimRemainderHelper(d: DoubleAnimationBase; sb: StoryBoard; seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; begin - var d := new DoubleAnimation(toValue, new System.Windows.Duration(System.TimeSpan.FromSeconds(seconds))); - d.BeginTime := System.TimeSpan.FromSeconds(waittime); - StoryBoard.SetTargetName(d, ttname); - StoryBoard.SetTargetProperty(d, new PropertyPath(prop)); - sb.Children.Add(d); - Result := d; - end; - - class function AddDoubleAnimOnByName(sb: StoryBoard; toValue, seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; - begin - var d := new DoubleAnimation(); - d.By := toValue; d.Duration := new System.Windows.Duration(System.TimeSpan.FromSeconds(seconds)); d.BeginTime := System.TimeSpan.FromSeconds(waittime); StoryBoard.SetTargetName(d, ttname); @@ -769,6 +703,23 @@ type sb.Children.Add(d); Result := d; end; + + protected + sb: StoryBoard; + + class function AddDoubleAnimByName(sb: StoryBoard; toValue, seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; + begin + var d := new DoubleAnimation(); + d.To := toValue; + Result := AddDoubleAnimRemainderHelper(d,sb,seconds,ttname,prop,waittime); + end; + + class function AddDoubleAnimOnByName(sb: StoryBoard; toValue, seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; + begin + var d := new DoubleAnimation(); + d.By := toValue; + Result := AddDoubleAnimRemainderHelper(d,sb,seconds,ttname,prop,waittime); + end; class function AddDoubleAnimByNameUsingKeyframes(sb: StoryBoard; a: sequence of real; seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; begin @@ -776,15 +727,10 @@ type d.KeyFrames := new DoubleKeyFrameCollection; foreach var x in a do d.KeyFrames.Add(new LinearDoubleKeyFrame(x)); // не указываем keytime - надеемся, что по секунде - d.Duration := new System.Windows.Duration(System.TimeSpan.FromSeconds(seconds)); - d.BeginTime := System.TimeSpan.FromSeconds(waittime); - StoryBoard.SetTargetName(d, ttname); - StoryBoard.SetTargetProperty(d, new PropertyPath(prop)); - sb.Children.Add(d); - Result := d; + Result := AddDoubleAnimRemainderHelper(d,sb,seconds,ttname,prop,waittime); end; - class function AddDoubleAnimByNameUsingTrajectory(sb: StoryBoard; a: sequence of real; seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; + {class function AddDoubleAnimByNameUsingTrajectory(sb: StoryBoard; a: sequence of real; seconds: real; ttname: string; prop: Object; waittime: real := 0.0): DoubleAnimationBase; begin var d := new DoubleAnimationUsingKeyframes; d.KeyFrames := new DoubleKeyFrameCollection; @@ -796,7 +742,7 @@ type StoryBoard.SetTargetProperty(d, new PropertyPath(prop)); sb.Children.Add(d); Result := d; - end; + end;} function RegisterName(sb: StoryBoard; element: Object; ttname: string): boolean; begin @@ -829,11 +775,7 @@ type end; public - constructor(e: Object3D; sec: real); - begin - Element := e; - Seconds := sec; - end; + constructor(e: Object3D; sec: real) := (Element,Seconds) := (e,sec); function WhenCompleted(act: procedure): MyAnimation; begin @@ -1133,15 +1075,9 @@ type end; public - constructor(params l: array of MyAnimation); - begin - ll := Lst(l); - end; + constructor(params l: array of MyAnimation) := ll := Lst(l); - constructor(l: List); - begin - ll := l; - end; + constructor(l: List) := ll := l; function Duration: real; override := ll.Select(l -> l.Duration).Max; {function AutoReverse: MyAnimation; override; @@ -1190,15 +1126,8 @@ type l.ApplyAllDecorators; end; public - constructor(params l: array of MyAnimation); - begin - ll := Lst(l); - end; - - constructor(l: List); - begin - ll := l; - end; + constructor(params l: array of MyAnimation) := ll := Lst(l); + constructor(l: List) := ll := l; function Duration: real; override := ll.Sum(l -> l.Duration); @@ -1260,7 +1189,7 @@ type Invoke(()->begin m.Radius := r end); end; - function GetR: real := Invoke&(()->(model as SphereVisual3D).Radius); + function GetR: real := InvokeReal(()->(model as SphereVisual3D).Radius); function NewVisualObject(r: real): SphereVisual3D; begin var sph := new SphereVisual3D; @@ -1271,15 +1200,8 @@ type protected function CreateObject: Object3D; override := new SphereT(X, Y, Z, Radius, Material.Clone); public - constructor(); - begin - CreateBase(NewVisualObject(1), 0, 0, 0, Colors.Blue); - end; - - constructor(x, y, z, r: real; m: Gmaterial); - begin - CreateBase(NewVisualObject(r), x, y, z, m); - end; + constructor := CreateBase(NewVisualObject(1), 0, 0, 0, Colors.Blue); + constructor(x, y, z, r: real; m: Gmaterial) := CreateBase(NewVisualObject(r), x, y, z, m); property Radius: real read GetR write SetR; function Clone := (inherited Clone) as SphereT; @@ -1290,13 +1212,13 @@ type function Model := inherited model as EllipsoidVisual3D; procedure SetRXP(r: real) := Model.RadiusX := r; procedure SetRX(r: real) := Invoke(SetRXP, x); - function GetRX: real := Invoke&(()->Model.RadiusX); + function GetRX: real := InvokeReal(()->Model.RadiusX); procedure SetRYP(r: real) := Model.RadiusY := r; procedure SetRY(r: real) := Invoke(SetRYP, x); - function GetRY: real := Invoke&(()->Model.RadiusY); + function GetRY: real := InvokeReal(()->Model.RadiusY); procedure SetRZP(r: real) := Model.RadiusZ := r; procedure SetRZ(r: real) := Invoke(SetRZP, x); - function GetRZ: real := Invoke&(()->Model.RadiusZ); + function GetRZ: real := InvokeReal(()->Model.RadiusZ); function NewVisualObject(rx, ry, rz: real): HelixToolkit.Wpf.EllipsoidVisual3D; begin var ell := new EllipsoidVisual3D; @@ -1309,10 +1231,7 @@ type protected function CreateObject: Object3D; override := new EllipsoidT(X, Y, Z, RadiusX, RadiusY, RadiusZ, Material); public - constructor(x, y, z, rx, ry, rz: real; m: GMaterial); - begin - CreateBase(NewVisualObject(rx, ry, rz), x, y, z, m); - end; + constructor(x, y, z, rx, ry, rz: real; m: GMaterial) := CreateBase(NewVisualObject(rx, ry, rz), x, y, z, m); property RadiusX: real read GetRX write SetRX; property RadiusY: real read GetRY write SetRY; @@ -1322,26 +1241,23 @@ type BoxT = class(ObjectWithMaterial3D) private - procedure SetWP(r: real) := (model as BoxVisual3D).Width := r; + function model := inherited model as BoxVisual3D; + procedure SetWP(r: real) := model.Width := r; procedure SetW(r: real) := Invoke(SetWP, r); - function GetW: real := Invoke&(()->(model as BoxVisual3D).Width); + function GetW: real := InvokeReal(()->model.Width); - procedure SetHP(r: real) := (model as BoxVisual3D).Height := r; + procedure SetHP(r: real) := model.Height := r; procedure SetH(r: real) := Invoke(SetHP, r); - function GetH: real := Invoke&(()->(model as BoxVisual3D).Height); + function GetH: real := InvokeReal(()->model.Height); - procedure SetLP(r: real) := (model as BoxVisual3D).Length := r; + procedure SetLP(r: real) := model.Length := r; procedure SetL(r: real) := Invoke(SetLP, r); - function GetL: real := Invoke&(()->(model as BoxVisual3D).Length); + function GetL: real := InvokeReal(()->model.Length); - procedure SetSzP(r: Size3D); - begin - var mmm := model as BoxVisual3D; - (mmm.Length, mmm.Width, mmm.Height) := (r.X, r.Y, r.Z); - end; + procedure SetSzP(r: Size3D) := (model.Length, model.Width, model.Height) := (r.X, r.Y, r.Z); procedure SetSz(r: Size3D) := Invoke(SetSzP, r); - function GetSz: Size3D := Invoke&(()->begin var mmm := model as BoxVisual3D;Result := Sz3D(mmm.Length, mmm.Width, mmm.Height) end); + function GetSz: Size3D := Invoke&(()->begin Result := Sz3D(model.Length, model.Width, model.Height) end); private function NewVisualObject(l, w, h: real): BoxVisual3D; begin @@ -1350,14 +1266,10 @@ type (bx.Width, bx.Height, bx.Length) := (w, h, l); Result := bx; end; - protected function CreateObject: Object3D; override := new BoxT(X, Y, Z, Length, Width, Height, Material.Clone); public - constructor(x, y, z, l, w, h: real; m: GMaterial); - begin - CreateBase(NewVisualObject(l, w, h), x, y, z, m); - end; + constructor(x, y, z, l, w, h: real; m: GMaterial) := CreateBase(NewVisualObject(l, w, h), x, y, z, m); property Length: real read GetL write SetL; property Width: real read GetW write SetW; @@ -1368,17 +1280,19 @@ type ArrowT = class(ObjectWithMaterial3D) private - procedure SetDP(r: real) := (model as ArrowVisual3D).Diameter := r; + function model := inherited model as ArrowVisual3D; + + procedure SetDP(r: real) := model.Diameter := r; procedure SetD(r: real) := Invoke(SetDP, r); - function GetD: real := Invoke&(()->(model as ArrowVisual3D).Diameter); + function GetD: real := InvokeReal(()->model.Diameter); - procedure SetLP(r: real) := (model as ArrowVisual3D).HeadLength := r; + procedure SetLP(r: real) := model.HeadLength := r; procedure SetL(r: real) := Invoke(SetLP, r); - function GetL: real := Invoke&(()->(model as ArrowVisual3D).HeadLength); + function GetL: real := InvokeReal(()->model.HeadLength); - procedure SetDirP(r: Vector3D) := (model as ArrowVisual3D).Direction := r; + procedure SetDirP(r: Vector3D) := model.Direction := r; procedure SetDir(r: Vector3D) := Invoke(SetDirP, r); - function GetDir: Vector3D := Invoke&(()->(model as ArrowVisual3D).Direction); + function GetDir: Vector3D := Invoke&(()->model.Direction); private function NewVisualObject(dx, dy, dz, d, hl: real): ArrowVisual3D; begin @@ -1388,7 +1302,6 @@ type a.Origin := P3D(0, 0, 0); Result := a; end; - protected function CreateObject: Object3D; override := new ArrowT(X, Y, Z, Direction.X, Direction.Y, Direction.Z, Diameter, HeadLength, Material.Clone); public @@ -1409,15 +1322,15 @@ type private procedure SetHP(r: real) := (model as TruncatedConeVisual3D).Height := r; procedure SetH(r: real) := Invoke(SetHP, r); - function GetH: real := Invoke&(()->(model as TruncatedConeVisual3D).Height); + function GetH: real := InvokeReal(()->(model as TruncatedConeVisual3D).Height); procedure SetBRP(r: real) := (model as TruncatedConeVisual3D).BaseRadius := r; procedure SetBR(r: real) := Invoke(SetBRP, r); - function GetBR: real := Invoke&(()->(model as TruncatedConeVisual3D).BaseRadius); + function GetBR: real := InvokeReal(()->(model as TruncatedConeVisual3D).BaseRadius); procedure SetTRP(r: real) := (model as TruncatedConeVisual3D).TopRadius := r; procedure SetTR(r: real) := Invoke(SetTRP, r); - function GetTR: real := Invoke&(()->(model as TruncatedConeVisual3D).TopRadius); + function GetTR: real := InvokeReal(()->(model as TruncatedConeVisual3D).TopRadius); procedure SetTCP(r: boolean) := (model as TruncatedConeVisual3D).TopCap := r; procedure SetTC(r: boolean) := Invoke(SetTCP, r); @@ -1461,10 +1374,7 @@ type end; function GetR: real := BaseRadius; protected - function CreateObject: Object3D; override; - begin - Result := new CylinderT(X, Y, Z, Height, Radius, (model as TruncatedConeVisual3D).ThetaDiv - 1, Topcap, Material.Clone); - end; + function CreateObject: Object3D; override := new CylinderT(X, Y, Z, Height, Radius, (model as TruncatedConeVisual3D).ThetaDiv - 1, Topcap, Material.Clone); public constructor(x, y, z, h, r: real; ThetaDiv: integer; topcap: boolean; m: GMaterial); begin @@ -1498,8 +1408,8 @@ type private procedure SetALP(r: real) := (model as CoordinateSystemVisual3D).ArrowLengths := r; procedure SetAL(r: real) := Invoke(SetALP, r); - function GetAL: real := Invoke&(()->(model as CoordinateSystemVisual3D).ArrowLengths); - function GetD: real := Invoke&(()->((model as CoordinateSystemVisual3D).Children[0] as ArrowVisual3D).Diameter); + function GetAL: real := InvokeReal(()->(model as CoordinateSystemVisual3D).ArrowLengths); + function GetD: real := InvokeReal(()->((model as CoordinateSystemVisual3D).Children[0] as ArrowVisual3D).Diameter); protected function CreateObject: Object3D; override := new CoordinateSystemT(X, Y, Z, ArrowLengths, Diameter); public @@ -1521,13 +1431,15 @@ type BillboardTextT = class(ObjectWithChildren3D) private - procedure SetTP(r: string) := (model as BillboardTextVisual3D).Text := r; + function model := inherited model as BillboardTextVisual3D; + + procedure SetTP(r: string) := model.Text := r; procedure SetT(r: string) := Invoke(SetTP, r); - function GetT: string := Invoke&(()->(model as BillboardTextVisual3D).Text); + function GetT: string := InvokeString(()->model.Text); - procedure SetFSP(r: real) := (model as BillboardTextVisual3D).FontSize := r; + procedure SetFSP(r: real) := model.FontSize := r; procedure SetFS(r: real) := Invoke(SetFS, r); - function GetFS: real := Invoke&(()->(model as BillboardTextVisual3D).FontSize); + function GetFS: real := InvokeReal(()->model.FontSize); protected function CreateObject: Object3D; override := new BillboardTextT(X, Y, Z, Text, FontSize); public @@ -1548,32 +1460,33 @@ type TextT = class(ObjectWithChildren3D) private fontname: string; - procedure SetTP(r: string) := (model as TextVisual3D).Text := r; + function model := inherited model as TextVisual3D; + + procedure SetTP(r: string) := model.Text := r; procedure SetT(r: string) := Invoke(SetTP, r); - function GetT: string := Invoke&(()->(model as TextVisual3D).Text); + function GetT: string := InvokeString(()->model.Text); - procedure SetFSP(r: real) := (model as TextVisual3D).Height := r; + procedure SetFSP(r: real) := model.Height := r; procedure SetFS(r: real) := Invoke(SetFS, r); - function GetFS: real := Invoke&(()->(model as TextVisual3D).Height); + function GetFS: real := InvokeReal(()->model.Height); - procedure SetUP(v: Vector3D) := (model as TextVisual3D).UpDirection := v; + procedure SetUP(v: Vector3D) := model.UpDirection := v; procedure SetU(v: Vector3D) := Invoke(SetUP, v); - function GetU: Vector3D := Invoke&(()->(model as TextVisual3D).UpDirection); + function GetU: Vector3D := Invoke&(()->model.UpDirection); - procedure SetNP(fontname: string) := (model as TextVisual3D).FontFamily := new FontFamily(fontname); + procedure SetNP(fontname: string) := model.FontFamily := new FontFamily(fontname); procedure SetN(fontname: string) := Invoke(SetTP, fontname); - function GetN: string := Invoke&(()->fontname); + function GetN: string := InvokeString(()->fontname); - procedure SetColorP(c: GColor) := (model as TextVisual3D).Foreground := new SolidColorBrush(c); + procedure SetColorP(c: GColor) := model.Foreground := new SolidColorBrush(c); procedure SetColor(c: GColor) := Invoke(SetColorP, c); - function GetColor: GColor := Invoke&(()->((model as TextVisual3D).Foreground as SolidColorBrush).Color); + function GetColor: GColor := Invoke&(()->(model.Foreground as SolidColorBrush).Color); protected function CreateObject: Object3D; override := new TextT(X, Y, Z, Text, Height, Name, Color); public constructor(x, y, z: real; text: string; height: real; fontname: string; c: Color); begin var a := new TextVisual3D; - //a.UpDirection := V3D(0,-1,0); a.Position := p3D(0, 0, 0); a.Text := text; a.Height := height; @@ -1594,21 +1507,22 @@ type RectangleT = class(ObjectWithMaterial3D) private - procedure SetWP(r: real) := (model as RectangleVisual3D).Width := r; + function model := inherited model as RectangleVisual3D; + procedure SetWP(r: real) := model.Width := r; procedure SetW(r: real) := Invoke(SetWP, r); - function GetW: real := Invoke&(()->(model as RectangleVisual3D).Width); + function GetW: real := InvokeReal(()->model.Width); - procedure SetLP(r: real) := (model as RectangleVisual3D).Length := r; + procedure SetLP(r: real) := model.Length := r; procedure SetL(r: real) := Invoke(SetLP, r); - function GetL: real := Invoke&(()->(model as RectangleVisual3D).Length); + function GetL: real := InvokeReal(()->model.Length); - procedure SetLDP(r: Vector3D) := (model as RectangleVisual3D).LengthDirection := r; + procedure SetLDP(r: Vector3D) := model.LengthDirection := r; procedure SetLD(r: Vector3D) := Invoke(SetLDP, r); - function GetLD: Vector3D := Invoke&(()->(model as RectangleVisual3D).LengthDirection); + function GetLD: Vector3D := Invoke&(()->model.LengthDirection); - procedure SetNP(r: Vector3D) := (model as RectangleVisual3D).Normal := r; + procedure SetNP(r: Vector3D) := model.Normal := r; procedure SetN(r: Vector3D) := Invoke(SetNP, r); - function GetN: Vector3D := Invoke&(()->(model as RectangleVisual3D).Normal); + function GetN: Vector3D := Invoke&(()->model.Normal); protected function CreateObject: Object3D; override := new RectangleT(X, Y, Z, Length, Width, Normal, LengthDirection, Material); public @@ -1697,17 +1611,18 @@ type PipeT = class(ObjectWithMaterial3D) private - procedure SetDP(r: real) := (model as PipeVisual3D).Diameter := r * 2; + function model := inherited model as PipeVisual3D; + procedure SetDP(r: real) := model.Diameter := r * 2; procedure SetD(r: real) := Invoke(SetDP, r); - function GetD: real := Invoke&(()->(model as PipeVisual3D).Diameter / 2); + function GetD: real := InvokeReal(()->model.Diameter / 2); - procedure SetIDP(r: real) := (model as PipeVisual3D).InnerDiameter := r * 2; + procedure SetIDP(r: real) := model.InnerDiameter := r * 2; procedure SetID(r: real) := Invoke(SetIDP, r); - function GetID: real := Invoke&(()->(model as PipeVisual3D).InnerDiameter / 2); + function GetID: real := InvokeReal(()->model.InnerDiameter / 2); - procedure SetHP(r: real) := (model as PipeVisual3D).Point2 := P3D(0, 0, r); + procedure SetHP(r: real) := model.Point2 := P3D(0, 0, r); procedure SetH(r: real) := Invoke(SetHP, r); - function GetH: real := Invoke&(()->(model as PipeVisual3D).Point2.Z); + function GetH: real := InvokeReal(()->model.Point2.Z); protected function CreateObject: Object3D; override := new PipeT(X, Y, Z, Height, Radius, InnerRadius, Material); public @@ -1809,17 +1724,18 @@ type type LegoT = class(ObjectWithMaterial3D) private - procedure SetWP(r: integer) := (model as LegoVisual3D).Rows := r; + function model := inherited model as LegoVisual3D; + procedure SetWP(r: integer) := model.Rows := r; procedure SetW(r: integer) := Invoke(SetWP, r); - function GetW: integer := Invoke&(()->(model as LegoVisual3D).Rows); + function GetW: integer := InvokeInteger(()->model.Rows); - procedure SetHP(r: integer) := (model as LegoVisual3D).Height := r; + procedure SetHP(r: integer) := model.Height := r; procedure SetH(r: integer) := Invoke(SetHP, r); - function GetH: integer := Invoke&(()->(model as LegoVisual3D).Height); + function GetH: integer := InvokeInteger(()->model.Height); - procedure SetLP(r: integer) := (model as LegoVisual3D).Columns := r; + procedure SetLP(r: integer) := model.Columns := r; procedure SetL(r: integer) := Invoke(SetLP, r); - function GetL: integer := Invoke&(()->(model as LegoVisual3D).Columns); + function GetL: integer := InvokeInteger(()->model.Columns); {procedure SetSzP(r: Size3D); begin @@ -2033,7 +1949,7 @@ type private procedure SetLengthP(r: real) := (model as PlatonicAbstractVisual3D).Length := r; procedure SetLength(r: real) := Invoke(SetLengthP, r); - function GetLength: real := Invoke&(()->(model as PlatonicAbstractVisual3D).Length); + function GetLength: real := InvokeReal(()->(model as PlatonicAbstractVisual3D).Length); public property Length: real read GetLength write SetLength; end; @@ -2042,10 +1958,7 @@ type protected function CreateObject: Object3D; override := new IcosahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new IcosahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new IcosahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as IcosahedronT; end; @@ -2053,10 +1966,7 @@ type protected function CreateObject: Object3D; override := new DodecahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new DodecahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new DodecahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as DodecahedronT; end; @@ -2064,10 +1974,7 @@ type protected function CreateObject: Object3D; override := new TetrahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new TetrahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new TetrahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as TetrahedronT; end; @@ -2075,10 +1982,7 @@ type protected function CreateObject: Object3D; override := new OctahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new OctahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new OctahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as OctahedronT; end; @@ -2137,18 +2041,15 @@ type private function Model := inherited model as PrismVisual3D; procedure SetR(r: real) := Invoke(procedure(r: real)->model.Radius := r, r); - function GetR: real := Invoke&(()->model.Radius); + function GetR: real := InvokeReal(()->model.Radius); procedure SetH(r: real) := Invoke(procedure(r: real)->model.Height := r, r); - function GetH: real := Invoke&(()->model.Height); + function GetH: real := InvokeReal(()->model.Height); procedure SetN(n: integer) := Invoke(procedure(n: integer)->model.N := n, n); - function GetN: integer := Invoke&(()->model.N); + function GetN: integer := InvokeInteger(()->model.N); protected function CreateObject: Object3D; override := new PrismT(X, Y, Z, N, Radius, Height, Material.Clone); public - constructor(x, y, z: real; N: integer; r, h: real; m: Gmaterial); - begin - CreateBase(new PrismVisual3D(N, r, h), x, y, z, m); - end; + constructor(x, y, z: real; N: integer; r, h: real; m: Gmaterial) := CreateBase(new PrismVisual3D(N, r, h), x, y, z, m); property Radius: real read GetR write SetR; property Height: real read GetH write SetH; property N: integer read GetN write SetN; @@ -2160,10 +2061,7 @@ type protected function CreateObject: Object3D; override := new PyramidT(X, Y, Z, N, Radius, Height, Material.Clone); public - constructor(x, y, z: real; N: integer; r, h: real; m: GMaterial); - begin - CreateBase(new PyramidVisual3D(N, r, h), x, y, z, m); - end; + constructor(x, y, z: real; N: integer; r, h: real; m: GMaterial) := CreateBase(new PyramidVisual3D(N, r, h), x, y, z, m); function Clone := (inherited Clone) as PyramidT; end; @@ -2178,7 +2076,7 @@ type function GetC: GColor := Invoke&(()->Model.Color); procedure SetTP(th: real) := Model.Thickness := th; procedure SetT(th: real) := Invoke(SetTP, th); - function GetT: real := Invoke&(()->Model.Thickness); + function GetT: real := InvokeReal(()->Model.Thickness); procedure SetRP(value: real); begin @@ -2252,10 +2150,8 @@ type Result := pc; end; - constructor(x, y, z: real; N: integer; Radius, Height: real; Thickness: real; c: GColor); - begin + constructor(x, y, z: real; N: integer; Radius, Height: real; Thickness: real; c: GColor) := CreateBase0(NewVisualObject(N,Radius,Height,Thickness,c), x, y, z); - end; property Height: real read fh write SetH; property Radius: real read fr write SetR; @@ -2294,7 +2190,7 @@ type private function Model := inherited model as LinesVisual3D; function GetTP: real := Model.Thickness; - function GetT: real := Invoke&(GetTP); + function GetT: real := InvokeReal(GetTP); procedure SetT(t: real) := Invoke(procedure(t: real)->Model.Thickness := t, t); function GetCP: GColor := Model.Color; function GetC: GColor := Invoke&(GetCP); @@ -2325,9 +2221,9 @@ type private function Model := inherited model as TorusVisual3D; procedure SetD(d: real) := Invoke(procedure(d: real)->model.TorusDiameter := d, d); - function GetD: real := Invoke&(()->model.TorusDiameter); + function GetD: real := InvokeReal(()->model.TorusDiameter); procedure SetTD(d: real) := Invoke(procedure(d: real)->model.TubeDiameter := d, d); - function GetTD: real := Invoke&(()->model.TubeDiameter); + function GetTD: real := InvokeReal(()->model.TubeDiameter); protected function CreateObject: Object3D; override := new TorusT(X, Y, Z, Diameter, TubeDiameter, Material.Clone); public @@ -2343,7 +2239,6 @@ type function Clone := (inherited Clone) as PrismT; end; - MyAnyT = class(PlatonicAbstractT) protected function CreateObject: Object3D; override := new MyAnyT(X, Y, Z, Length, Material); @@ -2612,7 +2507,7 @@ procedure WindowType.SetLeft(l: real) := Invoke(WindowTypeSetLeftP, l); function WindowTypeGetLeftP := MainWindow.Left; -function WindowType.GetLeft := Invoke&(WindowTypeGetLeftP); +function WindowType.GetLeft := InvokeReal(WindowTypeGetLeftP); procedure WindowTypeSetTopP(t: real) := MainWindow.Top := t; @@ -2620,7 +2515,7 @@ procedure WindowType.SetTop(t: real) := Invoke(WindowTypeSetTopP, t); function WindowTypeGetTopP := MainWindow.Top; -function WindowType.GetTop := Invoke&(WindowTypeGetTopP); +function WindowType.GetTop := InvokeReal(WindowTypeGetTopP); procedure WindowTypeSetWidthP(w: real) := MainWindow.Width := w + wplus; @@ -2628,7 +2523,7 @@ procedure WindowType.SetWidth(w: real) := Invoke(WindowTypeSetWidthP, w); function WindowTypeGetWidthP := MainWindow.Width - wplus; -function WindowType.GetWidth := Invoke&(WindowTypeGetWidthP); +function WindowType.GetWidth := InvokeReal(WindowTypeGetWidthP); procedure WindowTypeSetHeightP(h: real) := MainWindow.Height := h + hplus; @@ -2636,7 +2531,7 @@ procedure WindowType.SetHeight(h: real) := Invoke(WindowTypeSetHeightP, h); function WindowTypeGetHeightP := MainWindow.Height - hplus; -function WindowType.GetHeight := Invoke&(WindowTypeGetHeightP); +function WindowType.GetHeight := InvokeReal(WindowTypeGetHeightP); procedure WindowTypeSetCaptionP(c: string) := MainWindow.Title := c; @@ -2644,7 +2539,7 @@ procedure WindowType.SetCaption(c: string) := Invoke(WindowTypeSetCaptionP, c); function WindowTypeGetCaptionP := MainWindow.Title; -function WindowType.GetCaption := Invoke&(WindowTypeGetCaptionP); +function WindowType.GetCaption := InvokeString(WindowTypeGetCaptionP); procedure WindowTypeSetSizeP(w, h: real); begin diff --git a/bin/Lib/Graph3D.pas b/bin/Lib/Graph3D.pas index 138622875..e321c3cdd 100644 --- a/bin/Lib/Graph3D.pas +++ b/bin/Lib/Graph3D.pas @@ -118,8 +118,8 @@ procedure Invoke(d: System.Delegate; params args: array of object) := app.Dispat procedure Invoke(d: ()->()) := app.Dispatcher.Invoke(d); function Invoke(d: Func0): T := app.Dispatcher.Invoke&(d); -function InvokeString(d: Func0): string := Invoke&(d); -function InvokeReal(d: Func0): real := Invoke&(d); +function InvokeString(d: Func0): string := Invoke&(d); +function InvokeReal(d: Func0): real := Invoke&(d); function InvokeBoolean(d: Func0): boolean := Invoke&(d); function InvokeInteger(d: Func0): integer := Invoke&(d); @@ -1075,15 +1075,9 @@ type end; public - constructor(params l: array of MyAnimation); - begin - ll := Lst(l); - end; + constructor(params l: array of MyAnimation) := ll := Lst(l); - constructor(l: List); - begin - ll := l; - end; + constructor(l: List) := ll := l; function Duration: real; override := ll.Select(l -> l.Duration).Max; {function AutoReverse: MyAnimation; override; @@ -1132,15 +1126,8 @@ type l.ApplyAllDecorators; end; public - constructor(params l: array of MyAnimation); - begin - ll := Lst(l); - end; - - constructor(l: List); - begin - ll := l; - end; + constructor(params l: array of MyAnimation) := ll := Lst(l); + constructor(l: List) := ll := l; function Duration: real; override := ll.Sum(l -> l.Duration); @@ -1202,7 +1189,7 @@ type Invoke(()->begin m.Radius := r end); end; - function GetR: real := Invoke&(()->(model as SphereVisual3D).Radius); + function GetR: real := InvokeReal(()->(model as SphereVisual3D).Radius); function NewVisualObject(r: real): SphereVisual3D; begin var sph := new SphereVisual3D; @@ -1213,15 +1200,8 @@ type protected function CreateObject: Object3D; override := new SphereT(X, Y, Z, Radius, Material.Clone); public - constructor(); - begin - CreateBase(NewVisualObject(1), 0, 0, 0, Colors.Blue); - end; - - constructor(x, y, z, r: real; m: Gmaterial); - begin - CreateBase(NewVisualObject(r), x, y, z, m); - end; + constructor := CreateBase(NewVisualObject(1), 0, 0, 0, Colors.Blue); + constructor(x, y, z, r: real; m: Gmaterial) := CreateBase(NewVisualObject(r), x, y, z, m); property Radius: real read GetR write SetR; function Clone := (inherited Clone) as SphereT; @@ -1232,13 +1212,13 @@ type function Model := inherited model as EllipsoidVisual3D; procedure SetRXP(r: real) := Model.RadiusX := r; procedure SetRX(r: real) := Invoke(SetRXP, x); - function GetRX: real := Invoke&(()->Model.RadiusX); + function GetRX: real := InvokeReal(()->Model.RadiusX); procedure SetRYP(r: real) := Model.RadiusY := r; procedure SetRY(r: real) := Invoke(SetRYP, x); - function GetRY: real := Invoke&(()->Model.RadiusY); + function GetRY: real := InvokeReal(()->Model.RadiusY); procedure SetRZP(r: real) := Model.RadiusZ := r; procedure SetRZ(r: real) := Invoke(SetRZP, x); - function GetRZ: real := Invoke&(()->Model.RadiusZ); + function GetRZ: real := InvokeReal(()->Model.RadiusZ); function NewVisualObject(rx, ry, rz: real): HelixToolkit.Wpf.EllipsoidVisual3D; begin var ell := new EllipsoidVisual3D; @@ -1251,10 +1231,7 @@ type protected function CreateObject: Object3D; override := new EllipsoidT(X, Y, Z, RadiusX, RadiusY, RadiusZ, Material); public - constructor(x, y, z, rx, ry, rz: real; m: GMaterial); - begin - CreateBase(NewVisualObject(rx, ry, rz), x, y, z, m); - end; + constructor(x, y, z, rx, ry, rz: real; m: GMaterial) := CreateBase(NewVisualObject(rx, ry, rz), x, y, z, m); property RadiusX: real read GetRX write SetRX; property RadiusY: real read GetRY write SetRY; @@ -1264,26 +1241,23 @@ type BoxT = class(ObjectWithMaterial3D) private - procedure SetWP(r: real) := (model as BoxVisual3D).Width := r; + function model := inherited model as BoxVisual3D; + procedure SetWP(r: real) := model.Width := r; procedure SetW(r: real) := Invoke(SetWP, r); - function GetW: real := Invoke&(()->(model as BoxVisual3D).Width); + function GetW: real := InvokeReal(()->model.Width); - procedure SetHP(r: real) := (model as BoxVisual3D).Height := r; + procedure SetHP(r: real) := model.Height := r; procedure SetH(r: real) := Invoke(SetHP, r); - function GetH: real := Invoke&(()->(model as BoxVisual3D).Height); + function GetH: real := InvokeReal(()->model.Height); - procedure SetLP(r: real) := (model as BoxVisual3D).Length := r; + procedure SetLP(r: real) := model.Length := r; procedure SetL(r: real) := Invoke(SetLP, r); - function GetL: real := Invoke&(()->(model as BoxVisual3D).Length); + function GetL: real := InvokeReal(()->model.Length); - procedure SetSzP(r: Size3D); - begin - var mmm := model as BoxVisual3D; - (mmm.Length, mmm.Width, mmm.Height) := (r.X, r.Y, r.Z); - end; + procedure SetSzP(r: Size3D) := (model.Length, model.Width, model.Height) := (r.X, r.Y, r.Z); procedure SetSz(r: Size3D) := Invoke(SetSzP, r); - function GetSz: Size3D := Invoke&(()->begin var mmm := model as BoxVisual3D;Result := Sz3D(mmm.Length, mmm.Width, mmm.Height) end); + function GetSz: Size3D := Invoke&(()->begin Result := Sz3D(model.Length, model.Width, model.Height) end); private function NewVisualObject(l, w, h: real): BoxVisual3D; begin @@ -1292,14 +1266,10 @@ type (bx.Width, bx.Height, bx.Length) := (w, h, l); Result := bx; end; - protected function CreateObject: Object3D; override := new BoxT(X, Y, Z, Length, Width, Height, Material.Clone); public - constructor(x, y, z, l, w, h: real; m: GMaterial); - begin - CreateBase(NewVisualObject(l, w, h), x, y, z, m); - end; + constructor(x, y, z, l, w, h: real; m: GMaterial) := CreateBase(NewVisualObject(l, w, h), x, y, z, m); property Length: real read GetL write SetL; property Width: real read GetW write SetW; @@ -1310,17 +1280,19 @@ type ArrowT = class(ObjectWithMaterial3D) private - procedure SetDP(r: real) := (model as ArrowVisual3D).Diameter := r; + function model := inherited model as ArrowVisual3D; + + procedure SetDP(r: real) := model.Diameter := r; procedure SetD(r: real) := Invoke(SetDP, r); - function GetD: real := Invoke&(()->(model as ArrowVisual3D).Diameter); + function GetD: real := InvokeReal(()->model.Diameter); - procedure SetLP(r: real) := (model as ArrowVisual3D).HeadLength := r; + procedure SetLP(r: real) := model.HeadLength := r; procedure SetL(r: real) := Invoke(SetLP, r); - function GetL: real := Invoke&(()->(model as ArrowVisual3D).HeadLength); + function GetL: real := InvokeReal(()->model.HeadLength); - procedure SetDirP(r: Vector3D) := (model as ArrowVisual3D).Direction := r; + procedure SetDirP(r: Vector3D) := model.Direction := r; procedure SetDir(r: Vector3D) := Invoke(SetDirP, r); - function GetDir: Vector3D := Invoke&(()->(model as ArrowVisual3D).Direction); + function GetDir: Vector3D := Invoke&(()->model.Direction); private function NewVisualObject(dx, dy, dz, d, hl: real): ArrowVisual3D; begin @@ -1330,7 +1302,6 @@ type a.Origin := P3D(0, 0, 0); Result := a; end; - protected function CreateObject: Object3D; override := new ArrowT(X, Y, Z, Direction.X, Direction.Y, Direction.Z, Diameter, HeadLength, Material.Clone); public @@ -1351,15 +1322,15 @@ type private procedure SetHP(r: real) := (model as TruncatedConeVisual3D).Height := r; procedure SetH(r: real) := Invoke(SetHP, r); - function GetH: real := Invoke&(()->(model as TruncatedConeVisual3D).Height); + function GetH: real := InvokeReal(()->(model as TruncatedConeVisual3D).Height); procedure SetBRP(r: real) := (model as TruncatedConeVisual3D).BaseRadius := r; procedure SetBR(r: real) := Invoke(SetBRP, r); - function GetBR: real := Invoke&(()->(model as TruncatedConeVisual3D).BaseRadius); + function GetBR: real := InvokeReal(()->(model as TruncatedConeVisual3D).BaseRadius); procedure SetTRP(r: real) := (model as TruncatedConeVisual3D).TopRadius := r; procedure SetTR(r: real) := Invoke(SetTRP, r); - function GetTR: real := Invoke&(()->(model as TruncatedConeVisual3D).TopRadius); + function GetTR: real := InvokeReal(()->(model as TruncatedConeVisual3D).TopRadius); procedure SetTCP(r: boolean) := (model as TruncatedConeVisual3D).TopCap := r; procedure SetTC(r: boolean) := Invoke(SetTCP, r); @@ -1403,10 +1374,7 @@ type end; function GetR: real := BaseRadius; protected - function CreateObject: Object3D; override; - begin - Result := new CylinderT(X, Y, Z, Height, Radius, (model as TruncatedConeVisual3D).ThetaDiv - 1, Topcap, Material.Clone); - end; + function CreateObject: Object3D; override := new CylinderT(X, Y, Z, Height, Radius, (model as TruncatedConeVisual3D).ThetaDiv - 1, Topcap, Material.Clone); public constructor(x, y, z, h, r: real; ThetaDiv: integer; topcap: boolean; m: GMaterial); begin @@ -1440,8 +1408,8 @@ type private procedure SetALP(r: real) := (model as CoordinateSystemVisual3D).ArrowLengths := r; procedure SetAL(r: real) := Invoke(SetALP, r); - function GetAL: real := Invoke&(()->(model as CoordinateSystemVisual3D).ArrowLengths); - function GetD: real := Invoke&(()->((model as CoordinateSystemVisual3D).Children[0] as ArrowVisual3D).Diameter); + function GetAL: real := InvokeReal(()->(model as CoordinateSystemVisual3D).ArrowLengths); + function GetD: real := InvokeReal(()->((model as CoordinateSystemVisual3D).Children[0] as ArrowVisual3D).Diameter); protected function CreateObject: Object3D; override := new CoordinateSystemT(X, Y, Z, ArrowLengths, Diameter); public @@ -1463,13 +1431,15 @@ type BillboardTextT = class(ObjectWithChildren3D) private - procedure SetTP(r: string) := (model as BillboardTextVisual3D).Text := r; + function model := inherited model as BillboardTextVisual3D; + + procedure SetTP(r: string) := model.Text := r; procedure SetT(r: string) := Invoke(SetTP, r); - function GetT: string := Invoke&(()->(model as BillboardTextVisual3D).Text); + function GetT: string := InvokeString(()->model.Text); - procedure SetFSP(r: real) := (model as BillboardTextVisual3D).FontSize := r; + procedure SetFSP(r: real) := model.FontSize := r; procedure SetFS(r: real) := Invoke(SetFS, r); - function GetFS: real := Invoke&(()->(model as BillboardTextVisual3D).FontSize); + function GetFS: real := InvokeReal(()->model.FontSize); protected function CreateObject: Object3D; override := new BillboardTextT(X, Y, Z, Text, FontSize); public @@ -1490,32 +1460,33 @@ type TextT = class(ObjectWithChildren3D) private fontname: string; - procedure SetTP(r: string) := (model as TextVisual3D).Text := r; + function model := inherited model as TextVisual3D; + + procedure SetTP(r: string) := model.Text := r; procedure SetT(r: string) := Invoke(SetTP, r); - function GetT: string := Invoke&(()->(model as TextVisual3D).Text); + function GetT: string := InvokeString(()->model.Text); - procedure SetFSP(r: real) := (model as TextVisual3D).Height := r; + procedure SetFSP(r: real) := model.Height := r; procedure SetFS(r: real) := Invoke(SetFS, r); - function GetFS: real := Invoke&(()->(model as TextVisual3D).Height); + function GetFS: real := InvokeReal(()->model.Height); - procedure SetUP(v: Vector3D) := (model as TextVisual3D).UpDirection := v; + procedure SetUP(v: Vector3D) := model.UpDirection := v; procedure SetU(v: Vector3D) := Invoke(SetUP, v); - function GetU: Vector3D := Invoke&(()->(model as TextVisual3D).UpDirection); + function GetU: Vector3D := Invoke&(()->model.UpDirection); - procedure SetNP(fontname: string) := (model as TextVisual3D).FontFamily := new FontFamily(fontname); + procedure SetNP(fontname: string) := model.FontFamily := new FontFamily(fontname); procedure SetN(fontname: string) := Invoke(SetTP, fontname); - function GetN: string := Invoke&(()->fontname); + function GetN: string := InvokeString(()->fontname); - procedure SetColorP(c: GColor) := (model as TextVisual3D).Foreground := new SolidColorBrush(c); + procedure SetColorP(c: GColor) := model.Foreground := new SolidColorBrush(c); procedure SetColor(c: GColor) := Invoke(SetColorP, c); - function GetColor: GColor := Invoke&(()->((model as TextVisual3D).Foreground as SolidColorBrush).Color); + function GetColor: GColor := Invoke&(()->(model.Foreground as SolidColorBrush).Color); protected function CreateObject: Object3D; override := new TextT(X, Y, Z, Text, Height, Name, Color); public constructor(x, y, z: real; text: string; height: real; fontname: string; c: Color); begin var a := new TextVisual3D; - //a.UpDirection := V3D(0,-1,0); a.Position := p3D(0, 0, 0); a.Text := text; a.Height := height; @@ -1536,21 +1507,22 @@ type RectangleT = class(ObjectWithMaterial3D) private - procedure SetWP(r: real) := (model as RectangleVisual3D).Width := r; + function model := inherited model as RectangleVisual3D; + procedure SetWP(r: real) := model.Width := r; procedure SetW(r: real) := Invoke(SetWP, r); - function GetW: real := Invoke&(()->(model as RectangleVisual3D).Width); + function GetW: real := InvokeReal(()->model.Width); - procedure SetLP(r: real) := (model as RectangleVisual3D).Length := r; + procedure SetLP(r: real) := model.Length := r; procedure SetL(r: real) := Invoke(SetLP, r); - function GetL: real := Invoke&(()->(model as RectangleVisual3D).Length); + function GetL: real := InvokeReal(()->model.Length); - procedure SetLDP(r: Vector3D) := (model as RectangleVisual3D).LengthDirection := r; + procedure SetLDP(r: Vector3D) := model.LengthDirection := r; procedure SetLD(r: Vector3D) := Invoke(SetLDP, r); - function GetLD: Vector3D := Invoke&(()->(model as RectangleVisual3D).LengthDirection); + function GetLD: Vector3D := Invoke&(()->model.LengthDirection); - procedure SetNP(r: Vector3D) := (model as RectangleVisual3D).Normal := r; + procedure SetNP(r: Vector3D) := model.Normal := r; procedure SetN(r: Vector3D) := Invoke(SetNP, r); - function GetN: Vector3D := Invoke&(()->(model as RectangleVisual3D).Normal); + function GetN: Vector3D := Invoke&(()->model.Normal); protected function CreateObject: Object3D; override := new RectangleT(X, Y, Z, Length, Width, Normal, LengthDirection, Material); public @@ -1639,17 +1611,18 @@ type PipeT = class(ObjectWithMaterial3D) private - procedure SetDP(r: real) := (model as PipeVisual3D).Diameter := r * 2; + function model := inherited model as PipeVisual3D; + procedure SetDP(r: real) := model.Diameter := r * 2; procedure SetD(r: real) := Invoke(SetDP, r); - function GetD: real := Invoke&(()->(model as PipeVisual3D).Diameter / 2); + function GetD: real := InvokeReal(()->model.Diameter / 2); - procedure SetIDP(r: real) := (model as PipeVisual3D).InnerDiameter := r * 2; + procedure SetIDP(r: real) := model.InnerDiameter := r * 2; procedure SetID(r: real) := Invoke(SetIDP, r); - function GetID: real := Invoke&(()->(model as PipeVisual3D).InnerDiameter / 2); + function GetID: real := InvokeReal(()->model.InnerDiameter / 2); - procedure SetHP(r: real) := (model as PipeVisual3D).Point2 := P3D(0, 0, r); + procedure SetHP(r: real) := model.Point2 := P3D(0, 0, r); procedure SetH(r: real) := Invoke(SetHP, r); - function GetH: real := Invoke&(()->(model as PipeVisual3D).Point2.Z); + function GetH: real := InvokeReal(()->model.Point2.Z); protected function CreateObject: Object3D; override := new PipeT(X, Y, Z, Height, Radius, InnerRadius, Material); public @@ -1751,17 +1724,18 @@ type type LegoT = class(ObjectWithMaterial3D) private - procedure SetWP(r: integer) := (model as LegoVisual3D).Rows := r; + function model := inherited model as LegoVisual3D; + procedure SetWP(r: integer) := model.Rows := r; procedure SetW(r: integer) := Invoke(SetWP, r); - function GetW: integer := Invoke&(()->(model as LegoVisual3D).Rows); + function GetW: integer := InvokeInteger(()->model.Rows); - procedure SetHP(r: integer) := (model as LegoVisual3D).Height := r; + procedure SetHP(r: integer) := model.Height := r; procedure SetH(r: integer) := Invoke(SetHP, r); - function GetH: integer := Invoke&(()->(model as LegoVisual3D).Height); + function GetH: integer := InvokeInteger(()->model.Height); - procedure SetLP(r: integer) := (model as LegoVisual3D).Columns := r; + procedure SetLP(r: integer) := model.Columns := r; procedure SetL(r: integer) := Invoke(SetLP, r); - function GetL: integer := Invoke&(()->(model as LegoVisual3D).Columns); + function GetL: integer := InvokeInteger(()->model.Columns); {procedure SetSzP(r: Size3D); begin @@ -1975,7 +1949,7 @@ type private procedure SetLengthP(r: real) := (model as PlatonicAbstractVisual3D).Length := r; procedure SetLength(r: real) := Invoke(SetLengthP, r); - function GetLength: real := Invoke&(()->(model as PlatonicAbstractVisual3D).Length); + function GetLength: real := InvokeReal(()->(model as PlatonicAbstractVisual3D).Length); public property Length: real read GetLength write SetLength; end; @@ -1984,10 +1958,7 @@ type protected function CreateObject: Object3D; override := new IcosahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new IcosahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new IcosahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as IcosahedronT; end; @@ -1995,10 +1966,7 @@ type protected function CreateObject: Object3D; override := new DodecahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new DodecahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new DodecahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as DodecahedronT; end; @@ -2006,10 +1974,7 @@ type protected function CreateObject: Object3D; override := new TetrahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new TetrahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new TetrahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as TetrahedronT; end; @@ -2017,10 +1982,7 @@ type protected function CreateObject: Object3D; override := new OctahedronT(X, Y, Z, Length, Material); public - constructor(x, y, z, Length: real; m: GMaterial); - begin - CreateBase(new OctahedronVisual3D(Length), x, y, z, m); - end; + constructor(x, y, z, Length: real; m: GMaterial) := CreateBase(new OctahedronVisual3D(Length), x, y, z, m); function Clone := (inherited Clone) as OctahedronT; end; @@ -2074,23 +2036,20 @@ type Result := pmb.ToMeshGeometry3D end; end; - + PrismT = class(ObjectWithMaterial3D) private function Model := inherited model as PrismVisual3D; procedure SetR(r: real) := Invoke(procedure(r: real)->model.Radius := r, r); - function GetR: real := Invoke&(()->model.Radius); + function GetR: real := InvokeReal(()->model.Radius); procedure SetH(r: real) := Invoke(procedure(r: real)->model.Height := r, r); - function GetH: real := Invoke&(()->model.Height); + function GetH: real := InvokeReal(()->model.Height); procedure SetN(n: integer) := Invoke(procedure(n: integer)->model.N := n, n); - function GetN: integer := Invoke&(()->model.N); + function GetN: integer := InvokeInteger(()->model.N); protected function CreateObject: Object3D; override := new PrismT(X, Y, Z, N, Radius, Height, Material.Clone); public - constructor(x, y, z: real; N: integer; r, h: real; m: Gmaterial); - begin - CreateBase(new PrismVisual3D(N, r, h), x, y, z, m); - end; + constructor(x, y, z: real; N: integer; r, h: real; m: Gmaterial) := CreateBase(new PrismVisual3D(N, r, h), x, y, z, m); property Radius: real read GetR write SetR; property Height: real read GetH write SetH; property N: integer read GetN write SetN; @@ -2102,10 +2061,7 @@ type protected function CreateObject: Object3D; override := new PyramidT(X, Y, Z, N, Radius, Height, Material.Clone); public - constructor(x, y, z: real; N: integer; r, h: real; m: GMaterial); - begin - CreateBase(new PyramidVisual3D(N, r, h), x, y, z, m); - end; + constructor(x, y, z: real; N: integer; r, h: real; m: GMaterial) := CreateBase(new PyramidVisual3D(N, r, h), x, y, z, m); function Clone := (inherited Clone) as PyramidT; end; @@ -2120,7 +2076,7 @@ type function GetC: GColor := Invoke&(()->Model.Color); procedure SetTP(th: real) := Model.Thickness := th; procedure SetT(th: real) := Invoke(SetTP, th); - function GetT: real := Invoke&(()->Model.Thickness); + function GetT: real := InvokeReal(()->Model.Thickness); procedure SetRP(value: real); begin @@ -2194,10 +2150,8 @@ type Result := pc; end; - constructor(x, y, z: real; N: integer; Radius, Height: real; Thickness: real; c: GColor); - begin + constructor(x, y, z: real; N: integer; Radius, Height: real; Thickness: real; c: GColor) := CreateBase0(NewVisualObject(N,Radius,Height,Thickness,c), x, y, z); - end; property Height: real read fh write SetH; property Radius: real read fr write SetR; @@ -2236,7 +2190,7 @@ type private function Model := inherited model as LinesVisual3D; function GetTP: real := Model.Thickness; - function GetT: real := Invoke&(GetTP); + function GetT: real := InvokeReal(GetTP); procedure SetT(t: real) := Invoke(procedure(t: real)->Model.Thickness := t, t); function GetCP: GColor := Model.Color; function GetC: GColor := Invoke&(GetCP); @@ -2267,9 +2221,9 @@ type private function Model := inherited model as TorusVisual3D; procedure SetD(d: real) := Invoke(procedure(d: real)->model.TorusDiameter := d, d); - function GetD: real := Invoke&(()->model.TorusDiameter); + function GetD: real := InvokeReal(()->model.TorusDiameter); procedure SetTD(d: real) := Invoke(procedure(d: real)->model.TubeDiameter := d, d); - function GetTD: real := Invoke&(()->model.TubeDiameter); + function GetTD: real := InvokeReal(()->model.TubeDiameter); protected function CreateObject: Object3D; override := new TorusT(X, Y, Z, Diameter, TubeDiameter, Material.Clone); public @@ -2285,7 +2239,6 @@ type function Clone := (inherited Clone) as PrismT; end; - MyAnyT = class(PlatonicAbstractT) protected function CreateObject: Object3D; override := new MyAnyT(X, Y, Z, Length, Material); @@ -2312,6 +2265,17 @@ type end; end; + My13D = class(MeshElement3D) + public function Tessellate(): MeshGeometry3D; override; + begin + var tm := new MeshBuilder(false, false); + tm.AddRevolvedGeometry(Arr(Pnt(0,0),Pnt(0,1),Pnt(0.3,1),Pnt(0.5,0.3),Pnt(2,1),Pnt(3,0)),nil,Origin,OrtZ,80); + Result := tm.ToMesh(false); + end; + end; + + + type AnyT = class(ObjectWithMaterial3D) constructor(x, y, z: real; c: GColor); @@ -2324,10 +2288,14 @@ type //var a := new TerrainVisual3D; //a.Content := (new SphereVisual3D()).Model; //a.Text := 'PascalABC'; - var a := new LinesVisual3D; - a.Thickness := 1.99; - //a.Points := Arr(P3D(0, 0, 0), P3D(3, 0, 0), P3D(3, 0, 0), P3D(3, 3, 0), P3D(3, 3, 0), P3D(3, 3, 3)); - a.Color := c; + //var a := new LinesVisual3D; + {a.Thickness := 1.99; + a.Points := Arr(P3D(0, 0, 0), P3D(3, 0, 0), P3D(3, 0, 0), P3D(3, 3, 0), P3D(3, 3, 0), P3D(3, 3, 3)); + a.Color := c;} + + var a := new My13D; + a.Material := c; + {var aa := 1; var b := 80; @@ -2522,7 +2490,7 @@ begin //var c1 := XamlReader.Load(new System.IO.FileStream('cube.xaml',System.IO.FileMode.Open)) as CubeVisual3D; //hvp.Children.Add(c1); - var off := new offreader(nil); + {var off := new offreader(nil); var s := System.IO.File.OpenRead('boxcube.off'); off.Load(s); @@ -2531,18 +2499,14 @@ begin m1.EdgeDiameter := 0; m1.VertexRadius := 0; m1.Mesh := off.CreateMesh; - hvp.Children.Add(m1); - - {var m1 := new MeshGeometryVisual3D(); - m1.MeshGeometry := off.CreateMeshGeometry3D; hvp.Children.Add(m1);} + + var ex := new ExtrudedVisual3D(); + ex.BackMaterial := Colors.Green; + ex.Diameters := new DoubleCollection(Arr(1.0,1.5,1.2)); + ex.Path := new Point3DCollection(Arr(P3D(0,0,0),P3D(0,1,0),P3D(0,1,1),P3D(1,1,1))); + hvp.Children.Add(ex); - {var m1 := new ModelVisual3D(); - m1.Content := off.CreateModel3D; - hvp.Children.Add(m1);} - - {var imp := new HelixToolkit.Wpf.ModelImporter(); - imp.Load('a.xaml',nil,False);} end; procedure Proba2 := Invoke(ProbaP2); @@ -2554,7 +2518,7 @@ procedure WindowType.SetLeft(l: real) := Invoke(WindowTypeSetLeftP, l); function WindowTypeGetLeftP := MainWindow.Left; -function WindowType.GetLeft := Invoke&(WindowTypeGetLeftP); +function WindowType.GetLeft := InvokeReal(WindowTypeGetLeftP); procedure WindowTypeSetTopP(t: real) := MainWindow.Top := t; @@ -2562,7 +2526,7 @@ procedure WindowType.SetTop(t: real) := Invoke(WindowTypeSetTopP, t); function WindowTypeGetTopP := MainWindow.Top; -function WindowType.GetTop := Invoke&(WindowTypeGetTopP); +function WindowType.GetTop := InvokeReal(WindowTypeGetTopP); procedure WindowTypeSetWidthP(w: real) := MainWindow.Width := w + wplus; @@ -2570,7 +2534,7 @@ procedure WindowType.SetWidth(w: real) := Invoke(WindowTypeSetWidthP, w); function WindowTypeGetWidthP := MainWindow.Width - wplus; -function WindowType.GetWidth := Invoke&(WindowTypeGetWidthP); +function WindowType.GetWidth := InvokeReal(WindowTypeGetWidthP); procedure WindowTypeSetHeightP(h: real) := MainWindow.Height := h + hplus; @@ -2578,7 +2542,7 @@ procedure WindowType.SetHeight(h: real) := Invoke(WindowTypeSetHeightP, h); function WindowTypeGetHeightP := MainWindow.Height - hplus; -function WindowType.GetHeight := Invoke&(WindowTypeGetHeightP); +function WindowType.GetHeight := InvokeReal(WindowTypeGetHeightP); procedure WindowTypeSetCaptionP(c: string) := MainWindow.Title := c; @@ -2586,7 +2550,7 @@ procedure WindowType.SetCaption(c: string) := Invoke(WindowTypeSetCaptionP, c); function WindowTypeGetCaptionP := MainWindow.Title; -function WindowType.GetCaption := Invoke&(WindowTypeGetCaptionP); +function WindowType.GetCaption := InvokeString(WindowTypeGetCaptionP); procedure WindowTypeSetSizeP(w, h: real); begin diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index d96735d74..04e1d46c2 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -3255,6 +3255,16 @@ begin Result := sb.ToString; end; + +//------------------------------------------------------------------------------ +// Методы для object (экспериментально) +//------------------------------------------------------------------------------ +/// Выводит значение объекта на экран, после чего выводит пробел +procedure Print(Self: object); extensionmethod := Print(Self); + +/// Выводит значение объекта на экран и переходит на следующую строку +procedure Println(Self: object); extensionmethod := Println(Self); + //------------------------------------------------------------------------------ // Операции для string и char //------------------------------------------------------------------------------ @@ -3351,10 +3361,7 @@ function string.operator in(substr: string; str: string) := str.Contains(substr) procedure operator+=(var left: StringBuilder; right: string); extensionmethod := left.Append(right); -function operator implicit(s: string): StringBuilder; extensionmethod; -begin - Result := new StringBuilder(s); -end; +function operator implicit(s: string): StringBuilder; extensionmethod := new StringBuilder(s); //------------------------------------------------------------------------------ // Операции для array of T