The parser now accepts "external" global variables, in addition to the backwards
[oota-llvm.git] / lib / AsmParser / Lexer.l
index faddcb16d51d3801e1d1fc9acbf5a832bf69a1b8..7776c90a90a1c3ef8d17f91c2754f343b35b7e1f 100644 (file)
@@ -1,8 +1,8 @@
-/*===-- Lexer.l - Scanner for llvm assembly files ----------------*- C++ -*--=//
+/*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
 //
 //  This file implements the flex scanner for LLVM assembly languages files.
 //
-//===------------------------------------------------------------------------=*/
+//===----------------------------------------------------------------------===*/
 
 %option prefix="llvmAsm"
 %option yylineno
@@ -85,7 +85,7 @@ static double HexToFP(const char *Buffer) {
 // If AllowNull is set to true, the return value of the function points to the
 // last character of the string in memory.
 //
-char *UnEscapeLexed(char *Buffer, bool AllowNull = false) {
+char *UnEscapeLexed(char *Buffer, bool AllowNull) {
   char *BOut = Buffer;
   for (char *BIn = Buffer; *BIn; ) {
     if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
@@ -155,13 +155,14 @@ global          { return GLOBAL; }
 constant        { return CONSTANT; }
 const           { return CONST; }
 internal        { return INTERNAL; }
-uninitialized   { return UNINIT; }
+uninitialized   { return EXTERNAL; }    /* Deprecated, turn into external */
+external        { return EXTERNAL; }
 implementation  { return IMPLEMENTATION; }
 \.\.\.          { return DOTDOTDOT; }
-string          { return STRING; }
 null            { return NULL_TOK; }
 to              { return TO; }
 except          { return EXCEPT; }
+not             { return NOT; }  /* Deprecated, turned into XOR */
 
 void            { llvmAsmlval.PrimType = Type::VoidTy  ; return VOID;   }
 bool            { llvmAsmlval.PrimType = Type::BoolTy  ; return BOOL;   }
@@ -179,9 +180,6 @@ type            { llvmAsmlval.PrimType = Type::TypeTy  ; return TYPE;   }
 label           { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL;  }
 opaque          { return OPAQUE; }
 
-
-not             { RET_TOK(UnaryOpVal, Not, NOT); }
-
 add             { RET_TOK(BinaryOpVal, Add, ADD); }
 sub             { RET_TOK(BinaryOpVal, Sub, SUB); }
 mul             { RET_TOK(BinaryOpVal, Mul, MUL); }