From c0b1d6629fc874c969c93432b5eb36510beae0ea Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 15 May 2019 14:47:24 +0200 Subject: [PATCH] =?UTF-8?q?:gear:=20Pas=20d'espace=20int=C3=A9rieur=20aux?= =?UTF-8?q?=20parenth=C3=A8ses;=20filtres=20en=20crochets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/engine/grammar.ne | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/engine/grammar.ne b/source/engine/grammar.ne index 759b81132..247945aea 100644 --- a/source/engine/grammar.ne +++ b/source/engine/grammar.ne @@ -1,7 +1,3 @@ - -# To understand or edit this file, use the awesome nearley playground (but save your work, it can crash sometimes) : https://omrelli.ug/nearley-playground/ - - main -> AS {% id %} | Comparison {% id %} @@ -14,7 +10,7 @@ NumericTerminal -> | percentage {% id %} | number {% id %} -Parentheses -> "(" _ AS _ ")" {% ([,,e]) => e %} +Parentheses -> "(" AS ")" {% ([,e]) => e %} | NumericTerminal {% id %} ComparisonOperator -> ">" | "<" | ">=" | "<=" | "=" | "!=" @@ -40,7 +36,7 @@ NegatedVariable -> "≠" _ Variable {% ([,,{variable}]) => ({'≠': {explanation FilteredVariable -> Variable _ Filter {% ([{variable},,filter]) => ({filter: {filter, explanation: variable}}) %} -Filter -> "(" VariableFragment ")" {% ([,filter]) =>filter %} +Filter -> "[" VariableFragment "]" {% ([,filter]) =>filter %} TemporalVariable -> Variable _ TemporalTransform {% ([{variable},,temporalTransform]) => ({'temporalTransform': {explanation: variable, temporalTransform} }) %}