X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAsmParser%2FLexer.l;h=7776c90a90a1c3ef8d17f91c2754f343b35b7e1f;hb=08c0e6af4f82ca6213a7e63d6085633f92c25a81;hp=faddcb16d51d3801e1d1fc9acbf5a832bf69a1b8;hpb=9b02cc365ccb53a9476989fbed80cfd29ca7c384;p=oota-llvm.git diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index faddcb16d51..7776c90a90a 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -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); }