fix file header
[oota-llvm.git] / lib / AsmParser / Lexer.l
index 6e69262c5f27310ca60bf62acbda207511ad0ab0..3092891527db01b7443ef1956c391568e9a740b3 100644 (file)
@@ -22,8 +22,8 @@
 #include "llvm/Module.h"
 #include <list>
 #include "llvmAsmParser.h"
-#include <ctype.h>
-#include "Config/stdlib.h"
+#include <cctype>
+#include <cstdlib>
 
 #define RET_TOK(type, Enum, sym) \
   llvmAsmlval.type = Instruction::Enum; return sym
@@ -129,7 +129,7 @@ VarID       %[-a-zA-Z$._][-a-zA-Z$._0-9]*
 Label       [-a-zA-Z$._0-9]+:
 
 /* Quoted names can contain any character except " and \ */
-StringConstant \"[^\"]+\"
+StringConstant \"[^\"]*\"
 
 
 /* [PN]Integer: match positive and negative literal integer values that
@@ -170,6 +170,7 @@ constant        { return CONSTANT; }
 const           { return CONST; }
 internal        { return INTERNAL; }
 linkonce        { return LINKONCE; }
+weak            { return WEAK; }
 appending       { return APPENDING; }
 uninitialized   { return EXTERNAL; }    /* Deprecated, turn into external */
 external        { return EXTERNAL; }
@@ -218,12 +219,14 @@ setgt           { RET_TOK(BinaryOpVal, SetGT, SETGT); }
 setle           { RET_TOK(BinaryOpVal, SetLE, SETLE); }
 setge           { RET_TOK(BinaryOpVal, SetGE, SETGE); }
 
-phi             { RET_TOK(OtherOpVal, PHINode, PHI); }
+phi             { RET_TOK(OtherOpVal, PHI, PHI_TOK); }
 call            { RET_TOK(OtherOpVal, Call, CALL); }
 cast            { RET_TOK(OtherOpVal, Cast, CAST); }
 shl             { RET_TOK(OtherOpVal, Shl, SHL); }
 shr             { RET_TOK(OtherOpVal, Shr, SHR); }
-va_arg          { RET_TOK(OtherOpVal, VarArg, VA_ARG); }
+va_arg          { return VA_ARG; /* FIXME: OBSOLETE */}
+vanext          { RET_TOK(OtherOpVal, VANext, VANEXT); }
+vaarg           { RET_TOK(OtherOpVal, VAArg , VAARG); }
 
 ret             { RET_TOK(TermOpVal, Ret, RET); }
 br              { RET_TOK(TermOpVal, Br, BR); }