From e2b50a9cc44cae0efb0ccbc4374448c4421b2183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=B7=D0=B4=D0=B0=D0=B9=D1=89=D0=B8=D0=BA?= Date: Sat, 27 Jul 2019 00:57:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20IsLexpr=20(#229,=20#239)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compiler/OptTree-Drive.ref | 49 +++++++++++++++------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/src/compiler/OptTree-Drive.ref b/src/compiler/OptTree-Drive.ref index 85033c68..f2f4b4a7 100644 --- a/src/compiler/OptTree-Drive.ref +++ b/src/compiler/OptTree-Drive.ref @@ -169,43 +169,38 @@ IsPassiveCall-Aux { IsLexpr { e.Expr - = : ((e.Vars) t.Res) - = t.Res + , + : { + e.Res-B OpenE e.Res-E = False; + e.Res-B (s.Mode e.Index) e.Res-M (s.Mode e.Index) e.Res-E = False; + e.Other = True; + } } +/* + == t.IsLexpr-Aux-Item* + + t.IsLexpr-Aux-Item ::= OpenE | ('e' e.Index) | ('t' e.Index) +*/ IsLexpr-Aux { - e.B (TkVariable 'e' e.Index1) - e.M (TkVariable 'e' e.Index2) - e.E (e.ETVars) - = (() False); + e.Expr-B (TkVariable 'e' e.Index1) e.Expr-M (TkVariable 'e' e.Index2) e.Expr-E + = OpenE; - e.Expr (e.ETVars) - = ; - ((e.Vars) False) t.Term = (() False); + (TkVariable 'e' e.Index) = ('e' e.Index); + (TkVariable 't' e.Index) = ('t' e.Index); + + (Brackets e.InBrackets) = ; + (ADT-Brackets (e.Name) e.InBrackets) = ; + + t.Other = /* пропускаем */; } - ((e.ETVars) True) e.Expr >; } -IsLexpr-Term { - t.Term (e.B t.Term e.E) - , t.Term : (TkVariable 't' e.Index) - = (() False); - - t.Term (e.B t.Term e.E) - , t.Term : (TkVariable 'e' e.Index) - = (() False); - - (Brackets e.Expr) (e.ETVars) = ; - - (ADT-Brackets e.Expr) (e.ETVars) = ; - - t.Term (e.ETVars) = ((e.ETVars t.Term) True); -} - /* Осуществляет попытку прогонки или встраивания в функции == t.Function*