X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flibcore%2Flc_config_lexer.c;h=200856b5ab72e881557b01e1c4bf75bc0686baad;hb=225580e8d7eabc0488b2ac4437cd34ec65cc93d6;hp=217117c08f38500b0cf259f8310aafe78ebd129b;hpb=cfc7f9e2006fd93ed64399307b2b8728b03e4ec7;p=libfirm diff --git a/ir/libcore/lc_config_lexer.c b/ir/libcore/lc_config_lexer.c index 217117c08..200856b5a 100644 --- a/ir/libcore/lc_config_lexer.c +++ b/ir/libcore/lc_config_lexer.c @@ -161,7 +161,15 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -523,20 +531,33 @@ char *_lc_opt_text; #include +/* flex generated code wants a declaration of isatty... */ +#ifdef _WIN32 +#include +#else +#include +#endif + #include "lc_parser_t.h" #include "lc_config_parser.h" -static int _lc_opt_wrap(void) -{ - return 1; +#define YY_NO_UNISTD_H +#define YY_NO_INPUT + +#ifdef __cplusplus +extern "C" { +#endif +static int _lc_opt_wrap(void); +#ifdef __cplusplus } +#endif -#line 540 "lc_config_lexer.c" +#line 555 "lc_config_lexer.c" #define INITIAL 0 #define LINE_COMMENT 1 @@ -622,7 +643,12 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -630,7 +656,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( _lc_opt_text, _lc_opt_leng, 1, _lc_opt_out ) +#define ECHO do { if (fwrite( _lc_opt_text, _lc_opt_leng, 1, _lc_opt_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -723,10 +749,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 55 "lc_config_lexer.l" +#line 62 "lc_config_lexer.l" -#line 730 "lc_config_lexer.c" +#line 750 "lc_config_lexer.c" if ( !(yy_init) ) { @@ -811,65 +837,65 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 57 "lc_config_lexer.l" +#line 64 "lc_config_lexer.l" { BEGIN(BIG_COMMENT); } YY_BREAK case 2: YY_RULE_SETUP -#line 58 "lc_config_lexer.l" +#line 65 "lc_config_lexer.l" { BEGIN(INITIAL); } YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 59 "lc_config_lexer.l" +#line 66 "lc_config_lexer.l" PMANGLE(linenr)++; YY_BREAK case 4: YY_RULE_SETUP -#line 60 "lc_config_lexer.l" +#line 67 "lc_config_lexer.l" ; YY_BREAK case 5: YY_RULE_SETUP -#line 62 "lc_config_lexer.l" +#line 69 "lc_config_lexer.l" { BEGIN(LINE_COMMENT); } YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 63 "lc_config_lexer.l" +#line 70 "lc_config_lexer.l" { BEGIN(INITIAL); PMANGLE(linenr)++; } YY_BREAK case 7: YY_RULE_SETUP -#line 64 "lc_config_lexer.l" +#line 71 "lc_config_lexer.l" ; YY_BREAK case 8: YY_RULE_SETUP -#line 67 "lc_config_lexer.l" +#line 74 "lc_config_lexer.l" { BEGIN(DAT); } YY_BREAK case 9: YY_RULE_SETUP -#line 68 "lc_config_lexer.l" +#line 75 "lc_config_lexer.l" { BEGIN(STR); } YY_BREAK case 10: YY_RULE_SETUP -#line 69 "lc_config_lexer.l" +#line 76 "lc_config_lexer.l" { BEGIN(DAT_CONT); } YY_BREAK case 11: YY_RULE_SETUP -#line 70 "lc_config_lexer.l" +#line 77 "lc_config_lexer.l" { _lc_opt_add_to_data_char(PMANGLE(text)[0]); } YY_BREAK case 12: /* rule 12 can match eol */ YY_RULE_SETUP -#line 71 "lc_config_lexer.l" +#line 78 "lc_config_lexer.l" { BEGIN(INITIAL); PMANGLE(linenr)++; @@ -880,17 +906,17 @@ YY_RULE_SETUP case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 77 "lc_config_lexer.l" +#line 84 "lc_config_lexer.l" { BEGIN(DAT); PMANGLE(linenr)++; } YY_BREAK case 14: YY_RULE_SETUP -#line 78 "lc_config_lexer.l" +#line 85 "lc_config_lexer.l" ; YY_BREAK case 15: YY_RULE_SETUP -#line 81 "lc_config_lexer.l" +#line 88 "lc_config_lexer.l" { BEGIN(INITIAL); _lc_opt_add_to_data_char('\0'); @@ -899,43 +925,43 @@ YY_RULE_SETUP YY_BREAK case 16: YY_RULE_SETUP -#line 87 "lc_config_lexer.l" +#line 94 "lc_config_lexer.l" _lc_opt_add_to_data_char('\n'); YY_BREAK case 17: YY_RULE_SETUP -#line 88 "lc_config_lexer.l" +#line 95 "lc_config_lexer.l" _lc_opt_add_to_data_char('\r'); YY_BREAK case 18: YY_RULE_SETUP -#line 89 "lc_config_lexer.l" +#line 96 "lc_config_lexer.l" _lc_opt_add_to_data_char('\t'); YY_BREAK case 19: YY_RULE_SETUP -#line 90 "lc_config_lexer.l" +#line 97 "lc_config_lexer.l" _lc_opt_add_to_data_char('\b'); YY_BREAK case 20: YY_RULE_SETUP -#line 91 "lc_config_lexer.l" +#line 98 "lc_config_lexer.l" _lc_opt_add_to_data_char('\f'); YY_BREAK case 21: YY_RULE_SETUP -#line 92 "lc_config_lexer.l" +#line 99 "lc_config_lexer.l" _lc_opt_add_to_data_char(_lc_opt_text[1]); YY_BREAK case 22: /* rule 22 can match eol */ YY_RULE_SETUP -#line 93 "lc_config_lexer.l" +#line 100 "lc_config_lexer.l" _lc_opt_add_to_data_char(_lc_opt_text[0]); YY_BREAK case 23: YY_RULE_SETUP -#line 95 "lc_config_lexer.l" +#line 102 "lc_config_lexer.l" { PMANGLE(lval).text.str = PMANGLE(text); PMANGLE(lval).text.len = PMANGLE(leng); @@ -944,31 +970,31 @@ YY_RULE_SETUP YY_BREAK case 24: YY_RULE_SETUP -#line 100 "lc_config_lexer.l" +#line 107 "lc_config_lexer.l" { return SEP; } YY_BREAK case 25: YY_RULE_SETUP -#line 102 "lc_config_lexer.l" +#line 109 "lc_config_lexer.l" ; YY_BREAK case 26: /* rule 26 can match eol */ YY_RULE_SETUP -#line 103 "lc_config_lexer.l" +#line 110 "lc_config_lexer.l" PMANGLE(linenr)++; YY_BREAK case 27: YY_RULE_SETUP -#line 105 "lc_config_lexer.l" +#line 112 "lc_config_lexer.l" return _lc_opt_text[0]; YY_BREAK case 28: YY_RULE_SETUP -#line 107 "lc_config_lexer.l" +#line 114 "lc_config_lexer.l" ECHO; YY_BREAK -#line 972 "lc_config_lexer.c" +#line 992 "lc_config_lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(LINE_COMMENT): case YY_STATE_EOF(BIG_COMMENT): @@ -1731,8 +1757,8 @@ YY_BUFFER_STATE _lc_opt__scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to _lc_opt_lex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ @@ -1971,4 +1997,13 @@ void _lc_opt_free (void * ptr ) #define YYTABLES_NAME "yytables" -#line 107 "lc_config_lexer.l" +#line 114 "lc_config_lexer.l" + + + +static int _lc_opt_wrap(void) +{ + /* avoid warning */ + (void) yyunput; + return 1; +}