From 0253a47bed8fa5aabc213554a6c6987b672dfd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9F=D0=BE=D0=B3=D0=BE=D1=80=D0=B5=D0=BB=D0=BE=D0=B2?= Date: Tue, 5 May 2020 18:58:06 +0300 Subject: [PATCH] =?UTF-8?q?-1=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD=D0=BE=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=B0?= =?UTF-8?q?=20to=20=D0=B2=20SystemSlice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Parsers/PascalABCParserNewSaushkin/ABCPascal.cs | 2 +- .../PascalABCParserNewSaushkin/ABCPascalYacc.cs | 2 +- .../SugarVisitors/SliceDesugarVisitor.cs | 14 ++++++++------ bin/Lib/PABCSystem.pas | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 567aa29dc..6a8dae13c 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-P4NLNB1 -// DateTime: 5/4/2020 10:24:40 AM +// DateTime: 5/5/2020 6:55:25 PM // UserName: fatco // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 1b8b39812..2643bae14 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-P4NLNB1 -// DateTime: 5/4/2020 10:24:41 AM +// DateTime: 5/5/2020 6:55:26 PM // UserName: fatco // Input file diff --git a/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs b/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs index 923ed50c1..d492b08ea 100644 --- a/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs @@ -59,6 +59,8 @@ namespace SyntaxVisitors.SugarVisitors el.Add(sl.step); return el; } + + /* public override void Exit(syntax_tree_node st) { if (st is slice_expr_question) @@ -68,15 +70,15 @@ namespace SyntaxVisitors.SugarVisitors { ProceedSliceExpr(st as slice_expr); } - // base.Exit(st); - } + }*/ + public override void visit(assign _assign) { - ProcessNode(_assign.from); - ProcessNode(_assign.to); + _assign.from.visit(this); + _assign.to.visit(this); } - public void ProceedSliceExpr(slice_expr sl) + public override void visit(slice_expr sl) { var el = construct_expression_list_for_slice_expr(sl); if (sl.Parent is assign parent_assign && parent_assign.to == sl) @@ -104,7 +106,7 @@ namespace SyntaxVisitors.SugarVisitors } } - public void ProceedSliceQuestionExpr(slice_expr_question sl) + public override void visit(slice_expr_question sl) { if (sl.Parent is assign parent_assign && parent_assign.to == sl) { diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index c93f682d9..49a2bebba 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -10387,7 +10387,7 @@ begin raise new ArgumentException(GetTranslation(PARAMETER_FROM_OUT_OF_RANGE)); if (situation = 0) or (situation = 1) then - if (&to < 0) or (&to > Len) then + if (&to < -1) or (&to > Len) then raise new ArgumentException(GetTranslation(PARAMETER_TO_OUT_OF_RANGE)); if situation > 0 then