Contents of /trunk/module-init-tools/patches/modutils-2.4.27-flex.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 805 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 805 byte(s)
-import
1 | Taken from Debian. |
2 | |
3 | Build with newer flex versions. |
4 | |
5 | --- modutils-2.4.27.0.orig/genksyms/lex.l |
6 | +++ modutils-2.4.27.0/genksyms/lex.l |
7 | @@ -130,6 +130,7 @@ |
8 | |
9 | static int suppress_type_lookup, dont_want_brace_phrase; |
10 | static struct string_list *next_node; |
11 | + static int next_token = 0; |
12 | |
13 | int token, count = 0; |
14 | struct string_list *cur_node; |
15 | @@ -144,7 +145,12 @@ |
16 | } |
17 | |
18 | repeat: |
19 | - token = yylex1(); |
20 | + if (next_token != 0) { |
21 | + token = next_token; |
22 | + next_token = 0; |
23 | + } |
24 | + else |
25 | + token = yylex1(); |
26 | |
27 | if (token == 0) |
28 | return 0; |
29 | @@ -425,7 +431,7 @@ |
30 | { |
31 | /* Put back the token we just read so's we can find it again |
32 | after registering the expression. */ |
33 | - unput(token); |
34 | + next_token = token; |
35 | |
36 | lexstate = ST_NORMAL; |
37 | token = EXPRESSION_PHRASE; |