X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAsmParser%2FLexer.l;h=6466cb721b760748162442ffa8972d70c281461f;hb=856ba76200ec2302f2fe500bc507f426c7d566c8;hp=983e667c839d6a2ad650e1c740804a424002c3a4;hpb=7a73b80b9052136c8cd2234eb3433a07df7cf38e;p=oota-llvm.git diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index 983e667c839..6466cb721b7 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -1,4 +1,11 @@ /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// // // This file implements the flex scanner for LLVM assembly languages files. // @@ -22,8 +29,8 @@ #include "llvm/Module.h" #include #include "llvmAsmParser.h" -#include -#include "Config/stdlib.h" +#include +#include #define RET_TOK(type, Enum, sym) \ llvmAsmlval.type = Instruction::Enum; return sym @@ -129,7 +136,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 +177,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; } @@ -185,6 +193,7 @@ endian { return ENDIAN; } pointersize { return POINTERSIZE; } little { return LITTLE; } big { return BIG; } +volatile { return VOLATILE; } void { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } bool { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } @@ -217,17 +226,20 @@ 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); } switch { RET_TOK(TermOpVal, Switch, SWITCH); } invoke { RET_TOK(TermOpVal, Invoke, INVOKE); } +unwind { RET_TOK(TermOpVal, Unwind, UNWIND); } malloc { RET_TOK(MemOpVal, Malloc, MALLOC); }