-/*===-- 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
// 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])) {
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; }
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); }