forked from OSchip/llvm-project
				
			Avoid TRUE and FALSE which apparently conflict with some macros on OSX
llvm-svn: 12566
This commit is contained in:
		
							parent
							
								
									709f03e2dd
								
							
						
					
					
						commit
						c0ba90e35c
					
				| 
						 | 
					@ -174,8 +174,8 @@ HexIntConstant [us]0x[0-9A-Fa-f]+
 | 
				
			||||||
 | 
					
 | 
				
			||||||
begin           { return BEGINTOK; }
 | 
					begin           { return BEGINTOK; }
 | 
				
			||||||
end             { return ENDTOK; }
 | 
					end             { return ENDTOK; }
 | 
				
			||||||
true            { return TRUE;  }
 | 
					true            { return TRUETOK;  }
 | 
				
			||||||
false           { return FALSE; }
 | 
					false           { return FALSETOK; }
 | 
				
			||||||
declare         { return DECLARE; }
 | 
					declare         { return DECLARE; }
 | 
				
			||||||
global          { return GLOBAL; }
 | 
					global          { return GLOBAL; }
 | 
				
			||||||
constant        { return CONSTANT; }
 | 
					constant        { return CONSTANT; }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -857,7 +857,7 @@ using namespace llvm;
 | 
				
			||||||
%type  <StrVal> Name OptName OptAssign
 | 
					%type  <StrVal> Name OptName OptAssign
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%token IMPLEMENTATION ZEROINITIALIZER TRUE FALSE BEGINTOK ENDTOK
 | 
					%token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK
 | 
				
			||||||
%token DECLARE GLOBAL CONSTANT VOLATILE
 | 
					%token DECLARE GLOBAL CONSTANT VOLATILE
 | 
				
			||||||
%token TO DOTDOTDOT NULL_TOK CONST INTERNAL LINKONCE WEAK  APPENDING
 | 
					%token TO DOTDOTDOT NULL_TOK CONST INTERNAL LINKONCE WEAK  APPENDING
 | 
				
			||||||
%token OPAQUE NOT EXTERNAL TARGET ENDIAN POINTERSIZE LITTLE BIG
 | 
					%token OPAQUE NOT EXTERNAL TARGET ENDIAN POINTERSIZE LITTLE BIG
 | 
				
			||||||
| 
						 | 
					@ -1210,10 +1210,10 @@ ConstVal : SIntType EINT64VAL {      // integral constants
 | 
				
			||||||
      ThrowException("Constant value doesn't fit in type!");
 | 
					      ThrowException("Constant value doesn't fit in type!");
 | 
				
			||||||
    $$ = ConstantUInt::get($1, $2);
 | 
					    $$ = ConstantUInt::get($1, $2);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  | BOOL TRUE {                      // Boolean constants
 | 
					  | BOOL TRUETOK {                      // Boolean constants
 | 
				
			||||||
    $$ = ConstantBool::True;
 | 
					    $$ = ConstantBool::True;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  | BOOL FALSE {                     // Boolean constants
 | 
					  | BOOL FALSETOK {                     // Boolean constants
 | 
				
			||||||
    $$ = ConstantBool::False;
 | 
					    $$ = ConstantBool::False;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  | FPType FPVAL {                   // Float & Double constants
 | 
					  | FPType FPVAL {                   // Float & Double constants
 | 
				
			||||||
| 
						 | 
					@ -1550,10 +1550,10 @@ ConstValueRef : ESINT64VAL {    // A reference to a direct constant
 | 
				
			||||||
  | FPVAL {                     // Perhaps it's an FP constant?
 | 
					  | FPVAL {                     // Perhaps it's an FP constant?
 | 
				
			||||||
    $$ = ValID::create($1);
 | 
					    $$ = ValID::create($1);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  | TRUE {
 | 
					  | TRUETOK {
 | 
				
			||||||
    $$ = ValID::create(ConstantBool::True);
 | 
					    $$ = ValID::create(ConstantBool::True);
 | 
				
			||||||
  } 
 | 
					  } 
 | 
				
			||||||
  | FALSE {
 | 
					  | FALSETOK {
 | 
				
			||||||
    $$ = ValID::create(ConstantBool::False);
 | 
					    $$ = ValID::create(ConstantBool::False);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  | NULL_TOK {
 | 
					  | NULL_TOK {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -117,10 +117,10 @@ OutChar		\>c
 | 
				
			||||||
{Colon}		{ return COLON; }
 | 
					{Colon}		{ return COLON; }
 | 
				
			||||||
{Semi}		{ return SEMI; }
 | 
					{Semi}		{ return SEMI; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TRUE		{ return TRUE; }
 | 
					TRUE		{ return TRUETOK; }
 | 
				
			||||||
FALSE		{ return FALSE; }
 | 
					FALSE		{ return FALSETOK; }
 | 
				
			||||||
ON		{ return TRUE; }
 | 
					ON		{ return TRUETOK; }
 | 
				
			||||||
OFF		{ return FALSE; }
 | 
					OFF		{ return FALSETOK; }
 | 
				
			||||||
{Less}		{ return LESS; }
 | 
					{Less}		{ return LESS; }
 | 
				
			||||||
LT		{ return LESS; }
 | 
					LT		{ return LESS; }
 | 
				
			||||||
{More}		{ return MORE; }
 | 
					{More}		{ return MORE; }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -820,13 +820,13 @@ StackerCompiler::handle_word( int tkn )
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Logical Operations
 | 
					    // Logical Operations
 | 
				
			||||||
    case TRUE :  // -- -1
 | 
					    case TRUETOK :  // -- -1
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
	if (echo) bb->setName("TRUE");
 | 
						if (echo) bb->setName("TRUE");
 | 
				
			||||||
	push_integer(bb,-1); 
 | 
						push_integer(bb,-1); 
 | 
				
			||||||
	break;
 | 
						break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    case FALSE : // -- 0
 | 
					    case FALSETOK : // -- 0
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
	if (echo) bb->setName("FALSE");
 | 
						if (echo) bb->setName("FALSE");
 | 
				
			||||||
	push_integer(bb,0); 
 | 
						push_integer(bb,0); 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -55,7 +55,7 @@ int yyparse();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Terminal Tokens */
 | 
					/* Terminal Tokens */
 | 
				
			||||||
%token 			SEMI COLON FORWARD MAIN DUMP
 | 
					%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 			PLUS MINUS INCR DECR MULT DIV MODULUS NEGATE ABS MIN MAX STAR_SLASH 
 | 
				
			||||||
%token 			AND OR XOR LSHIFT RSHIFT 
 | 
					%token 			AND OR XOR LSHIFT RSHIFT 
 | 
				
			||||||
%token 			DROP DROP2 NIP NIP2 DUP DUP2 SWAP SWAP2	OVER OVER2 ROT ROT2 
 | 
					%token 			DROP DROP2 NIP NIP2 DUP DUP2 SWAP SWAP2	OVER OVER2 ROT ROT2 
 | 
				
			||||||
| 
						 | 
					@ -109,8 +109,8 @@ Word : STRING 					{ $$ = SCI->handle_string( $1 ); } ;
 | 
				
			||||||
Word : INTEGER 					{ $$ = SCI->handle_integer( $1 ); } ;
 | 
					Word : INTEGER 					{ $$ = SCI->handle_integer( $1 ); } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Everything else is a terminal symbol and goes to handle_word */
 | 
					/* Everything else is a terminal symbol and goes to handle_word */
 | 
				
			||||||
Word : TRUE					{ $$ = SCI->handle_word( TRUE ); } ;
 | 
					Word : TRUETOK					{ $$ = SCI->handle_word( TRUETOK ); } ;
 | 
				
			||||||
Word : FALSE					{ $$ = SCI->handle_word( FALSE ); } ;
 | 
					Word : FALSETOK					{ $$ = SCI->handle_word( FALSETOK ); } ;
 | 
				
			||||||
Word : LESS					{ $$ = SCI->handle_word( LESS ); } ;
 | 
					Word : LESS					{ $$ = SCI->handle_word( LESS ); } ;
 | 
				
			||||||
Word : MORE					{ $$ = SCI->handle_word( MORE ); } ;
 | 
					Word : MORE					{ $$ = SCI->handle_word( MORE ); } ;
 | 
				
			||||||
Word : LESS_EQUAL				{ $$ = SCI->handle_word( LESS_EQUAL ); } ;
 | 
					Word : LESS_EQUAL				{ $$ = SCI->handle_word( LESS_EQUAL ); } ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue