Rev 2714 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2714 | Rev 2782 | ||
---|---|---|---|
1 | 1 | ||
2 | #line 3 "lex.yy.c" |
2 | #line 3 "lex.yy.c" |
3 | 3 | ||
4 | #define YY_INT_ALIGNED short int |
4 | #define YY_INT_ALIGNED short int |
5 | 5 | ||
6 | /* A lexical scanner generated by flex */ |
6 | /* A lexical scanner generated by flex */ |
7 | 7 | ||
8 | #define FLEX_SCANNER |
8 | #define FLEX_SCANNER |
9 | #define YY_FLEX_MAJOR_VERSION 2 |
9 | #define YY_FLEX_MAJOR_VERSION 2 |
10 | #define YY_FLEX_MINOR_VERSION 5 |
10 | #define YY_FLEX_MINOR_VERSION 5 |
11 | #define YY_FLEX_SUBMINOR_VERSION 33 |
11 | #define YY_FLEX_SUBMINOR_VERSION 33 |
12 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
12 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
13 | #define FLEX_BETA |
13 | #define FLEX_BETA |
14 | #endif |
14 | #endif |
15 | 15 | ||
16 | /* First, we deal with platform-specific or compiler-specific issues. */ |
16 | /* First, we deal with platform-specific or compiler-specific issues. */ |
17 | 17 | ||
18 | /* begin standard C headers. */ |
18 | /* begin standard C headers. */ |
19 | #include <stdio.h> |
19 | #include <stdio.h> |
20 | #include <string.h> |
20 | #include <string.h> |
21 | #include <errno.h> |
21 | #include <errno.h> |
22 | #include <stdlib.h> |
22 | #include <stdlib.h> |
23 | 23 | ||
24 | /* end standard C headers. */ |
24 | /* end standard C headers. */ |
25 | 25 | ||
26 | /* flex integer type definitions */ |
26 | /* flex integer type definitions */ |
27 | 27 | ||
28 | #ifndef FLEXINT_H |
28 | #ifndef FLEXINT_H |
29 | #define FLEXINT_H |
29 | #define FLEXINT_H |
30 | 30 | ||
31 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
31 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
32 | 32 | ||
33 | #if __STDC_VERSION__ >= 199901L |
33 | #if __STDC_VERSION__ >= 199901L |
34 | 34 | ||
35 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
35 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
36 | * if you want the limit (max/min) macros for int types. |
36 | * if you want the limit (max/min) macros for int types. |
37 | */ |
37 | */ |
38 | #ifndef __STDC_LIMIT_MACROS |
38 | #ifndef __STDC_LIMIT_MACROS |
39 | #define __STDC_LIMIT_MACROS 1 |
39 | #define __STDC_LIMIT_MACROS 1 |
40 | #endif |
40 | #endif |
41 | 41 | ||
42 | #include <inttypes.h> |
42 | #include <inttypes.h> |
43 | typedef int8_t flex_int8_t; |
43 | typedef int8_t flex_int8_t; |
44 | typedef uint8_t flex_uint8_t; |
44 | typedef uint8_t flex_uint8_t; |
45 | typedef int16_t flex_int16_t; |
45 | typedef int16_t flex_int16_t; |
46 | typedef uint16_t flex_uint16_t; |
46 | typedef uint16_t flex_uint16_t; |
47 | typedef int32_t flex_int32_t; |
47 | typedef int32_t flex_int32_t; |
48 | typedef uint32_t flex_uint32_t; |
48 | typedef uint32_t flex_uint32_t; |
49 | #else |
49 | #else |
50 | typedef signed char flex_int8_t; |
50 | typedef signed char flex_int8_t; |
51 | typedef short int flex_int16_t; |
51 | typedef short int flex_int16_t; |
52 | typedef int flex_int32_t; |
52 | typedef int flex_int32_t; |
53 | typedef unsigned char flex_uint8_t; |
53 | typedef unsigned char flex_uint8_t; |
54 | typedef unsigned short int flex_uint16_t; |
54 | typedef unsigned short int flex_uint16_t; |
55 | typedef unsigned int flex_uint32_t; |
55 | typedef unsigned int flex_uint32_t; |
56 | #endif /* ! C99 */ |
56 | #endif /* ! C99 */ |
57 | 57 | ||
58 | /* Limits of integral types. */ |
58 | /* Limits of integral types. */ |
59 | #ifndef INT8_MIN |
59 | #ifndef INT8_MIN |
60 | #define INT8_MIN (-128) |
60 | #define INT8_MIN (-128) |
61 | #endif |
61 | #endif |
62 | #ifndef INT16_MIN |
62 | #ifndef INT16_MIN |
63 | #define INT16_MIN (-32767-1) |
63 | #define INT16_MIN (-32767-1) |
64 | #endif |
64 | #endif |
65 | #ifndef INT32_MIN |
65 | #ifndef INT32_MIN |
66 | #define INT32_MIN (-2147483647-1) |
66 | #define INT32_MIN (-2147483647-1) |
67 | #endif |
67 | #endif |
68 | #ifndef INT8_MAX |
68 | #ifndef INT8_MAX |
69 | #define INT8_MAX (127) |
69 | #define INT8_MAX (127) |
70 | #endif |
70 | #endif |
71 | #ifndef INT16_MAX |
71 | #ifndef INT16_MAX |
72 | #define INT16_MAX (32767) |
72 | #define INT16_MAX (32767) |
73 | #endif |
73 | #endif |
74 | #ifndef INT32_MAX |
74 | #ifndef INT32_MAX |
75 | #define INT32_MAX (2147483647) |
75 | #define INT32_MAX (2147483647) |
76 | #endif |
76 | #endif |
77 | #ifndef UINT8_MAX |
77 | #ifndef UINT8_MAX |
78 | #define UINT8_MAX (255U) |
78 | #define UINT8_MAX (255U) |
79 | #endif |
79 | #endif |
80 | #ifndef UINT16_MAX |
80 | #ifndef UINT16_MAX |
81 | #define UINT16_MAX (65535U) |
81 | #define UINT16_MAX (65535U) |
82 | #endif |
82 | #endif |
83 | #ifndef UINT32_MAX |
83 | #ifndef UINT32_MAX |
84 | #define UINT32_MAX (4294967295U) |
84 | #define UINT32_MAX (4294967295U) |
85 | #endif |
85 | #endif |
86 | 86 | ||
87 | #endif /* ! FLEXINT_H */ |
87 | #endif /* ! FLEXINT_H */ |
88 | 88 | ||
89 | #ifdef __cplusplus |
89 | #ifdef __cplusplus |
90 | 90 | ||
91 | /* The "const" storage-class-modifier is valid. */ |
91 | /* The "const" storage-class-modifier is valid. */ |
92 | #define YY_USE_CONST |
92 | #define YY_USE_CONST |
93 | 93 | ||
94 | #else /* ! __cplusplus */ |
94 | #else /* ! __cplusplus */ |
95 | 95 | ||
96 | #if __STDC__ |
96 | #if __STDC__ |
97 | 97 | ||
98 | #define YY_USE_CONST |
98 | #define YY_USE_CONST |
99 | 99 | ||
100 | #endif /* __STDC__ */ |
100 | #endif /* __STDC__ */ |
101 | #endif /* ! __cplusplus */ |
101 | #endif /* ! __cplusplus */ |
102 | 102 | ||
103 | #ifdef YY_USE_CONST |
103 | #ifdef YY_USE_CONST |
104 | #define yyconst const |
104 | #define yyconst const |
105 | #else |
105 | #else |
106 | #define yyconst |
106 | #define yyconst |
107 | #endif |
107 | #endif |
108 | 108 | ||
109 | /* Returned upon end-of-file. */ |
109 | /* Returned upon end-of-file. */ |
110 | #define YY_NULL 0 |
110 | #define YY_NULL 0 |
111 | 111 | ||
112 | /* Promotes a possibly negative, possibly signed char to an unsigned |
112 | /* Promotes a possibly negative, possibly signed char to an unsigned |
113 | * integer for use as an array index. If the signed char is negative, |
113 | * integer for use as an array index. If the signed char is negative, |
114 | * we want to instead treat it as an 8-bit unsigned char, hence the |
114 | * we want to instead treat it as an 8-bit unsigned char, hence the |
115 | * double cast. |
115 | * double cast. |
116 | */ |
116 | */ |
117 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
117 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
118 | 118 | ||
119 | /* Enter a start condition. This macro really ought to take a parameter, |
119 | /* Enter a start condition. This macro really ought to take a parameter, |
120 | * but we do it the disgusting crufty way forced on us by the ()-less |
120 | * but we do it the disgusting crufty way forced on us by the ()-less |
121 | * definition of BEGIN. |
121 | * definition of BEGIN. |
122 | */ |
122 | */ |
123 | #define BEGIN (yy_start) = 1 + 2 * |
123 | #define BEGIN (yy_start) = 1 + 2 * |
124 | 124 | ||
125 | /* Translate the current start state into a value that can be later handed |
125 | /* Translate the current start state into a value that can be later handed |
126 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
126 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
127 | * compatibility. |
127 | * compatibility. |
128 | */ |
128 | */ |
129 | #define YY_START (((yy_start) - 1) / 2) |
129 | #define YY_START (((yy_start) - 1) / 2) |
130 | #define YYSTATE YY_START |
130 | #define YYSTATE YY_START |
131 | 131 | ||
132 | /* Action number for EOF rule of a given start state. */ |
132 | /* Action number for EOF rule of a given start state. */ |
133 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
133 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
134 | 134 | ||
135 | /* Special action meaning "start processing a new file". */ |
135 | /* Special action meaning "start processing a new file". */ |
136 | #define YY_NEW_FILE yyrestart(yyin ) |
136 | #define YY_NEW_FILE yyrestart(yyin ) |
137 | 137 | ||
138 | #define YY_END_OF_BUFFER_CHAR 0 |
138 | #define YY_END_OF_BUFFER_CHAR 0 |
139 | 139 | ||
140 | /* Size of default input buffer. */ |
140 | /* Size of default input buffer. */ |
141 | #ifndef YY_BUF_SIZE |
141 | #ifndef YY_BUF_SIZE |
142 | #define YY_BUF_SIZE 16384 |
142 | #define YY_BUF_SIZE 16384 |
143 | #endif |
143 | #endif |
144 | 144 | ||
145 | /* The state buf must be large enough to hold one state per character in the main buffer. |
145 | /* The state buf must be large enough to hold one state per character in the main buffer. |
146 | */ |
146 | */ |
147 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
147 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
148 | 148 | ||
149 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
149 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
150 | #define YY_TYPEDEF_YY_BUFFER_STATE |
150 | #define YY_TYPEDEF_YY_BUFFER_STATE |
151 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
151 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
152 | #endif |
152 | #endif |
153 | 153 | ||
154 | extern int yyleng; |
154 | extern int yyleng; |
155 | 155 | ||
156 | extern FILE *yyin, *yyout; |
156 | extern FILE *yyin, *yyout; |
157 | 157 | ||
158 | #define EOB_ACT_CONTINUE_SCAN 0 |
158 | #define EOB_ACT_CONTINUE_SCAN 0 |
159 | #define EOB_ACT_END_OF_FILE 1 |
159 | #define EOB_ACT_END_OF_FILE 1 |
160 | #define EOB_ACT_LAST_MATCH 2 |
160 | #define EOB_ACT_LAST_MATCH 2 |
161 | 161 | ||
162 | #define YY_LESS_LINENO(n) |
162 | #define YY_LESS_LINENO(n) |
163 | 163 | ||
164 | /* Return all but the first "n" matched characters back to the input stream. */ |
164 | /* Return all but the first "n" matched characters back to the input stream. */ |
165 | #define yyless(n) \ |
165 | #define yyless(n) \ |
166 | do \ |
166 | do \ |
167 | { \ |
167 | { \ |
168 | /* Undo effects of setting up yytext. */ \ |
168 | /* Undo effects of setting up yytext. */ \ |
169 | int yyless_macro_arg = (n); \ |
169 | int yyless_macro_arg = (n); \ |
170 | YY_LESS_LINENO(yyless_macro_arg);\ |
170 | YY_LESS_LINENO(yyless_macro_arg);\ |
171 | *yy_cp = (yy_hold_char); \ |
171 | *yy_cp = (yy_hold_char); \ |
172 | YY_RESTORE_YY_MORE_OFFSET \ |
172 | YY_RESTORE_YY_MORE_OFFSET \ |
173 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
173 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
174 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
174 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
175 | } \ |
175 | } \ |
176 | while ( 0 ) |
176 | while ( 0 ) |
177 | 177 | ||
178 | #define unput(c) yyunput( c, (yytext_ptr) ) |
178 | #define unput(c) yyunput( c, (yytext_ptr) ) |
179 | 179 | ||
180 | /* The following is because we cannot portably get our hands on size_t |
180 | /* The following is because we cannot portably get our hands on size_t |
181 | * (without autoconf's help, which isn't available because we want |
181 | * (without autoconf's help, which isn't available because we want |
182 | * flex-generated scanners to compile on their own). |
182 | * flex-generated scanners to compile on their own). |
183 | */ |
183 | */ |
184 | 184 | ||
185 | #ifndef YY_TYPEDEF_YY_SIZE_T |
185 | #ifndef YY_TYPEDEF_YY_SIZE_T |
186 | #define YY_TYPEDEF_YY_SIZE_T |
186 | #define YY_TYPEDEF_YY_SIZE_T |
187 | typedef unsigned int yy_size_t; |
187 | typedef unsigned int yy_size_t; |
188 | #endif |
188 | #endif |
189 | 189 | ||
190 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
190 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
191 | #define YY_STRUCT_YY_BUFFER_STATE |
191 | #define YY_STRUCT_YY_BUFFER_STATE |
192 | struct yy_buffer_state |
192 | struct yy_buffer_state |
193 | { |
193 | { |
194 | FILE *yy_input_file; |
194 | FILE *yy_input_file; |
195 | 195 | ||
196 | char *yy_ch_buf; /* input buffer */ |
196 | char *yy_ch_buf; /* input buffer */ |
197 | char *yy_buf_pos; /* current position in input buffer */ |
197 | char *yy_buf_pos; /* current position in input buffer */ |
198 | 198 | ||
199 | /* Size of input buffer in bytes, not including room for EOB |
199 | /* Size of input buffer in bytes, not including room for EOB |
200 | * characters. |
200 | * characters. |
201 | */ |
201 | */ |
202 | yy_size_t yy_buf_size; |
202 | yy_size_t yy_buf_size; |
203 | 203 | ||
204 | /* Number of characters read into yy_ch_buf, not including EOB |
204 | /* Number of characters read into yy_ch_buf, not including EOB |
205 | * characters. |
205 | * characters. |
206 | */ |
206 | */ |
207 | int yy_n_chars; |
207 | int yy_n_chars; |
208 | 208 | ||
209 | /* Whether we "own" the buffer - i.e., we know we created it, |
209 | /* Whether we "own" the buffer - i.e., we know we created it, |
210 | * and can realloc() it to grow it, and should free() it to |
210 | * and can realloc() it to grow it, and should free() it to |
211 | * delete it. |
211 | * delete it. |
212 | */ |
212 | */ |
213 | int yy_is_our_buffer; |
213 | int yy_is_our_buffer; |
214 | 214 | ||
215 | /* Whether this is an "interactive" input source; if so, and |
215 | /* Whether this is an "interactive" input source; if so, and |
216 | * if we're using stdio for input, then we want to use getc() |
216 | * if we're using stdio for input, then we want to use getc() |
217 | * instead of fread(), to make sure we stop fetching input after |
217 | * instead of fread(), to make sure we stop fetching input after |
218 | * each newline. |
218 | * each newline. |
219 | */ |
219 | */ |
220 | int yy_is_interactive; |
220 | int yy_is_interactive; |
221 | 221 | ||
222 | /* Whether we're considered to be at the beginning of a line. |
222 | /* Whether we're considered to be at the beginning of a line. |
223 | * If so, '^' rules will be active on the next match, otherwise |
223 | * If so, '^' rules will be active on the next match, otherwise |
224 | * not. |
224 | * not. |
225 | */ |
225 | */ |
226 | int yy_at_bol; |
226 | int yy_at_bol; |
227 | 227 | ||
228 | int yy_bs_lineno; /**< The line count. */ |
228 | int yy_bs_lineno; /**< The line count. */ |
229 | int yy_bs_column; /**< The column count. */ |
229 | int yy_bs_column; /**< The column count. */ |
230 | 230 | ||
231 | /* Whether to try to fill the input buffer when we reach the |
231 | /* Whether to try to fill the input buffer when we reach the |
232 | * end of it. |
232 | * end of it. |
233 | */ |
233 | */ |
234 | int yy_fill_buffer; |
234 | int yy_fill_buffer; |
235 | 235 | ||
236 | int yy_buffer_status; |
236 | int yy_buffer_status; |
237 | 237 | ||
238 | #define YY_BUFFER_NEW 0 |
238 | #define YY_BUFFER_NEW 0 |
239 | #define YY_BUFFER_NORMAL 1 |
239 | #define YY_BUFFER_NORMAL 1 |
240 | /* When an EOF's been seen but there's still some text to process |
240 | /* When an EOF's been seen but there's still some text to process |
241 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
241 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
242 | * shouldn't try reading from the input source any more. We might |
242 | * shouldn't try reading from the input source any more. We might |
243 | * still have a bunch of tokens to match, though, because of |
243 | * still have a bunch of tokens to match, though, because of |
244 | * possible backing-up. |
244 | * possible backing-up. |
245 | * |
245 | * |
246 | * When we actually see the EOF, we change the status to "new" |
246 | * When we actually see the EOF, we change the status to "new" |
247 | * (via yyrestart()), so that the user can continue scanning by |
247 | * (via yyrestart()), so that the user can continue scanning by |
248 | * just pointing yyin at a new input file. |
248 | * just pointing yyin at a new input file. |
249 | */ |
249 | */ |
250 | #define YY_BUFFER_EOF_PENDING 2 |
250 | #define YY_BUFFER_EOF_PENDING 2 |
251 | 251 | ||
252 | }; |
252 | }; |
253 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
253 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
254 | 254 | ||
255 | /* Stack of input buffers. */ |
255 | /* Stack of input buffers. */ |
256 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
256 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
257 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
257 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
258 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ |
258 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ |
259 | 259 | ||
260 | /* We provide macros for accessing buffer states in case in the |
260 | /* We provide macros for accessing buffer states in case in the |
261 | * future we want to put the buffer states in a more general |
261 | * future we want to put the buffer states in a more general |
262 | * "scanner state". |
262 | * "scanner state". |
263 | * |
263 | * |
264 | * Returns the top of the stack, or NULL. |
264 | * Returns the top of the stack, or NULL. |
265 | */ |
265 | */ |
266 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
266 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
267 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
267 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
268 | : NULL) |
268 | : NULL) |
269 | 269 | ||
270 | /* Same as previous macro, but useful when we know that the buffer stack is not |
270 | /* Same as previous macro, but useful when we know that the buffer stack is not |
271 | * NULL or when we need an lvalue. For internal use only. |
271 | * NULL or when we need an lvalue. For internal use only. |
272 | */ |
272 | */ |
273 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
273 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
274 | 274 | ||
275 | /* yy_hold_char holds the character lost when yytext is formed. */ |
275 | /* yy_hold_char holds the character lost when yytext is formed. */ |
276 | static char yy_hold_char; |
276 | static char yy_hold_char; |
277 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
277 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
278 | int yyleng; |
278 | int yyleng; |
279 | 279 | ||
280 | /* Points to current character in buffer. */ |
280 | /* Points to current character in buffer. */ |
281 | static char *yy_c_buf_p = (char *) 0; |
281 | static char *yy_c_buf_p = (char *) 0; |
282 | static int yy_init = 0; /* whether we need to initialize */ |
282 | static int yy_init = 0; /* whether we need to initialize */ |
283 | static int yy_start = 0; /* start state number */ |
283 | static int yy_start = 0; /* start state number */ |
284 | 284 | ||
285 | /* Flag which is used to allow yywrap()'s to do buffer switches |
285 | /* Flag which is used to allow yywrap()'s to do buffer switches |
286 | * instead of setting up a fresh yyin. A bit of a hack ... |
286 | * instead of setting up a fresh yyin. A bit of a hack ... |
287 | */ |
287 | */ |
288 | static int yy_did_buffer_switch_on_eof; |
288 | static int yy_did_buffer_switch_on_eof; |
289 | 289 | ||
290 | void yyrestart (FILE *input_file ); |
290 | void yyrestart (FILE *input_file ); |
291 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); |
291 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); |
292 | YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); |
292 | YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); |
293 | void yy_delete_buffer (YY_BUFFER_STATE b ); |
293 | void yy_delete_buffer (YY_BUFFER_STATE b ); |
294 | void yy_flush_buffer (YY_BUFFER_STATE b ); |
294 | void yy_flush_buffer (YY_BUFFER_STATE b ); |
295 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); |
295 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); |
296 | void yypop_buffer_state (void ); |
296 | void yypop_buffer_state (void ); |
297 | 297 | ||
298 | static void yyensure_buffer_stack (void ); |
298 | static void yyensure_buffer_stack (void ); |
299 | static void yy_load_buffer_state (void ); |
299 | static void yy_load_buffer_state (void ); |
300 | static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); |
300 | static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); |
301 | 301 | ||
302 | #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) |
302 | #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) |
303 | 303 | ||
304 | YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); |
304 | YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); |
305 | YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); |
305 | YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); |
306 | YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); |
306 | YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); |
307 | 307 | ||
308 | void *yyalloc (yy_size_t ); |
308 | void *yyalloc (yy_size_t ); |
309 | void *yyrealloc (void *,yy_size_t ); |
309 | void *yyrealloc (void *,yy_size_t ); |
310 | void yyfree (void * ); |
310 | void yyfree (void * ); |
311 | 311 | ||
312 | #define yy_new_buffer yy_create_buffer |
312 | #define yy_new_buffer yy_create_buffer |
313 | 313 | ||
314 | #define yy_set_interactive(is_interactive) \ |
314 | #define yy_set_interactive(is_interactive) \ |
315 | { \ |
315 | { \ |
316 | if ( ! YY_CURRENT_BUFFER ){ \ |
316 | if ( ! YY_CURRENT_BUFFER ){ \ |
317 | yyensure_buffer_stack (); \ |
317 | yyensure_buffer_stack (); \ |
318 | YY_CURRENT_BUFFER_LVALUE = \ |
318 | YY_CURRENT_BUFFER_LVALUE = \ |
319 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ |
319 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ |
320 | } \ |
320 | } \ |
321 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
321 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
322 | } |
322 | } |
323 | 323 | ||
324 | #define yy_set_bol(at_bol) \ |
324 | #define yy_set_bol(at_bol) \ |
325 | { \ |
325 | { \ |
326 | if ( ! YY_CURRENT_BUFFER ){\ |
326 | if ( ! YY_CURRENT_BUFFER ){\ |
327 | yyensure_buffer_stack (); \ |
327 | yyensure_buffer_stack (); \ |
328 | YY_CURRENT_BUFFER_LVALUE = \ |
328 | YY_CURRENT_BUFFER_LVALUE = \ |
329 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ |
329 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ |
330 | } \ |
330 | } \ |
331 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
331 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
332 | } |
332 | } |
333 | 333 | ||
334 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
334 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
335 | 335 | ||
336 | /* Begin user sect3 */ |
336 | /* Begin user sect3 */ |
337 | 337 | ||
338 | typedef unsigned char YY_CHAR; |
338 | typedef unsigned char YY_CHAR; |
339 | 339 | ||
340 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; |
340 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; |
341 | 341 | ||
342 | typedef int yy_state_type; |
342 | typedef int yy_state_type; |
343 | 343 | ||
344 | extern int yylineno; |
344 | extern int yylineno; |
345 | 345 | ||
346 | int yylineno = 1; |
346 | int yylineno = 1; |
347 | 347 | ||
348 | extern char *yytext; |
348 | extern char *yytext; |
349 | #define yytext_ptr yytext |
349 | #define yytext_ptr yytext |
350 | 350 | ||
351 | static yy_state_type yy_get_previous_state (void ); |
351 | static yy_state_type yy_get_previous_state (void ); |
352 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); |
352 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); |
353 | static int yy_get_next_buffer (void ); |
353 | static int yy_get_next_buffer (void ); |
354 | static void yy_fatal_error (yyconst char msg[] ); |
354 | static void yy_fatal_error (yyconst char msg[] ); |
355 | 355 | ||
356 | /* Done after the current pattern has been matched and before the |
356 | /* Done after the current pattern has been matched and before the |
357 | * corresponding action - sets up yytext. |
357 | * corresponding action - sets up yytext. |
358 | */ |
358 | */ |
359 | #define YY_DO_BEFORE_ACTION \ |
359 | #define YY_DO_BEFORE_ACTION \ |
360 | (yytext_ptr) = yy_bp; \ |
360 | (yytext_ptr) = yy_bp; \ |
361 | yyleng = (size_t) (yy_cp - yy_bp); \ |
361 | yyleng = (size_t) (yy_cp - yy_bp); \ |
362 | (yy_hold_char) = *yy_cp; \ |
362 | (yy_hold_char) = *yy_cp; \ |
363 | *yy_cp = '\0'; \ |
363 | *yy_cp = '\0'; \ |
364 | (yy_c_buf_p) = yy_cp; |
364 | (yy_c_buf_p) = yy_cp; |
365 | 365 | ||
366 | #define YY_NUM_RULES 26 |
366 | #define YY_NUM_RULES 26 |
367 | #define YY_END_OF_BUFFER 27 |
367 | #define YY_END_OF_BUFFER 27 |
368 | /* This struct is not used in this scanner, |
368 | /* This struct is not used in this scanner, |
369 | but its presence is necessary. */ |
369 | but its presence is necessary. */ |
370 | struct yy_trans_info |
370 | struct yy_trans_info |
371 | { |
371 | { |
372 | flex_int32_t yy_verify; |
372 | flex_int32_t yy_verify; |
373 | flex_int32_t yy_nxt; |
373 | flex_int32_t yy_nxt; |
374 | }; |
374 | }; |
375 | static yyconst flex_int16_t yy_accept[33] = |
375 | static yyconst flex_int16_t yy_accept[33] = |
376 | { 0, |
376 | { 0, |
377 | 0, 0, 27, 25, 1, 1, 24, 20, 9, 3, |
377 | 0, 0, 27, 25, 1, 1, 24, 20, 9, 3, |
378 | 4, 18, 21, 22, 19, 2, 14, 25, 12, 8, |
378 | 4, 18, 21, 22, 19, 2, 14, 25, 12, 8, |
379 | 7, 23, 11, 6, 2, 16, 15, 10, 13, 17, |
379 | 7, 23, 11, 6, 2, 16, 15, 10, 13, 17, |
380 | 5, 0 |
380 | 5, 0 |
381 | } ; |
381 | } ; |
382 | 382 | ||
383 | static yyconst flex_int32_t yy_ec[256] = |
383 | static yyconst flex_int32_t yy_ec[256] = |
384 | { 0, |
384 | { 0, |
385 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
385 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
386 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
386 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
387 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
387 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
388 | 1, 2, 4, 1, 1, 1, 5, 6, 1, 7, |
388 | 1, 2, 4, 1, 1, 1, 5, 6, 1, 7, |
389 | 8, 9, 10, 1, 11, 1, 12, 13, 13, 13, |
389 | 8, 9, 10, 1, 11, 1, 12, 13, 13, 13, |
390 | 13, 13, 13, 13, 13, 13, 13, 1, 1, 14, |
390 | 13, 13, 13, 13, 13, 13, 13, 1, 1, 14, |
391 | 15, 16, 1, 1, 1, 1, 1, 1, 1, 1, |
391 | 15, 16, 1, 1, 1, 1, 1, 1, 1, 1, |
392 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
392 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
393 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
393 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
394 | 1, 1, 1, 17, 1, 1, 1, 1, 1, 1, |
394 | 1, 1, 1, 17, 1, 1, 1, 1, 1, 1, |
395 | 395 | ||
396 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
396 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
397 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
397 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
398 | 1, 1, 1, 18, 1, 19, 1, 1, 1, 1, |
398 | 1, 1, 1, 18, 1, 19, 1, 1, 1, 1, |
399 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
399 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
400 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
400 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
401 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
401 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
402 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
402 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
403 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
403 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
404 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
404 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
405 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
405 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
406 | 406 | ||
407 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
407 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
408 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
408 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
409 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
409 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
410 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
410 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
411 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
411 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
412 | 1, 1, 1, 1, 1 |
412 | 1, 1, 1, 1, 1 |
413 | } ; |
413 | } ; |
414 | 414 | ||
415 | static yyconst flex_int32_t yy_meta[20] = |
415 | static yyconst flex_int32_t yy_meta[20] = |
416 | { 0, |
416 | { 0, |
417 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
417 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
418 | 1, 1, 1, 1, 1, 1, 1, 1, 1 |
418 | 1, 1, 1, 1, 1, 1, 1, 1, 1 |
419 | } ; |
419 | } ; |
420 | 420 | ||
421 | static yyconst flex_int16_t yy_base[33] = |
421 | static yyconst flex_int16_t yy_base[33] = |
422 | { 0, |
422 | { 0, |
423 | 0, 0, 30, 31, 31, 31, 14, 31, 22, 31, |
423 | 0, 0, 30, 31, 31, 31, 14, 31, 22, 31, |
424 | 31, 31, 31, 31, 31, 14, 6, 11, 7, 31, |
424 | 31, 31, 31, 31, 31, 14, 6, 11, 7, 31, |
425 | 7, 31, 31, 31, 11, 31, 31, 31, 31, 31, |
425 | 7, 31, 31, 31, 11, 31, 31, 31, 31, 31, |
426 | 31, 31 |
426 | 31, 31 |
427 | } ; |
427 | } ; |
428 | 428 | ||
429 | static yyconst flex_int16_t yy_def[33] = |
429 | static yyconst flex_int16_t yy_def[33] = |
430 | { 0, |
430 | { 0, |
431 | 32, 1, 32, 32, 32, 32, 32, 32, 32, 32, |
431 | 32, 1, 32, 32, 32, 32, 32, 32, 32, 32, |
432 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
432 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
433 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
433 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
434 | 32, 0 |
434 | 32, 0 |
435 | } ; |
435 | } ; |
436 | 436 | ||
437 | static yyconst flex_int16_t yy_nxt[51] = |
437 | static yyconst flex_int16_t yy_nxt[51] = |
438 | { 0, |
438 | { 0, |
439 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
439 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
440 | 14, 15, 16, 17, 18, 19, 20, 21, 22, 26, |
440 | 14, 15, 16, 17, 18, 19, 20, 21, 22, 26, |
441 | 27, 29, 30, 25, 31, 28, 25, 24, 23, 32, |
441 | 27, 29, 30, 25, 31, 28, 25, 24, 23, 32, |
442 | 3, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
442 | 3, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
443 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 |
443 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 |
444 | } ; |
444 | } ; |
445 | 445 | ||
446 | static yyconst flex_int16_t yy_chk[51] = |
446 | static yyconst flex_int16_t yy_chk[51] = |
447 | { 0, |
447 | { 0, |
448 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
448 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
449 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, |
449 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, |
450 | 17, 19, 19, 25, 21, 18, 16, 9, 7, 3, |
450 | 17, 19, 19, 25, 21, 18, 16, 9, 7, 3, |
451 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
451 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, |
452 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 |
452 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 |
453 | } ; |
453 | } ; |
454 | 454 | ||
455 | static yy_state_type yy_last_accepting_state; |
455 | static yy_state_type yy_last_accepting_state; |
456 | static char *yy_last_accepting_cpos; |
456 | static char *yy_last_accepting_cpos; |
457 | 457 | ||
458 | extern int yy_flex_debug; |
458 | extern int yy_flex_debug; |
459 | int yy_flex_debug = 0; |
459 | int yy_flex_debug = 0; |
460 | 460 | ||
461 | /* The intent behind this definition is that it'll catch |
461 | /* The intent behind this definition is that it'll catch |
462 | * any uses of REJECT which flex missed. |
462 | * any uses of REJECT which flex missed. |
463 | */ |
463 | */ |
464 | #define REJECT reject_used_but_not_detected |
464 | #define REJECT reject_used_but_not_detected |
465 | #define yymore() yymore_used_but_not_detected |
465 | #define yymore() yymore_used_but_not_detected |
466 | #define YY_MORE_ADJ 0 |
466 | #define YY_MORE_ADJ 0 |
467 | #define YY_RESTORE_YY_MORE_OFFSET |
467 | #define YY_RESTORE_YY_MORE_OFFSET |
468 | char *yytext; |
468 | char *yytext; |
469 | #line 1 "arith_lex.l" |
469 | #line 1 "arith_lex.l" |
470 | #line 2 "arith_lex.l" |
470 | #line 2 "arith_lex.l" |
471 | /* $NetBSD: arith_lex.l,v 1.10 1999/02/05 07:52:52 christos Exp $ */ |
471 | /* $NetBSD: arith_lex.l,v 1.10 1999/02/05 07:52:52 christos Exp $ */ |
472 | 472 | ||
473 | /*- |
473 | /*- |
474 | * Copyright (c) 1993 |
474 | * Copyright (c) 1993 |
475 | * The Regents of the University of California. All rights reserved. |
475 | * The Regents of the University of California. All rights reserved. |
476 | * |
476 | * |
477 | * This code is derived from software contributed to Berkeley by |
477 | * This code is derived from software contributed to Berkeley by |
478 | * Kenneth Almquist. |
478 | * Kenneth Almquist. |
479 | * |
479 | * |
480 | * Redistribution and use in source and binary forms, with or without |
480 | * Redistribution and use in source and binary forms, with or without |
481 | * modification, are permitted provided that the following conditions |
481 | * modification, are permitted provided that the following conditions |
482 | * are met: |
482 | * are met: |
483 | * 1. Redistributions of source code must retain the above copyright |
483 | * 1. Redistributions of source code must retain the above copyright |
484 | * notice, this list of conditions and the following disclaimer. |
484 | * notice, this list of conditions and the following disclaimer. |
485 | * 2. Redistributions in binary form must reproduce the above copyright |
485 | * 2. Redistributions in binary form must reproduce the above copyright |
486 | * notice, this list of conditions and the following disclaimer in the |
486 | * notice, this list of conditions and the following disclaimer in the |
487 | * documentation and/or other materials provided with the distribution. |
487 | * documentation and/or other materials provided with the distribution. |
488 | * 3. All advertising materials mentioning features or use of this software |
488 | * 3. All advertising materials mentioning features or use of this software |
489 | * must display the following acknowledgement: |
489 | * must display the following acknowledgement: |
490 | * This product includes software developed by the University of |
490 | * This product includes software developed by the University of |
491 | * California, Berkeley and its contributors. |
491 | * California, Berkeley and its contributors. |
492 | * 4. Neither the name of the University nor the names of its contributors |
492 | * 4. Neither the name of the University nor the names of its contributors |
493 | * may be used to endorse or promote products derived from this software |
493 | * may be used to endorse or promote products derived from this software |
494 | * without specific prior written permission. |
494 | * without specific prior written permission. |
495 | * |
495 | * |
496 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
496 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
497 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
497 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
498 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
498 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
499 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
499 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
500 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
500 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
501 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
501 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
502 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
502 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
503 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
503 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
504 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
504 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
505 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
505 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
506 | * SUCH DAMAGE. |
506 | * SUCH DAMAGE. |
507 | */ |
507 | */ |
508 | 508 | ||
509 | #include <sys/cdefs.h> |
509 | #include <sys/cdefs.h> |
510 | #ifndef lint |
510 | #ifndef lint |
511 | #if 0 |
511 | #if 0 |
512 | static char sccsid[] = "@(#)arith_lex.l 8.3 (Berkeley) 5/4/95"; |
512 | static char sccsid[] = "@(#)arith_lex.l 8.3 (Berkeley) 5/4/95"; |
513 | #else |
513 | #else |
514 | __RCSID("$NetBSD: arith_lex.l,v 1.10 1999/02/05 07:52:52 christos Exp $"); |
514 | __RCSID("$NetBSD: arith_lex.l,v 1.10 1999/02/05 07:52:52 christos Exp $"); |
515 | #endif |
515 | #endif |
516 | #endif /* not lint */ |
516 | #endif /* not lint */ |
517 | 517 | ||
518 | #include <unistd.h> |
518 | #include <unistd.h> |
519 | #include "arith.h" |
519 | #include "arith.h" |
520 | #include "error.h" |
520 | #include "error.h" |
521 | #include "expand.h" |
521 | #include "expand.h" |
522 | 522 | ||
523 | extern int yylval; |
523 | extern int yylval; |
524 | extern char *arith_buf, *arith_startbuf; |
524 | extern char *arith_buf, *arith_startbuf; |
525 | #undef YY_INPUT |
525 | #undef YY_INPUT |
526 | #define YY_INPUT(buf,result,max) \ |
526 | #define YY_INPUT(buf,result,max) \ |
527 | result = (*buf = *arith_buf++) ? 1 : YY_NULL; |
527 | result = (*buf = *arith_buf++) ? 1 : YY_NULL; |
528 | #define YY_NO_UNPUT |
528 | #define YY_NO_UNPUT |
529 | #line 530 "lex.yy.c" |
529 | #line 530 "lex.yy.c" |
530 | 530 | ||
531 | #define INITIAL 0 |
531 | #define INITIAL 0 |
532 | 532 | ||
533 | #ifndef YY_NO_UNISTD_H |
533 | #ifndef YY_NO_UNISTD_H |
534 | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
534 | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
535 | * down here because we want the user's section 1 to have been scanned first. |
535 | * down here because we want the user's section 1 to have been scanned first. |
536 | * The user has a chance to override it with an option. |
536 | * The user has a chance to override it with an option. |
537 | */ |
537 | */ |
538 | #include <unistd.h> |
538 | #include <unistd.h> |
539 | #endif |
539 | #endif |
540 | 540 | ||
541 | #ifndef YY_EXTRA_TYPE |
541 | #ifndef YY_EXTRA_TYPE |
542 | #define YY_EXTRA_TYPE void * |
542 | #define YY_EXTRA_TYPE void * |
543 | #endif |
543 | #endif |
544 | 544 | ||
545 | static int yy_init_globals (void ); |
545 | static int yy_init_globals (void ); |
546 | 546 | ||
547 | /* Macros after this point can all be overridden by user definitions in |
547 | /* Macros after this point can all be overridden by user definitions in |
548 | * section 1. |
548 | * section 1. |
549 | */ |
549 | */ |
550 | 550 | ||
551 | #ifndef YY_SKIP_YYWRAP |
551 | #ifndef YY_SKIP_YYWRAP |
552 | #ifdef __cplusplus |
552 | #ifdef __cplusplus |
553 | extern "C" int yywrap (void ); |
553 | extern "C" int yywrap (void ); |
554 | #else |
554 | #else |
555 | extern int yywrap (void ); |
555 | extern int yywrap (void ); |
556 | #endif |
556 | #endif |
557 | #endif |
557 | #endif |
558 | 558 | ||
559 | static void yyunput (int c,char *buf_ptr ); |
559 | static void yyunput (int c,char *buf_ptr ); |
560 | 560 | ||
561 | #ifndef yytext_ptr |
561 | #ifndef yytext_ptr |
562 | static void yy_flex_strncpy (char *,yyconst char *,int ); |
562 | static void yy_flex_strncpy (char *,yyconst char *,int ); |
563 | #endif |
563 | #endif |
564 | 564 | ||
565 | #ifdef YY_NEED_STRLEN |
565 | #ifdef YY_NEED_STRLEN |
566 | static int yy_flex_strlen (yyconst char * ); |
566 | static int yy_flex_strlen (yyconst char * ); |
567 | #endif |
567 | #endif |
568 | 568 | ||
569 | #ifndef YY_NO_INPUT |
569 | #ifndef YY_NO_INPUT |
570 | 570 | ||
571 | #ifdef __cplusplus |
571 | #ifdef __cplusplus |
572 | static int yyinput (void ); |
572 | static int yyinput (void ); |
573 | #else |
573 | #else |
574 | static int input (void ); |
574 | static int input (void ); |
575 | #endif |
575 | #endif |
576 | 576 | ||
577 | #endif |
577 | #endif |
578 | 578 | ||
579 | /* Amount of stuff to slurp up with each read. */ |
579 | /* Amount of stuff to slurp up with each read. */ |
580 | #ifndef YY_READ_BUF_SIZE |
580 | #ifndef YY_READ_BUF_SIZE |
581 | #define YY_READ_BUF_SIZE 8192 |
581 | #define YY_READ_BUF_SIZE 8192 |
582 | #endif |
582 | #endif |
583 | 583 | ||
584 | /* Copy whatever the last rule matched to the standard output. */ |
584 | /* Copy whatever the last rule matched to the standard output. */ |
585 | #ifndef ECHO |
585 | #ifndef ECHO |
586 | /* This used to be an fputs(), but since the string might contain NUL's, |
586 | /* This used to be an fputs(), but since the string might contain NUL's, |
587 | * we now use fwrite(). |
587 | * we now use fwrite(). |
588 | */ |
588 | */ |
589 | #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) |
589 | #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) |
590 | #endif |
590 | #endif |
591 | 591 | ||
592 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
592 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
593 | * is returned in "result". |
593 | * is returned in "result". |
594 | */ |
594 | */ |
595 | #ifndef YY_INPUT |
595 | #ifndef YY_INPUT |
596 | #define YY_INPUT(buf,result,max_size) \ |
596 | #define YY_INPUT(buf,result,max_size) \ |
597 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
597 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
598 | { \ |
598 | { \ |
599 | int c = '*'; \ |
599 | int c = '*'; \ |
600 | size_t n; \ |
600 | size_t n; \ |
601 | for ( n = 0; n < max_size && \ |
601 | for ( n = 0; n < max_size && \ |
602 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
602 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
603 | buf[n] = (char) c; \ |
603 | buf[n] = (char) c; \ |
604 | if ( c == '\n' ) \ |
604 | if ( c == '\n' ) \ |
605 | buf[n++] = (char) c; \ |
605 | buf[n++] = (char) c; \ |
606 | if ( c == EOF && ferror( yyin ) ) \ |
606 | if ( c == EOF && ferror( yyin ) ) \ |
607 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
607 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
608 | result = n; \ |
608 | result = n; \ |
609 | } \ |
609 | } \ |
610 | else \ |
610 | else \ |
611 | { \ |
611 | { \ |
612 | errno=0; \ |
612 | errno=0; \ |
613 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ |
613 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ |
614 | { \ |
614 | { \ |
615 | if( errno != EINTR) \ |
615 | if( errno != EINTR) \ |
616 | { \ |
616 | { \ |
617 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
617 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
618 | break; \ |
618 | break; \ |
619 | } \ |
619 | } \ |
620 | errno=0; \ |
620 | errno=0; \ |
621 | clearerr(yyin); \ |
621 | clearerr(yyin); \ |
622 | } \ |
622 | } \ |
623 | }\ |
623 | }\ |
624 | \ |
624 | \ |
625 | 625 | ||
626 | #endif |
626 | #endif |
627 | 627 | ||
628 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
628 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
629 | * we don't want an extra ';' after the "return" because that will cause |
629 | * we don't want an extra ';' after the "return" because that will cause |
630 | * some compilers to complain about unreachable statements. |
630 | * some compilers to complain about unreachable statements. |
631 | */ |
631 | */ |
632 | #ifndef yyterminate |
632 | #ifndef yyterminate |
633 | #define yyterminate() return YY_NULL |
633 | #define yyterminate() return YY_NULL |
634 | #endif |
634 | #endif |
635 | 635 | ||
636 | /* Number of entries by which start-condition stack grows. */ |
636 | /* Number of entries by which start-condition stack grows. */ |
637 | #ifndef YY_START_STACK_INCR |
637 | #ifndef YY_START_STACK_INCR |
638 | #define YY_START_STACK_INCR 25 |
638 | #define YY_START_STACK_INCR 25 |
639 | #endif |
639 | #endif |
640 | 640 | ||
641 | /* Report a fatal error. */ |
641 | /* Report a fatal error. */ |
642 | #ifndef YY_FATAL_ERROR |
642 | #ifndef YY_FATAL_ERROR |
643 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
643 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
644 | #endif |
644 | #endif |
645 | 645 | ||
646 | /* end tables serialization structures and prototypes */ |
646 | /* end tables serialization structures and prototypes */ |
647 | 647 | ||
648 | /* Default declaration of generated scanner - a define so the user can |
648 | /* Default declaration of generated scanner - a define so the user can |
649 | * easily add parameters. |
649 | * easily add parameters. |
650 | */ |
650 | */ |
651 | #ifndef YY_DECL |
651 | #ifndef YY_DECL |
652 | #define YY_DECL_IS_OURS 1 |
652 | #define YY_DECL_IS_OURS 1 |
653 | 653 | ||
654 | extern int yylex (void); |
654 | extern int yylex (void); |
655 | 655 | ||
656 | #define YY_DECL int yylex (void) |
656 | #define YY_DECL int yylex (void) |
657 | #endif /* !YY_DECL */ |
657 | #endif /* !YY_DECL */ |
658 | 658 | ||
659 | /* Code executed at the beginning of each rule, after yytext and yyleng |
659 | /* Code executed at the beginning of each rule, after yytext and yyleng |
660 | * have been set up. |
660 | * have been set up. |
661 | */ |
661 | */ |
662 | #ifndef YY_USER_ACTION |
662 | #ifndef YY_USER_ACTION |
663 | #define YY_USER_ACTION |
663 | #define YY_USER_ACTION |
664 | #endif |
664 | #endif |
665 | 665 | ||
666 | /* Code executed at the end of each rule. */ |
666 | /* Code executed at the end of each rule. */ |
667 | #ifndef YY_BREAK |
667 | #ifndef YY_BREAK |
668 | #define YY_BREAK break; |
668 | #define YY_BREAK break; |
669 | #endif |
669 | #endif |
670 | 670 | ||
671 | #define YY_RULE_SETUP \ |
671 | #define YY_RULE_SETUP \ |
672 | YY_USER_ACTION |
672 | YY_USER_ACTION |
673 | 673 | ||
674 | /** The main scanner function which does all the work. |
674 | /** The main scanner function which does all the work. |
675 | */ |
675 | */ |
676 | YY_DECL |
676 | YY_DECL |
677 | { |
677 | { |
678 | register yy_state_type yy_current_state; |
678 | register yy_state_type yy_current_state; |
679 | register char *yy_cp, *yy_bp; |
679 | register char *yy_cp, *yy_bp; |
680 | register int yy_act; |
680 | register int yy_act; |
681 | 681 | ||
682 | #line 62 "arith_lex.l" |
682 | #line 62 "arith_lex.l" |
683 | 683 | ||
684 | #line 685 "lex.yy.c" |
684 | #line 685 "lex.yy.c" |
685 | 685 | ||
686 | if ( !(yy_init) ) |
686 | if ( !(yy_init) ) |
687 | { |
687 | { |
688 | (yy_init) = 1; |
688 | (yy_init) = 1; |
689 | 689 | ||
690 | #ifdef YY_USER_INIT |
690 | #ifdef YY_USER_INIT |
691 | YY_USER_INIT; |
691 | YY_USER_INIT; |
692 | #endif |
692 | #endif |
693 | 693 | ||
694 | if ( ! (yy_start) ) |
694 | if ( ! (yy_start) ) |
695 | (yy_start) = 1; /* first start state */ |
695 | (yy_start) = 1; /* first start state */ |
696 | 696 | ||
697 | if ( ! yyin ) |
697 | if ( ! yyin ) |
698 | yyin = stdin; |
698 | yyin = stdin; |
699 | 699 | ||
700 | if ( ! yyout ) |
700 | if ( ! yyout ) |
701 | yyout = stdout; |
701 | yyout = stdout; |
702 | 702 | ||
703 | if ( ! YY_CURRENT_BUFFER ) { |
703 | if ( ! YY_CURRENT_BUFFER ) { |
704 | yyensure_buffer_stack (); |
704 | yyensure_buffer_stack (); |
705 | YY_CURRENT_BUFFER_LVALUE = |
705 | YY_CURRENT_BUFFER_LVALUE = |
706 | yy_create_buffer(yyin,YY_BUF_SIZE ); |
706 | yy_create_buffer(yyin,YY_BUF_SIZE ); |
707 | } |
707 | } |
708 | 708 | ||
709 | yy_load_buffer_state( ); |
709 | yy_load_buffer_state( ); |
710 | } |
710 | } |
711 | 711 | ||
712 | while ( 1 ) /* loops until end-of-file is reached */ |
712 | while ( 1 ) /* loops until end-of-file is reached */ |
713 | { |
713 | { |
714 | yy_cp = (yy_c_buf_p); |
714 | yy_cp = (yy_c_buf_p); |
715 | 715 | ||
716 | /* Support of yytext. */ |
716 | /* Support of yytext. */ |
717 | *yy_cp = (yy_hold_char); |
717 | *yy_cp = (yy_hold_char); |
718 | 718 | ||
719 | /* yy_bp points to the position in yy_ch_buf of the start of |
719 | /* yy_bp points to the position in yy_ch_buf of the start of |
720 | * the current run. |
720 | * the current run. |
721 | */ |
721 | */ |
722 | yy_bp = yy_cp; |
722 | yy_bp = yy_cp; |
723 | 723 | ||
724 | yy_current_state = (yy_start); |
724 | yy_current_state = (yy_start); |
725 | yy_match: |
725 | yy_match: |
726 | do |
726 | do |
727 | { |
727 | { |
728 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
728 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
729 | if ( yy_accept[yy_current_state] ) |
729 | if ( yy_accept[yy_current_state] ) |
730 | { |
730 | { |
731 | (yy_last_accepting_state) = yy_current_state; |
731 | (yy_last_accepting_state) = yy_current_state; |
732 | (yy_last_accepting_cpos) = yy_cp; |
732 | (yy_last_accepting_cpos) = yy_cp; |
733 | } |
733 | } |
734 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
734 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
735 | { |
735 | { |
736 | yy_current_state = (int) yy_def[yy_current_state]; |
736 | yy_current_state = (int) yy_def[yy_current_state]; |
737 | if ( yy_current_state >= 33 ) |
737 | if ( yy_current_state >= 33 ) |
738 | yy_c = yy_meta[(unsigned int) yy_c]; |
738 | yy_c = yy_meta[(unsigned int) yy_c]; |
739 | } |
739 | } |
740 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
740 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
741 | ++yy_cp; |
741 | ++yy_cp; |
742 | } |
742 | } |
743 | while ( yy_base[yy_current_state] != 31 ); |
743 | while ( yy_base[yy_current_state] != 31 ); |
744 | 744 | ||
745 | yy_find_action: |
745 | yy_find_action: |
746 | yy_act = yy_accept[yy_current_state]; |
746 | yy_act = yy_accept[yy_current_state]; |
747 | if ( yy_act == 0 ) |
747 | if ( yy_act == 0 ) |
748 | { /* have to back up */ |
748 | { /* have to back up */ |
749 | yy_cp = (yy_last_accepting_cpos); |
749 | yy_cp = (yy_last_accepting_cpos); |
750 | yy_current_state = (yy_last_accepting_state); |
750 | yy_current_state = (yy_last_accepting_state); |
751 | yy_act = yy_accept[yy_current_state]; |
751 | yy_act = yy_accept[yy_current_state]; |
752 | } |
752 | } |
753 | 753 | ||
754 | YY_DO_BEFORE_ACTION; |
754 | YY_DO_BEFORE_ACTION; |
755 | 755 | ||
756 | do_action: /* This label is used only to access EOF actions. */ |
756 | do_action: /* This label is used only to access EOF actions. */ |
757 | 757 | ||
758 | switch ( yy_act ) |
758 | switch ( yy_act ) |
759 | { /* beginning of action switch */ |
759 | { /* beginning of action switch */ |
760 | case 0: /* must back up */ |
760 | case 0: /* must back up */ |
761 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
761 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
762 | *yy_cp = (yy_hold_char); |
762 | *yy_cp = (yy_hold_char); |
763 | yy_cp = (yy_last_accepting_cpos); |
763 | yy_cp = (yy_last_accepting_cpos); |
764 | yy_current_state = (yy_last_accepting_state); |
764 | yy_current_state = (yy_last_accepting_state); |
765 | goto yy_find_action; |
765 | goto yy_find_action; |
766 | 766 | ||
767 | case 1: |
767 | case 1: |
768 | /* rule 1 can match eol */ |
768 | /* rule 1 can match eol */ |
769 | YY_RULE_SETUP |
769 | YY_RULE_SETUP |
770 | #line 63 "arith_lex.l" |
770 | #line 63 "arith_lex.l" |
771 | { ; } |
771 | { ; } |
772 | YY_BREAK |
772 | YY_BREAK |
773 | case 2: |
773 | case 2: |
774 | YY_RULE_SETUP |
774 | YY_RULE_SETUP |
775 | #line 64 "arith_lex.l" |
775 | #line 64 "arith_lex.l" |
776 | { yylval = atol(yytext); return(ARITH_NUM); } |
776 | { yylval = atol(yytext); return(ARITH_NUM); } |
777 | YY_BREAK |
777 | YY_BREAK |
778 | case 3: |
778 | case 3: |
779 | YY_RULE_SETUP |
779 | YY_RULE_SETUP |
780 | #line 65 "arith_lex.l" |
780 | #line 65 "arith_lex.l" |
781 | { return(ARITH_LPAREN); } |
781 | { return(ARITH_LPAREN); } |
782 | YY_BREAK |
782 | YY_BREAK |
783 | case 4: |
783 | case 4: |
784 | YY_RULE_SETUP |
784 | YY_RULE_SETUP |
785 | #line 66 "arith_lex.l" |
785 | #line 66 "arith_lex.l" |
786 | { return(ARITH_RPAREN); } |
786 | { return(ARITH_RPAREN); } |
787 | YY_BREAK |
787 | YY_BREAK |
788 | case 5: |
788 | case 5: |
789 | YY_RULE_SETUP |
789 | YY_RULE_SETUP |
790 | #line 67 "arith_lex.l" |
790 | #line 67 "arith_lex.l" |
791 | { return(ARITH_OR); } |
791 | { return(ARITH_OR); } |
792 | YY_BREAK |
792 | YY_BREAK |
793 | case 6: |
793 | case 6: |
794 | YY_RULE_SETUP |
794 | YY_RULE_SETUP |
795 | #line 68 "arith_lex.l" |
795 | #line 68 "arith_lex.l" |
796 | { return(ARITH_AND); } |
796 | { return(ARITH_AND); } |
797 | YY_BREAK |
797 | YY_BREAK |
798 | case 7: |
798 | case 7: |
799 | YY_RULE_SETUP |
799 | YY_RULE_SETUP |
800 | #line 69 "arith_lex.l" |
800 | #line 69 "arith_lex.l" |
801 | { return(ARITH_BOR); } |
801 | { return(ARITH_BOR); } |
802 | YY_BREAK |
802 | YY_BREAK |
803 | case 8: |
803 | case 8: |
804 | YY_RULE_SETUP |
804 | YY_RULE_SETUP |
805 | #line 70 "arith_lex.l" |
805 | #line 70 "arith_lex.l" |
806 | { return(ARITH_BXOR); } |
806 | { return(ARITH_BXOR); } |
807 | YY_BREAK |
807 | YY_BREAK |
808 | case 9: |
808 | case 9: |
809 | YY_RULE_SETUP |
809 | YY_RULE_SETUP |
810 | #line 71 "arith_lex.l" |
810 | #line 71 "arith_lex.l" |
811 | { return(ARITH_BAND); } |
811 | { return(ARITH_BAND); } |
812 | YY_BREAK |
812 | YY_BREAK |
813 | case 10: |
813 | case 10: |
814 | YY_RULE_SETUP |
814 | YY_RULE_SETUP |
815 | #line 72 "arith_lex.l" |
815 | #line 72 "arith_lex.l" |
816 | { return(ARITH_EQ); } |
816 | { return(ARITH_EQ); } |
817 | YY_BREAK |
817 | YY_BREAK |
818 | case 11: |
818 | case 11: |
819 | YY_RULE_SETUP |
819 | YY_RULE_SETUP |
820 | #line 73 "arith_lex.l" |
820 | #line 73 "arith_lex.l" |
821 | { return(ARITH_NE); } |
821 | { return(ARITH_NE); } |
822 | YY_BREAK |
822 | YY_BREAK |
823 | case 12: |
823 | case 12: |
824 | YY_RULE_SETUP |
824 | YY_RULE_SETUP |
825 | #line 74 "arith_lex.l" |
825 | #line 74 "arith_lex.l" |
826 | { return(ARITH_GT); } |
826 | { return(ARITH_GT); } |
827 | YY_BREAK |
827 | YY_BREAK |
828 | case 13: |
828 | case 13: |
829 | YY_RULE_SETUP |
829 | YY_RULE_SETUP |
830 | #line 75 "arith_lex.l" |
830 | #line 75 "arith_lex.l" |
831 | { return(ARITH_GE); } |
831 | { return(ARITH_GE); } |
832 | YY_BREAK |
832 | YY_BREAK |
833 | case 14: |
833 | case 14: |
834 | YY_RULE_SETUP |
834 | YY_RULE_SETUP |
835 | #line 76 "arith_lex.l" |
835 | #line 76 "arith_lex.l" |
836 | { return(ARITH_LT); } |
836 | { return(ARITH_LT); } |
837 | YY_BREAK |
837 | YY_BREAK |
838 | case 15: |
838 | case 15: |
839 | YY_RULE_SETUP |
839 | YY_RULE_SETUP |
840 | #line 77 "arith_lex.l" |
840 | #line 77 "arith_lex.l" |
841 | { return(ARITH_LE); } |
841 | { return(ARITH_LE); } |
842 | YY_BREAK |
842 | YY_BREAK |
843 | case 16: |
843 | case 16: |
844 | YY_RULE_SETUP |
844 | YY_RULE_SETUP |
845 | #line 78 "arith_lex.l" |
845 | #line 78 "arith_lex.l" |
846 | { return(ARITH_LSHIFT); } |
846 | { return(ARITH_LSHIFT); } |
847 | YY_BREAK |
847 | YY_BREAK |
848 | case 17: |
848 | case 17: |
849 | YY_RULE_SETUP |
849 | YY_RULE_SETUP |
850 | #line 79 "arith_lex.l" |
850 | #line 79 "arith_lex.l" |
851 | { return(ARITH_RSHIFT); } |
851 | { return(ARITH_RSHIFT); } |
852 | YY_BREAK |
852 | YY_BREAK |
853 | case 18: |
853 | case 18: |
854 | YY_RULE_SETUP |
854 | YY_RULE_SETUP |
855 | #line 80 "arith_lex.l" |
855 | #line 80 "arith_lex.l" |
856 | { return(ARITH_MUL); } |
856 | { return(ARITH_MUL); } |
857 | YY_BREAK |
857 | YY_BREAK |
858 | case 19: |
858 | case 19: |
859 | YY_RULE_SETUP |
859 | YY_RULE_SETUP |
860 | #line 81 "arith_lex.l" |
860 | #line 81 "arith_lex.l" |
861 | { return(ARITH_DIV); } |
861 | { return(ARITH_DIV); } |
862 | YY_BREAK |
862 | YY_BREAK |
863 | case 20: |
863 | case 20: |
864 | YY_RULE_SETUP |
864 | YY_RULE_SETUP |
865 | #line 82 "arith_lex.l" |
865 | #line 82 "arith_lex.l" |
866 | { return(ARITH_REM); } |
866 | { return(ARITH_REM); } |
867 | YY_BREAK |
867 | YY_BREAK |
868 | case 21: |
868 | case 21: |
869 | YY_RULE_SETUP |
869 | YY_RULE_SETUP |
870 | #line 83 "arith_lex.l" |
870 | #line 83 "arith_lex.l" |
871 | { return(ARITH_ADD); } |
871 | { return(ARITH_ADD); } |
872 | YY_BREAK |
872 | YY_BREAK |
873 | case 22: |
873 | case 22: |
874 | YY_RULE_SETUP |
874 | YY_RULE_SETUP |
875 | #line 84 "arith_lex.l" |
875 | #line 84 "arith_lex.l" |
876 | { return(ARITH_SUB); } |
876 | { return(ARITH_SUB); } |
877 | YY_BREAK |
877 | YY_BREAK |
878 | case 23: |
878 | case 23: |
879 | YY_RULE_SETUP |
879 | YY_RULE_SETUP |
880 | #line 85 "arith_lex.l" |
880 | #line 85 "arith_lex.l" |
881 | { return(ARITH_BNOT); } |
881 | { return(ARITH_BNOT); } |
882 | YY_BREAK |
882 | YY_BREAK |
883 | case 24: |
883 | case 24: |
884 | YY_RULE_SETUP |
884 | YY_RULE_SETUP |
885 | #line 86 "arith_lex.l" |
885 | #line 86 "arith_lex.l" |
886 | { return(ARITH_NOT); } |
886 | { return(ARITH_NOT); } |
887 | YY_BREAK |
887 | YY_BREAK |
888 | case 25: |
888 | case 25: |
889 | YY_RULE_SETUP |
889 | YY_RULE_SETUP |
890 | #line 87 "arith_lex.l" |
890 | #line 87 "arith_lex.l" |
891 | { error("arith: syntax error: \"%s\"\n", arith_startbuf); } |
891 | { error("arith: syntax error: \"%s\"\n", arith_startbuf); } |
892 | YY_BREAK |
892 | YY_BREAK |
893 | case 26: |
893 | case 26: |
894 | YY_RULE_SETUP |
894 | YY_RULE_SETUP |
895 | #line 88 "arith_lex.l" |
895 | #line 88 "arith_lex.l" |
896 | ECHO; |
896 | ECHO; |
897 | YY_BREAK |
897 | YY_BREAK |
898 | #line 899 "lex.yy.c" |
898 | #line 899 "lex.yy.c" |
899 | case YY_STATE_EOF(INITIAL): |
899 | case YY_STATE_EOF(INITIAL): |
900 | yyterminate(); |
900 | yyterminate(); |
901 | 901 | ||
902 | case YY_END_OF_BUFFER: |
902 | case YY_END_OF_BUFFER: |
903 | { |
903 | { |
904 | /* Amount of text matched not including the EOB char. */ |
904 | /* Amount of text matched not including the EOB char. */ |
905 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; |
905 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; |
906 | 906 | ||
907 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
907 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
908 | *yy_cp = (yy_hold_char); |
908 | *yy_cp = (yy_hold_char); |
909 | YY_RESTORE_YY_MORE_OFFSET |
909 | YY_RESTORE_YY_MORE_OFFSET |
910 | 910 | ||
911 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
911 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
912 | { |
912 | { |
913 | /* We're scanning a new file or input source. It's |
913 | /* We're scanning a new file or input source. It's |
914 | * possible that this happened because the user |
914 | * possible that this happened because the user |
915 | * just pointed yyin at a new source and called |
915 | * just pointed yyin at a new source and called |
916 | * yylex(). If so, then we have to assure |
916 | * yylex(). If so, then we have to assure |
917 | * consistency between YY_CURRENT_BUFFER and our |
917 | * consistency between YY_CURRENT_BUFFER and our |
918 | * globals. Here is the right place to do so, because |
918 | * globals. Here is the right place to do so, because |
919 | * this is the first action (other than possibly a |
919 | * this is the first action (other than possibly a |
920 | * back-up) that will match for the new input source. |
920 | * back-up) that will match for the new input source. |
921 | */ |
921 | */ |
922 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
922 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
923 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
923 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
924 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
924 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
925 | } |
925 | } |
926 | 926 | ||
927 | /* Note that here we test for yy_c_buf_p "<=" to the position |
927 | /* Note that here we test for yy_c_buf_p "<=" to the position |
928 | * of the first EOB in the buffer, since yy_c_buf_p will |
928 | * of the first EOB in the buffer, since yy_c_buf_p will |
929 | * already have been incremented past the NUL character |
929 | * already have been incremented past the NUL character |
930 | * (since all states make transitions on EOB to the |
930 | * (since all states make transitions on EOB to the |
931 | * end-of-buffer state). Contrast this with the test |
931 | * end-of-buffer state). Contrast this with the test |
932 | * in input(). |
932 | * in input(). |
933 | */ |
933 | */ |
934 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
934 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
935 | { /* This was really a NUL. */ |
935 | { /* This was really a NUL. */ |
936 | yy_state_type yy_next_state; |
936 | yy_state_type yy_next_state; |
937 | 937 | ||
938 | (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; |
938 | (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; |
939 | 939 | ||
940 | yy_current_state = yy_get_previous_state( ); |
940 | yy_current_state = yy_get_previous_state( ); |
941 | 941 | ||
942 | /* Okay, we're now positioned to make the NUL |
942 | /* Okay, we're now positioned to make the NUL |
943 | * transition. We couldn't have |
943 | * transition. We couldn't have |
944 | * yy_get_previous_state() go ahead and do it |
944 | * yy_get_previous_state() go ahead and do it |
945 | * for us because it doesn't know how to deal |
945 | * for us because it doesn't know how to deal |
946 | * with the possibility of jamming (and we don't |
946 | * with the possibility of jamming (and we don't |
947 | * want to build jamming into it because then it |
947 | * want to build jamming into it because then it |
948 | * will run more slowly). |
948 | * will run more slowly). |
949 | */ |
949 | */ |
950 | 950 | ||
951 | yy_next_state = yy_try_NUL_trans( yy_current_state ); |
951 | yy_next_state = yy_try_NUL_trans( yy_current_state ); |
952 | 952 | ||
953 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
953 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
954 | 954 | ||
955 | if ( yy_next_state ) |
955 | if ( yy_next_state ) |
956 | { |
956 | { |
957 | /* Consume the NUL. */ |
957 | /* Consume the NUL. */ |
958 | yy_cp = ++(yy_c_buf_p); |
958 | yy_cp = ++(yy_c_buf_p); |
959 | yy_current_state = yy_next_state; |
959 | yy_current_state = yy_next_state; |
960 | goto yy_match; |
960 | goto yy_match; |
961 | } |
961 | } |
962 | 962 | ||
963 | else |
963 | else |
964 | { |
964 | { |
965 | yy_cp = (yy_c_buf_p); |
965 | yy_cp = (yy_c_buf_p); |
966 | goto yy_find_action; |
966 | goto yy_find_action; |
967 | } |
967 | } |
968 | } |
968 | } |
969 | 969 | ||
970 | else switch ( yy_get_next_buffer( ) ) |
970 | else switch ( yy_get_next_buffer( ) ) |
971 | { |
971 | { |
972 | case EOB_ACT_END_OF_FILE: |
972 | case EOB_ACT_END_OF_FILE: |
973 | { |
973 | { |
974 | (yy_did_buffer_switch_on_eof) = 0; |
974 | (yy_did_buffer_switch_on_eof) = 0; |
975 | 975 | ||
976 | if ( yywrap( ) ) |
976 | if ( yywrap( ) ) |
977 | { |
977 | { |
978 | /* Note: because we've taken care in |
978 | /* Note: because we've taken care in |
979 | * yy_get_next_buffer() to have set up |
979 | * yy_get_next_buffer() to have set up |
980 | * yytext, we can now set up |
980 | * yytext, we can now set up |
981 | * yy_c_buf_p so that if some total |
981 | * yy_c_buf_p so that if some total |
982 | * hoser (like flex itself) wants to |
982 | * hoser (like flex itself) wants to |
983 | * call the scanner after we return the |
983 | * call the scanner after we return the |
984 | * YY_NULL, it'll still work - another |
984 | * YY_NULL, it'll still work - another |
985 | * YY_NULL will get returned. |
985 | * YY_NULL will get returned. |
986 | */ |
986 | */ |
987 | (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; |
987 | (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; |
988 | 988 | ||
989 | yy_act = YY_STATE_EOF(YY_START); |
989 | yy_act = YY_STATE_EOF(YY_START); |
990 | goto do_action; |
990 | goto do_action; |
991 | } |
991 | } |
992 | 992 | ||
993 | else |
993 | else |
994 | { |
994 | { |
995 | if ( ! (yy_did_buffer_switch_on_eof) ) |
995 | if ( ! (yy_did_buffer_switch_on_eof) ) |
996 | YY_NEW_FILE; |
996 | YY_NEW_FILE; |
997 | } |
997 | } |
998 | break; |
998 | break; |
999 | } |
999 | } |
1000 | 1000 | ||
1001 | case EOB_ACT_CONTINUE_SCAN: |
1001 | case EOB_ACT_CONTINUE_SCAN: |
1002 | (yy_c_buf_p) = |
1002 | (yy_c_buf_p) = |
1003 | (yytext_ptr) + yy_amount_of_matched_text; |
1003 | (yytext_ptr) + yy_amount_of_matched_text; |
1004 | 1004 | ||
1005 | yy_current_state = yy_get_previous_state( ); |
1005 | yy_current_state = yy_get_previous_state( ); |
1006 | 1006 | ||
1007 | yy_cp = (yy_c_buf_p); |
1007 | yy_cp = (yy_c_buf_p); |
1008 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
1008 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
1009 | goto yy_match; |
1009 | goto yy_match; |
1010 | 1010 | ||
1011 | case EOB_ACT_LAST_MATCH: |
1011 | case EOB_ACT_LAST_MATCH: |
1012 | (yy_c_buf_p) = |
1012 | (yy_c_buf_p) = |
1013 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; |
1013 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; |
1014 | 1014 | ||
1015 | yy_current_state = yy_get_previous_state( ); |
1015 | yy_current_state = yy_get_previous_state( ); |
1016 | 1016 | ||
1017 | yy_cp = (yy_c_buf_p); |
1017 | yy_cp = (yy_c_buf_p); |
1018 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
1018 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
1019 | goto yy_find_action; |
1019 | goto yy_find_action; |
1020 | } |
1020 | } |
1021 | break; |
1021 | break; |
1022 | } |
1022 | } |
1023 | 1023 | ||
1024 | default: |
1024 | default: |
1025 | YY_FATAL_ERROR( |
1025 | YY_FATAL_ERROR( |
1026 | "fatal flex scanner internal error--no action found" ); |
1026 | "fatal flex scanner internal error--no action found" ); |
1027 | } /* end of action switch */ |
1027 | } /* end of action switch */ |
1028 | } /* end of scanning one token */ |
1028 | } /* end of scanning one token */ |
1029 | } /* end of yylex */ |
1029 | } /* end of yylex */ |
1030 | 1030 | ||
1031 | /* yy_get_next_buffer - try to read in a new buffer |
1031 | /* yy_get_next_buffer - try to read in a new buffer |
1032 | * |
1032 | * |
1033 | * Returns a code representing an action: |
1033 | * Returns a code representing an action: |
1034 | * EOB_ACT_LAST_MATCH - |
1034 | * EOB_ACT_LAST_MATCH - |
1035 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
1035 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
1036 | * EOB_ACT_END_OF_FILE - end of file |
1036 | * EOB_ACT_END_OF_FILE - end of file |
1037 | */ |
1037 | */ |
1038 | static int yy_get_next_buffer (void) |
1038 | static int yy_get_next_buffer (void) |
1039 | { |
1039 | { |
1040 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
1040 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
1041 | register char *source = (yytext_ptr); |
1041 | register char *source = (yytext_ptr); |
1042 | register int number_to_move, i; |
1042 | register int number_to_move, i; |
1043 | int ret_val; |
1043 | int ret_val; |
1044 | 1044 | ||
1045 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) |
1045 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) |
1046 | YY_FATAL_ERROR( |
1046 | YY_FATAL_ERROR( |
1047 | "fatal flex scanner internal error--end of buffer missed" ); |
1047 | "fatal flex scanner internal error--end of buffer missed" ); |
1048 | 1048 | ||
1049 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
1049 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
1050 | { /* Don't try to fill the buffer, so this is an EOF. */ |
1050 | { /* Don't try to fill the buffer, so this is an EOF. */ |
1051 | if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) |
1051 | if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) |
1052 | { |
1052 | { |
1053 | /* We matched a single character, the EOB, so |
1053 | /* We matched a single character, the EOB, so |
1054 | * treat this as a final EOF. |
1054 | * treat this as a final EOF. |
1055 | */ |
1055 | */ |
1056 | return EOB_ACT_END_OF_FILE; |
1056 | return EOB_ACT_END_OF_FILE; |
1057 | } |
1057 | } |
1058 | 1058 | ||
1059 | else |
1059 | else |
1060 | { |
1060 | { |
1061 | /* We matched some text prior to the EOB, first |
1061 | /* We matched some text prior to the EOB, first |
1062 | * process it. |
1062 | * process it. |
1063 | */ |
1063 | */ |
1064 | return EOB_ACT_LAST_MATCH; |
1064 | return EOB_ACT_LAST_MATCH; |
1065 | } |
1065 | } |
1066 | } |
1066 | } |
1067 | 1067 | ||
1068 | /* Try to read more data. */ |
1068 | /* Try to read more data. */ |
1069 | 1069 | ||
1070 | /* First move last chars to start of buffer. */ |
1070 | /* First move last chars to start of buffer. */ |
1071 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; |
1071 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; |
1072 | 1072 | ||
1073 | for ( i = 0; i < number_to_move; ++i ) |
1073 | for ( i = 0; i < number_to_move; ++i ) |
1074 | *(dest++) = *(source++); |
1074 | *(dest++) = *(source++); |
1075 | 1075 | ||
1076 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
1076 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
1077 | /* don't do the read, it's not guaranteed to return an EOF, |
1077 | /* don't do the read, it's not guaranteed to return an EOF, |
1078 | * just force an EOF |
1078 | * just force an EOF |
1079 | */ |
1079 | */ |
1080 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; |
1080 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; |
1081 | 1081 | ||
1082 | else |
1082 | else |
1083 | { |
1083 | { |
1084 | int num_to_read = |
1084 | int num_to_read = |
1085 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
1085 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
1086 | 1086 | ||
1087 | while ( num_to_read <= 0 ) |
1087 | while ( num_to_read <= 0 ) |
1088 | { /* Not enough room in the buffer - grow it. */ |
1088 | { /* Not enough room in the buffer - grow it. */ |
1089 | 1089 | ||
1090 | /* just a shorter name for the current buffer */ |
1090 | /* just a shorter name for the current buffer */ |
1091 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
1091 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
1092 | 1092 | ||
1093 | int yy_c_buf_p_offset = |
1093 | int yy_c_buf_p_offset = |
1094 | (int) ((yy_c_buf_p) - b->yy_ch_buf); |
1094 | (int) ((yy_c_buf_p) - b->yy_ch_buf); |
1095 | 1095 | ||
1096 | if ( b->yy_is_our_buffer ) |
1096 | if ( b->yy_is_our_buffer ) |
1097 | { |
1097 | { |
1098 | int new_size = b->yy_buf_size * 2; |
1098 | int new_size = b->yy_buf_size * 2; |
1099 | 1099 | ||
1100 | if ( new_size <= 0 ) |
1100 | if ( new_size <= 0 ) |
1101 | b->yy_buf_size += b->yy_buf_size / 8; |
1101 | b->yy_buf_size += b->yy_buf_size / 8; |
1102 | else |
1102 | else |
1103 | b->yy_buf_size *= 2; |
1103 | b->yy_buf_size *= 2; |
1104 | 1104 | ||
1105 | b->yy_ch_buf = (char *) |
1105 | b->yy_ch_buf = (char *) |
1106 | /* Include room in for 2 EOB chars. */ |
1106 | /* Include room in for 2 EOB chars. */ |
1107 | yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); |
1107 | yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); |
1108 | } |
1108 | } |
1109 | else |
1109 | else |
1110 | /* Can't grow it, we don't own it. */ |
1110 | /* Can't grow it, we don't own it. */ |
1111 | b->yy_ch_buf = 0; |
1111 | b->yy_ch_buf = 0; |
1112 | 1112 | ||
1113 | if ( ! b->yy_ch_buf ) |
1113 | if ( ! b->yy_ch_buf ) |
1114 | YY_FATAL_ERROR( |
1114 | YY_FATAL_ERROR( |
1115 | "fatal error - scanner input buffer overflow" ); |
1115 | "fatal error - scanner input buffer overflow" ); |
1116 | 1116 | ||
1117 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
1117 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
1118 | 1118 | ||
1119 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
1119 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
1120 | number_to_move - 1; |
1120 | number_to_move - 1; |
1121 | 1121 | ||
1122 | } |
1122 | } |
1123 | 1123 | ||
1124 | if ( num_to_read > YY_READ_BUF_SIZE ) |
1124 | if ( num_to_read > YY_READ_BUF_SIZE ) |
1125 | num_to_read = YY_READ_BUF_SIZE; |
1125 | num_to_read = YY_READ_BUF_SIZE; |
1126 | 1126 | ||
1127 | /* Read in more data. */ |
1127 | /* Read in more data. */ |
1128 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
1128 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
1129 | (yy_n_chars), num_to_read ); |
1129 | (yy_n_chars), num_to_read ); |
1130 | 1130 | ||
1131 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
1131 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
1132 | } |
1132 | } |
1133 | 1133 | ||
1134 | if ( (yy_n_chars) == 0 ) |
1134 | if ( (yy_n_chars) == 0 ) |
1135 | { |
1135 | { |
1136 | if ( number_to_move == YY_MORE_ADJ ) |
1136 | if ( number_to_move == YY_MORE_ADJ ) |
1137 | { |
1137 | { |
1138 | ret_val = EOB_ACT_END_OF_FILE; |
1138 | ret_val = EOB_ACT_END_OF_FILE; |
1139 | yyrestart(yyin ); |
1139 | yyrestart(yyin ); |
1140 | } |
1140 | } |
1141 | 1141 | ||
1142 | else |
1142 | else |
1143 | { |
1143 | { |
1144 | ret_val = EOB_ACT_LAST_MATCH; |
1144 | ret_val = EOB_ACT_LAST_MATCH; |
1145 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
1145 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
1146 | YY_BUFFER_EOF_PENDING; |
1146 | YY_BUFFER_EOF_PENDING; |
1147 | } |
1147 | } |
1148 | } |
1148 | } |
1149 | 1149 | ||
1150 | else |
1150 | else |
1151 | ret_val = EOB_ACT_CONTINUE_SCAN; |
1151 | ret_val = EOB_ACT_CONTINUE_SCAN; |
1152 | 1152 | ||
1153 | (yy_n_chars) += number_to_move; |
1153 | (yy_n_chars) += number_to_move; |
1154 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
1154 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
1155 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
1155 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
1156 | 1156 | ||
1157 | (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
1157 | (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
1158 | 1158 | ||
1159 | return ret_val; |
1159 | return ret_val; |
1160 | } |
1160 | } |
1161 | 1161 | ||
1162 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
1162 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
1163 | 1163 | ||
1164 | static yy_state_type yy_get_previous_state (void) |
1164 | static yy_state_type yy_get_previous_state (void) |
1165 | { |
1165 | { |
1166 | register yy_state_type yy_current_state; |
1166 | register yy_state_type yy_current_state; |
1167 | register char *yy_cp; |
1167 | register char *yy_cp; |
1168 | 1168 | ||
1169 | yy_current_state = (yy_start); |
1169 | yy_current_state = (yy_start); |
1170 | 1170 | ||
1171 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
1171 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
1172 | { |
1172 | { |
1173 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
1173 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
1174 | if ( yy_accept[yy_current_state] ) |
1174 | if ( yy_accept[yy_current_state] ) |
1175 | { |
1175 | { |
1176 | (yy_last_accepting_state) = yy_current_state; |
1176 | (yy_last_accepting_state) = yy_current_state; |
1177 | (yy_last_accepting_cpos) = yy_cp; |
1177 | (yy_last_accepting_cpos) = yy_cp; |
1178 | } |
1178 | } |
1179 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1179 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1180 | { |
1180 | { |
1181 | yy_current_state = (int) yy_def[yy_current_state]; |
1181 | yy_current_state = (int) yy_def[yy_current_state]; |
1182 | if ( yy_current_state >= 33 ) |
1182 | if ( yy_current_state >= 33 ) |
1183 | yy_c = yy_meta[(unsigned int) yy_c]; |
1183 | yy_c = yy_meta[(unsigned int) yy_c]; |
1184 | } |
1184 | } |
1185 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
1185 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
1186 | } |
1186 | } |
1187 | 1187 | ||
1188 | return yy_current_state; |
1188 | return yy_current_state; |
1189 | } |
1189 | } |
1190 | 1190 | ||
1191 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
1191 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
1192 | * |
1192 | * |
1193 | * synopsis |
1193 | * synopsis |
1194 | * next_state = yy_try_NUL_trans( current_state ); |
1194 | * next_state = yy_try_NUL_trans( current_state ); |
1195 | */ |
1195 | */ |
1196 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
1196 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
1197 | { |
1197 | { |
1198 | register int yy_is_jam; |
1198 | register int yy_is_jam; |
1199 | register char *yy_cp = (yy_c_buf_p); |
1199 | register char *yy_cp = (yy_c_buf_p); |
1200 | 1200 | ||
1201 | register YY_CHAR yy_c = 1; |
1201 | register YY_CHAR yy_c = 1; |
1202 | if ( yy_accept[yy_current_state] ) |
1202 | if ( yy_accept[yy_current_state] ) |
1203 | { |
1203 | { |
1204 | (yy_last_accepting_state) = yy_current_state; |
1204 | (yy_last_accepting_state) = yy_current_state; |
1205 | (yy_last_accepting_cpos) = yy_cp; |
1205 | (yy_last_accepting_cpos) = yy_cp; |
1206 | } |
1206 | } |
1207 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1207 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1208 | { |
1208 | { |
1209 | yy_current_state = (int) yy_def[yy_current_state]; |
1209 | yy_current_state = (int) yy_def[yy_current_state]; |
1210 | if ( yy_current_state >= 33 ) |
1210 | if ( yy_current_state >= 33 ) |
1211 | yy_c = yy_meta[(unsigned int) yy_c]; |
1211 | yy_c = yy_meta[(unsigned int) yy_c]; |
1212 | } |
1212 | } |
1213 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
1213 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
1214 | yy_is_jam = (yy_current_state == 32); |
1214 | yy_is_jam = (yy_current_state == 32); |
1215 | 1215 | ||
1216 | return yy_is_jam ? 0 : yy_current_state; |
1216 | return yy_is_jam ? 0 : yy_current_state; |
1217 | } |
1217 | } |
1218 | 1218 | ||
1219 | static void yyunput (int c, register char * yy_bp ) |
1219 | static void yyunput (int c, register char * yy_bp ) |
1220 | { |
1220 | { |
1221 | register char *yy_cp; |
1221 | register char *yy_cp; |
1222 | 1222 | ||
1223 | yy_cp = (yy_c_buf_p); |
1223 | yy_cp = (yy_c_buf_p); |
1224 | 1224 | ||
1225 | /* undo effects of setting up yytext */ |
1225 | /* undo effects of setting up yytext */ |
1226 | *yy_cp = (yy_hold_char); |
1226 | *yy_cp = (yy_hold_char); |
1227 | 1227 | ||
1228 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
1228 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
1229 | { /* need to shift things up to make room */ |
1229 | { /* need to shift things up to make room */ |
1230 | /* +2 for EOB chars. */ |
1230 | /* +2 for EOB chars. */ |
1231 | register int number_to_move = (yy_n_chars) + 2; |
1231 | register int number_to_move = (yy_n_chars) + 2; |
1232 | register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
1232 | register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
1233 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
1233 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
1234 | register char *source = |
1234 | register char *source = |
1235 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
1235 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
1236 | 1236 | ||
1237 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
1237 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
1238 | *--dest = *--source; |
1238 | *--dest = *--source; |
1239 | 1239 | ||
1240 | yy_cp += (int) (dest - source); |
1240 | yy_cp += (int) (dest - source); |
1241 | yy_bp += (int) (dest - source); |
1241 | yy_bp += (int) (dest - source); |
1242 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
1242 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
1243 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
1243 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
1244 | 1244 | ||
1245 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
1245 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
1246 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
1246 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
1247 | } |
1247 | } |
1248 | 1248 | ||
1249 | *--yy_cp = (char) c; |
1249 | *--yy_cp = (char) c; |
1250 | 1250 | ||
1251 | (yytext_ptr) = yy_bp; |
1251 | (yytext_ptr) = yy_bp; |
1252 | (yy_hold_char) = *yy_cp; |
1252 | (yy_hold_char) = *yy_cp; |
1253 | (yy_c_buf_p) = yy_cp; |
1253 | (yy_c_buf_p) = yy_cp; |
1254 | } |
1254 | } |
1255 | 1255 | ||
1256 | #ifndef YY_NO_INPUT |
1256 | #ifndef YY_NO_INPUT |
1257 | #ifdef __cplusplus |
1257 | #ifdef __cplusplus |
1258 | static int yyinput (void) |
1258 | static int yyinput (void) |
1259 | #else |
1259 | #else |
1260 | static int input (void) |
1260 | static int input (void) |
1261 | #endif |
1261 | #endif |
1262 | 1262 | ||
1263 | { |
1263 | { |
1264 | int c; |
1264 | int c; |
1265 | 1265 | ||
1266 | *(yy_c_buf_p) = (yy_hold_char); |
1266 | *(yy_c_buf_p) = (yy_hold_char); |
1267 | 1267 | ||
1268 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
1268 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
1269 | { |
1269 | { |
1270 | /* yy_c_buf_p now points to the character we want to return. |
1270 | /* yy_c_buf_p now points to the character we want to return. |
1271 | * If this occurs *before* the EOB characters, then it's a |
1271 | * If this occurs *before* the EOB characters, then it's a |
1272 | * valid NUL; if not, then we've hit the end of the buffer. |
1272 | * valid NUL; if not, then we've hit the end of the buffer. |
1273 | */ |
1273 | */ |
1274 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
1274 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
1275 | /* This was really a NUL. */ |
1275 | /* This was really a NUL. */ |
1276 | *(yy_c_buf_p) = '\0'; |
1276 | *(yy_c_buf_p) = '\0'; |
1277 | 1277 | ||
1278 | else |
1278 | else |
1279 | { /* need more input */ |
1279 | { /* need more input */ |
1280 | int offset = (yy_c_buf_p) - (yytext_ptr); |
1280 | int offset = (yy_c_buf_p) - (yytext_ptr); |
1281 | ++(yy_c_buf_p); |
1281 | ++(yy_c_buf_p); |
1282 | 1282 | ||
1283 | switch ( yy_get_next_buffer( ) ) |
1283 | switch ( yy_get_next_buffer( ) ) |
1284 | { |
1284 | { |
1285 | case EOB_ACT_LAST_MATCH: |
1285 | case EOB_ACT_LAST_MATCH: |
1286 | /* This happens because yy_g_n_b() |
1286 | /* This happens because yy_g_n_b() |
1287 | * sees that we've accumulated a |
1287 | * sees that we've accumulated a |
1288 | * token and flags that we need to |
1288 | * token and flags that we need to |
1289 | * try matching the token before |
1289 | * try matching the token before |
1290 | * proceeding. But for input(), |
1290 | * proceeding. But for input(), |
1291 | * there's no matching to consider. |
1291 | * there's no matching to consider. |
1292 | * So convert the EOB_ACT_LAST_MATCH |
1292 | * So convert the EOB_ACT_LAST_MATCH |
1293 | * to EOB_ACT_END_OF_FILE. |
1293 | * to EOB_ACT_END_OF_FILE. |
1294 | */ |
1294 | */ |
1295 | 1295 | ||
1296 | /* Reset buffer status. */ |
1296 | /* Reset buffer status. */ |
1297 | yyrestart(yyin ); |
1297 | yyrestart(yyin ); |
1298 | 1298 | ||
1299 | /*FALLTHROUGH*/ |
1299 | /*FALLTHROUGH*/ |
1300 | 1300 | ||
1301 | case EOB_ACT_END_OF_FILE: |
1301 | case EOB_ACT_END_OF_FILE: |
1302 | { |
1302 | { |
1303 | if ( yywrap( ) ) |
1303 | if ( yywrap( ) ) |
1304 | return EOF; |
1304 | return EOF; |
1305 | 1305 | ||
1306 | if ( ! (yy_did_buffer_switch_on_eof) ) |
1306 | if ( ! (yy_did_buffer_switch_on_eof) ) |
1307 | YY_NEW_FILE; |
1307 | YY_NEW_FILE; |
1308 | #ifdef __cplusplus |
1308 | #ifdef __cplusplus |
1309 | return yyinput(); |
1309 | return yyinput(); |
1310 | #else |
1310 | #else |
1311 | return input(); |
1311 | return input(); |
1312 | #endif |
1312 | #endif |
1313 | } |
1313 | } |
1314 | 1314 | ||
1315 | case EOB_ACT_CONTINUE_SCAN: |
1315 | case EOB_ACT_CONTINUE_SCAN: |
1316 | (yy_c_buf_p) = (yytext_ptr) + offset; |
1316 | (yy_c_buf_p) = (yytext_ptr) + offset; |
1317 | break; |
1317 | break; |
1318 | } |
1318 | } |
1319 | } |
1319 | } |
1320 | } |
1320 | } |
1321 | 1321 | ||
1322 | c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ |
1322 | c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ |
1323 | *(yy_c_buf_p) = '\0'; /* preserve yytext */ |
1323 | *(yy_c_buf_p) = '\0'; /* preserve yytext */ |
1324 | (yy_hold_char) = *++(yy_c_buf_p); |
1324 | (yy_hold_char) = *++(yy_c_buf_p); |
1325 | 1325 | ||
1326 | return c; |
1326 | return c; |
1327 | } |
1327 | } |
1328 | #endif /* ifndef YY_NO_INPUT */ |
1328 | #endif /* ifndef YY_NO_INPUT */ |
1329 | 1329 | ||
1330 | /** Immediately switch to a different input stream. |
1330 | /** Immediately switch to a different input stream. |
1331 | * @param input_file A readable stream. |
1331 | * @param input_file A readable stream. |
1332 | * |
1332 | * |
1333 | * @note This function does not reset the start condition to @c INITIAL . |
1333 | * @note This function does not reset the start condition to @c INITIAL . |
1334 | */ |
1334 | */ |
1335 | void yyrestart (FILE * input_file ) |
1335 | void yyrestart (FILE * input_file ) |
1336 | { |
1336 | { |
1337 | 1337 | ||
1338 | if ( ! YY_CURRENT_BUFFER ){ |
1338 | if ( ! YY_CURRENT_BUFFER ){ |
1339 | yyensure_buffer_stack (); |
1339 | yyensure_buffer_stack (); |
1340 | YY_CURRENT_BUFFER_LVALUE = |
1340 | YY_CURRENT_BUFFER_LVALUE = |
1341 | yy_create_buffer(yyin,YY_BUF_SIZE ); |
1341 | yy_create_buffer(yyin,YY_BUF_SIZE ); |
1342 | } |
1342 | } |
1343 | 1343 | ||
1344 | yy_init_buffer(YY_CURRENT_BUFFER,input_file ); |
1344 | yy_init_buffer(YY_CURRENT_BUFFER,input_file ); |
1345 | yy_load_buffer_state( ); |
1345 | yy_load_buffer_state( ); |
1346 | } |
1346 | } |
1347 | 1347 | ||
1348 | /** Switch to a different input buffer. |
1348 | /** Switch to a different input buffer. |
1349 | * @param new_buffer The new input buffer. |
1349 | * @param new_buffer The new input buffer. |
1350 | * |
1350 | * |
1351 | */ |
1351 | */ |
1352 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) |
1352 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) |
1353 | { |
1353 | { |
1354 | 1354 | ||
1355 | /* TODO. We should be able to replace this entire function body |
1355 | /* TODO. We should be able to replace this entire function body |
1356 | * with |
1356 | * with |
1357 | * yypop_buffer_state(); |
1357 | * yypop_buffer_state(); |
1358 | * yypush_buffer_state(new_buffer); |
1358 | * yypush_buffer_state(new_buffer); |
1359 | */ |
1359 | */ |
1360 | yyensure_buffer_stack (); |
1360 | yyensure_buffer_stack (); |
1361 | if ( YY_CURRENT_BUFFER == new_buffer ) |
1361 | if ( YY_CURRENT_BUFFER == new_buffer ) |
1362 | return; |
1362 | return; |
1363 | 1363 | ||
1364 | if ( YY_CURRENT_BUFFER ) |
1364 | if ( YY_CURRENT_BUFFER ) |
1365 | { |
1365 | { |
1366 | /* Flush out information for old buffer. */ |
1366 | /* Flush out information for old buffer. */ |
1367 | *(yy_c_buf_p) = (yy_hold_char); |
1367 | *(yy_c_buf_p) = (yy_hold_char); |
1368 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
1368 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
1369 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
1369 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
1370 | } |
1370 | } |
1371 | 1371 | ||
1372 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
1372 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
1373 | yy_load_buffer_state( ); |
1373 | yy_load_buffer_state( ); |
1374 | 1374 | ||
1375 | /* We don't actually know whether we did this switch during |
1375 | /* We don't actually know whether we did this switch during |
1376 | * EOF (yywrap()) processing, but the only time this flag |
1376 | * EOF (yywrap()) processing, but the only time this flag |
1377 | * is looked at is after yywrap() is called, so it's safe |
1377 | * is looked at is after yywrap() is called, so it's safe |
1378 | * to go ahead and always set it. |
1378 | * to go ahead and always set it. |
1379 | */ |
1379 | */ |
1380 | (yy_did_buffer_switch_on_eof) = 1; |
1380 | (yy_did_buffer_switch_on_eof) = 1; |
1381 | } |
1381 | } |
1382 | 1382 | ||
1383 | static void yy_load_buffer_state (void) |
1383 | static void yy_load_buffer_state (void) |
1384 | { |
1384 | { |
1385 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
1385 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
1386 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
1386 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
1387 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
1387 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
1388 | (yy_hold_char) = *(yy_c_buf_p); |
1388 | (yy_hold_char) = *(yy_c_buf_p); |
1389 | } |
1389 | } |
1390 | 1390 | ||
1391 | /** Allocate and initialize an input buffer state. |
1391 | /** Allocate and initialize an input buffer state. |
1392 | * @param file A readable stream. |
1392 | * @param file A readable stream. |
1393 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
1393 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
1394 | * |
1394 | * |
1395 | * @return the allocated buffer state. |
1395 | * @return the allocated buffer state. |
1396 | */ |
1396 | */ |
1397 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) |
1397 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) |
1398 | { |
1398 | { |
1399 | YY_BUFFER_STATE b; |
1399 | YY_BUFFER_STATE b; |
1400 | 1400 | ||
1401 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); |
1401 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); |
1402 | if ( ! b ) |
1402 | if ( ! b ) |
1403 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
1403 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
1404 | 1404 | ||
1405 | b->yy_buf_size = size; |
1405 | b->yy_buf_size = size; |
1406 | 1406 | ||
1407 | /* yy_ch_buf has to be 2 characters longer than the size given because |
1407 | /* yy_ch_buf has to be 2 characters longer than the size given because |
1408 | * we need to put in 2 end-of-buffer characters. |
1408 | * we need to put in 2 end-of-buffer characters. |
1409 | */ |
1409 | */ |
1410 | b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); |
1410 | b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); |
1411 | if ( ! b->yy_ch_buf ) |
1411 | if ( ! b->yy_ch_buf ) |
1412 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
1412 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
1413 | 1413 | ||
1414 | b->yy_is_our_buffer = 1; |
1414 | b->yy_is_our_buffer = 1; |
1415 | 1415 | ||
1416 | yy_init_buffer(b,file ); |
1416 | yy_init_buffer(b,file ); |
1417 | 1417 | ||
1418 | return b; |
1418 | return b; |
1419 | } |
1419 | } |
1420 | 1420 | ||
1421 | /** Destroy the buffer. |
1421 | /** Destroy the buffer. |
1422 | * @param b a buffer created with yy_create_buffer() |
1422 | * @param b a buffer created with yy_create_buffer() |
1423 | * |
1423 | * |
1424 | */ |
1424 | */ |
1425 | void yy_delete_buffer (YY_BUFFER_STATE b ) |
1425 | void yy_delete_buffer (YY_BUFFER_STATE b ) |
1426 | { |
1426 | { |
1427 | 1427 | ||
1428 | if ( ! b ) |
1428 | if ( ! b ) |
1429 | return; |
1429 | return; |
1430 | 1430 | ||
1431 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
1431 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
1432 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
1432 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
1433 | 1433 | ||
1434 | if ( b->yy_is_our_buffer ) |
1434 | if ( b->yy_is_our_buffer ) |
1435 | yyfree((void *) b->yy_ch_buf ); |
1435 | yyfree((void *) b->yy_ch_buf ); |
1436 | 1436 | ||
1437 | yyfree((void *) b ); |
1437 | yyfree((void *) b ); |
1438 | } |
1438 | } |
1439 | 1439 | ||
1440 | #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */ |
1440 | #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */ |
1441 | #ifdef __cplusplus |
1441 | #ifdef __cplusplus |
1442 | extern "C" { |
1442 | extern "C" { |
1443 | #endif |
1443 | #endif |
1444 | #ifdef __THROW /* this is a gnuism */ |
1444 | #ifdef __THROW /* this is a gnuism */ |
1445 | extern int isatty (int ) __THROW; |
1445 | extern int isatty (int ) __THROW; |
1446 | #else |
1446 | #else |
1447 | extern int isatty (int ); |
1447 | extern int isatty (int ); |
1448 | #endif |
1448 | #endif |
1449 | #ifdef __cplusplus |
1449 | #ifdef __cplusplus |
1450 | } |
1450 | } |
1451 | #endif |
1451 | #endif |
1452 | #endif |
1452 | #endif |
1453 | 1453 | ||
1454 | /* Initializes or reinitializes a buffer. |
1454 | /* Initializes or reinitializes a buffer. |
1455 | * This function is sometimes called more than once on the same buffer, |
1455 | * This function is sometimes called more than once on the same buffer, |
1456 | * such as during a yyrestart() or at EOF. |
1456 | * such as during a yyrestart() or at EOF. |
1457 | */ |
1457 | */ |
1458 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
1458 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
1459 | 1459 | ||
1460 | { |
1460 | { |
1461 | int oerrno = errno; |
1461 | int oerrno = errno; |
1462 | 1462 | ||
1463 | yy_flush_buffer(b ); |
1463 | yy_flush_buffer(b ); |
1464 | 1464 | ||
1465 | b->yy_input_file = file; |
1465 | b->yy_input_file = file; |
1466 | b->yy_fill_buffer = 1; |
1466 | b->yy_fill_buffer = 1; |
1467 | 1467 | ||
1468 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
1468 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
1469 | * called from yyrestart() or through yy_get_next_buffer. |
1469 | * called from yyrestart() or through yy_get_next_buffer. |
1470 | * In that case, we don't want to reset the lineno or column. |
1470 | * In that case, we don't want to reset the lineno or column. |
1471 | */ |
1471 | */ |
1472 | if (b != YY_CURRENT_BUFFER){ |
1472 | if (b != YY_CURRENT_BUFFER){ |
1473 | b->yy_bs_lineno = 1; |
1473 | b->yy_bs_lineno = 1; |
1474 | b->yy_bs_column = 0; |
1474 | b->yy_bs_column = 0; |
1475 | } |
1475 | } |
1476 | 1476 | ||
1477 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
1477 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
1478 | 1478 | ||
1479 | errno = oerrno; |
1479 | errno = oerrno; |
1480 | } |
1480 | } |
1481 | 1481 | ||
1482 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
1482 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
1483 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
1483 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
1484 | * |
1484 | * |
1485 | */ |
1485 | */ |
1486 | void yy_flush_buffer (YY_BUFFER_STATE b ) |
1486 | void yy_flush_buffer (YY_BUFFER_STATE b ) |
1487 | { |
1487 | { |
1488 | if ( ! b ) |
1488 | if ( ! b ) |
1489 | return; |
1489 | return; |
1490 | 1490 | ||
1491 | b->yy_n_chars = 0; |
1491 | b->yy_n_chars = 0; |
1492 | 1492 | ||
1493 | /* We always need two end-of-buffer characters. The first causes |
1493 | /* We always need two end-of-buffer characters. The first causes |
1494 | * a transition to the end-of-buffer state. The second causes |
1494 | * a transition to the end-of-buffer state. The second causes |
1495 | * a jam in that state. |
1495 | * a jam in that state. |
1496 | */ |
1496 | */ |
1497 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
1497 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
1498 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
1498 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
1499 | 1499 | ||
1500 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
1500 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
1501 | 1501 | ||
1502 | b->yy_at_bol = 1; |
1502 | b->yy_at_bol = 1; |
1503 | b->yy_buffer_status = YY_BUFFER_NEW; |
1503 | b->yy_buffer_status = YY_BUFFER_NEW; |
1504 | 1504 | ||
1505 | if ( b == YY_CURRENT_BUFFER ) |
1505 | if ( b == YY_CURRENT_BUFFER ) |
1506 | yy_load_buffer_state( ); |
1506 | yy_load_buffer_state( ); |
1507 | } |
1507 | } |
1508 | 1508 | ||
1509 | /** Pushes the new state onto the stack. The new state becomes |
1509 | /** Pushes the new state onto the stack. The new state becomes |
1510 | * the current state. This function will allocate the stack |
1510 | * the current state. This function will allocate the stack |
1511 | * if necessary. |
1511 | * if necessary. |
1512 | * @param new_buffer The new state. |
1512 | * @param new_buffer The new state. |
1513 | * |
1513 | * |
1514 | */ |
1514 | */ |
1515 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) |
1515 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) |
1516 | { |
1516 | { |
1517 | if (new_buffer == NULL) |
1517 | if (new_buffer == NULL) |
1518 | return; |
1518 | return; |
1519 | 1519 | ||
1520 | yyensure_buffer_stack(); |
1520 | yyensure_buffer_stack(); |
1521 | 1521 | ||
1522 | /* This block is copied from yy_switch_to_buffer. */ |
1522 | /* This block is copied from yy_switch_to_buffer. */ |
1523 | if ( YY_CURRENT_BUFFER ) |
1523 | if ( YY_CURRENT_BUFFER ) |
1524 | { |
1524 | { |
1525 | /* Flush out information for old buffer. */ |
1525 | /* Flush out information for old buffer. */ |
1526 | *(yy_c_buf_p) = (yy_hold_char); |
1526 | *(yy_c_buf_p) = (yy_hold_char); |
1527 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
1527 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
1528 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
1528 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
1529 | } |
1529 | } |
1530 | 1530 | ||
1531 | /* Only push if top exists. Otherwise, replace top. */ |
1531 | /* Only push if top exists. Otherwise, replace top. */ |
1532 | if (YY_CURRENT_BUFFER) |
1532 | if (YY_CURRENT_BUFFER) |
1533 | (yy_buffer_stack_top)++; |
1533 | (yy_buffer_stack_top)++; |
1534 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
1534 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
1535 | 1535 | ||
1536 | /* copied from yy_switch_to_buffer. */ |
1536 | /* copied from yy_switch_to_buffer. */ |
1537 | yy_load_buffer_state( ); |
1537 | yy_load_buffer_state( ); |
1538 | (yy_did_buffer_switch_on_eof) = 1; |
1538 | (yy_did_buffer_switch_on_eof) = 1; |
1539 | } |
1539 | } |
1540 | 1540 | ||
1541 | /** Removes and deletes the top of the stack, if present. |
1541 | /** Removes and deletes the top of the stack, if present. |
1542 | * The next element becomes the new top. |
1542 | * The next element becomes the new top. |
1543 | * |
1543 | * |
1544 | */ |
1544 | */ |
1545 | void yypop_buffer_state (void) |
1545 | void yypop_buffer_state (void) |
1546 | { |
1546 | { |
1547 | if (!YY_CURRENT_BUFFER) |
1547 | if (!YY_CURRENT_BUFFER) |
1548 | return; |
1548 | return; |
1549 | 1549 | ||
1550 | yy_delete_buffer(YY_CURRENT_BUFFER ); |
1550 | yy_delete_buffer(YY_CURRENT_BUFFER ); |
1551 | YY_CURRENT_BUFFER_LVALUE = NULL; |
1551 | YY_CURRENT_BUFFER_LVALUE = NULL; |
1552 | if ((yy_buffer_stack_top) > 0) |
1552 | if ((yy_buffer_stack_top) > 0) |
1553 | --(yy_buffer_stack_top); |
1553 | --(yy_buffer_stack_top); |
1554 | 1554 | ||
1555 | if (YY_CURRENT_BUFFER) { |
1555 | if (YY_CURRENT_BUFFER) { |
1556 | yy_load_buffer_state( ); |
1556 | yy_load_buffer_state( ); |
1557 | (yy_did_buffer_switch_on_eof) = 1; |
1557 | (yy_did_buffer_switch_on_eof) = 1; |
1558 | } |
1558 | } |
1559 | } |
1559 | } |
1560 | 1560 | ||
1561 | /* Allocates the stack if it does not exist. |
1561 | /* Allocates the stack if it does not exist. |
1562 | * Guarantees space for at least one push. |
1562 | * Guarantees space for at least one push. |
1563 | */ |
1563 | */ |
1564 | static void yyensure_buffer_stack (void) |
1564 | static void yyensure_buffer_stack (void) |
1565 | { |
1565 | { |
1566 | int num_to_alloc; |
1566 | int num_to_alloc; |
1567 | 1567 | ||
1568 | if (!(yy_buffer_stack)) { |
1568 | if (!(yy_buffer_stack)) { |
1569 | 1569 | ||
1570 | /* First allocation is just for 2 elements, since we don't know if this |
1570 | /* First allocation is just for 2 elements, since we don't know if this |
1571 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
1571 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
1572 | * immediate realloc on the next call. |
1572 | * immediate realloc on the next call. |
1573 | */ |
1573 | */ |
1574 | num_to_alloc = 1; |
1574 | num_to_alloc = 1; |
1575 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc |
1575 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc |
1576 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
1576 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
1577 | ); |
1577 | ); |
1578 | 1578 | ||
1579 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
1579 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
1580 | 1580 | ||
1581 | (yy_buffer_stack_max) = num_to_alloc; |
1581 | (yy_buffer_stack_max) = num_to_alloc; |
1582 | (yy_buffer_stack_top) = 0; |
1582 | (yy_buffer_stack_top) = 0; |
1583 | return; |
1583 | return; |
1584 | } |
1584 | } |
1585 | 1585 | ||
1586 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ |
1586 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ |
1587 | 1587 | ||
1588 | /* Increase the buffer to prepare for a possible push. */ |
1588 | /* Increase the buffer to prepare for a possible push. */ |
1589 | int grow_size = 8 /* arbitrary grow size */; |
1589 | int grow_size = 8 /* arbitrary grow size */; |
1590 | 1590 | ||
1591 | num_to_alloc = (yy_buffer_stack_max) + grow_size; |
1591 | num_to_alloc = (yy_buffer_stack_max) + grow_size; |
1592 | (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc |
1592 | (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc |
1593 | ((yy_buffer_stack), |
1593 | ((yy_buffer_stack), |
1594 | num_to_alloc * sizeof(struct yy_buffer_state*) |
1594 | num_to_alloc * sizeof(struct yy_buffer_state*) |
1595 | ); |
1595 | ); |
1596 | 1596 | ||
1597 | /* zero only the new slots.*/ |
1597 | /* zero only the new slots.*/ |
1598 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
1598 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
1599 | (yy_buffer_stack_max) = num_to_alloc; |
1599 | (yy_buffer_stack_max) = num_to_alloc; |
1600 | } |
1600 | } |
1601 | } |
1601 | } |
1602 | 1602 | ||
1603 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
1603 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
1604 | * @param base the character buffer |
1604 | * @param base the character buffer |
1605 | * @param size the size in bytes of the character buffer |
1605 | * @param size the size in bytes of the character buffer |
1606 | * |
1606 | * |
1607 | * @return the newly allocated buffer state object. |
1607 | * @return the newly allocated buffer state object. |
1608 | */ |
1608 | */ |
1609 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) |
1609 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) |
1610 | { |
1610 | { |
1611 | YY_BUFFER_STATE b; |
1611 | YY_BUFFER_STATE b; |
1612 | 1612 | ||
1613 | if ( size < 2 || |
1613 | if ( size < 2 || |
1614 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
1614 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
1615 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
1615 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
1616 | /* They forgot to leave room for the EOB's. */ |
1616 | /* They forgot to leave room for the EOB's. */ |
1617 | return 0; |
1617 | return 0; |
1618 | 1618 | ||
1619 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); |
1619 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); |
1620 | if ( ! b ) |
1620 | if ( ! b ) |
1621 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
1621 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
1622 | 1622 | ||
1623 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
1623 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
1624 | b->yy_buf_pos = b->yy_ch_buf = base; |
1624 | b->yy_buf_pos = b->yy_ch_buf = base; |
1625 | b->yy_is_our_buffer = 0; |
1625 | b->yy_is_our_buffer = 0; |
1626 | b->yy_input_file = 0; |
1626 | b->yy_input_file = 0; |
1627 | b->yy_n_chars = b->yy_buf_size; |
1627 | b->yy_n_chars = b->yy_buf_size; |
1628 | b->yy_is_interactive = 0; |
1628 | b->yy_is_interactive = 0; |
1629 | b->yy_at_bol = 1; |
1629 | b->yy_at_bol = 1; |
1630 | b->yy_fill_buffer = 0; |
1630 | b->yy_fill_buffer = 0; |
1631 | b->yy_buffer_status = YY_BUFFER_NEW; |
1631 | b->yy_buffer_status = YY_BUFFER_NEW; |
1632 | 1632 | ||
1633 | yy_switch_to_buffer(b ); |
1633 | yy_switch_to_buffer(b ); |
1634 | 1634 | ||
1635 | return b; |
1635 | return b; |
1636 | } |
1636 | } |
1637 | 1637 | ||
1638 | /** Setup the input buffer state to scan a string. The next call to yylex() will |
1638 | /** Setup the input buffer state to scan a string. The next call to yylex() will |
1639 | * scan from a @e copy of @a str. |
1639 | * scan from a @e copy of @a str. |
1640 | * @param str a NUL-terminated string to scan |
1640 | * @param str a NUL-terminated string to scan |
1641 | * |
1641 | * |
1642 | * @return the newly allocated buffer state object. |
1642 | * @return the newly allocated buffer state object. |
1643 | * @note If you want to scan bytes that may contain NUL values, then use |
1643 | * @note If you want to scan bytes that may contain NUL values, then use |
1644 | * yy_scan_bytes() instead. |
1644 | * yy_scan_bytes() instead. |
1645 | */ |
1645 | */ |
1646 | YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) |
1646 | YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) |
1647 | { |
1647 | { |
1648 | 1648 | ||
1649 | return yy_scan_bytes(yystr,strlen(yystr) ); |
1649 | return yy_scan_bytes(yystr,strlen(yystr) ); |
1650 | } |
1650 | } |
1651 | 1651 | ||
1652 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
1652 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
1653 | * scan from a @e copy of @a bytes. |
1653 | * scan from a @e copy of @a bytes. |
1654 | * @param bytes the byte buffer to scan |
1654 | * @param bytes the byte buffer to scan |
1655 | * @param len the number of bytes in the buffer pointed to by @a bytes. |
1655 | * @param len the number of bytes in the buffer pointed to by @a bytes. |
1656 | * |
1656 | * |
1657 | * @return the newly allocated buffer state object. |
1657 | * @return the newly allocated buffer state object. |
1658 | */ |
1658 | */ |
1659 | YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) |
1659 | YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) |
1660 | { |
1660 | { |
1661 | YY_BUFFER_STATE b; |
1661 | YY_BUFFER_STATE b; |
1662 | char *buf; |
1662 | char *buf; |
1663 | yy_size_t n; |
1663 | yy_size_t n; |
1664 | int i; |
1664 | int i; |
1665 | 1665 | ||
1666 | /* Get memory for full buffer, including space for trailing EOB's. */ |
1666 | /* Get memory for full buffer, including space for trailing EOB's. */ |
1667 | n = _yybytes_len + 2; |
1667 | n = _yybytes_len + 2; |
1668 | buf = (char *) yyalloc(n ); |
1668 | buf = (char *) yyalloc(n ); |
1669 | if ( ! buf ) |
1669 | if ( ! buf ) |
1670 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
1670 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
1671 | 1671 | ||
1672 | for ( i = 0; i < _yybytes_len; ++i ) |
1672 | for ( i = 0; i < _yybytes_len; ++i ) |
1673 | buf[i] = yybytes[i]; |
1673 | buf[i] = yybytes[i]; |
1674 | 1674 | ||
1675 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
1675 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
1676 | 1676 | ||
1677 | b = yy_scan_buffer(buf,n ); |
1677 | b = yy_scan_buffer(buf,n ); |
1678 | if ( ! b ) |
1678 | if ( ! b ) |
1679 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
1679 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
1680 | 1680 | ||
1681 | /* It's okay to grow etc. this buffer, and we should throw it |
1681 | /* It's okay to grow etc. this buffer, and we should throw it |
1682 | * away when we're done. |
1682 | * away when we're done. |
1683 | */ |
1683 | */ |
1684 | b->yy_is_our_buffer = 1; |
1684 | b->yy_is_our_buffer = 1; |
1685 | 1685 | ||
1686 | return b; |
1686 | return b; |
1687 | } |
1687 | } |
1688 | 1688 | ||
1689 | #ifndef YY_EXIT_FAILURE |
1689 | #ifndef YY_EXIT_FAILURE |
1690 | #define YY_EXIT_FAILURE 2 |
1690 | #define YY_EXIT_FAILURE 2 |
1691 | #endif |
1691 | #endif |
1692 | 1692 | ||
1693 | static void yy_fatal_error (yyconst char* msg ) |
1693 | static void yy_fatal_error (yyconst char* msg ) |
1694 | { |
1694 | { |
1695 | (void) fprintf( stderr, "%s\n", msg ); |
1695 | (void) fprintf( stderr, "%s\n", msg ); |
1696 | exit( YY_EXIT_FAILURE ); |
1696 | exit( YY_EXIT_FAILURE ); |
1697 | } |
1697 | } |
1698 | 1698 | ||
1699 | /* Redefine yyless() so it works in section 3 code. */ |
1699 | /* Redefine yyless() so it works in section 3 code. */ |
1700 | 1700 | ||
1701 | #undef yyless |
1701 | #undef yyless |
1702 | #define yyless(n) \ |
1702 | #define yyless(n) \ |
1703 | do \ |
1703 | do \ |
1704 | { \ |
1704 | { \ |
1705 | /* Undo effects of setting up yytext. */ \ |
1705 | /* Undo effects of setting up yytext. */ \ |
1706 | int yyless_macro_arg = (n); \ |
1706 | int yyless_macro_arg = (n); \ |
1707 | YY_LESS_LINENO(yyless_macro_arg);\ |
1707 | YY_LESS_LINENO(yyless_macro_arg);\ |
1708 | yytext[yyleng] = (yy_hold_char); \ |
1708 | yytext[yyleng] = (yy_hold_char); \ |
1709 | (yy_c_buf_p) = yytext + yyless_macro_arg; \ |
1709 | (yy_c_buf_p) = yytext + yyless_macro_arg; \ |
1710 | (yy_hold_char) = *(yy_c_buf_p); \ |
1710 | (yy_hold_char) = *(yy_c_buf_p); \ |
1711 | *(yy_c_buf_p) = '\0'; \ |
1711 | *(yy_c_buf_p) = '\0'; \ |
1712 | yyleng = yyless_macro_arg; \ |
1712 | yyleng = yyless_macro_arg; \ |
1713 | } \ |
1713 | } \ |
1714 | while ( 0 ) |
1714 | while ( 0 ) |
1715 | 1715 | ||
1716 | /* Accessor methods (get/set functions) to struct members. */ |
1716 | /* Accessor methods (get/set functions) to struct members. */ |
1717 | 1717 | ||
1718 | /** Get the current line number. |
1718 | /** Get the current line number. |
1719 | * |
1719 | * |
1720 | */ |
1720 | */ |
1721 | int yyget_lineno (void) |
1721 | int yyget_lineno (void) |
1722 | { |
1722 | { |
1723 | 1723 | ||
1724 | return yylineno; |
1724 | return yylineno; |
1725 | } |
1725 | } |
1726 | 1726 | ||
1727 | /** Get the input stream. |
1727 | /** Get the input stream. |
1728 | * |
1728 | * |
1729 | */ |
1729 | */ |
1730 | FILE *yyget_in (void) |
1730 | FILE *yyget_in (void) |
1731 | { |
1731 | { |
1732 | return yyin; |
1732 | return yyin; |
1733 | } |
1733 | } |
1734 | 1734 | ||
1735 | /** Get the output stream. |
1735 | /** Get the output stream. |
1736 | * |
1736 | * |
1737 | */ |
1737 | */ |
1738 | FILE *yyget_out (void) |
1738 | FILE *yyget_out (void) |
1739 | { |
1739 | { |
1740 | return yyout; |
1740 | return yyout; |
1741 | } |
1741 | } |
1742 | 1742 | ||
1743 | /** Get the length of the current token. |
1743 | /** Get the length of the current token. |
1744 | * |
1744 | * |
1745 | */ |
1745 | */ |
1746 | int yyget_leng (void) |
1746 | int yyget_leng (void) |
1747 | { |
1747 | { |
1748 | return yyleng; |
1748 | return yyleng; |
1749 | } |
1749 | } |
1750 | 1750 | ||
1751 | /** Get the current token. |
1751 | /** Get the current token. |
1752 | * |
1752 | * |
1753 | */ |
1753 | */ |
1754 | 1754 | ||
1755 | char *yyget_text (void) |
1755 | char *yyget_text (void) |
1756 | { |
1756 | { |
1757 | return yytext; |
1757 | return yytext; |
1758 | } |
1758 | } |
1759 | 1759 | ||
1760 | /** Set the current line number. |
1760 | /** Set the current line number. |
1761 | * @param line_number |
1761 | * @param line_number |
1762 | * |
1762 | * |
1763 | */ |
1763 | */ |
1764 | void yyset_lineno (int line_number ) |
1764 | void yyset_lineno (int line_number ) |
1765 | { |
1765 | { |
1766 | 1766 | ||
1767 | yylineno = line_number; |
1767 | yylineno = line_number; |
1768 | } |
1768 | } |
1769 | 1769 | ||
1770 | /** Set the input stream. This does not discard the current |
1770 | /** Set the input stream. This does not discard the current |
1771 | * input buffer. |
1771 | * input buffer. |
1772 | * @param in_str A readable stream. |
1772 | * @param in_str A readable stream. |
1773 | * |
1773 | * |
1774 | * @see yy_switch_to_buffer |
1774 | * @see yy_switch_to_buffer |
1775 | */ |
1775 | */ |
1776 | void yyset_in (FILE * in_str ) |
1776 | void yyset_in (FILE * in_str ) |
1777 | { |
1777 | { |
1778 | yyin = in_str ; |
1778 | yyin = in_str ; |
1779 | } |
1779 | } |
1780 | 1780 | ||
1781 | void yyset_out (FILE * out_str ) |
1781 | void yyset_out (FILE * out_str ) |
1782 | { |
1782 | { |
1783 | yyout = out_str ; |
1783 | yyout = out_str ; |
1784 | } |
1784 | } |
1785 | 1785 | ||
1786 | int yyget_debug (void) |
1786 | int yyget_debug (void) |
1787 | { |
1787 | { |
1788 | return yy_flex_debug; |
1788 | return yy_flex_debug; |
1789 | } |
1789 | } |
1790 | 1790 | ||
1791 | void yyset_debug (int bdebug ) |
1791 | void yyset_debug (int bdebug ) |
1792 | { |
1792 | { |
1793 | yy_flex_debug = bdebug ; |
1793 | yy_flex_debug = bdebug ; |
1794 | } |
1794 | } |
1795 | 1795 | ||
1796 | static int yy_init_globals (void) |
1796 | static int yy_init_globals (void) |
1797 | { |
1797 | { |
1798 | /* Initialization is the same as for the non-reentrant scanner. |
1798 | /* Initialization is the same as for the non-reentrant scanner. |
1799 | * This function is called from yylex_destroy(), so don't allocate here. |
1799 | * This function is called from yylex_destroy(), so don't allocate here. |
1800 | */ |
1800 | */ |
1801 | 1801 | ||
1802 | (yy_buffer_stack) = 0; |
1802 | (yy_buffer_stack) = 0; |
1803 | (yy_buffer_stack_top) = 0; |
1803 | (yy_buffer_stack_top) = 0; |
1804 | (yy_buffer_stack_max) = 0; |
1804 | (yy_buffer_stack_max) = 0; |
1805 | (yy_c_buf_p) = (char *) 0; |
1805 | (yy_c_buf_p) = (char *) 0; |
1806 | (yy_init) = 0; |
1806 | (yy_init) = 0; |
1807 | (yy_start) = 0; |
1807 | (yy_start) = 0; |
1808 | 1808 | ||
1809 | /* Defined in main.c */ |
1809 | /* Defined in main.c */ |
1810 | #ifdef YY_STDINIT |
1810 | #ifdef YY_STDINIT |
1811 | yyin = stdin; |
1811 | yyin = stdin; |
1812 | yyout = stdout; |
1812 | yyout = stdout; |
1813 | #else |
1813 | #else |
1814 | yyin = (FILE *) 0; |
1814 | yyin = (FILE *) 0; |
1815 | yyout = (FILE *) 0; |
1815 | yyout = (FILE *) 0; |
1816 | #endif |
1816 | #endif |
1817 | 1817 | ||
1818 | /* For future reference: Set errno on error, since we are called by |
1818 | /* For future reference: Set errno on error, since we are called by |
1819 | * yylex_init() |
1819 | * yylex_init() |
1820 | */ |
1820 | */ |
1821 | return 0; |
1821 | return 0; |
1822 | } |
1822 | } |
1823 | 1823 | ||
1824 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
1824 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
1825 | int yylex_destroy (void) |
1825 | int yylex_destroy (void) |
1826 | { |
1826 | { |
1827 | 1827 | ||
1828 | /* Pop the buffer stack, destroying each element. */ |
1828 | /* Pop the buffer stack, destroying each element. */ |
1829 | while(YY_CURRENT_BUFFER){ |
1829 | while(YY_CURRENT_BUFFER){ |
1830 | yy_delete_buffer(YY_CURRENT_BUFFER ); |
1830 | yy_delete_buffer(YY_CURRENT_BUFFER ); |
1831 | YY_CURRENT_BUFFER_LVALUE = NULL; |
1831 | YY_CURRENT_BUFFER_LVALUE = NULL; |
1832 | yypop_buffer_state(); |
1832 | yypop_buffer_state(); |
1833 | } |
1833 | } |
1834 | 1834 | ||
1835 | /* Destroy the stack itself. */ |
1835 | /* Destroy the stack itself. */ |
1836 | yyfree((yy_buffer_stack) ); |
1836 | yyfree((yy_buffer_stack) ); |
1837 | (yy_buffer_stack) = NULL; |
1837 | (yy_buffer_stack) = NULL; |
1838 | 1838 | ||
1839 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
1839 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
1840 | * yylex() is called, initialization will occur. */ |
1840 | * yylex() is called, initialization will occur. */ |
1841 | yy_init_globals( ); |
1841 | yy_init_globals( ); |
1842 | 1842 | ||
1843 | return 0; |
1843 | return 0; |
1844 | } |
1844 | } |
1845 | 1845 | ||
1846 | /* |
1846 | /* |
1847 | * Internal utility routines. |
1847 | * Internal utility routines. |
1848 | */ |
1848 | */ |
1849 | 1849 | ||
1850 | #ifndef yytext_ptr |
1850 | #ifndef yytext_ptr |
1851 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) |
1851 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) |
1852 | { |
1852 | { |
1853 | register int i; |
1853 | register int i; |
1854 | for ( i = 0; i < n; ++i ) |
1854 | for ( i = 0; i < n; ++i ) |
1855 | s1[i] = s2[i]; |
1855 | s1[i] = s2[i]; |
1856 | } |
1856 | } |
1857 | #endif |
1857 | #endif |
1858 | 1858 | ||
1859 | #ifdef YY_NEED_STRLEN |
1859 | #ifdef YY_NEED_STRLEN |
1860 | static int yy_flex_strlen (yyconst char * s ) |
1860 | static int yy_flex_strlen (yyconst char * s ) |
1861 | { |
1861 | { |
1862 | register int n; |
1862 | register int n; |
1863 | for ( n = 0; s[n]; ++n ) |
1863 | for ( n = 0; s[n]; ++n ) |
1864 | ; |
1864 | ; |
1865 | 1865 | ||
1866 | return n; |
1866 | return n; |
1867 | } |
1867 | } |
1868 | #endif |
1868 | #endif |
1869 | 1869 | ||
1870 | void *yyalloc (yy_size_t size ) |
1870 | void *yyalloc (yy_size_t size ) |
1871 | { |
1871 | { |
1872 | return (void *) malloc( size ); |
1872 | return (void *) malloc( size ); |
1873 | } |
1873 | } |
1874 | 1874 | ||
1875 | void *yyrealloc (void * ptr, yy_size_t size ) |
1875 | void *yyrealloc (void * ptr, yy_size_t size ) |
1876 | { |
1876 | { |
1877 | /* The cast to (char *) in the following accommodates both |
1877 | /* The cast to (char *) in the following accommodates both |
1878 | * implementations that use char* generic pointers, and those |
1878 | * implementations that use char* generic pointers, and those |
1879 | * that use void* generic pointers. It works with the latter |
1879 | * that use void* generic pointers. It works with the latter |
1880 | * because both ANSI C and C++ allow castless assignment from |
1880 | * because both ANSI C and C++ allow castless assignment from |
1881 | * any pointer type to void*, and deal with argument conversions |
1881 | * any pointer type to void*, and deal with argument conversions |
1882 | * as though doing an assignment. |
1882 | * as though doing an assignment. |
1883 | */ |
1883 | */ |
1884 | return (void *) realloc( (char *) ptr, size ); |
1884 | return (void *) realloc( (char *) ptr, size ); |
1885 | } |
1885 | } |
1886 | 1886 | ||
1887 | void yyfree (void * ptr ) |
1887 | void yyfree (void * ptr ) |
1888 | { |
1888 | { |
1889 | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
1889 | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
1890 | } |
1890 | } |
1891 | 1891 | ||
1892 | #define YYTABLES_NAME "yytables" |
1892 | #define YYTABLES_NAME "yytables" |
1893 | 1893 | ||
1894 | #line 88 "arith_lex.l" |
1894 | #line 88 "arith_lex.l" |
1895 | 1895 | ||
1896 | 1896 | ||
1897 | 1897 | ||
1898 | void |
1898 | void |
1899 | arith_lex_reset() { |
1899 | arith_lex_reset() { |
1900 | #ifdef YY_NEW_FILE |
1900 | #ifdef YY_NEW_FILE |
1901 | YY_NEW_FILE; |
1901 | YY_NEW_FILE; |
1902 | #endif |
1902 | #endif |
1903 | } |
1903 | } |
1904 | 1904 | ||
1905 | 1905 |