From 8797cd79a5cf2c8bcf7c52197309910f036de4e3 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 20 Nov 2021 14:25:06 +1100 Subject: [PATCH] oceani: remove "expr precedence" section Use "declare terminals" for declaring all terminals, whether for precedence or otherwise. Signed-off-by: NeilBrown --- csrc/oceani.mdc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index 87b9070..ca6f5d7 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -3019,10 +3019,11 @@ there. ###### Binode types CondExpr, -###### Grammar +###### declare terminals $LEFT if $$ifelse - ## expr precedence + +###### Grammar $*exec Expression -> Expression if Expression else Expression $$ifelse ${ { @@ -3141,7 +3142,7 @@ evaluate the second expression if not necessary. OrElse, Not, -###### expr precedence +###### declare terminals $LEFT or $LEFT and $LEFT not @@ -3289,7 +3290,7 @@ expression operator, and the `CMPop` non-terminal will match one of them. Eql, NEql, -###### expr precedence +###### declare terminals $LEFT < > <= >= == != CMPop ###### expression grammar @@ -3406,7 +3407,7 @@ should only insert brackets were needed for precedence. StringConv, Bracket, -###### expr precedence +###### declare terminals $LEFT + - Eop $LEFT * / % ++ Top $LEFT Uop $ @@ -3948,7 +3949,7 @@ printed. ###### Binode types Print, -##### expr precedence +##### declare terminals $TERM print ###### SimpleStatement Grammar @@ -4167,7 +4168,7 @@ function which has a return type, and the "condition" code blocks in ###### Binode types Use, -###### expr precedence +###### declare terminals $TERM use ###### SimpleStatement Grammar @@ -4330,7 +4331,7 @@ casepart` to track a list of case parts. ###### ComplexStatement Grammar | CondStatement ${ $0 = $<1; }$ -###### expr precedence +###### declare terminals $TERM for then while do $TERM else $TERM switch case -- 2.43.0