X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAsmParser%2FLexer.l;h=b4910ec5172e6dd551f7f6a184c9782c61b25017;hb=90ebc114c66871ce5b9b98253fe767ec9246bdfe;hp=6a650a367b5647f0a48215b2fbc9bb0a1eeacd0e;hpb=70cc3397f84c2e1fd69c059a0ef89e398e847b00;p=oota-llvm.git diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index 6a650a367b5..b4910ec5172 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -111,7 +111,7 @@ NInteger -[0-9]+ /* FPConstant - A Floating point constant. TODO: Expand lexer to support 10e50 FP constant notation */ -FPConstant [0-9]+[.][0-9]* +FPConstant -?[0-9]+[.][0-9]* %% @@ -123,9 +123,15 @@ true { return TRUE; } false { return FALSE; } declare { return DECLARE; } global { return GLOBAL; } +constant { return CONSTANT; } +const { return CONST; } +uninitialized { return UNINIT; } implementation { return IMPLEMENTATION; } \.\.\. { return DOTDOTDOT; } string { return STRING; } +null { return NULL_TOK; } +to { return TO; } +except { return EXCEPT; } void { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } bool { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } @@ -156,6 +162,9 @@ sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } div { RET_TOK(BinaryOpVal, Div, DIV); } rem { RET_TOK(BinaryOpVal, Rem, REM); } +and { RET_TOK(BinaryOpVal, And, AND); } +or { RET_TOK(BinaryOpVal, Or , OR ); } +xor { RET_TOK(BinaryOpVal, Xor, XOR); } setne { RET_TOK(BinaryOpVal, SetNE, SETNE); } seteq { RET_TOK(BinaryOpVal, SetEQ, SETEQ); } setlt { RET_TOK(BinaryOpVal, SetLT, SETLT); } @@ -163,7 +172,6 @@ setgt { RET_TOK(BinaryOpVal, SetGT, SETGT); } setle { RET_TOK(BinaryOpVal, SetLE, SETLE); } setge { RET_TOK(BinaryOpVal, SetGE, SETGE); } -to { return TO; } phi { RET_TOK(OtherOpVal, PHINode, PHI); } call { RET_TOK(OtherOpVal, Call, CALL); } cast { RET_TOK(OtherOpVal, Cast, CAST); } @@ -173,6 +181,7 @@ shr { RET_TOK(OtherOpVal, Shr, SHR); } ret { RET_TOK(TermOpVal, Ret, RET); } br { RET_TOK(TermOpVal, Br, BR); } switch { RET_TOK(TermOpVal, Switch, SWITCH); } +invoke { RET_TOK(TermOpVal, Invoke, INVOKE); } malloc { RET_TOK(MemOpVal, Malloc, MALLOC); }