[llvm-commits] CVS: llvm/projects/Stacker/lib/compiler/Lexer.l StackerCompiler.cpp StackerParser.y
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 30 21:50:06 PST 2004
Changes in directory llvm/projects/Stacker/lib/compiler:
Lexer.l updated: 1.1 -> 1.2
StackerCompiler.cpp updated: 1.4 -> 1.5
StackerParser.y updated: 1.3 -> 1.4
---
Log message:
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
---
Diffs of the changes: (+9 -9)
Index: llvm/projects/Stacker/lib/compiler/Lexer.l
diff -u llvm/projects/Stacker/lib/compiler/Lexer.l:1.1 llvm/projects/Stacker/lib/compiler/Lexer.l:1.2
--- llvm/projects/Stacker/lib/compiler/Lexer.l:1.1 Sun Nov 23 11:52:55 2003
+++ llvm/projects/Stacker/lib/compiler/Lexer.l Tue Mar 30 21:49:47 2004
@@ -117,10 +117,10 @@
{Colon} { return COLON; }
{Semi} { return SEMI; }
-TRUE { return TRUE; }
-FALSE { return FALSE; }
-ON { return TRUE; }
-OFF { return FALSE; }
+TRUE { return TRUETOK; }
+FALSE { return FALSETOK; }
+ON { return TRUETOK; }
+OFF { return FALSETOK; }
{Less} { return LESS; }
LT { return LESS; }
{More} { return MORE; }
Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.4 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.5
--- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.4 Sat Feb 14 22:05:58 2004
+++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Tue Mar 30 21:49:47 2004
@@ -820,13 +820,13 @@
}
// Logical Operations
- case TRUE : // -- -1
+ case TRUETOK : // -- -1
{
if (echo) bb->setName("TRUE");
push_integer(bb,-1);
break;
}
- case FALSE : // -- 0
+ case FALSETOK : // -- 0
{
if (echo) bb->setName("FALSE");
push_integer(bb,0);
Index: llvm/projects/Stacker/lib/compiler/StackerParser.y
diff -u llvm/projects/Stacker/lib/compiler/StackerParser.y:1.3 llvm/projects/Stacker/lib/compiler/StackerParser.y:1.4
--- llvm/projects/Stacker/lib/compiler/StackerParser.y:1.3 Tue Dec 9 22:33:07 2003
+++ llvm/projects/Stacker/lib/compiler/StackerParser.y Tue Mar 30 21:49:47 2004
@@ -55,7 +55,7 @@
/* Terminal Tokens */
%token SEMI COLON FORWARD MAIN DUMP
-%token TRUE FALSE LESS MORE LESS_EQUAL MORE_EQUAL NOT_EQUAL EQUAL
+%token TRUETOK FALSETOK LESS MORE LESS_EQUAL MORE_EQUAL NOT_EQUAL EQUAL
%token PLUS MINUS INCR DECR MULT DIV MODULUS NEGATE ABS MIN MAX STAR_SLASH
%token AND OR XOR LSHIFT RSHIFT
%token DROP DROP2 NIP NIP2 DUP DUP2 SWAP SWAP2 OVER OVER2 ROT ROT2
@@ -109,8 +109,8 @@
Word : INTEGER { $$ = SCI->handle_integer( $1 ); } ;
/* Everything else is a terminal symbol and goes to handle_word */
-Word : TRUE { $$ = SCI->handle_word( TRUE ); } ;
-Word : FALSE { $$ = SCI->handle_word( FALSE ); } ;
+Word : TRUETOK { $$ = SCI->handle_word( TRUETOK ); } ;
+Word : FALSETOK { $$ = SCI->handle_word( FALSETOK ); } ;
Word : LESS { $$ = SCI->handle_word( LESS ); } ;
Word : MORE { $$ = SCI->handle_word( MORE ); } ;
Word : LESS_EQUAL { $$ = SCI->handle_word( LESS_EQUAL ); } ;
More information about the llvm-commits
mailing list