]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/m2/gm2-compiler/P3Build.bnf
Bugfix to allow testsuite/gm2/pim/pass/arraybool.mod to compile on ppc64le
[gcc.git] / gcc / m2 / gm2-compiler / P3Build.bnf
index 8ccc4d604a34d2881408a366d51605b62d519e4b..9b2e8421a26fa57afa39ef22cbc999f5653989b0 100644 (file)
@@ -723,8 +723,10 @@ MulOperator := "*"                                                         % Pus
                                                                              RecordOp %
             =:
 
-ConstFactor := Number | ConstString | ConstSetOrQualidentOrFunction |
-               "(" ConstExpression ")" | "NOT" ConstFactor                 % BuildNot %
+ConstFactor :=                                                             % VAR tokpos: CARDINAL ; %
+               Number | ConstString | ConstSetOrQualidentOrFunction |
+               "(" ConstExpression ")" | "NOT"                             % tokpos := GetTokenNo() -1 %
+                                               ConstFactor                 % BuildNot (tokpos) %
                | ConstAttribute =:
 
 -- to help satisfy LL1
@@ -1087,11 +1089,14 @@ UnaryOrTerm := "+"                                                         % Pus
                  Term                                                      % BuildUnaryOp %
                | Term =:
 
-Term := Factor { MulOperator Factor                                        % BuildBinaryOp %
+Term := Factor
+               { MulOperator Factor                                        % BuildBinaryOp %
                } =:
 
-Factor := Number | string | SetOrDesignatorOrFunction |
-          "(" Expression ")" | "NOT" ( Factor                              % BuildNot %
+Factor :=                                                                  % VAR tokpos: CARDINAL ; %
+          Number | string | SetOrDesignatorOrFunction |
+          "(" Expression ")" | "NOT"                                       % tokpos := GetTokenNo ()-1 %
+                                     ( Factor                              % BuildNot (tokpos) %
           | ConstAttribute
                                 ) =:
 
This page took 0.026629 seconds and 5 git commands to generate.