X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAsmParser%2FLexer.l;h=e843e5e631865f2aa32e7c259d0e1002a1ba2d01;hb=7061dc50b2513731d7b346ab16183cda4a44619f;hp=06b197d448622f14c7f5e2b65b4e6655ed27c28b;hpb=1a1cb111fe9081cab4d666338c547253c4a437c9;p=oota-llvm.git diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index 06b197d4486..e843e5e6318 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]*([eE][-+]?[0-9]+)? %% @@ -124,11 +124,15 @@ false { return FALSE; } declare { return DECLARE; } global { return GLOBAL; } constant { return CONSTANT; } +const { return CONST; } +internal { return INTERNAL; } 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; } @@ -159,6 +163,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); } @@ -166,7 +173,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); } @@ -176,6 +182,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); }