diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 36a54ef0e..5888b74a4 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: POMAH -// DateTime: 20.05.2015 11:32:45 -// UserName: ????? +// Machine: SSM +// DateTime: 21.05.2015 23:36:52 +// UserName: ????????? // GPLEX input file // GPLEX frame file // diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index cb86eca07..e17d34465 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -1249,7 +1249,7 @@ unpacked_structured_type ; sequence_type - : tkSequence tkOf type_ref + : tkSequence tkOf template_param { $$ = new sequence_type($3,@$); } @@ -1338,15 +1338,15 @@ proc_type_decl { $$ = new function_header($2 as formal_parameters, null, null, null, $4 as type_definition, @$); } - | identifier tkArrow identifier + | identifier tkArrow template_param { $$ = new modern_proc_type($1,null,$3,@$); } - | tkRoundOpen tkRoundClose tkArrow identifier + | tkRoundOpen tkRoundClose tkArrow template_param { $$ = new modern_proc_type(null,null,$4,@$); } - | tkRoundOpen enumeration_id_list tkRoundClose tkArrow identifier + | tkRoundOpen enumeration_id_list tkRoundClose tkArrow template_param { $$ = new modern_proc_type(null,$2 as enumerator_list,$5,@$); } diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index acb05553a..2cd9c77cd 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,10 +1,10 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: POMAH -// DateTime: 20.05.2015 11:32:46 -// UserName: ????? -// Input file +// Machine: SSM +// DateTime: 21.05.2015 23:36:52 +// UserName: ????????? +// Input file // options: no-lines gplex @@ -56,7 +56,7 @@ public abstract class ScanBase : AbstractScanner { - // Verbatim content from ABCPascal.y + // Verbatim content from D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y // ��� ���������� ����������� � ����� GPPGParser, �������������� ����� ������, ������������ �������� gppg public syntax_tree_node root; // �������� ���� ��������������� ������ @@ -68,7 +68,7 @@ public partial class GPPGParser: ShiftReduceParser scanner) : base(scanner) { } - // End verbatim content from ABCPascal.y + // End verbatim content from D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y #pragma warning disable 649 private static Dictionary aliasses; @@ -299,7 +299,7 @@ public partial class GPPGParser: ShiftReduceParser sequence_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 246: // sequence_type -> tkSequence, tkOf, type_ref + case 246: // sequence_type -> tkSequence, tkOf, template_param { CurrentSemanticValue.td = new sequence_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } @@ -3253,20 +3253,20 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkArrow, identifier + case 263: // proc_type_decl -> identifier, tkArrow, template_param { - CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].id,null,ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); + CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].id,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 264: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, identifier + case 264: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param { - CurrentSemanticValue.td = new modern_proc_type(null,null,ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); + CurrentSemanticValue.td = new modern_proc_type(null,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; case 265: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, - // identifier + // template_param { - CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-4].stn as enumerator_list,ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); + CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-4].stn as enumerator_list,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; case 266: // proc_type_decl -> identifier, tkArrow, tkRoundOpen, tkRoundClose diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.tags b/Parsers/PascalABCParserNewSaushkin/PABC.tags index 380c566af..b313e4d05 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.tags +++ b/Parsers/PascalABCParserNewSaushkin/PABC.tags @@ -304,6 +304,7 @@ + diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index 83d907447..e8b8f2810 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -66,5 +66,6 @@ script= + diff --git a/SyntaxTree/tree/SyntaxTreeStreamReader.cs b/SyntaxTree/tree/SyntaxTreeStreamReader.cs index 44ef474ec..0e9198fa9 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamReader.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamReader.cs @@ -3818,7 +3818,7 @@ namespace PascalABCCompiler.SyntaxTree read_type_definition(_modern_proc_type); _modern_proc_type.aloneparam = _read_node() as ident; _modern_proc_type.el = _read_node() as enumerator_list; - _modern_proc_type.res = _read_node() as ident; + _modern_proc_type.res = _read_node() as type_definition; } } diff --git a/SyntaxTree/tree/Tree.cs b/SyntaxTree/tree/Tree.cs index aadcb7d8e..cce1242b7 100644 --- a/SyntaxTree/tree/Tree.cs +++ b/SyntaxTree/tree/Tree.cs @@ -28183,7 +28183,7 @@ namespace PascalABCCompiler.SyntaxTree /// ///Конструктор с параметрами. /// - public modern_proc_type(ident _aloneparam,enumerator_list _el,ident _res) + public modern_proc_type(ident _aloneparam,enumerator_list _el,type_definition _res) { this._aloneparam=_aloneparam; this._el=_el; @@ -28193,7 +28193,7 @@ namespace PascalABCCompiler.SyntaxTree /// ///Конструктор с параметрами. /// - public modern_proc_type(ident _aloneparam,enumerator_list _el,ident _res,SourceContext sc) + public modern_proc_type(ident _aloneparam,enumerator_list _el,type_definition _res,SourceContext sc) { this._aloneparam=_aloneparam; this._el=_el; @@ -28204,7 +28204,7 @@ namespace PascalABCCompiler.SyntaxTree /// ///Конструктор с параметрами. /// - public modern_proc_type(type_definition_attr_list _attr_list,ident _aloneparam,enumerator_list _el,ident _res) + public modern_proc_type(type_definition_attr_list _attr_list,ident _aloneparam,enumerator_list _el,type_definition _res) { this._attr_list=_attr_list; this._aloneparam=_aloneparam; @@ -28215,7 +28215,7 @@ namespace PascalABCCompiler.SyntaxTree /// ///Конструктор с параметрами. /// - public modern_proc_type(type_definition_attr_list _attr_list,ident _aloneparam,enumerator_list _el,ident _res,SourceContext sc) + public modern_proc_type(type_definition_attr_list _attr_list,ident _aloneparam,enumerator_list _el,type_definition _res,SourceContext sc) { this._attr_list=_attr_list; this._aloneparam=_aloneparam; @@ -28226,7 +28226,7 @@ namespace PascalABCCompiler.SyntaxTree protected ident _aloneparam; protected enumerator_list _el; - protected ident _res; + protected type_definition _res; /// /// @@ -28261,7 +28261,7 @@ namespace PascalABCCompiler.SyntaxTree /// /// /// - public ident res + public type_definition res { get { @@ -28322,7 +28322,7 @@ namespace PascalABCCompiler.SyntaxTree el = (enumerator_list)value; break; case 3: - res = (ident)value; + res = (type_definition)value; break; } } diff --git a/SyntaxTree/tree/tree.nin b/SyntaxTree/tree/tree.nin index f4670d9f0..38193c7c3 100644 Binary files a/SyntaxTree/tree/tree.nin and b/SyntaxTree/tree/tree.nin differ diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index ef3742b25..0fc4fc905 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -17944,7 +17944,7 @@ namespace PascalABCCompiler.TreeConverter t.Add(new named_type_reference(en.enumerators[i].name, en.enumerators[i].name.source_context)); } } - t.Add(new named_type_reference(_modern_proc_type.res, _modern_proc_type.res.source_context)); + t.Add(_modern_proc_type.res, _modern_proc_type.res.source_context); t.source_context = _modern_proc_type.source_context; var ttr = new template_type_reference(new named_type_reference(l), t, _modern_proc_type.source_context); visit(ttr);