projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restored somehow lost AMD Family 11h support.
[libfirm]
/
ir
/
libcore
/
lc_config_lexer.c
diff --git
a/ir/libcore/lc_config_lexer.c
b/ir/libcore/lc_config_lexer.c
index
217117c
..
200856b
100644
(file)
--- 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
/* 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
#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.
#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 <stdio.h>
#include <stdio.h>
+/* flex generated code wants a declaration of isatty... */
+#ifdef _WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
#include "lc_parser_t.h"
#include "lc_config_parser.h"
#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 5
40
"lc_config_lexer.c"
+#line 5
55
"lc_config_lexer.c"
#define INITIAL 0
#define LINE_COMMENT 1
#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
/* 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
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
#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().
*/
/* 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,
#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;
register char *yy_cp, *yy_bp;
register int yy_act;
-#line
55
"lc_config_lexer.l"
+#line
62
"lc_config_lexer.l"
-#line 7
3
0 "lc_config_lexer.c"
+#line 7
5
0 "lc_config_lexer.c"
if ( !(yy_init) )
{
if ( !(yy_init) )
{
@@
-811,65
+837,65
@@
do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
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
{ 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
{ 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
PMANGLE(linenr)++;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 6
0
"lc_config_lexer.l"
+#line 6
7
"lc_config_lexer.l"
;
YY_BREAK
case 5:
YY_RULE_SETUP
;
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 6
2
"lc_config_lexer.l"
+#line 6
9
"lc_config_lexer.l"
{ BEGIN(LINE_COMMENT); }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
{ 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
{ 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
;
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
{ 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
{ 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
{ BEGIN(DAT_CONT); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 7
0
"lc_config_lexer.l"
+#line 7
7
"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
{ _lc_opt_add_to_data_char(PMANGLE(text)[0]); }
YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 7
1
"lc_config_lexer.l"
+#line 7
8
"lc_config_lexer.l"
{
BEGIN(INITIAL);
PMANGLE(linenr)++;
{
BEGIN(INITIAL);
PMANGLE(linenr)++;
@@
-880,17
+906,17
@@
YY_RULE_SETUP
case 13:
/* rule 13 can match eol */
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
{ 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
;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 8
1
"lc_config_lexer.l"
+#line 8
8
"lc_config_lexer.l"
{
BEGIN(INITIAL);
_lc_opt_add_to_data_char('\0');
{
BEGIN(INITIAL);
_lc_opt_add_to_data_char('\0');
@@
-899,43
+925,43
@@
YY_RULE_SETUP
YY_BREAK
case 16:
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
_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
_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
_lc_opt_add_to_data_char('\t');
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 9
0
"lc_config_lexer.l"
+#line 9
7
"lc_config_lexer.l"
_lc_opt_add_to_data_char('\b');
YY_BREAK
case 20:
YY_RULE_SETUP
_lc_opt_add_to_data_char('\b');
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 9
1
"lc_config_lexer.l"
+#line 9
8
"lc_config_lexer.l"
_lc_opt_add_to_data_char('\f');
YY_BREAK
case 21:
YY_RULE_SETUP
_lc_opt_add_to_data_char('\f');
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 9
2
"lc_config_lexer.l"
+#line 9
9
"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
_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
_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);
{
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
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 10
0
"lc_config_lexer.l"
+#line 10
7
"lc_config_lexer.l"
{ return SEP; }
YY_BREAK
case 25:
YY_RULE_SETUP
{ return SEP; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 10
2
"lc_config_lexer.l"
+#line 10
9
"lc_config_lexer.l"
;
YY_BREAK
case 26:
/* rule 26 can match eol */
YY_RULE_SETUP
;
YY_BREAK
case 26:
/* rule 26 can match eol */
YY_RULE_SETUP
-#line 1
03
"lc_config_lexer.l"
+#line 1
10
"lc_config_lexer.l"
PMANGLE(linenr)++;
YY_BREAK
case 27:
YY_RULE_SETUP
PMANGLE(linenr)++;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 1
05
"lc_config_lexer.l"
+#line 1
12
"lc_config_lexer.l"
return _lc_opt_text[0];
YY_BREAK
case 28:
YY_RULE_SETUP
return _lc_opt_text[0];
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 1
07
"lc_config_lexer.l"
+#line 1
14
"lc_config_lexer.l"
ECHO;
YY_BREAK
ECHO;
YY_BREAK
-#line 9
7
2 "lc_config_lexer.c"
+#line 9
9
2 "lc_config_lexer.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(LINE_COMMENT):
case YY_STATE_EOF(BIG_COMMENT):
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.
/** 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
yy
bytes 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.
*/
*
* @return the newly allocated buffer state object.
*/
@@
-1971,4
+1997,13
@@
void _lc_opt_free (void * ptr )
#define YYTABLES_NAME "yytables"
#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;
+}