diff options
Diffstat (limited to 'utils/TableGen/FileLexer.cpp')
-rw-r--r-- | utils/TableGen/FileLexer.cpp | 84 |
1 files changed, 40 insertions, 44 deletions
diff --git a/utils/TableGen/FileLexer.cpp b/utils/TableGen/FileLexer.cpp index 496ea43..2973fe3 100644 --- a/utils/TableGen/FileLexer.cpp +++ b/utils/TableGen/FileLexer.cpp @@ -29,6 +29,7 @@ #define YY_FLEX_MINOR_VERSION 5 #include <stdio.h> +#include <unistd.h> /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ @@ -42,7 +43,6 @@ #ifdef __cplusplus #include <stdlib.h> -#include <unistd.h> /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -489,7 +489,7 @@ goto find_rule; \ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 1 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" #define INITIAL 0 /*===-- FileLexer.l - Scanner for TableGen Files ----------------*- C++ -*-===// // @@ -507,7 +507,7 @@ char *yytext; #define YY_NEVER_INTERACTIVE 1 #define comment 1 -#line 30 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 30 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" #include "Record.h" typedef std::pair<llvm::Record*, std::vector<llvm::Init*>*> SubClassRefTy; #include "FileParser.h" @@ -792,10 +792,10 @@ YY_MALLOC_DECL YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; + register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 176 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 176 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" #line 802 "Lexer.cpp" @@ -891,165 +891,165 @@ do_action: /* This label is used only to access EOF actions. */ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 178 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 178 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { /* Ignore comments */ } YY_BREAK case 2: YY_RULE_SETUP -#line 180 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 180 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { HandleInclude(yytext); } YY_BREAK case 3: YY_RULE_SETUP -#line 181 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 181 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext+2, yytext+yyleng-2); return CODEFRAGMENT; } YY_BREAK case 4: YY_RULE_SETUP -#line 184 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 184 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return INT; } YY_BREAK case 5: YY_RULE_SETUP -#line 185 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 185 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return BIT; } YY_BREAK case 6: YY_RULE_SETUP -#line 186 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 186 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return BITS; } YY_BREAK case 7: YY_RULE_SETUP -#line 187 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 187 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return STRING; } YY_BREAK case 8: YY_RULE_SETUP -#line 188 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 188 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return LIST; } YY_BREAK case 9: YY_RULE_SETUP -#line 189 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 189 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return CODE; } YY_BREAK case 10: YY_RULE_SETUP -#line 190 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 190 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return DAG; } YY_BREAK case 11: YY_RULE_SETUP -#line 192 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 192 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return CLASS; } YY_BREAK case 12: YY_RULE_SETUP -#line 193 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 193 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return DEF; } YY_BREAK case 13: YY_RULE_SETUP -#line 194 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 194 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return FIELD; } YY_BREAK case 14: YY_RULE_SETUP -#line 195 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 195 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return LET; } YY_BREAK case 15: YY_RULE_SETUP -#line 196 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 196 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return IN; } YY_BREAK case 16: YY_RULE_SETUP -#line 198 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 198 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return SRATOK; } YY_BREAK case 17: YY_RULE_SETUP -#line 199 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 199 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return SRLTOK; } YY_BREAK case 18: YY_RULE_SETUP -#line 200 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 200 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return SHLTOK; } YY_BREAK case 19: YY_RULE_SETUP -#line 203 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 203 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext, yytext+yyleng); return ID; } YY_BREAK case 20: YY_RULE_SETUP -#line 205 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 205 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng); return VARNAME; } YY_BREAK case 21: YY_RULE_SETUP -#line 208 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 208 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng-1); return STRVAL; } YY_BREAK case 22: YY_RULE_SETUP -#line 211 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 211 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { Filelval.IntVal = ParseInt(Filetext); return INTVAL; } YY_BREAK case 23: YY_RULE_SETUP -#line 213 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 213 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { /* Ignore whitespace */ } YY_BREAK case 24: YY_RULE_SETUP -#line 216 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 216 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { BEGIN(comment); CommentDepth++; } YY_BREAK case 25: YY_RULE_SETUP -#line 217 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 217 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" {} /* eat anything that's not a '*' or '/' */ YY_BREAK case 26: YY_RULE_SETUP -#line 218 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 218 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" {} /* eat up '*'s not followed by '/'s */ YY_BREAK case 27: YY_RULE_SETUP -#line 219 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 219 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { ++CommentDepth; } YY_BREAK case 28: YY_RULE_SETUP -#line 220 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 220 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" {} /* eat up /'s not followed by *'s */ YY_BREAK case 29: YY_RULE_SETUP -#line 221 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 221 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { if (!--CommentDepth) { BEGIN(INITIAL); } } YY_BREAK case YY_STATE_EOF(comment): -#line 222 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 222 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { err() << "Unterminated comment!\n"; exit(1); } YY_BREAK case 30: YY_RULE_SETUP -#line 224 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 224 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" { return Filetext[0]; } YY_BREAK case 31: YY_RULE_SETUP -#line 226 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 226 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1056 "Lexer.cpp" @@ -1430,6 +1430,7 @@ register char *yy_bp; #endif /* ifndef YY_NO_UNPUT */ +#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else @@ -1503,7 +1504,7 @@ static int input() return c; } - +#endif /* YY_NO_INPUT */ #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) @@ -1614,11 +1615,6 @@ YY_BUFFER_STATE b; } -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) @@ -1936,5 +1932,5 @@ int main() return 0; } #endif -#line 226 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l" +#line 226 "/home/vadve/lattner/llvm/utils/TableGen/FileLexer.l" |