Skip to content

Commit

Permalink
[lang] Fixing the invalid precedence of the power operator.
Browse files Browse the repository at this point in the history
close #846

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Aug 17, 2018
1 parent a6b5c7d commit 18501d8
Show file tree
Hide file tree
Showing 20 changed files with 2,367 additions and 1,994 deletions.
Expand Up @@ -323,7 +323,8 @@ in ascending precedence, i.e. from the lower priority to the higher priority.
| +, - | left to right |
| *, /, % | left to right |
| as | left to right |
| !, - (unary), ** | right to left |
| ** | left to right |
| !, - (unary), + (unrary) | right to left |
| ++, -- | not associative |


Expand All @@ -339,7 +340,8 @@ in ascending precedence, i.e. from the lower priority to the higher priority.
#[ "$i+$i", "$i-$i" ],
#[ "$i*$i", "$i/$i", "$i%$i" ],
#[ "$L as $t" ],
#[ "!$R", "-$R", "$i**$i" ],
#[ "$i**$i" ],
#[ "!$R", "-$R", "+$R" ],
#[ "$v++", "$v--" ]
].validateOperatorOrder
}
Expand Down
2 changes: 1 addition & 1 deletion formatting-styles/latex/sarl-beamer-listing.sty
Expand Up @@ -22,7 +22,7 @@
% limitations under the License.
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{sarl-beamer-listing}[2018/07/31]
\ProvidesPackage{sarl-beamer-listing}[2018/08/17]
\newif\ifusesarlcolors\usesarlcolorstrue
\DeclareOption{sarlcolors}{\global\usesarlcolorstrue}
\DeclareOption{nosarlcolors}{\global\usesarlcolorsfalse}
Expand Down
2 changes: 1 addition & 1 deletion formatting-styles/latex/sarl-colorized-listing.sty
Expand Up @@ -22,7 +22,7 @@
% limitations under the License.
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{sarl-colorized-listing}[2018/07/31]
\ProvidesPackage{sarl-colorized-listing}[2018/08/17]
\newif\ifusesarlcolors\usesarlcolorstrue
\DeclareOption{sarlcolors}{\global\usesarlcolorstrue}
\DeclareOption{nosarlcolors}{\global\usesarlcolorsfalse}
Expand Down
2 changes: 1 addition & 1 deletion formatting-styles/latex/sarl-listing.sty
Expand Up @@ -22,7 +22,7 @@
% limitations under the License.
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{sarl-listing}[2018/07/31]
\ProvidesPackage{sarl-listing}[2018/08/17]
\newif\ifusesarlcolors\usesarlcolorstrue
\DeclareOption{sarlcolors}{\global\usesarlcolorstrue}
\DeclareOption{nosarlcolors}{\global\usesarlcolorsfalse}
Expand Down
Expand Up @@ -357,11 +357,11 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getXCastedExpressionAccess().getGroup_1(), "rule__XCastedExpression__Group_1__0");
builder.put(grammarAccess.getXCastedExpressionAccess().getGroup_1_0(), "rule__XCastedExpression__Group_1_0__0");
builder.put(grammarAccess.getXCastedExpressionAccess().getGroup_1_0_0(), "rule__XCastedExpression__Group_1_0_0__0");
builder.put(grammarAccess.getXUnaryOperationAccess().getGroup_0(), "rule__XUnaryOperation__Group_0__0");
builder.put(grammarAccess.getXExponentExpressionAccess().getGroup(), "rule__XExponentExpression__Group__0");
builder.put(grammarAccess.getXExponentExpressionAccess().getGroup_1(), "rule__XExponentExpression__Group_1__0");
builder.put(grammarAccess.getXExponentExpressionAccess().getGroup_1_0(), "rule__XExponentExpression__Group_1_0__0");
builder.put(grammarAccess.getXExponentExpressionAccess().getGroup_1_0_0(), "rule__XExponentExpression__Group_1_0_0__0");
builder.put(grammarAccess.getXUnaryOperationAccess().getGroup_0(), "rule__XUnaryOperation__Group_0__0");
builder.put(grammarAccess.getFileAccess().getGroup(), "rule__File__Group__0");
builder.put(grammarAccess.getFileAccess().getGroup_0(), "rule__File__Group_0__0");
builder.put(grammarAccess.getXFunctionSuperTypeRefAccess().getGroup(), "rule__XFunctionSuperTypeRef__Group__0");
Expand Down Expand Up @@ -884,10 +884,10 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureAssignment_1_0_0_1(), "rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1");
builder.put(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandAssignment_1_1(), "rule__XMultiplicativeExpression__RightOperandAssignment_1_1");
builder.put(grammarAccess.getXCastedExpressionAccess().getTypeAssignment_1_1(), "rule__XCastedExpression__TypeAssignment_1_1");
builder.put(grammarAccess.getXUnaryOperationAccess().getFeatureAssignment_0_1(), "rule__XUnaryOperation__FeatureAssignment_0_1");
builder.put(grammarAccess.getXUnaryOperationAccess().getOperandAssignment_0_2(), "rule__XUnaryOperation__OperandAssignment_0_2");
builder.put(grammarAccess.getXExponentExpressionAccess().getFeatureAssignment_1_0_0_1(), "rule__XExponentExpression__FeatureAssignment_1_0_0_1");
builder.put(grammarAccess.getXExponentExpressionAccess().getRightOperandAssignment_1_1(), "rule__XExponentExpression__RightOperandAssignment_1_1");
builder.put(grammarAccess.getXUnaryOperationAccess().getFeatureAssignment_0_1(), "rule__XUnaryOperation__FeatureAssignment_0_1");
builder.put(grammarAccess.getXUnaryOperationAccess().getOperandAssignment_0_2(), "rule__XUnaryOperation__OperandAssignment_0_2");
builder.put(grammarAccess.getFileAccess().getPackageAssignment_0_1(), "rule__File__PackageAssignment_0_1");
builder.put(grammarAccess.getFileAccess().getImportSectionAssignment_1(), "rule__File__ImportSectionAssignment_1");
builder.put(grammarAccess.getFileAccess().getXtendTypesAssignment_2(), "rule__File__XtendTypesAssignment_2");
Expand Down

0 comments on commit 18501d8

Please sign in to comment.