^ and | parsing

porten at froglogic.com porten at froglogic.com
Tue Nov 11 00:35:06 CET 2003


Hi,

almost forgot about a grammar.y copy&paste bug I fixed last month.

Tests:

shouldBe("3^4&5", "7");
shouldBe("2|4^5", "3");

Harri.

-------------- next part --------------
Index: grammar.y
===================================================================
RCS file: /home/kde/kdelibs/kjs/grammar.y,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -p -r1.51 -r1.52
--- grammar.y	18 Apr 2003 08:29:49 -0000	1.51
+++ grammar.y	19 Oct 2003 18:10:36 -0000	1.52
@@ -326,12 +326,12 @@ BitwiseANDExpr:
 
 BitwiseXORExpr:
     BitwiseANDExpr
-  | BitwiseXORExpr '^' EqualityExpr { $$ = new BitOperNode($1, OpBitXOr, $3); }
+  | BitwiseXORExpr '^' BitwiseANDExpr { $$ = new BitOperNode($1, OpBitXOr, $3); }
 ;
 
 BitwiseORExpr:
     BitwiseXORExpr
-  | BitwiseORExpr '|' EqualityExpr  { $$ = new BitOperNode($1, OpBitOr, $3); }
+  | BitwiseORExpr '|' BitwiseXORExpr { $$ = new BitOperNode($1, OpBitOr, $3); }
 ;
 
 LogicalANDExpr:


More information about the Khtml-devel mailing list