1 | #line 2 "dt_lex.c"
|
---|
2 | /* A lexical scanner generated by flex */
|
---|
3 |
|
---|
4 | /* Scanner skeleton version:
|
---|
5 | * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
|
---|
6 | */
|
---|
7 |
|
---|
8 | #define FLEX_SCANNER
|
---|
9 | #define YY_FLEX_MAJOR_VERSION 2
|
---|
10 | #define YY_FLEX_MINOR_VERSION 5
|
---|
11 |
|
---|
12 | #include <stdio.h>
|
---|
13 |
|
---|
14 |
|
---|
15 | /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
|
---|
16 | #ifdef c_plusplus
|
---|
17 | #ifndef __cplusplus
|
---|
18 | #define __cplusplus
|
---|
19 | #endif
|
---|
20 | #endif
|
---|
21 |
|
---|
22 |
|
---|
23 | #ifdef __cplusplus
|
---|
24 |
|
---|
25 | #include <stdlib.h>
|
---|
26 | #include <unistd.h>
|
---|
27 |
|
---|
28 | /* Use prototypes in function declarations. */
|
---|
29 | #define YY_USE_PROTOS
|
---|
30 |
|
---|
31 | /* The "const" storage-class-modifier is valid. */
|
---|
32 | #define YY_USE_CONST
|
---|
33 |
|
---|
34 | #else /* ! __cplusplus */
|
---|
35 |
|
---|
36 | #if __STDC__
|
---|
37 |
|
---|
38 | #define YY_USE_PROTOS
|
---|
39 | #define YY_USE_CONST
|
---|
40 |
|
---|
41 | #endif /* __STDC__ */
|
---|
42 | #endif /* ! __cplusplus */
|
---|
43 |
|
---|
44 | #ifdef __TURBOC__
|
---|
45 | #pragma warn -rch
|
---|
46 | #pragma warn -use
|
---|
47 | #include <io.h>
|
---|
48 | #include <stdlib.h>
|
---|
49 | #define YY_USE_CONST
|
---|
50 | #define YY_USE_PROTOS
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | #ifdef YY_USE_CONST
|
---|
54 | #define yyconst const
|
---|
55 | #else
|
---|
56 | #define yyconst
|
---|
57 | #endif
|
---|
58 |
|
---|
59 |
|
---|
60 | #ifdef YY_USE_PROTOS
|
---|
61 | #define YY_PROTO(proto) proto
|
---|
62 | #else
|
---|
63 | #define YY_PROTO(proto) ()
|
---|
64 | #endif
|
---|
65 |
|
---|
66 | /* Returned upon end-of-file. */
|
---|
67 | #define YY_NULL 0
|
---|
68 |
|
---|
69 | /* Promotes a possibly negative, possibly signed char to an unsigned
|
---|
70 | * integer for use as an array index. If the signed char is negative,
|
---|
71 | * we want to instead treat it as an 8-bit unsigned char, hence the
|
---|
72 | * double cast.
|
---|
73 | */
|
---|
74 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
---|
75 |
|
---|
76 | /* Enter a start condition. This macro really ought to take a parameter,
|
---|
77 | * but we do it the disgusting crufty way forced on us by the ()-less
|
---|
78 | * definition of BEGIN.
|
---|
79 | */
|
---|
80 | #define BEGIN yy_start = 1 + 2 *
|
---|
81 |
|
---|
82 | /* Translate the current start state into a value that can be later handed
|
---|
83 | * to BEGIN to return to the state. The YYSTATE alias is for lex
|
---|
84 | * compatibility.
|
---|
85 | */
|
---|
86 | #define YY_START ((yy_start - 1) / 2)
|
---|
87 | #define YYSTATE YY_START
|
---|
88 |
|
---|
89 | /* Action number for EOF rule of a given start state. */
|
---|
90 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
---|
91 |
|
---|
92 | /* Special action meaning "start processing a new file". */
|
---|
93 | #define YY_NEW_FILE yyrestart( yyin )
|
---|
94 |
|
---|
95 | #define YY_END_OF_BUFFER_CHAR 0
|
---|
96 |
|
---|
97 | /* Size of default input buffer. */
|
---|
98 | #define YY_BUF_SIZE 16384
|
---|
99 |
|
---|
100 | typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
---|
101 |
|
---|
102 | extern int yyleng;
|
---|
103 | extern FILE *yyin, *yyout;
|
---|
104 |
|
---|
105 | #define EOB_ACT_CONTINUE_SCAN 0
|
---|
106 | #define EOB_ACT_END_OF_FILE 1
|
---|
107 | #define EOB_ACT_LAST_MATCH 2
|
---|
108 |
|
---|
109 | /* The funky do-while in the following #define is used to turn the definition
|
---|
110 | * int a single C statement (which needs a semi-colon terminator). This
|
---|
111 | * avoids problems with code like:
|
---|
112 | *
|
---|
113 | * if ( condition_holds )
|
---|
114 | * yyless( 5 );
|
---|
115 | * else
|
---|
116 | * do_something_else();
|
---|
117 | *
|
---|
118 | * Prior to using the do-while the compiler would get upset at the
|
---|
119 | * "else" because it interpreted the "if" statement as being all
|
---|
120 | * done when it reached the ';' after the yyless() call.
|
---|
121 | */
|
---|
122 |
|
---|
123 | /* Return all but the first 'n' matched characters back to the input stream. */
|
---|
124 |
|
---|
125 | #define yyless(n) \
|
---|
126 | do \
|
---|
127 | { \
|
---|
128 | /* Undo effects of setting up yytext. */ \
|
---|
129 | *yy_cp = yy_hold_char; \
|
---|
130 | YY_RESTORE_YY_MORE_OFFSET \
|
---|
131 | yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
|
---|
132 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
---|
133 | } \
|
---|
134 | while ( 0 )
|
---|
135 |
|
---|
136 | #define unput(c) yyunput( c, yytext_ptr )
|
---|
137 |
|
---|
138 | /* The following is because we cannot portably get our hands on size_t
|
---|
139 | * (without autoconf's help, which isn't available because we want
|
---|
140 | * flex-generated scanners to compile on their own).
|
---|
141 | */
|
---|
142 | typedef unsigned int yy_size_t;
|
---|
143 |
|
---|
144 |
|
---|
145 | struct yy_buffer_state
|
---|
146 | {
|
---|
147 | FILE *yy_input_file;
|
---|
148 |
|
---|
149 | char *yy_ch_buf; /* input buffer */
|
---|
150 | char *yy_buf_pos; /* current position in input buffer */
|
---|
151 |
|
---|
152 | /* Size of input buffer in bytes, not including room for EOB
|
---|
153 | * characters.
|
---|
154 | */
|
---|
155 | yy_size_t yy_buf_size;
|
---|
156 |
|
---|
157 | /* Number of characters read into yy_ch_buf, not including EOB
|
---|
158 | * characters.
|
---|
159 | */
|
---|
160 | int yy_n_chars;
|
---|
161 |
|
---|
162 | /* Whether we "own" the buffer - i.e., we know we created it,
|
---|
163 | * and can realloc() it to grow it, and should free() it to
|
---|
164 | * delete it.
|
---|
165 | */
|
---|
166 | int yy_is_our_buffer;
|
---|
167 |
|
---|
168 | /* Whether this is an "interactive" input source; if so, and
|
---|
169 | * if we're using stdio for input, then we want to use getc()
|
---|
170 | * instead of fread(), to make sure we stop fetching input after
|
---|
171 | * each newline.
|
---|
172 | */
|
---|
173 | int yy_is_interactive;
|
---|
174 |
|
---|
175 | /* Whether we're considered to be at the beginning of a line.
|
---|
176 | * If so, '^' rules will be active on the next match, otherwise
|
---|
177 | * not.
|
---|
178 | */
|
---|
179 | int yy_at_bol;
|
---|
180 |
|
---|
181 | /* Whether to try to fill the input buffer when we reach the
|
---|
182 | * end of it.
|
---|
183 | */
|
---|
184 | int yy_fill_buffer;
|
---|
185 |
|
---|
186 | int yy_buffer_status;
|
---|
187 | #define YY_BUFFER_NEW 0
|
---|
188 | #define YY_BUFFER_NORMAL 1
|
---|
189 | /* When an EOF's been seen but there's still some text to process
|
---|
190 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
---|
191 | * shouldn't try reading from the input source any more. We might
|
---|
192 | * still have a bunch of tokens to match, though, because of
|
---|
193 | * possible backing-up.
|
---|
194 | *
|
---|
195 | * When we actually see the EOF, we change the status to "new"
|
---|
196 | * (via yyrestart()), so that the user can continue scanning by
|
---|
197 | * just pointing yyin at a new input file.
|
---|
198 | */
|
---|
199 | #define YY_BUFFER_EOF_PENDING 2
|
---|
200 | };
|
---|
201 |
|
---|
202 | static YY_BUFFER_STATE yy_current_buffer = 0;
|
---|
203 |
|
---|
204 | /* We provide macros for accessing buffer states in case in the
|
---|
205 | * future we want to put the buffer states in a more general
|
---|
206 | * "scanner state".
|
---|
207 | */
|
---|
208 | #define YY_CURRENT_BUFFER yy_current_buffer
|
---|
209 |
|
---|
210 |
|
---|
211 | /* yy_hold_char holds the character lost when yytext is formed. */
|
---|
212 | static char yy_hold_char;
|
---|
213 |
|
---|
214 | static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
---|
215 |
|
---|
216 |
|
---|
217 | int yyleng;
|
---|
218 |
|
---|
219 | /* Points to current character in buffer. */
|
---|
220 | static char *yy_c_buf_p = (char *) 0;
|
---|
221 | static int yy_init = 1; /* whether we need to initialize */
|
---|
222 | static int yy_start = 0; /* start state number */
|
---|
223 |
|
---|
224 | /* Flag which is used to allow yywrap()'s to do buffer switches
|
---|
225 | * instead of setting up a fresh yyin. A bit of a hack ...
|
---|
226 | */
|
---|
227 | static int yy_did_buffer_switch_on_eof;
|
---|
228 |
|
---|
229 | void yyrestart YY_PROTO(( FILE *input_file ));
|
---|
230 |
|
---|
231 | void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
|
---|
232 | void yy_load_buffer_state YY_PROTO(( void ));
|
---|
233 | YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
|
---|
234 | void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
|
---|
235 | void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
|
---|
236 | void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
|
---|
237 | #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
|
---|
238 |
|
---|
239 | YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
|
---|
240 | YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
|
---|
241 | YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
|
---|
242 |
|
---|
243 | static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
|
---|
244 | static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
|
---|
245 | static void yy_flex_free YY_PROTO(( void * ));
|
---|
246 |
|
---|
247 | #define yy_new_buffer yy_create_buffer
|
---|
248 |
|
---|
249 | #define yy_set_interactive(is_interactive) \
|
---|
250 | { \
|
---|
251 | if ( ! yy_current_buffer ) \
|
---|
252 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
---|
253 | yy_current_buffer->yy_is_interactive = is_interactive; \
|
---|
254 | }
|
---|
255 |
|
---|
256 | #define yy_set_bol(at_bol) \
|
---|
257 | { \
|
---|
258 | if ( ! yy_current_buffer ) \
|
---|
259 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
---|
260 | yy_current_buffer->yy_at_bol = at_bol; \
|
---|
261 | }
|
---|
262 |
|
---|
263 | #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
|
---|
264 |
|
---|
265 |
|
---|
266 | #define YY_USES_REJECT
|
---|
267 | typedef unsigned char YY_CHAR;
|
---|
268 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
|
---|
269 | typedef int yy_state_type;
|
---|
270 | #define YY_FLEX_LEX_COMPAT
|
---|
271 | extern int yylineno;
|
---|
272 | int yylineno = 1;
|
---|
273 | extern char yytext[];
|
---|
274 |
|
---|
275 |
|
---|
276 | static yy_state_type yy_get_previous_state YY_PROTO(( void ));
|
---|
277 | static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
|
---|
278 | static int yy_get_next_buffer YY_PROTO(( void ));
|
---|
279 | static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
|
---|
280 |
|
---|
281 | /* Done after the current pattern has been matched and before the
|
---|
282 | * corresponding action - sets up yytext.
|
---|
283 | */
|
---|
284 | #define YY_DO_BEFORE_ACTION \
|
---|
285 | yytext_ptr = yy_bp; \
|
---|
286 | yyleng = (int) (yy_cp - yy_bp); \
|
---|
287 | yy_hold_char = *yy_cp; \
|
---|
288 | *yy_cp = '\0'; \
|
---|
289 | if ( yyleng + yy_more_offset >= YYLMAX ) \
|
---|
290 | YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
|
---|
291 | yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \
|
---|
292 | yyleng += yy_more_offset; \
|
---|
293 | yy_prev_more_offset = yy_more_offset; \
|
---|
294 | yy_more_offset = 0; \
|
---|
295 | yy_c_buf_p = yy_cp;
|
---|
296 |
|
---|
297 | #define YY_NUM_RULES 162
|
---|
298 | #define YY_END_OF_BUFFER 163
|
---|
299 | static yyconst short int yy_acclist[740] =
|
---|
300 | { 0,
|
---|
301 | 163, 162, 149, 162, 147, 149, 162, 147, 162, 126,
|
---|
302 | 149, 162, 149, 162,16469, 149, 162, 124, 149, 162,
|
---|
303 | 109, 149, 162, 149, 162,16472, 100, 149, 162, 101,
|
---|
304 | 149, 162, 123, 149, 162, 121, 149, 162, 145, 149,
|
---|
305 | 162, 122, 149, 162, 129, 149, 162, 99, 149, 162,
|
---|
306 | 81, 84, 149, 162, 81, 84, 149, 162, 128, 149,
|
---|
307 | 162, 146, 149, 162, 115, 149, 162, 131, 149, 162,
|
---|
308 | 117, 149, 162, 127, 149, 162, 80, 149, 162, 78,
|
---|
309 | 149, 162, 102, 149, 162, 149, 162, 103, 149, 162,
|
---|
310 | 108, 149, 162, 78, 149, 162, 78, 149, 162, 78,
|
---|
311 |
|
---|
312 | 149, 162, 78, 149, 162, 78, 149, 162, 78, 149,
|
---|
313 | 162, 78, 149, 162, 78, 149, 162, 78, 149, 162,
|
---|
314 | 78, 149, 162, 78, 149, 162, 78, 149, 162, 78,
|
---|
315 | 149, 162, 78, 149, 162, 78, 149, 162, 78, 149,
|
---|
316 | 162, 78, 149, 162, 78, 149, 162, 104, 149, 162,
|
---|
317 | 107, 149, 162, 106, 149, 162, 125, 149, 162, 147,
|
---|
318 | 149, 162, 94, 149, 162, 152, 162, 152, 162, 152,
|
---|
319 | 162, 157, 162, 156, 157, 162, 156, 162, 153, 157,
|
---|
320 | 162, 155, 157, 162, 154, 157, 162, 82, 157, 162,
|
---|
321 | 82, 157, 162, 153, 157, 162, 153, 157, 162, 153,
|
---|
322 |
|
---|
323 | 157, 162, 153, 157, 162, 153, 157, 162, 153, 157,
|
---|
324 | 162, 153, 157, 162, 153, 157, 162, 153, 157, 162,
|
---|
325 | 153, 157, 162, 153, 157, 162, 153, 157, 162, 153,
|
---|
326 | 157, 162, 105, 157, 162, 156, 157, 162, 95, 157,
|
---|
327 | 162, 160, 161, 162, 159, 161, 162, 158, 162, 161,
|
---|
328 | 162,16469, 83, 160, 161, 162, 83, 160, 161, 162,
|
---|
329 | 97, 162, 98, 162, 97, 162, 96, 97, 162, 114,
|
---|
330 | 16469, 8277, 86, 75, 77, 136, 110, 137,16472, 8280,
|
---|
331 | 89, 134, 142, 132, 143, 133, 130, 84, 90, 135,
|
---|
332 | 84, 81, 84, 84, 81, 84, 81, 119, 116, 113,
|
---|
333 |
|
---|
334 | 118, 120, 79, 78, 148, 138, 111, 78, 78, 78,
|
---|
335 | 78, 78, 78, 9, 78, 78, 78, 78, 78, 78,
|
---|
336 | 78, 17, 78, 78, 78, 78, 78, 78, 78, 78,
|
---|
337 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
|
---|
338 | 78, 139, 112, 94, 92, 151, 150, 153, 91, 82,
|
---|
339 | 82, 82, 153, 153, 153, 153, 153, 153, 153, 153,
|
---|
340 | 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
|
---|
341 | 153, 153, 153, 95, 93, 160, 159,16469, 87, 83,
|
---|
342 | 160, 83, 160, 83, 160, 160, 96, 74, 76, 77,
|
---|
343 | 144, 84, 84, 81, 81, 81, 140, 141, 79, 78,
|
---|
344 |
|
---|
345 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
|
---|
346 | 78, 15, 78, 78, 78, 78, 20, 78, 78, 78,
|
---|
347 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
|
---|
348 | 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
|
---|
349 | 92, 82, 82, 153, 153, 153, 153, 153, 153, 153,
|
---|
350 | 153, 153, 153, 56, 153, 153, 153, 153, 153, 153,
|
---|
351 | 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
|
---|
352 | 153, 93, 83, 160, 83, 160, 76, 1, 78, 78,
|
---|
353 | 3, 78, 4, 78, 78, 78, 78, 78, 78, 11,
|
---|
354 | 78, 12, 78, 78, 78, 16, 78, 78, 78, 21,
|
---|
355 |
|
---|
356 | 78, 78, 78, 78, 78, 78, 78, 28, 78, 78,
|
---|
357 | 78, 78, 78, 78, 78, 78, 37, 78, 78, 78,
|
---|
358 | 78, 78, 42, 78, 78, 78, 78, 46, 153, 47,
|
---|
359 | 153, 153, 153, 153, 51, 153, 153, 153, 153, 153,
|
---|
360 | 57, 153, 153, 153, 153, 61, 153, 153, 153, 153,
|
---|
361 | 153, 153, 67, 153, 153, 153, 153, 153, 72, 153,
|
---|
362 | 153, 2, 78, 5, 78, 78, 78, 78, 78, 78,
|
---|
363 | 14, 78, 78, 78, 78, 23, 78, 78, 78, 78,
|
---|
364 | 78, 29, 78, 78, 78, 78, 78, 78, 78, 78,
|
---|
365 | 78, 40, 78, 78, 78, 44, 78, 45, 78, 48,
|
---|
366 |
|
---|
367 | 153, 153, 153, 153, 53, 153, 153, 153, 153, 153,
|
---|
368 | 153, 62, 153, 153, 153, 153, 153, 153, 153, 70,
|
---|
369 | 153, 153, 153, 78, 78, 78, 10, 78, 13, 78,
|
---|
370 | 18, 78, 19, 78, 78, 78, 78, 78, 27, 78,
|
---|
371 | 30, 78, 31, 78, 32, 78, 33, 78, 35, 78,
|
---|
372 | 36, 78, 78, 78, 78, 78, 153, 50, 153, 52,
|
---|
373 | 153, 54, 153, 55, 153, 153, 153, 153, 63, 153,
|
---|
374 | 64, 153, 65, 153, 66, 153, 153, 153, 153, 153,
|
---|
375 | 78, 7, 78, 8, 78, 78, 78, 78, 78, 78,
|
---|
376 | 78, 39, 78, 78, 78, 49, 153, 153, 153, 153,
|
---|
377 |
|
---|
378 | 153, 69, 153, 153, 153, 6, 78, 22, 78, 24,
|
---|
379 | 78, 25, 78, 26, 78, 34, 78, 78, 41, 78,
|
---|
380 | 43, 78, 58, 153, 59, 153, 60, 153, 153, 71,
|
---|
381 | 153, 73, 153, 78, 153, 38, 78, 68, 153
|
---|
382 | } ;
|
---|
383 |
|
---|
384 | static yyconst short int yy_accept[511] =
|
---|
385 | { 0,
|
---|
386 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
387 | 1, 1, 1, 2, 3, 5, 8, 10, 13, 16,
|
---|
388 | 18, 21, 24, 27, 30, 33, 36, 39, 42, 45,
|
---|
389 | 48, 51, 55, 59, 62, 65, 68, 71, 74, 77,
|
---|
390 | 80, 83, 86, 88, 91, 94, 97, 100, 103, 106,
|
---|
391 | 109, 112, 115, 118, 121, 124, 127, 130, 133, 136,
|
---|
392 | 139, 142, 145, 148, 151, 154, 157, 160, 163, 166,
|
---|
393 | 168, 170, 172, 174, 177, 179, 182, 185, 188, 191,
|
---|
394 | 194, 197, 200, 203, 206, 209, 212, 215, 218, 221,
|
---|
395 | 224, 227, 230, 233, 236, 239, 242, 245, 248, 250,
|
---|
396 |
|
---|
397 | 253, 257, 261, 263, 265, 267, 270, 271, 272, 273,
|
---|
398 | 274, 274, 274, 275, 276, 277, 278, 279, 280, 281,
|
---|
399 | 282, 282, 283, 284, 285, 286, 287, 288, 288, 289,
|
---|
400 | 290, 291, 292, 294, 294, 295, 297, 298, 298, 299,
|
---|
401 | 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
|
---|
402 | 310, 311, 312, 313, 314, 316, 317, 318, 319, 320,
|
---|
403 | 321, 322, 324, 325, 326, 327, 328, 329, 330, 331,
|
---|
404 | 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
|
---|
405 | 342, 343, 344, 344, 345, 346, 347, 348, 349, 350,
|
---|
406 | 351, 352, 353, 353, 354, 355, 356, 357, 358, 359,
|
---|
407 |
|
---|
408 | 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
|
---|
409 | 370, 371, 372, 373, 374, 374, 375, 376, 377, 378,
|
---|
410 | 379, 380, 380, 382, 384, 386, 387, 387, 388, 389,
|
---|
411 | 390, 391, 392, 393, 393, 394, 395, 396, 397, 398,
|
---|
412 | 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
|
---|
413 | 409, 410, 411, 412, 414, 415, 416, 417, 419, 420,
|
---|
414 | 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
|
---|
415 | 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
|
---|
416 | 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
|
---|
417 | 451, 452, 453, 454, 456, 457, 458, 459, 460, 461,
|
---|
418 |
|
---|
419 | 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
|
---|
420 | 472, 473, 475, 477, 478, 480, 481, 483, 485, 486,
|
---|
421 | 487, 488, 489, 490, 492, 494, 495, 496, 498, 499,
|
---|
422 | 500, 502, 503, 504, 505, 506, 507, 508, 510, 511,
|
---|
423 | 512, 513, 514, 515, 516, 517, 519, 520, 521, 522,
|
---|
424 | 523, 525, 526, 527, 528, 530, 532, 533, 534, 535,
|
---|
425 | 537, 538, 539, 540, 541, 543, 544, 545, 546, 548,
|
---|
426 | 549, 550, 551, 552, 553, 555, 556, 557, 558, 559,
|
---|
427 | 561, 562, 564, 566, 567, 568, 569, 570, 571, 573,
|
---|
428 | 574, 575, 576, 578, 579, 580, 581, 582, 584, 585,
|
---|
429 |
|
---|
430 | 586, 587, 588, 589, 590, 591, 592, 594, 595, 596,
|
---|
431 | 598, 600, 602, 603, 604, 605, 607, 608, 609, 610,
|
---|
432 | 611, 612, 614, 615, 616, 617, 618, 619, 620, 622,
|
---|
433 | 623, 624, 625, 626, 627, 629, 631, 633, 635, 636,
|
---|
434 | 637, 638, 639, 641, 643, 645, 647, 649, 651, 653,
|
---|
435 | 654, 655, 656, 657, 658, 660, 662, 664, 666, 667,
|
---|
436 | 668, 669, 671, 673, 675, 677, 678, 679, 680, 681,
|
---|
437 | 682, 684, 686, 687, 688, 689, 690, 691, 692, 694,
|
---|
438 | 695, 696, 698, 699, 700, 701, 702, 704, 705, 706,
|
---|
439 | 708, 710, 712, 714, 716, 718, 719, 721, 723, 725,
|
---|
440 |
|
---|
441 | 727, 729, 730, 732, 734, 735, 736, 738, 740, 740
|
---|
442 | } ;
|
---|
443 |
|
---|
444 | static yyconst int yy_ec[256] =
|
---|
445 | { 0,
|
---|
446 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
---|
447 | 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
|
---|
448 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
449 | 1, 2, 5, 6, 7, 8, 9, 10, 11, 12,
|
---|
450 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 21,
|
---|
451 | 21, 21, 21, 21, 21, 21, 21, 22, 23, 24,
|
---|
452 | 25, 26, 27, 28, 29, 29, 29, 29, 30, 31,
|
---|
453 | 32, 32, 32, 32, 32, 33, 32, 32, 32, 32,
|
---|
454 | 32, 32, 32, 32, 34, 32, 32, 35, 32, 32,
|
---|
455 | 36, 37, 38, 39, 32, 40, 41, 42, 43, 44,
|
---|
456 |
|
---|
457 | 45, 46, 47, 48, 49, 32, 50, 51, 52, 53,
|
---|
458 | 54, 55, 32, 56, 57, 58, 59, 60, 61, 62,
|
---|
459 | 63, 64, 65, 66, 67, 68, 1, 1, 1, 1,
|
---|
460 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
461 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
462 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
463 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
464 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
465 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
466 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
467 |
|
---|
468 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
469 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
470 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
471 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
472 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
473 | 1, 1, 1, 1, 1
|
---|
474 | } ;
|
---|
475 |
|
---|
476 | static yyconst int yy_meta[69] =
|
---|
477 | { 0,
|
---|
478 | 1, 2, 3, 1, 4, 2, 1, 5, 1, 1,
|
---|
479 | 1, 1, 1, 4, 1, 1, 4, 4, 1, 6,
|
---|
480 | 6, 4, 1, 1, 1, 1, 4, 1, 7, 7,
|
---|
481 | 7, 8, 8, 8, 8, 4, 4, 4, 1, 9,
|
---|
482 | 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
|
---|
483 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
---|
484 | 8, 8, 8, 8, 1, 1, 1, 1
|
---|
485 | } ;
|
---|
486 |
|
---|
487 | static yyconst short int yy_base[530] =
|
---|
488 | { 0,
|
---|
489 | 0, 0, 0, 67, 56, 57, 76, 143, 145, 150,
|
---|
490 | 811, 152, 813, 815, 815, 815, 815, 787, 143, 152,
|
---|
491 | 786, 151, 164, 815, 815, 785, 143, 815, 152, 161,
|
---|
492 | 149, 184, 122, 815, 815, 48, 784, 160, 815, 0,
|
---|
493 | 0, 815, 805, 815, 158, 748, 750, 146, 144, 137,
|
---|
494 | 141, 751, 157, 750, 757, 746, 756, 163, 175, 747,
|
---|
495 | 745, 750, 746, 815, 166, 815, 815, 218, 791, 815,
|
---|
496 | 776, 780, 815, 815, 815, 0, 815, 779, 206, 216,
|
---|
497 | 733, 159, 737, 180, 739, 192, 735, 732, 742, 203,
|
---|
498 | 199, 733, 731, 815, 251, 779, 0, 781, 815, 253,
|
---|
499 |
|
---|
500 | 243, 249, 815, 815, 264, 815, 815, 278, 815, 815,
|
---|
501 | 779, 252, 259, 0, 815, 815, 815, 282, 815, 815,
|
---|
502 | 778, 815, 815, 815, 815, 815, 815, 762, 266, 815,
|
---|
503 | 815, 283, 239, 303, 815, 183, 255, 0, 754, 815,
|
---|
504 | 815, 815, 753, 0, 0, 815, 815, 815, 719, 731,
|
---|
505 | 718, 733, 169, 727, 713, 714, 711, 711, 714, 711,
|
---|
506 | 708, 0, 710, 240, 711, 717, 708, 274, 710, 706,
|
---|
507 | 245, 254, 710, 709, 716, 701, 273, 113, 706, 713,
|
---|
508 | 815, 815, 331, 748, 0, 815, 815, 0, 815, 306,
|
---|
509 | 256, 292, 0, 694, 710, 201, 691, 690, 690, 693,
|
---|
510 |
|
---|
511 | 691, 284, 692, 690, 149, 692, 688, 694, 295, 691,
|
---|
512 | 698, 683, 288, 295, 345, 732, 0, 0, 734, 347,
|
---|
513 | 815, 732, 328, 308, 321, 368, 353, 815, 343, 0,
|
---|
514 | 0, 815, 350, 346, 371, 815, 323, 335, 815, 815,
|
---|
515 | 0, 680, 692, 687, 675, 318, 677, 688, 686, 682,
|
---|
516 | 674, 680, 683, 0, 669, 668, 672, 0, 673, 662,
|
---|
517 | 340, 669, 659, 657, 669, 658, 660, 667, 653, 344,
|
---|
518 | 652, 652, 655, 662, 652, 656, 660, 662, 651, 643,
|
---|
519 | 0, 815, 372, 646, 643, 641, 644, 654, 643, 649,
|
---|
520 | 652, 638, 642, 0, 643, 629, 639, 629, 640, 629,
|
---|
521 |
|
---|
522 | 631, 625, 359, 625, 628, 635, 625, 629, 633, 635,
|
---|
523 | 0, 0, 412, 0, 0, 625, 0, 0, 616, 624,
|
---|
524 | 614, 612, 619, 0, 0, 613, 610, 0, 611, 613,
|
---|
525 | 0, 620, 619, 614, 605, 605, 604, 0, 601, 613,
|
---|
526 | 603, 607, 602, 611, 610, 0, 595, 607, 597, 602,
|
---|
527 | 0, 590, 602, 601, 0, 0, 587, 586, 592, 0,
|
---|
528 | 586, 583, 584, 586, 0, 589, 580, 580, 0, 577,
|
---|
529 | 589, 584, 579, 588, 0, 573, 585, 575, 580, 0,
|
---|
530 | 568, 0, 0, 572, 579, 572, 577, 568, 0, 562,
|
---|
531 | 574, 560, 0, 573, 558, 566, 561, 0, 569, 566,
|
---|
532 |
|
---|
533 | 568, 563, 551, 560, 556, 561, 0, 552, 555, 0,
|
---|
534 | 0, 0, 558, 557, 548, 0, 542, 554, 554, 529,
|
---|
535 | 527, 0, 501, 501, 423, 411, 417, 422, 0, 413,
|
---|
536 | 416, 405, 406, 403, 0, 0, 0, 0, 406, 414,
|
---|
537 | 407, 408, 0, 0, 0, 0, 396, 0, 0, 408,
|
---|
538 | 402, 402, 393, 384, 0, 0, 0, 0, 394, 393,
|
---|
539 | 394, 0, 0, 0, 0, 395, 389, 389, 379, 384,
|
---|
540 | 0, 0, 382, 371, 370, 367, 378, 363, 0, 376,
|
---|
541 | 374, 0, 360, 359, 349, 332, 0, 341, 333, 0,
|
---|
542 | 0, 0, 0, 0, 0, 323, 0, 0, 0, 0,
|
---|
543 |
|
---|
544 | 0, 319, 0, 0, 302, 137, 0, 0, 815, 471,
|
---|
545 | 480, 489, 498, 507, 512, 521, 524, 527, 533, 542,
|
---|
546 | 551, 555, 559, 563, 565, 573, 577, 584, 588
|
---|
547 | } ;
|
---|
548 |
|
---|
549 | static yyconst short int yy_def[530] =
|
---|
550 | { 0,
|
---|
551 | 510, 510, 509, 3, 511, 511, 509, 7, 512, 512,
|
---|
552 | 513, 513, 509, 509, 509, 509, 509, 509, 514, 515,
|
---|
553 | 509, 509, 516, 509, 509, 509, 509, 509, 509, 509,
|
---|
554 | 509, 509, 32, 509, 509, 509, 509, 509, 509, 517,
|
---|
555 | 518, 509, 509, 509, 509, 518, 518, 518, 518, 518,
|
---|
556 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
557 | 518, 518, 518, 509, 509, 509, 509, 509, 509, 509,
|
---|
558 | 509, 509, 509, 509, 509, 519, 509, 509, 509, 509,
|
---|
559 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
560 | 519, 519, 519, 509, 509, 509, 520, 509, 509, 521,
|
---|
561 |
|
---|
562 | 520, 520, 509, 509, 509, 509, 509, 514, 509, 509,
|
---|
563 | 514, 522, 509, 523, 509, 509, 509, 516, 509, 509,
|
---|
564 | 516, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
565 | 509, 509, 32, 509, 509, 509, 509, 524, 509, 509,
|
---|
566 | 509, 509, 509, 525, 518, 509, 509, 509, 518, 518,
|
---|
567 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
568 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
569 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
570 | 509, 509, 509, 509, 526, 509, 509, 519, 509, 509,
|
---|
571 | 509, 509, 527, 519, 519, 519, 519, 519, 519, 519,
|
---|
572 |
|
---|
573 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
574 | 519, 519, 519, 519, 509, 509, 528, 520, 509, 521,
|
---|
575 | 509, 521, 520, 520, 520, 520, 509, 509, 509, 529,
|
---|
576 | 523, 509, 509, 509, 509, 509, 509, 524, 509, 509,
|
---|
577 | 525, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
578 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
579 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
580 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
581 | 526, 509, 527, 519, 519, 519, 519, 519, 519, 519,
|
---|
582 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
583 |
|
---|
584 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
585 | 528, 520, 520, 529, 518, 518, 518, 518, 518, 518,
|
---|
586 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
587 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
588 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
589 | 518, 518, 518, 518, 519, 519, 519, 519, 519, 519,
|
---|
590 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
591 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
592 | 519, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
593 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
594 |
|
---|
595 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
596 | 518, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
597 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
|
---|
598 | 519, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
599 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
600 | 518, 518, 518, 519, 519, 519, 519, 519, 519, 519,
|
---|
601 | 519, 519, 519, 519, 519, 519, 519, 519, 519, 518,
|
---|
602 | 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
|
---|
603 | 518, 519, 519, 519, 519, 519, 519, 519, 519, 518,
|
---|
604 | 518, 518, 518, 518, 518, 518, 518, 518, 519, 519,
|
---|
605 |
|
---|
606 | 519, 519, 519, 519, 518, 519, 518, 519, 0, 509,
|
---|
607 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
608 | 509, 509, 509, 509, 509, 509, 509, 509, 509
|
---|
609 | } ;
|
---|
610 |
|
---|
611 | static yyconst short int yy_nxt[884] =
|
---|
612 | { 0,
|
---|
613 | 15, 16, 17, 16, 18, 19, 15, 20, 21, 22,
|
---|
614 | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
---|
615 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 41,
|
---|
616 | 41, 41, 41, 41, 41, 42, 43, 44, 45, 41,
|
---|
617 | 46, 47, 48, 49, 50, 51, 52, 41, 53, 41,
|
---|
618 | 54, 41, 41, 55, 56, 57, 58, 59, 60, 61,
|
---|
619 | 62, 63, 41, 41, 64, 65, 66, 67, 68, 71,
|
---|
620 | 71, 139, 140, 69, 72, 72, 73, 74, 75, 74,
|
---|
621 | 76, 73, 73, 76, 73, 73, 73, 73, 73, 76,
|
---|
622 | 73, 77, 76, 76, 78, 79, 80, 76, 73, 73,
|
---|
623 |
|
---|
624 | 73, 73, 76, 73, 76, 76, 76, 76, 76, 76,
|
---|
625 | 76, 76, 76, 76, 73, 73, 81, 76, 82, 83,
|
---|
626 | 84, 85, 76, 76, 86, 76, 87, 76, 76, 76,
|
---|
627 | 88, 89, 90, 91, 92, 93, 76, 76, 76, 76,
|
---|
628 | 94, 73, 73, 73, 95, 109, 98, 99, 110, 96,
|
---|
629 | 100, 98, 99, 105, 104, 100, 509, 123, 106, 112,
|
---|
630 | 116, 277, 130, 278, 101, 102, 119, 124, 125, 101,
|
---|
631 | 102, 113, 113, 131, 120, 117, 126, 127, 128, 111,
|
---|
632 | 129, 129, 147, 509, 142, 143, 151, 156, 154, 157,
|
---|
633 | 181, 159, 508, 152, 160, 297, 148, 155, 158, 153,
|
---|
634 |
|
---|
635 | 121, 132, 162, 133, 133, 298, 195, 169, 163, 164,
|
---|
636 | 170, 171, 196, 134, 135, 236, 136, 137, 138, 183,
|
---|
637 | 172, 246, 174, 173, 184, 190, 190, 247, 134, 135,
|
---|
638 | 175, 182, 198, 236, 136, 190, 190, 176, 191, 192,
|
---|
639 | 193, 199, 137, 201, 202, 138, 210, 206, 191, 192,
|
---|
640 | 207, 208, 215, 286, 211, 109, 191, 216, 221, 287,
|
---|
641 | 209, 212, 223, 223, 192, 227, 191, 193, 223, 223,
|
---|
642 | 228, 229, 229, 509, 192, 224, 225, 226, 113, 113,
|
---|
643 | 109, 224, 225, 110, 119, 129, 129, 237, 282, 222,
|
---|
644 | 257, 267, 120, 224, 269, 134, 135, 258, 135, 224,
|
---|
645 |
|
---|
646 | 509, 225, 233, 233, 226, 237, 282, 225, 268, 270,
|
---|
647 | 134, 135, 134, 135, 111, 135, 135, 234, 121, 234,
|
---|
648 | 262, 275, 235, 235, 191, 190, 190, 134, 135, 276,
|
---|
649 | 263, 264, 183, 135, 293, 302, 307, 184, 191, 192,
|
---|
650 | 312, 294, 191, 309, 308, 310, 215, 223, 223, 109,
|
---|
651 | 303, 216, 221, 224, 227, 236, 191, 507, 312, 228,
|
---|
652 | 224, 225, 229, 229, 192, 235, 235, 237, 137, 233,
|
---|
653 | 233, 224, 506, 236, 319, 320, 505, 504, 224, 134,
|
---|
654 | 135, 333, 135, 222, 503, 237, 225, 313, 313, 502,
|
---|
655 | 235, 235, 343, 137, 134, 135, 313, 313, 313, 334,
|
---|
656 |
|
---|
657 | 135, 135, 344, 135, 191, 192, 501, 373, 313, 313,
|
---|
658 | 313, 313, 313, 313, 500, 499, 135, 374, 498, 497,
|
---|
659 | 496, 135, 191, 495, 494, 493, 492, 491, 490, 489,
|
---|
660 | 192, 313, 313, 488, 487, 486, 485, 484, 483, 482,
|
---|
661 | 313, 313, 313, 481, 224, 225, 480, 479, 478, 477,
|
---|
662 | 476, 475, 313, 313, 313, 313, 313, 313, 474, 473,
|
---|
663 | 472, 471, 224, 470, 469, 468, 467, 466, 465, 464,
|
---|
664 | 225, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
---|
665 | 70, 70, 70, 70, 70, 70, 70, 70, 70, 97,
|
---|
666 | 97, 97, 97, 97, 97, 97, 97, 97, 103, 103,
|
---|
667 |
|
---|
668 | 103, 103, 103, 103, 103, 103, 103, 108, 108, 108,
|
---|
669 | 108, 108, 108, 108, 108, 108, 114, 114, 114, 114,
|
---|
670 | 114, 118, 118, 118, 118, 118, 118, 118, 118, 118,
|
---|
671 | 144, 144, 145, 145, 145, 145, 188, 188, 188, 188,
|
---|
672 | 188, 188, 218, 463, 462, 218, 218, 218, 218, 218,
|
---|
673 | 218, 220, 220, 220, 220, 220, 220, 220, 220, 220,
|
---|
674 | 230, 230, 230, 230, 231, 231, 231, 231, 238, 238,
|
---|
675 | 241, 241, 241, 281, 281, 461, 281, 281, 281, 281,
|
---|
676 | 281, 281, 283, 283, 311, 311, 460, 311, 311, 311,
|
---|
677 | 311, 311, 311, 314, 314, 314, 314, 459, 458, 457,
|
---|
678 |
|
---|
679 | 456, 455, 454, 453, 452, 451, 450, 449, 448, 447,
|
---|
680 | 446, 445, 444, 443, 442, 441, 440, 439, 438, 437,
|
---|
681 | 436, 435, 434, 433, 432, 431, 430, 429, 428, 427,
|
---|
682 | 426, 425, 424, 423, 422, 421, 420, 419, 418, 417,
|
---|
683 | 416, 415, 414, 413, 412, 411, 410, 409, 408, 407,
|
---|
684 | 406, 405, 404, 403, 402, 401, 400, 399, 398, 397,
|
---|
685 | 396, 395, 394, 393, 392, 391, 390, 389, 388, 387,
|
---|
686 | 386, 385, 384, 383, 382, 381, 380, 379, 378, 377,
|
---|
687 | 376, 375, 372, 371, 370, 369, 368, 367, 366, 365,
|
---|
688 | 364, 363, 362, 361, 360, 359, 358, 357, 356, 355,
|
---|
689 |
|
---|
690 | 354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
|
---|
691 | 342, 341, 340, 339, 338, 337, 336, 335, 332, 331,
|
---|
692 | 330, 329, 328, 327, 326, 325, 324, 323, 322, 321,
|
---|
693 | 318, 317, 316, 315, 509, 219, 217, 306, 305, 304,
|
---|
694 | 301, 300, 299, 296, 295, 292, 291, 290, 289, 288,
|
---|
695 | 285, 284, 185, 280, 279, 274, 273, 272, 271, 266,
|
---|
696 | 265, 261, 260, 259, 256, 255, 254, 253, 252, 251,
|
---|
697 | 250, 249, 248, 245, 244, 243, 242, 240, 239, 232,
|
---|
698 | 509, 509, 219, 217, 214, 213, 205, 204, 203, 200,
|
---|
699 | 197, 194, 189, 187, 186, 185, 180, 179, 178, 177,
|
---|
700 |
|
---|
701 | 168, 167, 166, 165, 161, 150, 149, 146, 141, 122,
|
---|
702 | 115, 107, 509, 104, 13, 509, 509, 509, 509, 509,
|
---|
703 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
704 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
705 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
706 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
707 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
708 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
709 | 509, 509, 509
|
---|
710 | } ;
|
---|
711 |
|
---|
712 | static yyconst short int yy_chk[884] =
|
---|
713 | { 0,
|
---|
714 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
---|
715 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
---|
716 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
---|
717 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
---|
718 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
---|
719 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
---|
720 | 3, 3, 3, 3, 3, 3, 3, 3, 4, 5,
|
---|
721 | 6, 36, 36, 4, 5, 6, 7, 7, 7, 7,
|
---|
722 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
---|
723 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
---|
724 |
|
---|
725 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
---|
726 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
---|
727 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
---|
728 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
---|
729 | 7, 7, 7, 7, 8, 19, 9, 9, 19, 8,
|
---|
730 | 9, 10, 10, 12, 12, 10, 33, 27, 12, 20,
|
---|
731 | 22, 178, 31, 178, 9, 9, 23, 27, 29, 10,
|
---|
732 | 10, 20, 20, 31, 23, 22, 29, 29, 30, 19,
|
---|
733 | 30, 30, 45, 33, 38, 38, 48, 50, 49, 50,
|
---|
734 | 65, 51, 506, 48, 51, 205, 45, 49, 50, 48,
|
---|
735 |
|
---|
736 | 23, 32, 53, 32, 32, 205, 82, 58, 53, 53,
|
---|
737 | 58, 58, 82, 32, 32, 136, 32, 32, 32, 68,
|
---|
738 | 58, 153, 59, 58, 68, 79, 79, 153, 32, 32,
|
---|
739 | 59, 65, 84, 136, 32, 80, 80, 59, 79, 79,
|
---|
740 | 79, 84, 32, 86, 86, 32, 91, 90, 80, 80,
|
---|
741 | 90, 90, 95, 196, 91, 100, 79, 95, 100, 196,
|
---|
742 | 90, 91, 101, 101, 79, 105, 80, 79, 102, 102,
|
---|
743 | 105, 112, 112, 133, 80, 101, 101, 101, 113, 113,
|
---|
744 | 108, 102, 102, 108, 118, 129, 129, 137, 191, 100,
|
---|
745 | 164, 171, 118, 101, 172, 129, 129, 164, 129, 102,
|
---|
746 |
|
---|
747 | 133, 101, 132, 132, 101, 137, 191, 102, 171, 172,
|
---|
748 | 129, 129, 132, 132, 108, 132, 129, 134, 118, 134,
|
---|
749 | 168, 177, 134, 134, 192, 190, 190, 132, 132, 177,
|
---|
750 | 168, 168, 183, 132, 202, 209, 213, 183, 190, 190,
|
---|
751 | 224, 202, 192, 214, 213, 214, 215, 223, 223, 220,
|
---|
752 | 209, 215, 220, 225, 227, 237, 190, 505, 224, 227,
|
---|
753 | 223, 223, 229, 229, 190, 234, 234, 238, 238, 233,
|
---|
754 | 233, 225, 502, 237, 246, 246, 496, 489, 223, 233,
|
---|
755 | 233, 261, 233, 220, 488, 238, 223, 226, 226, 486,
|
---|
756 | 235, 235, 270, 238, 233, 233, 226, 226, 226, 261,
|
---|
757 |
|
---|
758 | 233, 235, 270, 235, 283, 283, 485, 303, 226, 226,
|
---|
759 | 226, 226, 226, 226, 484, 483, 235, 303, 481, 480,
|
---|
760 | 478, 235, 283, 477, 476, 475, 474, 473, 470, 469,
|
---|
761 | 283, 313, 313, 468, 467, 466, 461, 460, 459, 454,
|
---|
762 | 313, 313, 313, 453, 313, 313, 452, 451, 450, 447,
|
---|
763 | 442, 441, 313, 313, 313, 313, 313, 313, 440, 439,
|
---|
764 | 434, 433, 313, 432, 431, 430, 428, 427, 426, 425,
|
---|
765 | 313, 510, 510, 510, 510, 510, 510, 510, 510, 510,
|
---|
766 | 511, 511, 511, 511, 511, 511, 511, 511, 511, 512,
|
---|
767 | 512, 512, 512, 512, 512, 512, 512, 512, 513, 513,
|
---|
768 |
|
---|
769 | 513, 513, 513, 513, 513, 513, 513, 514, 514, 514,
|
---|
770 | 514, 514, 514, 514, 514, 514, 515, 515, 515, 515,
|
---|
771 | 515, 516, 516, 516, 516, 516, 516, 516, 516, 516,
|
---|
772 | 517, 517, 518, 518, 518, 518, 519, 519, 519, 519,
|
---|
773 | 519, 519, 520, 424, 423, 520, 520, 520, 520, 520,
|
---|
774 | 520, 521, 521, 521, 521, 521, 521, 521, 521, 521,
|
---|
775 | 522, 522, 522, 522, 523, 523, 523, 523, 524, 524,
|
---|
776 | 525, 525, 525, 526, 526, 421, 526, 526, 526, 526,
|
---|
777 | 526, 526, 527, 527, 528, 528, 420, 528, 528, 528,
|
---|
778 | 528, 528, 528, 529, 529, 529, 529, 419, 418, 417,
|
---|
779 |
|
---|
780 | 415, 414, 413, 409, 408, 406, 405, 404, 403, 402,
|
---|
781 | 401, 400, 399, 397, 396, 395, 394, 392, 391, 390,
|
---|
782 | 388, 387, 386, 385, 384, 381, 379, 378, 377, 376,
|
---|
783 | 374, 373, 372, 371, 370, 368, 367, 366, 364, 363,
|
---|
784 | 362, 361, 359, 358, 357, 354, 353, 352, 350, 349,
|
---|
785 | 348, 347, 345, 344, 343, 342, 341, 340, 339, 337,
|
---|
786 | 336, 335, 334, 333, 332, 330, 329, 327, 326, 323,
|
---|
787 | 322, 321, 320, 319, 316, 310, 309, 308, 307, 306,
|
---|
788 | 305, 304, 302, 301, 300, 299, 298, 297, 296, 295,
|
---|
789 | 293, 292, 291, 290, 289, 288, 287, 286, 285, 284,
|
---|
790 |
|
---|
791 | 280, 279, 278, 277, 276, 275, 274, 273, 272, 271,
|
---|
792 | 269, 268, 267, 266, 265, 264, 263, 262, 260, 259,
|
---|
793 | 257, 256, 255, 253, 252, 251, 250, 249, 248, 247,
|
---|
794 | 245, 244, 243, 242, 222, 219, 216, 212, 211, 210,
|
---|
795 | 208, 207, 206, 204, 203, 201, 200, 199, 198, 197,
|
---|
796 | 195, 194, 184, 180, 179, 176, 175, 174, 173, 170,
|
---|
797 | 169, 167, 166, 165, 163, 161, 160, 159, 158, 157,
|
---|
798 | 156, 155, 154, 152, 151, 150, 149, 143, 139, 128,
|
---|
799 | 121, 111, 98, 96, 93, 92, 89, 88, 87, 85,
|
---|
800 | 83, 81, 78, 72, 71, 69, 63, 62, 61, 60,
|
---|
801 |
|
---|
802 | 57, 56, 55, 54, 52, 47, 46, 43, 37, 26,
|
---|
803 | 21, 18, 13, 11, 509, 509, 509, 509, 509, 509,
|
---|
804 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
805 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
806 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
807 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
808 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
809 | 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
|
---|
810 | 509, 509, 509
|
---|
811 | } ;
|
---|
812 |
|
---|
813 | static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
|
---|
814 | static char *yy_full_match;
|
---|
815 | static int yy_lp;
|
---|
816 | static int yy_looking_for_trail_begin = 0;
|
---|
817 | static int yy_full_lp;
|
---|
818 | static int *yy_full_state;
|
---|
819 | #define YY_TRAILING_MASK 0x2000
|
---|
820 | #define YY_TRAILING_HEAD_MASK 0x4000
|
---|
821 | #define REJECT \
|
---|
822 | { \
|
---|
823 | *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
|
---|
824 | yy_cp = yy_full_match; /* restore poss. backed-over text */ \
|
---|
825 | yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
|
---|
826 | yy_state_ptr = yy_full_state; /* restore orig. state */ \
|
---|
827 | yy_current_state = *yy_state_ptr; /* restore curr. state */ \
|
---|
828 | ++yy_lp; \
|
---|
829 | goto find_rule; \
|
---|
830 | }
|
---|
831 | static int yy_more_offset = 0;
|
---|
832 | static int yy_prev_more_offset = 0;
|
---|
833 | #define yymore() (yy_more_offset = yy_flex_strlen( yytext ))
|
---|
834 | #define YY_NEED_STRLEN
|
---|
835 | #define YY_MORE_ADJ 0
|
---|
836 | #define YY_RESTORE_YY_MORE_OFFSET \
|
---|
837 | { \
|
---|
838 | yy_more_offset = yy_prev_more_offset; \
|
---|
839 | yyleng -= yy_more_offset; \
|
---|
840 | }
|
---|
841 | #ifndef YYLMAX
|
---|
842 | #define YYLMAX 8192
|
---|
843 | #endif
|
---|
844 |
|
---|
845 | char yytext[YYLMAX];
|
---|
846 | char *yytext_ptr;
|
---|
847 | #line 1 "dt_lex.l"
|
---|
848 | #define INITIAL 0
|
---|
849 | #line 2 "dt_lex.l"
|
---|
850 | /*
|
---|
851 | * CDDL HEADER START
|
---|
852 | *
|
---|
853 | * The contents of this file are subject to the terms of the
|
---|
854 | * Common Development and Distribution License (the "License").
|
---|
855 | * You may not use this file except in compliance with the License.
|
---|
856 | *
|
---|
857 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
---|
858 | * or http://www.opensolaris.org/os/licensing.
|
---|
859 | * See the License for the specific language governing permissions
|
---|
860 | * and limitations under the License.
|
---|
861 | *
|
---|
862 | * When distributing Covered Code, include this CDDL HEADER in each
|
---|
863 | * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
---|
864 | * If applicable, add the following below this CDDL HEADER, with the
|
---|
865 | * fields enclosed by brackets "[]" replaced with your own identifying
|
---|
866 | * information: Portions Copyright [yyyy] [name of copyright owner]
|
---|
867 | *
|
---|
868 | * CDDL HEADER END
|
---|
869 | */
|
---|
870 |
|
---|
871 | /*
|
---|
872 | * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
---|
873 | */
|
---|
874 |
|
---|
875 | #ifndef VBOX
|
---|
876 | #include <string.h>
|
---|
877 | #include <stdlib.h>
|
---|
878 | #include <stdio.h>
|
---|
879 | #include <assert.h>
|
---|
880 | #include <ctype.h>
|
---|
881 | #include <errno.h>
|
---|
882 | #else /* VBOX */
|
---|
883 | # ifdef RT_OS_WINDOWS /* No unistd.h on windows, avoid redef warnings of the [U]INTxx_MAX defines caused by no inttypes.h/stdint.h. */
|
---|
884 | # define YY_NO_UNISTD_H
|
---|
885 | # undef INT8_MAX
|
---|
886 | # undef INT16_MAX
|
---|
887 | # undef INT32_MAX
|
---|
888 | # undef INT64_MAX
|
---|
889 | # undef UINT8_MAX
|
---|
890 | # undef UINT16_MAX
|
---|
891 | # undef UINT32_MAX
|
---|
892 | # undef UINT64_MAX
|
---|
893 | # endif
|
---|
894 | # ifdef _MSC_VER
|
---|
895 | # pragma warning(disable:4668 4131 4255)
|
---|
896 | # endif
|
---|
897 | # ifdef __GNUC__
|
---|
898 | # if ((__GNUC__ << 16) + __GNUC_MINOR__) >= 0x4002
|
---|
899 | # pragma GCC diagnostic ignored "-Wunused-function"
|
---|
900 | # endif
|
---|
901 | # endif
|
---|
902 | # include <iprt/ctype.h>
|
---|
903 | # include <iprt/err.h>
|
---|
904 | # define isdigit(a_ch) RT_C_IS_DIGIT(a_ch)
|
---|
905 | #endif /* VBOX */
|
---|
906 |
|
---|
907 | #include <dt_impl.h>
|
---|
908 | #include <dt_grammar.h>
|
---|
909 | #include <dt_parser.h>
|
---|
910 | #include <dt_string.h>
|
---|
911 |
|
---|
912 | #ifndef USING_FLEX
|
---|
913 | /*
|
---|
914 | * We need to undefine lex's input and unput macros so that references to these
|
---|
915 | * call the functions provided at the end of this source file.
|
---|
916 | */
|
---|
917 | #undef input
|
---|
918 | #undef unput
|
---|
919 | #else /* USING_FLEX */
|
---|
920 | # define YY_INPUT(buf, result, max_size) \
|
---|
921 | do { \
|
---|
922 | if (yypcb->pcb_fileptr != NULL) { \
|
---|
923 | result = (int)fread(buf, 1, max_size, yypcb->pcb_fileptr); \
|
---|
924 | if (!result && ferror(yypcb->pcb_fileptr)) \
|
---|
925 | longjmp(yypcb->pcb_jmpbuf, EDT_FIO); \
|
---|
926 | /*YY_FATAL_ERROR("input in flex scanner failed");*/ \
|
---|
927 | } else { \
|
---|
928 | size_t off = yypcb->pcb_strptr - yypcb->pcb_string; \
|
---|
929 | if (off < yypcb->pcb_strlen) { \
|
---|
930 | off = yypcb->pcb_strlen - off; \
|
---|
931 | result = max_size; \
|
---|
932 | if ((size_t)result > off) \
|
---|
933 | result = (int)off; \
|
---|
934 | memcpy(buf, yypcb->pcb_strptr, result); \
|
---|
935 | yypcb->pcb_strptr += result; \
|
---|
936 | /*fprintf(stderr, "yy_input -> %d '%.*s'\n", result, result, buf);*/ \
|
---|
937 | } else { \
|
---|
938 | buf[0] = '\0'; \
|
---|
939 | result = 0; \
|
---|
940 | /*fprintf(stderr, "yy_input -> %d\n", result);*/ \
|
---|
941 | } \
|
---|
942 | } \
|
---|
943 | } while (0)
|
---|
944 | #endif /* USING_FLEX */
|
---|
945 |
|
---|
946 | static int id_or_type(const char *);
|
---|
947 | #ifndef USING_FLEX
|
---|
948 | static int input(void);
|
---|
949 | static void unput(int);
|
---|
950 | #endif
|
---|
951 |
|
---|
952 | /*
|
---|
953 | * We first define a set of labeled states for use in the D lexer and then a
|
---|
954 | * set of regular expressions to simplify things below. The lexer states are:
|
---|
955 | *
|
---|
956 | * S0 - D program clause and expression lexing
|
---|
957 | * S1 - D comments (i.e. skip everything until end of comment)
|
---|
958 | * S2 - D program outer scope (probe specifiers and declarations)
|
---|
959 | * S3 - D control line parsing (i.e. after ^# is seen but before \n)
|
---|
960 | * S4 - D control line scan (locate control directives only and invoke S3)
|
---|
961 | */
|
---|
962 | #define S0 1
|
---|
963 | #define S1 2
|
---|
964 | #define S2 3
|
---|
965 | #define S3 4
|
---|
966 | #define S4 5
|
---|
967 |
|
---|
968 | #line 968 "dt_lex.c"
|
---|
969 |
|
---|
970 | /* Macros after this point can all be overridden by user definitions in
|
---|
971 | * section 1.
|
---|
972 | */
|
---|
973 |
|
---|
974 | #ifndef YY_SKIP_YYWRAP
|
---|
975 | #ifdef __cplusplus
|
---|
976 | extern "C" int yywrap YY_PROTO(( void ));
|
---|
977 | #else
|
---|
978 | extern int yywrap YY_PROTO(( void ));
|
---|
979 | #endif
|
---|
980 | #endif
|
---|
981 |
|
---|
982 | #ifndef YY_NO_UNPUT
|
---|
983 | static void yyunput YY_PROTO(( int c, char *buf_ptr ));
|
---|
984 | #endif
|
---|
985 |
|
---|
986 | #ifndef yytext_ptr
|
---|
987 | static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
|
---|
988 | #endif
|
---|
989 |
|
---|
990 | #ifdef YY_NEED_STRLEN
|
---|
991 | static int yy_flex_strlen YY_PROTO(( yyconst char * ));
|
---|
992 | #endif
|
---|
993 |
|
---|
994 | #ifndef YY_NO_INPUT
|
---|
995 | #ifdef __cplusplus
|
---|
996 | static int yyinput YY_PROTO(( void ));
|
---|
997 | #else
|
---|
998 | static int input YY_PROTO(( void ));
|
---|
999 | #endif
|
---|
1000 | #endif
|
---|
1001 |
|
---|
1002 | #if YY_STACK_USED
|
---|
1003 | static int yy_start_stack_ptr = 0;
|
---|
1004 | static int yy_start_stack_depth = 0;
|
---|
1005 | static int *yy_start_stack = 0;
|
---|
1006 | #ifndef YY_NO_PUSH_STATE
|
---|
1007 | static void yy_push_state YY_PROTO(( int new_state ));
|
---|
1008 | #endif
|
---|
1009 | #ifndef YY_NO_POP_STATE
|
---|
1010 | static void yy_pop_state YY_PROTO(( void ));
|
---|
1011 | #endif
|
---|
1012 | #ifndef YY_NO_TOP_STATE
|
---|
1013 | static int yy_top_state YY_PROTO(( void ));
|
---|
1014 | #endif
|
---|
1015 |
|
---|
1016 | #else
|
---|
1017 | #define YY_NO_PUSH_STATE 1
|
---|
1018 | #define YY_NO_POP_STATE 1
|
---|
1019 | #define YY_NO_TOP_STATE 1
|
---|
1020 | #endif
|
---|
1021 |
|
---|
1022 | #ifdef YY_MALLOC_DECL
|
---|
1023 | YY_MALLOC_DECL
|
---|
1024 | #else
|
---|
1025 | #if __STDC__
|
---|
1026 | #ifndef __cplusplus
|
---|
1027 | #include <stdlib.h>
|
---|
1028 | #endif
|
---|
1029 | #else
|
---|
1030 | /* Just try to get by without declaring the routines. This will fail
|
---|
1031 | * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
|
---|
1032 | * or sizeof(void*) != sizeof(int).
|
---|
1033 | */
|
---|
1034 | #endif
|
---|
1035 | #endif
|
---|
1036 |
|
---|
1037 | /* Amount of stuff to slurp up with each read. */
|
---|
1038 | #ifndef YY_READ_BUF_SIZE
|
---|
1039 | #define YY_READ_BUF_SIZE 8192
|
---|
1040 | #endif
|
---|
1041 |
|
---|
1042 | /* Copy whatever the last rule matched to the standard output. */
|
---|
1043 |
|
---|
1044 | #ifndef ECHO
|
---|
1045 | /* This used to be an fputs(), but since the string might contain NUL's,
|
---|
1046 | * we now use fwrite().
|
---|
1047 | */
|
---|
1048 | #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
|
---|
1049 | #endif
|
---|
1050 |
|
---|
1051 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
---|
1052 | * is returned in "result".
|
---|
1053 | */
|
---|
1054 | #ifndef YY_INPUT
|
---|
1055 | #define YY_INPUT(buf,result,max_size) \
|
---|
1056 | if ( yy_current_buffer->yy_is_interactive ) \
|
---|
1057 | { \
|
---|
1058 | int c = '*', n; \
|
---|
1059 | for ( n = 0; n < max_size && \
|
---|
1060 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
---|
1061 | buf[n] = (char) c; \
|
---|
1062 | if ( c == '\n' ) \
|
---|
1063 | buf[n++] = (char) c; \
|
---|
1064 | if ( c == EOF && ferror( yyin ) ) \
|
---|
1065 | YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
---|
1066 | result = n; \
|
---|
1067 | } \
|
---|
1068 | else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
|
---|
1069 | && ferror( yyin ) ) \
|
---|
1070 | YY_FATAL_ERROR( "input in flex scanner failed" );
|
---|
1071 | #endif
|
---|
1072 |
|
---|
1073 | /* No semi-colon after return; correct usage is to write "yyterminate();" -
|
---|
1074 | * we don't want an extra ';' after the "return" because that will cause
|
---|
1075 | * some compilers to complain about unreachable statements.
|
---|
1076 | */
|
---|
1077 | #ifndef yyterminate
|
---|
1078 | #define yyterminate() return YY_NULL
|
---|
1079 | #endif
|
---|
1080 |
|
---|
1081 | /* Number of entries by which start-condition stack grows. */
|
---|
1082 | #ifndef YY_START_STACK_INCR
|
---|
1083 | #define YY_START_STACK_INCR 25
|
---|
1084 | #endif
|
---|
1085 |
|
---|
1086 | /* Report a fatal error. */
|
---|
1087 | #ifndef YY_FATAL_ERROR
|
---|
1088 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
|
---|
1089 | #endif
|
---|
1090 |
|
---|
1091 | /* Default declaration of generated scanner - a define so the user can
|
---|
1092 | * easily add parameters.
|
---|
1093 | */
|
---|
1094 | #ifndef YY_DECL
|
---|
1095 | #define YY_DECL int yylex YY_PROTO(( void ))
|
---|
1096 | #endif
|
---|
1097 |
|
---|
1098 | /* Code executed at the beginning of each rule, after yytext and yyleng
|
---|
1099 | * have been set up.
|
---|
1100 | */
|
---|
1101 | #ifndef YY_USER_ACTION
|
---|
1102 | #define YY_USER_ACTION
|
---|
1103 | #endif
|
---|
1104 |
|
---|
1105 | /* Code executed at the end of each rule. */
|
---|
1106 | #ifndef YY_BREAK
|
---|
1107 | #define YY_BREAK break;
|
---|
1108 | #endif
|
---|
1109 |
|
---|
1110 | #define YY_RULE_SETUP \
|
---|
1111 | if ( yyleng > 0 ) \
|
---|
1112 | yy_current_buffer->yy_at_bol = \
|
---|
1113 | (yytext[yyleng - 1] == '\n'); \
|
---|
1114 | YY_USER_ACTION
|
---|
1115 |
|
---|
1116 | YY_DECL
|
---|
1117 | {
|
---|
1118 | register yy_state_type yy_current_state;
|
---|
1119 | register char *yy_cp, *yy_bp;
|
---|
1120 | register int yy_act;
|
---|
1121 |
|
---|
1122 | #line 132 "dt_lex.l"
|
---|
1123 |
|
---|
1124 |
|
---|
1125 |
|
---|
1126 |
|
---|
1127 | /*
|
---|
1128 | * We insert a special prologue into yylex() itself: if the pcb contains a
|
---|
1129 | * context token, we return that prior to running the normal lexer. This
|
---|
1130 | * allows libdtrace to force yacc into one of our three parsing contexts: D
|
---|
1131 | * expression (DT_CTX_DEXPR), D program (DT_CTX_DPROG) or D type (DT_CTX_DTYPE).
|
---|
1132 | * Once the token is returned, we clear it so this only happens once.
|
---|
1133 | */
|
---|
1134 | if (yypcb->pcb_token != 0) {
|
---|
1135 | int tok = yypcb->pcb_token;
|
---|
1136 | yypcb->pcb_token = 0;
|
---|
1137 | return (tok);
|
---|
1138 | }
|
---|
1139 |
|
---|
1140 |
|
---|
1141 |
|
---|
1142 | #line 1142 "dt_lex.c"
|
---|
1143 |
|
---|
1144 | if ( yy_init )
|
---|
1145 | {
|
---|
1146 | yy_init = 0;
|
---|
1147 |
|
---|
1148 | #ifdef YY_USER_INIT
|
---|
1149 | YY_USER_INIT;
|
---|
1150 | #endif
|
---|
1151 |
|
---|
1152 | if ( ! yy_start )
|
---|
1153 | yy_start = 1; /* first start state */
|
---|
1154 |
|
---|
1155 | if ( ! yyin )
|
---|
1156 | yyin = stdin;
|
---|
1157 |
|
---|
1158 | if ( ! yyout )
|
---|
1159 | yyout = stdout;
|
---|
1160 |
|
---|
1161 | if ( ! yy_current_buffer )
|
---|
1162 | yy_current_buffer =
|
---|
1163 | yy_create_buffer( yyin, YY_BUF_SIZE );
|
---|
1164 |
|
---|
1165 | yy_load_buffer_state();
|
---|
1166 | }
|
---|
1167 |
|
---|
1168 | while ( 1 ) /* loops until end-of-file is reached */
|
---|
1169 | {
|
---|
1170 | yy_cp = yy_c_buf_p;
|
---|
1171 |
|
---|
1172 | /* Support of yytext. */
|
---|
1173 | *yy_cp = yy_hold_char;
|
---|
1174 |
|
---|
1175 | /* yy_bp points to the position in yy_ch_buf of the start of
|
---|
1176 | * the current run.
|
---|
1177 | */
|
---|
1178 | yy_bp = yy_cp;
|
---|
1179 |
|
---|
1180 | yy_current_state = yy_start;
|
---|
1181 | yy_current_state += YY_AT_BOL();
|
---|
1182 | yy_state_ptr = yy_state_buf;
|
---|
1183 | *yy_state_ptr++ = yy_current_state;
|
---|
1184 | yy_match:
|
---|
1185 | do
|
---|
1186 | {
|
---|
1187 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
---|
1188 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
---|
1189 | {
|
---|
1190 | yy_current_state = (int) yy_def[yy_current_state];
|
---|
1191 | if ( yy_current_state >= 510 )
|
---|
1192 | yy_c = yy_meta[(unsigned int) yy_c];
|
---|
1193 | }
|
---|
1194 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
---|
1195 | *yy_state_ptr++ = yy_current_state;
|
---|
1196 | ++yy_cp;
|
---|
1197 | }
|
---|
1198 | while ( yy_current_state != 509 );
|
---|
1199 |
|
---|
1200 | yy_find_action:
|
---|
1201 | yy_current_state = *--yy_state_ptr;
|
---|
1202 | yy_lp = yy_accept[yy_current_state];
|
---|
1203 | find_rule: /* we branch to this label when backing up */
|
---|
1204 | for ( ; ; ) /* until we find what rule we matched */
|
---|
1205 | {
|
---|
1206 | if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
|
---|
1207 | {
|
---|
1208 | yy_act = yy_acclist[yy_lp];
|
---|
1209 | if ( yy_act & YY_TRAILING_HEAD_MASK ||
|
---|
1210 | yy_looking_for_trail_begin )
|
---|
1211 | {
|
---|
1212 | if ( yy_act == yy_looking_for_trail_begin )
|
---|
1213 | {
|
---|
1214 | yy_looking_for_trail_begin = 0;
|
---|
1215 | yy_act &= ~YY_TRAILING_HEAD_MASK;
|
---|
1216 | break;
|
---|
1217 | }
|
---|
1218 | }
|
---|
1219 | else if ( yy_act & YY_TRAILING_MASK )
|
---|
1220 | {
|
---|
1221 | yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
|
---|
1222 | yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
|
---|
1223 | yy_full_match = yy_cp;
|
---|
1224 | yy_full_state = yy_state_ptr;
|
---|
1225 | yy_full_lp = yy_lp;
|
---|
1226 | }
|
---|
1227 | else
|
---|
1228 | {
|
---|
1229 | yy_full_match = yy_cp;
|
---|
1230 | yy_full_state = yy_state_ptr;
|
---|
1231 | yy_full_lp = yy_lp;
|
---|
1232 | break;
|
---|
1233 | }
|
---|
1234 | ++yy_lp;
|
---|
1235 | goto find_rule;
|
---|
1236 | }
|
---|
1237 | --yy_cp;
|
---|
1238 | yy_current_state = *--yy_state_ptr;
|
---|
1239 | yy_lp = yy_accept[yy_current_state];
|
---|
1240 | }
|
---|
1241 |
|
---|
1242 | YY_DO_BEFORE_ACTION;
|
---|
1243 |
|
---|
1244 | if ( yy_act != YY_END_OF_BUFFER )
|
---|
1245 | {
|
---|
1246 | int yyl;
|
---|
1247 | for ( yyl = 0; yyl < yyleng; ++yyl )
|
---|
1248 | if ( yytext[yyl] == '\n' )
|
---|
1249 | ++yylineno;
|
---|
1250 | }
|
---|
1251 |
|
---|
1252 | do_action: /* This label is used only to access EOF actions. */
|
---|
1253 |
|
---|
1254 |
|
---|
1255 | switch ( yy_act )
|
---|
1256 | { /* beginning of action switch */
|
---|
1257 | case 1:
|
---|
1258 | YY_RULE_SETUP
|
---|
1259 | #line 151 "dt_lex.l"
|
---|
1260 | return (DT_KEY_AUTO);
|
---|
1261 | YY_BREAK
|
---|
1262 | case 2:
|
---|
1263 | YY_RULE_SETUP
|
---|
1264 | #line 152 "dt_lex.l"
|
---|
1265 | return (DT_KEY_BREAK);
|
---|
1266 | YY_BREAK
|
---|
1267 | case 3:
|
---|
1268 | YY_RULE_SETUP
|
---|
1269 | #line 153 "dt_lex.l"
|
---|
1270 | return (DT_KEY_CASE);
|
---|
1271 | YY_BREAK
|
---|
1272 | case 4:
|
---|
1273 | YY_RULE_SETUP
|
---|
1274 | #line 154 "dt_lex.l"
|
---|
1275 | return (DT_KEY_CHAR);
|
---|
1276 | YY_BREAK
|
---|
1277 | case 5:
|
---|
1278 | YY_RULE_SETUP
|
---|
1279 | #line 155 "dt_lex.l"
|
---|
1280 | return (DT_KEY_CONST);
|
---|
1281 | YY_BREAK
|
---|
1282 | case 6:
|
---|
1283 | YY_RULE_SETUP
|
---|
1284 | #line 156 "dt_lex.l"
|
---|
1285 | return (DT_KEY_CONTINUE);
|
---|
1286 | YY_BREAK
|
---|
1287 | case 7:
|
---|
1288 | YY_RULE_SETUP
|
---|
1289 | #line 157 "dt_lex.l"
|
---|
1290 | return (DT_KEY_COUNTER);
|
---|
1291 | YY_BREAK
|
---|
1292 | case 8:
|
---|
1293 | YY_RULE_SETUP
|
---|
1294 | #line 158 "dt_lex.l"
|
---|
1295 | return (DT_KEY_DEFAULT);
|
---|
1296 | YY_BREAK
|
---|
1297 | case 9:
|
---|
1298 | YY_RULE_SETUP
|
---|
1299 | #line 159 "dt_lex.l"
|
---|
1300 | return (DT_KEY_DO);
|
---|
1301 | YY_BREAK
|
---|
1302 | case 10:
|
---|
1303 | YY_RULE_SETUP
|
---|
1304 | #line 160 "dt_lex.l"
|
---|
1305 | return (DT_KEY_DOUBLE);
|
---|
1306 | YY_BREAK
|
---|
1307 | case 11:
|
---|
1308 | YY_RULE_SETUP
|
---|
1309 | #line 161 "dt_lex.l"
|
---|
1310 | return (DT_KEY_ELSE);
|
---|
1311 | YY_BREAK
|
---|
1312 | case 12:
|
---|
1313 | YY_RULE_SETUP
|
---|
1314 | #line 162 "dt_lex.l"
|
---|
1315 | return (DT_KEY_ENUM);
|
---|
1316 | YY_BREAK
|
---|
1317 | case 13:
|
---|
1318 | YY_RULE_SETUP
|
---|
1319 | #line 163 "dt_lex.l"
|
---|
1320 | return (DT_KEY_EXTERN);
|
---|
1321 | YY_BREAK
|
---|
1322 | case 14:
|
---|
1323 | YY_RULE_SETUP
|
---|
1324 | #line 164 "dt_lex.l"
|
---|
1325 | return (DT_KEY_FLOAT);
|
---|
1326 | YY_BREAK
|
---|
1327 | case 15:
|
---|
1328 | YY_RULE_SETUP
|
---|
1329 | #line 165 "dt_lex.l"
|
---|
1330 | return (DT_KEY_FOR);
|
---|
1331 | YY_BREAK
|
---|
1332 | case 16:
|
---|
1333 | YY_RULE_SETUP
|
---|
1334 | #line 166 "dt_lex.l"
|
---|
1335 | return (DT_KEY_GOTO);
|
---|
1336 | YY_BREAK
|
---|
1337 | case 17:
|
---|
1338 | YY_RULE_SETUP
|
---|
1339 | #line 167 "dt_lex.l"
|
---|
1340 | return (DT_KEY_IF);
|
---|
1341 | YY_BREAK
|
---|
1342 | case 18:
|
---|
1343 | YY_RULE_SETUP
|
---|
1344 | #line 168 "dt_lex.l"
|
---|
1345 | return (DT_KEY_IMPORT);
|
---|
1346 | YY_BREAK
|
---|
1347 | case 19:
|
---|
1348 | YY_RULE_SETUP
|
---|
1349 | #line 169 "dt_lex.l"
|
---|
1350 | return (DT_KEY_INLINE);
|
---|
1351 | YY_BREAK
|
---|
1352 | case 20:
|
---|
1353 | YY_RULE_SETUP
|
---|
1354 | #line 170 "dt_lex.l"
|
---|
1355 | return (DT_KEY_INT);
|
---|
1356 | YY_BREAK
|
---|
1357 | case 21:
|
---|
1358 | YY_RULE_SETUP
|
---|
1359 | #line 171 "dt_lex.l"
|
---|
1360 | return (DT_KEY_LONG);
|
---|
1361 | YY_BREAK
|
---|
1362 | case 22:
|
---|
1363 | YY_RULE_SETUP
|
---|
1364 | #line 172 "dt_lex.l"
|
---|
1365 | return (DT_TOK_OFFSETOF);
|
---|
1366 | YY_BREAK
|
---|
1367 | case 23:
|
---|
1368 | YY_RULE_SETUP
|
---|
1369 | #line 173 "dt_lex.l"
|
---|
1370 | return (DT_KEY_PROBE);
|
---|
1371 | YY_BREAK
|
---|
1372 | case 24:
|
---|
1373 | YY_RULE_SETUP
|
---|
1374 | #line 174 "dt_lex.l"
|
---|
1375 | return (DT_KEY_PROVIDER);
|
---|
1376 | YY_BREAK
|
---|
1377 | case 25:
|
---|
1378 | YY_RULE_SETUP
|
---|
1379 | #line 175 "dt_lex.l"
|
---|
1380 | return (DT_KEY_REGISTER);
|
---|
1381 | YY_BREAK
|
---|
1382 | case 26:
|
---|
1383 | YY_RULE_SETUP
|
---|
1384 | #line 176 "dt_lex.l"
|
---|
1385 | return (DT_KEY_RESTRICT);
|
---|
1386 | YY_BREAK
|
---|
1387 | case 27:
|
---|
1388 | YY_RULE_SETUP
|
---|
1389 | #line 177 "dt_lex.l"
|
---|
1390 | return (DT_KEY_RETURN);
|
---|
1391 | YY_BREAK
|
---|
1392 | case 28:
|
---|
1393 | YY_RULE_SETUP
|
---|
1394 | #line 178 "dt_lex.l"
|
---|
1395 | return (DT_KEY_SELF);
|
---|
1396 | YY_BREAK
|
---|
1397 | case 29:
|
---|
1398 | YY_RULE_SETUP
|
---|
1399 | #line 179 "dt_lex.l"
|
---|
1400 | return (DT_KEY_SHORT);
|
---|
1401 | YY_BREAK
|
---|
1402 | case 30:
|
---|
1403 | YY_RULE_SETUP
|
---|
1404 | #line 180 "dt_lex.l"
|
---|
1405 | return (DT_KEY_SIGNED);
|
---|
1406 | YY_BREAK
|
---|
1407 | case 31:
|
---|
1408 | YY_RULE_SETUP
|
---|
1409 | #line 181 "dt_lex.l"
|
---|
1410 | return (DT_TOK_SIZEOF);
|
---|
1411 | YY_BREAK
|
---|
1412 | case 32:
|
---|
1413 | YY_RULE_SETUP
|
---|
1414 | #line 182 "dt_lex.l"
|
---|
1415 | return (DT_KEY_STATIC);
|
---|
1416 | YY_BREAK
|
---|
1417 | case 33:
|
---|
1418 | YY_RULE_SETUP
|
---|
1419 | #line 183 "dt_lex.l"
|
---|
1420 | return (DT_KEY_STRING);
|
---|
1421 | YY_BREAK
|
---|
1422 | case 34:
|
---|
1423 | YY_RULE_SETUP
|
---|
1424 | #line 184 "dt_lex.l"
|
---|
1425 | return (DT_TOK_STRINGOF);
|
---|
1426 | YY_BREAK
|
---|
1427 | case 35:
|
---|
1428 | YY_RULE_SETUP
|
---|
1429 | #line 185 "dt_lex.l"
|
---|
1430 | return (DT_KEY_STRUCT);
|
---|
1431 | YY_BREAK
|
---|
1432 | case 36:
|
---|
1433 | YY_RULE_SETUP
|
---|
1434 | #line 186 "dt_lex.l"
|
---|
1435 | return (DT_KEY_SWITCH);
|
---|
1436 | YY_BREAK
|
---|
1437 | case 37:
|
---|
1438 | YY_RULE_SETUP
|
---|
1439 | #line 187 "dt_lex.l"
|
---|
1440 | return (DT_KEY_THIS);
|
---|
1441 | YY_BREAK
|
---|
1442 | case 38:
|
---|
1443 | YY_RULE_SETUP
|
---|
1444 | #line 188 "dt_lex.l"
|
---|
1445 | return (DT_KEY_XLATOR);
|
---|
1446 | YY_BREAK
|
---|
1447 | case 39:
|
---|
1448 | YY_RULE_SETUP
|
---|
1449 | #line 189 "dt_lex.l"
|
---|
1450 | return (DT_KEY_TYPEDEF);
|
---|
1451 | YY_BREAK
|
---|
1452 | case 40:
|
---|
1453 | YY_RULE_SETUP
|
---|
1454 | #line 190 "dt_lex.l"
|
---|
1455 | return (DT_KEY_UNION);
|
---|
1456 | YY_BREAK
|
---|
1457 | case 41:
|
---|
1458 | YY_RULE_SETUP
|
---|
1459 | #line 191 "dt_lex.l"
|
---|
1460 | return (DT_KEY_UNSIGNED);
|
---|
1461 | YY_BREAK
|
---|
1462 | case 42:
|
---|
1463 | YY_RULE_SETUP
|
---|
1464 | #line 192 "dt_lex.l"
|
---|
1465 | return (DT_KEY_VOID);
|
---|
1466 | YY_BREAK
|
---|
1467 | case 43:
|
---|
1468 | YY_RULE_SETUP
|
---|
1469 | #line 193 "dt_lex.l"
|
---|
1470 | return (DT_KEY_VOLATILE);
|
---|
1471 | YY_BREAK
|
---|
1472 | case 44:
|
---|
1473 | YY_RULE_SETUP
|
---|
1474 | #line 194 "dt_lex.l"
|
---|
1475 | return (DT_KEY_WHILE);
|
---|
1476 | YY_BREAK
|
---|
1477 | case 45:
|
---|
1478 | YY_RULE_SETUP
|
---|
1479 | #line 195 "dt_lex.l"
|
---|
1480 | return (DT_TOK_XLATE);
|
---|
1481 | YY_BREAK
|
---|
1482 | case 46:
|
---|
1483 | YY_RULE_SETUP
|
---|
1484 | #line 197 "dt_lex.l"
|
---|
1485 | { yybegin(YYS_EXPR); return (DT_KEY_AUTO); }
|
---|
1486 | YY_BREAK
|
---|
1487 | case 47:
|
---|
1488 | YY_RULE_SETUP
|
---|
1489 | #line 198 "dt_lex.l"
|
---|
1490 | { yybegin(YYS_EXPR); return (DT_KEY_CHAR); }
|
---|
1491 | YY_BREAK
|
---|
1492 | case 48:
|
---|
1493 | YY_RULE_SETUP
|
---|
1494 | #line 199 "dt_lex.l"
|
---|
1495 | { yybegin(YYS_EXPR); return (DT_KEY_CONST); }
|
---|
1496 | YY_BREAK
|
---|
1497 | case 49:
|
---|
1498 | YY_RULE_SETUP
|
---|
1499 | #line 200 "dt_lex.l"
|
---|
1500 | { yybegin(YYS_DEFINE); return (DT_KEY_COUNTER); }
|
---|
1501 | YY_BREAK
|
---|
1502 | case 50:
|
---|
1503 | YY_RULE_SETUP
|
---|
1504 | #line 201 "dt_lex.l"
|
---|
1505 | { yybegin(YYS_EXPR); return (DT_KEY_DOUBLE); }
|
---|
1506 | YY_BREAK
|
---|
1507 | case 51:
|
---|
1508 | YY_RULE_SETUP
|
---|
1509 | #line 202 "dt_lex.l"
|
---|
1510 | { yybegin(YYS_EXPR); return (DT_KEY_ENUM); }
|
---|
1511 | YY_BREAK
|
---|
1512 | case 52:
|
---|
1513 | YY_RULE_SETUP
|
---|
1514 | #line 203 "dt_lex.l"
|
---|
1515 | { yybegin(YYS_EXPR); return (DT_KEY_EXTERN); }
|
---|
1516 | YY_BREAK
|
---|
1517 | case 53:
|
---|
1518 | YY_RULE_SETUP
|
---|
1519 | #line 204 "dt_lex.l"
|
---|
1520 | { yybegin(YYS_EXPR); return (DT_KEY_FLOAT); }
|
---|
1521 | YY_BREAK
|
---|
1522 | case 54:
|
---|
1523 | YY_RULE_SETUP
|
---|
1524 | #line 205 "dt_lex.l"
|
---|
1525 | { yybegin(YYS_EXPR); return (DT_KEY_IMPORT); }
|
---|
1526 | YY_BREAK
|
---|
1527 | case 55:
|
---|
1528 | YY_RULE_SETUP
|
---|
1529 | #line 206 "dt_lex.l"
|
---|
1530 | { yybegin(YYS_DEFINE); return (DT_KEY_INLINE); }
|
---|
1531 | YY_BREAK
|
---|
1532 | case 56:
|
---|
1533 | YY_RULE_SETUP
|
---|
1534 | #line 207 "dt_lex.l"
|
---|
1535 | { yybegin(YYS_EXPR); return (DT_KEY_INT); }
|
---|
1536 | YY_BREAK
|
---|
1537 | case 57:
|
---|
1538 | YY_RULE_SETUP
|
---|
1539 | #line 208 "dt_lex.l"
|
---|
1540 | { yybegin(YYS_EXPR); return (DT_KEY_LONG); }
|
---|
1541 | YY_BREAK
|
---|
1542 | case 58:
|
---|
1543 | YY_RULE_SETUP
|
---|
1544 | #line 209 "dt_lex.l"
|
---|
1545 | { yybegin(YYS_DEFINE); return (DT_KEY_PROVIDER); }
|
---|
1546 | YY_BREAK
|
---|
1547 | case 59:
|
---|
1548 | YY_RULE_SETUP
|
---|
1549 | #line 210 "dt_lex.l"
|
---|
1550 | { yybegin(YYS_EXPR); return (DT_KEY_REGISTER); }
|
---|
1551 | YY_BREAK
|
---|
1552 | case 60:
|
---|
1553 | YY_RULE_SETUP
|
---|
1554 | #line 211 "dt_lex.l"
|
---|
1555 | { yybegin(YYS_EXPR); return (DT_KEY_RESTRICT); }
|
---|
1556 | YY_BREAK
|
---|
1557 | case 61:
|
---|
1558 | YY_RULE_SETUP
|
---|
1559 | #line 212 "dt_lex.l"
|
---|
1560 | { yybegin(YYS_EXPR); return (DT_KEY_SELF); }
|
---|
1561 | YY_BREAK
|
---|
1562 | case 62:
|
---|
1563 | YY_RULE_SETUP
|
---|
1564 | #line 213 "dt_lex.l"
|
---|
1565 | { yybegin(YYS_EXPR); return (DT_KEY_SHORT); }
|
---|
1566 | YY_BREAK
|
---|
1567 | case 63:
|
---|
1568 | YY_RULE_SETUP
|
---|
1569 | #line 214 "dt_lex.l"
|
---|
1570 | { yybegin(YYS_EXPR); return (DT_KEY_SIGNED); }
|
---|
1571 | YY_BREAK
|
---|
1572 | case 64:
|
---|
1573 | YY_RULE_SETUP
|
---|
1574 | #line 215 "dt_lex.l"
|
---|
1575 | { yybegin(YYS_EXPR); return (DT_KEY_STATIC); }
|
---|
1576 | YY_BREAK
|
---|
1577 | case 65:
|
---|
1578 | YY_RULE_SETUP
|
---|
1579 | #line 216 "dt_lex.l"
|
---|
1580 | { yybegin(YYS_EXPR); return (DT_KEY_STRING); }
|
---|
1581 | YY_BREAK
|
---|
1582 | case 66:
|
---|
1583 | YY_RULE_SETUP
|
---|
1584 | #line 217 "dt_lex.l"
|
---|
1585 | { yybegin(YYS_EXPR); return (DT_KEY_STRUCT); }
|
---|
1586 | YY_BREAK
|
---|
1587 | case 67:
|
---|
1588 | YY_RULE_SETUP
|
---|
1589 | #line 218 "dt_lex.l"
|
---|
1590 | { yybegin(YYS_EXPR); return (DT_KEY_THIS); }
|
---|
1591 | YY_BREAK
|
---|
1592 | case 68:
|
---|
1593 | YY_RULE_SETUP
|
---|
1594 | #line 219 "dt_lex.l"
|
---|
1595 | { yybegin(YYS_DEFINE); return (DT_KEY_XLATOR); }
|
---|
1596 | YY_BREAK
|
---|
1597 | case 69:
|
---|
1598 | YY_RULE_SETUP
|
---|
1599 | #line 220 "dt_lex.l"
|
---|
1600 | { yybegin(YYS_EXPR); return (DT_KEY_TYPEDEF); }
|
---|
1601 | YY_BREAK
|
---|
1602 | case 70:
|
---|
1603 | YY_RULE_SETUP
|
---|
1604 | #line 221 "dt_lex.l"
|
---|
1605 | { yybegin(YYS_EXPR); return (DT_KEY_UNION); }
|
---|
1606 | YY_BREAK
|
---|
1607 | case 71:
|
---|
1608 | YY_RULE_SETUP
|
---|
1609 | #line 222 "dt_lex.l"
|
---|
1610 | { yybegin(YYS_EXPR); return (DT_KEY_UNSIGNED); }
|
---|
1611 | YY_BREAK
|
---|
1612 | case 72:
|
---|
1613 | YY_RULE_SETUP
|
---|
1614 | #line 223 "dt_lex.l"
|
---|
1615 | { yybegin(YYS_EXPR); return (DT_KEY_VOID); }
|
---|
1616 | YY_BREAK
|
---|
1617 | case 73:
|
---|
1618 | YY_RULE_SETUP
|
---|
1619 | #line 224 "dt_lex.l"
|
---|
1620 | { yybegin(YYS_EXPR); return (DT_KEY_VOLATILE); }
|
---|
1621 | YY_BREAK
|
---|
1622 | case 74:
|
---|
1623 | YY_RULE_SETUP
|
---|
1624 | #line 226 "dt_lex.l"
|
---|
1625 | {
|
---|
1626 | int i = atoi(yytext + 2);
|
---|
1627 | char *v = "";
|
---|
1628 |
|
---|
1629 | /*
|
---|
1630 | * A macro argument reference substitutes the text of
|
---|
1631 | * an argument in place of the current token. When we
|
---|
1632 | * see $$<d> we fetch the saved string from pcb_sargv
|
---|
1633 | * (or use the default argument if the option has been
|
---|
1634 | * set and the argument hasn't been specified) and
|
---|
1635 | * return a token corresponding to this string.
|
---|
1636 | */
|
---|
1637 | if (i < 0 || (i >= yypcb->pcb_sargc &&
|
---|
1638 | !(yypcb->pcb_cflags & DTRACE_C_DEFARG))) {
|
---|
1639 | xyerror(D_MACRO_UNDEF, "macro argument %s is "
|
---|
1640 | "not defined\n", yytext);
|
---|
1641 | }
|
---|
1642 |
|
---|
1643 | if (i < yypcb->pcb_sargc) {
|
---|
1644 | v = yypcb->pcb_sargv[i]; /* get val from pcb */
|
---|
1645 | yypcb->pcb_sflagv[i] |= DT_IDFLG_REF;
|
---|
1646 | }
|
---|
1647 |
|
---|
1648 | if ((yylval.l_str = strdup(v)) == NULL)
|
---|
1649 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
1650 |
|
---|
1651 | (void) stresc2chr(yylval.l_str);
|
---|
1652 | return (DT_TOK_STRING);
|
---|
1653 | }
|
---|
1654 | YY_BREAK
|
---|
1655 | case 75:
|
---|
1656 | YY_RULE_SETUP
|
---|
1657 | #line 256 "dt_lex.l"
|
---|
1658 | {
|
---|
1659 | int i = atoi(yytext + 1);
|
---|
1660 | char *p, *v = "0";
|
---|
1661 |
|
---|
1662 | /*
|
---|
1663 | * A macro argument reference substitutes the text of
|
---|
1664 | * one identifier or integer pattern for another. When
|
---|
1665 | * we see $<d> we fetch the saved string from pcb_sargv
|
---|
1666 | * (or use the default argument if the option has been
|
---|
1667 | * set and the argument hasn't been specified) and
|
---|
1668 | * return a token corresponding to this string.
|
---|
1669 | */
|
---|
1670 | if (i < 0 || (i >= yypcb->pcb_sargc &&
|
---|
1671 | !(yypcb->pcb_cflags & DTRACE_C_DEFARG))) {
|
---|
1672 | xyerror(D_MACRO_UNDEF, "macro argument %s is "
|
---|
1673 | "not defined\n", yytext);
|
---|
1674 | }
|
---|
1675 |
|
---|
1676 | if (i < yypcb->pcb_sargc) {
|
---|
1677 | v = yypcb->pcb_sargv[i]; /* get val from pcb */
|
---|
1678 | yypcb->pcb_sflagv[i] |= DT_IDFLG_REF;
|
---|
1679 | }
|
---|
1680 |
|
---|
1681 | /*
|
---|
1682 | * If the macro text is not a valid integer or ident,
|
---|
1683 | * then we treat it as a string. The string may be
|
---|
1684 | * optionally enclosed in quotes, which we strip.
|
---|
1685 | */
|
---|
1686 | if (strbadidnum(v)) {
|
---|
1687 | size_t len = strlen(v);
|
---|
1688 |
|
---|
1689 | if (len != 1 && *v == '"' && v[len - 1] == '"')
|
---|
1690 | yylval.l_str = strndup(v + 1, len - 2);
|
---|
1691 | else
|
---|
1692 | yylval.l_str = strndup(v, len);
|
---|
1693 |
|
---|
1694 | if (yylval.l_str == NULL)
|
---|
1695 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
1696 |
|
---|
1697 | (void) stresc2chr(yylval.l_str);
|
---|
1698 | return (DT_TOK_STRING);
|
---|
1699 | }
|
---|
1700 |
|
---|
1701 | /*
|
---|
1702 | * If the macro text is not a string an begins with a
|
---|
1703 | * digit or a +/- sign, process it as an integer token.
|
---|
1704 | */
|
---|
1705 | if (isdigit(v[0]) || v[0] == '-' || v[0] == '+') {
|
---|
1706 | #ifdef VBOX
|
---|
1707 | int rc;
|
---|
1708 | #endif
|
---|
1709 | if (isdigit(v[0]))
|
---|
1710 | yyintprefix = 0;
|
---|
1711 | else
|
---|
1712 | yyintprefix = *v++;
|
---|
1713 |
|
---|
1714 | #ifndef VBOX
|
---|
1715 | errno = 0;
|
---|
1716 | yylval.l_int = strtoull(v, &p, 0);
|
---|
1717 | #else
|
---|
1718 | rc = RTStrToUInt64Ex(v, &p, 0, &yylval.l_int);
|
---|
1719 | #endif
|
---|
1720 | (void) strncpy(yyintsuffix, p,
|
---|
1721 | sizeof (yyintsuffix));
|
---|
1722 | yyintdecimal = *v != '0';
|
---|
1723 |
|
---|
1724 | #ifndef VBOX
|
---|
1725 | if (errno == ERANGE)
|
---|
1726 | #else
|
---|
1727 | if (rc == VWRN_NUMBER_TOO_BIG || rc == VWRN_NEGATIVE_UNSIGNED)
|
---|
1728 | #endif
|
---|
1729 | xyerror(D_MACRO_OFLOW, "macro argument"
|
---|
1730 | " %s constant %s results in integer"
|
---|
1731 | " overflow\n", yytext, v);
|
---|
1732 |
|
---|
1733 | return (DT_TOK_INT);
|
---|
1734 | }
|
---|
1735 |
|
---|
1736 | return (id_or_type(v));
|
---|
1737 | }
|
---|
1738 | YY_BREAK
|
---|
1739 | case 76:
|
---|
1740 | YY_RULE_SETUP
|
---|
1741 | #line 337 "dt_lex.l"
|
---|
1742 | {
|
---|
1743 | dt_ident_t *idp = dt_idhash_lookup(
|
---|
1744 | yypcb->pcb_hdl->dt_macros, yytext + 2);
|
---|
1745 |
|
---|
1746 | char s[16]; /* enough for UINT_MAX + \0 */
|
---|
1747 |
|
---|
1748 | if (idp == NULL) {
|
---|
1749 | xyerror(D_MACRO_UNDEF, "macro variable %s "
|
---|
1750 | "is not defined\n", yytext);
|
---|
1751 | }
|
---|
1752 |
|
---|
1753 | /*
|
---|
1754 | * For the moment, all current macro variables are of
|
---|
1755 | * type id_t (refer to dtrace_update() for details).
|
---|
1756 | */
|
---|
1757 | (void) snprintf(s, sizeof (s), "%u", idp->di_id);
|
---|
1758 | if ((yylval.l_str = strdup(s)) == NULL)
|
---|
1759 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
1760 |
|
---|
1761 | return (DT_TOK_STRING);
|
---|
1762 | }
|
---|
1763 | YY_BREAK
|
---|
1764 | case 77:
|
---|
1765 | YY_RULE_SETUP
|
---|
1766 | #line 359 "dt_lex.l"
|
---|
1767 | {
|
---|
1768 | dt_ident_t *idp = dt_idhash_lookup(
|
---|
1769 | yypcb->pcb_hdl->dt_macros, yytext + 1);
|
---|
1770 |
|
---|
1771 | if (idp == NULL) {
|
---|
1772 | xyerror(D_MACRO_UNDEF, "macro variable %s "
|
---|
1773 | "is not defined\n", yytext);
|
---|
1774 | }
|
---|
1775 |
|
---|
1776 | /*
|
---|
1777 | * For the moment, all current macro variables are of
|
---|
1778 | * type id_t (refer to dtrace_update() for details).
|
---|
1779 | */
|
---|
1780 | yylval.l_int = (intmax_t)(int)idp->di_id;
|
---|
1781 | yyintprefix = 0;
|
---|
1782 | yyintsuffix[0] = '\0';
|
---|
1783 | yyintdecimal = 1;
|
---|
1784 |
|
---|
1785 | return (DT_TOK_INT);
|
---|
1786 | }
|
---|
1787 | YY_BREAK
|
---|
1788 | case 78:
|
---|
1789 | YY_RULE_SETUP
|
---|
1790 | #line 380 "dt_lex.l"
|
---|
1791 | {
|
---|
1792 | return (id_or_type(yytext));
|
---|
1793 | }
|
---|
1794 | YY_BREAK
|
---|
1795 | case 79:
|
---|
1796 | YY_RULE_SETUP
|
---|
1797 | #line 384 "dt_lex.l"
|
---|
1798 | {
|
---|
1799 | if ((yylval.l_str = strdup(yytext)) == NULL)
|
---|
1800 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
1801 | return (DT_TOK_AGG);
|
---|
1802 | }
|
---|
1803 | YY_BREAK
|
---|
1804 | case 80:
|
---|
1805 | YY_RULE_SETUP
|
---|
1806 | #line 390 "dt_lex.l"
|
---|
1807 | {
|
---|
1808 | if ((yylval.l_str = strdup("@_")) == NULL)
|
---|
1809 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
1810 | return (DT_TOK_AGG);
|
---|
1811 | }
|
---|
1812 | YY_BREAK
|
---|
1813 | case 81:
|
---|
1814 | #line 397 "dt_lex.l"
|
---|
1815 | case 82:
|
---|
1816 | #line 398 "dt_lex.l"
|
---|
1817 | case 83:
|
---|
1818 | YY_RULE_SETUP
|
---|
1819 | #line 398 "dt_lex.l"
|
---|
1820 | {
|
---|
1821 | char *p;
|
---|
1822 |
|
---|
1823 | #ifndef VBOX
|
---|
1824 | errno = 0;
|
---|
1825 | yylval.l_int = strtoull(yytext, &p, 0);
|
---|
1826 | #else
|
---|
1827 | int rc = RTStrToUInt64Ex(yytext, &p, 0, &yylval.l_int);
|
---|
1828 | #endif
|
---|
1829 | yyintprefix = 0;
|
---|
1830 | (void) strncpy(yyintsuffix, p, sizeof (yyintsuffix));
|
---|
1831 | yyintdecimal = yytext[0] != '0';
|
---|
1832 |
|
---|
1833 | #ifndef VBOX
|
---|
1834 | if (errno == ERANGE)
|
---|
1835 | #else
|
---|
1836 | if (rc == VWRN_NUMBER_TOO_BIG || rc == VWRN_NEGATIVE_UNSIGNED)
|
---|
1837 | #endif
|
---|
1838 | xyerror(D_INT_OFLOW, "constant %s results in "
|
---|
1839 | "integer overflow\n", yytext);
|
---|
1840 |
|
---|
1841 | if (*p != '\0' && strchr("uUlL", *p) == NULL) {
|
---|
1842 | xyerror(D_INT_DIGIT, "constant %s contains "
|
---|
1843 | "invalid digit %c\n", yytext, *p);
|
---|
1844 | }
|
---|
1845 |
|
---|
1846 | if ((YYSTATE) != S3)
|
---|
1847 | return (DT_TOK_INT);
|
---|
1848 |
|
---|
1849 | yypragma = dt_node_link(yypragma,
|
---|
1850 | dt_node_int(yylval.l_int));
|
---|
1851 | }
|
---|
1852 | YY_BREAK
|
---|
1853 | case 84:
|
---|
1854 | YY_RULE_SETUP
|
---|
1855 | #line 431 "dt_lex.l"
|
---|
1856 | yyerror("floating-point constants are not permitted\n");
|
---|
1857 | YY_BREAK
|
---|
1858 | /* VBOX changed:
|
---|
1859 | <S0>\"{RGX_STR}$ |
|
---|
1860 | <S3>\"{RGX_STR}$ xyerror(D_STR_NL, "newline encountered in string literal");
|
---|
1861 | input: */
|
---|
1862 | case 85:
|
---|
1863 | YY_RULE_SETUP
|
---|
1864 | #line 437 "dt_lex.l"
|
---|
1865 | xyerror(D_STR_NL, "newline encountered in string literal");
|
---|
1866 | YY_BREAK
|
---|
1867 | case 86:
|
---|
1868 | #line 440 "dt_lex.l"
|
---|
1869 | case 87:
|
---|
1870 | YY_RULE_SETUP
|
---|
1871 | #line 440 "dt_lex.l"
|
---|
1872 | {
|
---|
1873 | /*
|
---|
1874 | * Quoted string -- convert C escape sequences and
|
---|
1875 | * return the string as a token.
|
---|
1876 | */
|
---|
1877 | yylval.l_str = strndup(yytext + 1, yyleng - 2);
|
---|
1878 |
|
---|
1879 | if (yylval.l_str == NULL)
|
---|
1880 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
1881 |
|
---|
1882 | (void) stresc2chr(yylval.l_str);
|
---|
1883 | if ((YYSTATE) != S3)
|
---|
1884 | return (DT_TOK_STRING);
|
---|
1885 |
|
---|
1886 | yypragma = dt_node_link(yypragma,
|
---|
1887 | dt_node_string(yylval.l_str));
|
---|
1888 | }
|
---|
1889 | YY_BREAK
|
---|
1890 | case 88:
|
---|
1891 | YY_RULE_SETUP
|
---|
1892 | #line 458 "dt_lex.l"
|
---|
1893 | xyerror(D_CHR_NL, "newline encountered in character constant");
|
---|
1894 | YY_BREAK
|
---|
1895 | case 89:
|
---|
1896 | YY_RULE_SETUP
|
---|
1897 | #line 460 "dt_lex.l"
|
---|
1898 | {
|
---|
1899 | char *s, *p, *q;
|
---|
1900 | size_t nbytes;
|
---|
1901 |
|
---|
1902 | /*
|
---|
1903 | * Character constant -- convert C escape sequences and
|
---|
1904 | * return the character as an integer immediate value.
|
---|
1905 | */
|
---|
1906 | if (yyleng == 2)
|
---|
1907 | xyerror(D_CHR_NULL, "empty character constant");
|
---|
1908 |
|
---|
1909 | s = yytext + 1;
|
---|
1910 | yytext[yyleng - 1] = '\0';
|
---|
1911 | nbytes = stresc2chr(s);
|
---|
1912 | yylval.l_int = 0;
|
---|
1913 | yyintprefix = 0;
|
---|
1914 | yyintsuffix[0] = '\0';
|
---|
1915 | yyintdecimal = 1;
|
---|
1916 |
|
---|
1917 | if (nbytes > sizeof (yylval.l_int)) {
|
---|
1918 | xyerror(D_CHR_OFLOW, "character constant is "
|
---|
1919 | "too long");
|
---|
1920 | }
|
---|
1921 | #ifdef _LITTLE_ENDIAN
|
---|
1922 | p = ((char *)&yylval.l_int) + nbytes - 1;
|
---|
1923 | for (q = s; nbytes != 0; nbytes--)
|
---|
1924 | *p-- = *q++;
|
---|
1925 | #else
|
---|
1926 | bcopy(s, ((char *)&yylval.l_int) +
|
---|
1927 | sizeof (yylval.l_int) - nbytes, nbytes);
|
---|
1928 | #endif
|
---|
1929 | return (DT_TOK_INT);
|
---|
1930 | }
|
---|
1931 | YY_BREAK
|
---|
1932 | case 90:
|
---|
1933 | #line 495 "dt_lex.l"
|
---|
1934 | case 91:
|
---|
1935 | YY_RULE_SETUP
|
---|
1936 | #line 495 "dt_lex.l"
|
---|
1937 | {
|
---|
1938 | yypcb->pcb_cstate = (YYSTATE);
|
---|
1939 | BEGIN(S1);
|
---|
1940 | }
|
---|
1941 | YY_BREAK
|
---|
1942 | case 92:
|
---|
1943 | #line 501 "dt_lex.l"
|
---|
1944 | case 93:
|
---|
1945 | YY_RULE_SETUP
|
---|
1946 | #line 501 "dt_lex.l"
|
---|
1947 | ; /* discard any #! lines */
|
---|
1948 | YY_BREAK
|
---|
1949 | case 94:
|
---|
1950 | #line 504 "dt_lex.l"
|
---|
1951 | case 95:
|
---|
1952 | #line 505 "dt_lex.l"
|
---|
1953 | case 96:
|
---|
1954 | YY_RULE_SETUP
|
---|
1955 | #line 505 "dt_lex.l"
|
---|
1956 | {
|
---|
1957 | assert(yypragma == NULL);
|
---|
1958 | yypcb->pcb_cstate = (YYSTATE);
|
---|
1959 | BEGIN(S3);
|
---|
1960 | }
|
---|
1961 | YY_BREAK
|
---|
1962 | case 97:
|
---|
1963 | YY_RULE_SETUP
|
---|
1964 | #line 511 "dt_lex.l"
|
---|
1965 | ; /* discard */
|
---|
1966 | YY_BREAK
|
---|
1967 | case 98:
|
---|
1968 | YY_RULE_SETUP
|
---|
1969 | #line 512 "dt_lex.l"
|
---|
1970 | ; /* discard */
|
---|
1971 | YY_BREAK
|
---|
1972 | case 99:
|
---|
1973 | YY_RULE_SETUP
|
---|
1974 | #line 514 "dt_lex.l"
|
---|
1975 | {
|
---|
1976 | int c, tok;
|
---|
1977 |
|
---|
1978 | /*
|
---|
1979 | * The use of "/" as the predicate delimiter and as the
|
---|
1980 | * integer division symbol requires special lookahead
|
---|
1981 | * to avoid a shift/reduce conflict in the D grammar.
|
---|
1982 | * We look ahead to the next non-whitespace character.
|
---|
1983 | * If we encounter EOF, ";", "{", or "/", then this "/"
|
---|
1984 | * closes the predicate and we return DT_TOK_EPRED.
|
---|
1985 | * If we encounter anything else, it's DT_TOK_DIV.
|
---|
1986 | */
|
---|
1987 | while ((c = input()) != 0) {
|
---|
1988 | if (strchr("\f\n\r\t\v ", c) == NULL)
|
---|
1989 | break;
|
---|
1990 | }
|
---|
1991 |
|
---|
1992 | if (c == 0 || c == ';' || c == '{' || c == '/') {
|
---|
1993 | if (yypcb->pcb_parens != 0) {
|
---|
1994 | yyerror("closing ) expected in "
|
---|
1995 | "predicate before /\n");
|
---|
1996 | }
|
---|
1997 | if (yypcb->pcb_brackets != 0) {
|
---|
1998 | yyerror("closing ] expected in "
|
---|
1999 | "predicate before /\n");
|
---|
2000 | }
|
---|
2001 | tok = DT_TOK_EPRED;
|
---|
2002 | } else
|
---|
2003 | tok = DT_TOK_DIV;
|
---|
2004 |
|
---|
2005 | if (c != EOF) unput(c);
|
---|
2006 | return (tok);
|
---|
2007 | }
|
---|
2008 | YY_BREAK
|
---|
2009 | case 100:
|
---|
2010 | YY_RULE_SETUP
|
---|
2011 | #line 548 "dt_lex.l"
|
---|
2012 | {
|
---|
2013 | yypcb->pcb_parens++;
|
---|
2014 | return (DT_TOK_LPAR);
|
---|
2015 | }
|
---|
2016 | YY_BREAK
|
---|
2017 | case 101:
|
---|
2018 | YY_RULE_SETUP
|
---|
2019 | #line 553 "dt_lex.l"
|
---|
2020 | {
|
---|
2021 | if (--yypcb->pcb_parens < 0)
|
---|
2022 | yyerror("extra ) in input stream\n");
|
---|
2023 | return (DT_TOK_RPAR);
|
---|
2024 | }
|
---|
2025 | YY_BREAK
|
---|
2026 | case 102:
|
---|
2027 | YY_RULE_SETUP
|
---|
2028 | #line 559 "dt_lex.l"
|
---|
2029 | {
|
---|
2030 | yypcb->pcb_brackets++;
|
---|
2031 | return (DT_TOK_LBRAC);
|
---|
2032 | }
|
---|
2033 | YY_BREAK
|
---|
2034 | case 103:
|
---|
2035 | YY_RULE_SETUP
|
---|
2036 | #line 564 "dt_lex.l"
|
---|
2037 | {
|
---|
2038 | if (--yypcb->pcb_brackets < 0)
|
---|
2039 | yyerror("extra ] in input stream\n");
|
---|
2040 | return (DT_TOK_RBRAC);
|
---|
2041 | }
|
---|
2042 | YY_BREAK
|
---|
2043 | case 104:
|
---|
2044 | #line 571 "dt_lex.l"
|
---|
2045 | case 105:
|
---|
2046 | YY_RULE_SETUP
|
---|
2047 | #line 571 "dt_lex.l"
|
---|
2048 | {
|
---|
2049 | yypcb->pcb_braces++;
|
---|
2050 | return ('{');
|
---|
2051 | }
|
---|
2052 | YY_BREAK
|
---|
2053 | case 106:
|
---|
2054 | YY_RULE_SETUP
|
---|
2055 | #line 576 "dt_lex.l"
|
---|
2056 | {
|
---|
2057 | if (--yypcb->pcb_braces < 0)
|
---|
2058 | yyerror("extra } in input stream\n");
|
---|
2059 | return ('}');
|
---|
2060 | }
|
---|
2061 | YY_BREAK
|
---|
2062 | case 107:
|
---|
2063 | YY_RULE_SETUP
|
---|
2064 | #line 582 "dt_lex.l"
|
---|
2065 | return (DT_TOK_BOR);
|
---|
2066 | YY_BREAK
|
---|
2067 | case 108:
|
---|
2068 | YY_RULE_SETUP
|
---|
2069 | #line 583 "dt_lex.l"
|
---|
2070 | return (DT_TOK_XOR);
|
---|
2071 | YY_BREAK
|
---|
2072 | case 109:
|
---|
2073 | YY_RULE_SETUP
|
---|
2074 | #line 584 "dt_lex.l"
|
---|
2075 | return (DT_TOK_BAND);
|
---|
2076 | YY_BREAK
|
---|
2077 | case 110:
|
---|
2078 | YY_RULE_SETUP
|
---|
2079 | #line 585 "dt_lex.l"
|
---|
2080 | return (DT_TOK_LAND);
|
---|
2081 | YY_BREAK
|
---|
2082 | case 111:
|
---|
2083 | YY_RULE_SETUP
|
---|
2084 | #line 586 "dt_lex.l"
|
---|
2085 | return (DT_TOK_LXOR);
|
---|
2086 | YY_BREAK
|
---|
2087 | case 112:
|
---|
2088 | YY_RULE_SETUP
|
---|
2089 | #line 587 "dt_lex.l"
|
---|
2090 | return (DT_TOK_LOR);
|
---|
2091 | YY_BREAK
|
---|
2092 | case 113:
|
---|
2093 | YY_RULE_SETUP
|
---|
2094 | #line 588 "dt_lex.l"
|
---|
2095 | return (DT_TOK_EQU);
|
---|
2096 | YY_BREAK
|
---|
2097 | case 114:
|
---|
2098 | YY_RULE_SETUP
|
---|
2099 | #line 589 "dt_lex.l"
|
---|
2100 | return (DT_TOK_NEQ);
|
---|
2101 | YY_BREAK
|
---|
2102 | case 115:
|
---|
2103 | YY_RULE_SETUP
|
---|
2104 | #line 590 "dt_lex.l"
|
---|
2105 | return (DT_TOK_LT);
|
---|
2106 | YY_BREAK
|
---|
2107 | case 116:
|
---|
2108 | YY_RULE_SETUP
|
---|
2109 | #line 591 "dt_lex.l"
|
---|
2110 | return (DT_TOK_LE);
|
---|
2111 | YY_BREAK
|
---|
2112 | case 117:
|
---|
2113 | YY_RULE_SETUP
|
---|
2114 | #line 592 "dt_lex.l"
|
---|
2115 | return (DT_TOK_GT);
|
---|
2116 | YY_BREAK
|
---|
2117 | case 118:
|
---|
2118 | YY_RULE_SETUP
|
---|
2119 | #line 593 "dt_lex.l"
|
---|
2120 | return (DT_TOK_GE);
|
---|
2121 | YY_BREAK
|
---|
2122 | case 119:
|
---|
2123 | YY_RULE_SETUP
|
---|
2124 | #line 594 "dt_lex.l"
|
---|
2125 | return (DT_TOK_LSH);
|
---|
2126 | YY_BREAK
|
---|
2127 | case 120:
|
---|
2128 | YY_RULE_SETUP
|
---|
2129 | #line 595 "dt_lex.l"
|
---|
2130 | return (DT_TOK_RSH);
|
---|
2131 | YY_BREAK
|
---|
2132 | case 121:
|
---|
2133 | YY_RULE_SETUP
|
---|
2134 | #line 596 "dt_lex.l"
|
---|
2135 | return (DT_TOK_ADD);
|
---|
2136 | YY_BREAK
|
---|
2137 | case 122:
|
---|
2138 | YY_RULE_SETUP
|
---|
2139 | #line 597 "dt_lex.l"
|
---|
2140 | return (DT_TOK_SUB);
|
---|
2141 | YY_BREAK
|
---|
2142 | case 123:
|
---|
2143 | YY_RULE_SETUP
|
---|
2144 | #line 598 "dt_lex.l"
|
---|
2145 | return (DT_TOK_MUL);
|
---|
2146 | YY_BREAK
|
---|
2147 | case 124:
|
---|
2148 | YY_RULE_SETUP
|
---|
2149 | #line 599 "dt_lex.l"
|
---|
2150 | return (DT_TOK_MOD);
|
---|
2151 | YY_BREAK
|
---|
2152 | case 125:
|
---|
2153 | YY_RULE_SETUP
|
---|
2154 | #line 600 "dt_lex.l"
|
---|
2155 | return (DT_TOK_BNEG);
|
---|
2156 | YY_BREAK
|
---|
2157 | case 126:
|
---|
2158 | YY_RULE_SETUP
|
---|
2159 | #line 601 "dt_lex.l"
|
---|
2160 | return (DT_TOK_LNEG);
|
---|
2161 | YY_BREAK
|
---|
2162 | case 127:
|
---|
2163 | YY_RULE_SETUP
|
---|
2164 | #line 602 "dt_lex.l"
|
---|
2165 | return (DT_TOK_QUESTION);
|
---|
2166 | YY_BREAK
|
---|
2167 | case 128:
|
---|
2168 | YY_RULE_SETUP
|
---|
2169 | #line 603 "dt_lex.l"
|
---|
2170 | return (DT_TOK_COLON);
|
---|
2171 | YY_BREAK
|
---|
2172 | case 129:
|
---|
2173 | YY_RULE_SETUP
|
---|
2174 | #line 604 "dt_lex.l"
|
---|
2175 | return (DT_TOK_DOT);
|
---|
2176 | YY_BREAK
|
---|
2177 | case 130:
|
---|
2178 | YY_RULE_SETUP
|
---|
2179 | #line 605 "dt_lex.l"
|
---|
2180 | return (DT_TOK_PTR);
|
---|
2181 | YY_BREAK
|
---|
2182 | case 131:
|
---|
2183 | YY_RULE_SETUP
|
---|
2184 | #line 606 "dt_lex.l"
|
---|
2185 | return (DT_TOK_ASGN);
|
---|
2186 | YY_BREAK
|
---|
2187 | case 132:
|
---|
2188 | YY_RULE_SETUP
|
---|
2189 | #line 607 "dt_lex.l"
|
---|
2190 | return (DT_TOK_ADD_EQ);
|
---|
2191 | YY_BREAK
|
---|
2192 | case 133:
|
---|
2193 | YY_RULE_SETUP
|
---|
2194 | #line 608 "dt_lex.l"
|
---|
2195 | return (DT_TOK_SUB_EQ);
|
---|
2196 | YY_BREAK
|
---|
2197 | case 134:
|
---|
2198 | YY_RULE_SETUP
|
---|
2199 | #line 609 "dt_lex.l"
|
---|
2200 | return (DT_TOK_MUL_EQ);
|
---|
2201 | YY_BREAK
|
---|
2202 | case 135:
|
---|
2203 | YY_RULE_SETUP
|
---|
2204 | #line 610 "dt_lex.l"
|
---|
2205 | return (DT_TOK_DIV_EQ);
|
---|
2206 | YY_BREAK
|
---|
2207 | case 136:
|
---|
2208 | YY_RULE_SETUP
|
---|
2209 | #line 611 "dt_lex.l"
|
---|
2210 | return (DT_TOK_MOD_EQ);
|
---|
2211 | YY_BREAK
|
---|
2212 | case 137:
|
---|
2213 | YY_RULE_SETUP
|
---|
2214 | #line 612 "dt_lex.l"
|
---|
2215 | return (DT_TOK_AND_EQ);
|
---|
2216 | YY_BREAK
|
---|
2217 | case 138:
|
---|
2218 | YY_RULE_SETUP
|
---|
2219 | #line 613 "dt_lex.l"
|
---|
2220 | return (DT_TOK_XOR_EQ);
|
---|
2221 | YY_BREAK
|
---|
2222 | case 139:
|
---|
2223 | YY_RULE_SETUP
|
---|
2224 | #line 614 "dt_lex.l"
|
---|
2225 | return (DT_TOK_OR_EQ);
|
---|
2226 | YY_BREAK
|
---|
2227 | case 140:
|
---|
2228 | YY_RULE_SETUP
|
---|
2229 | #line 615 "dt_lex.l"
|
---|
2230 | return (DT_TOK_LSH_EQ);
|
---|
2231 | YY_BREAK
|
---|
2232 | case 141:
|
---|
2233 | YY_RULE_SETUP
|
---|
2234 | #line 616 "dt_lex.l"
|
---|
2235 | return (DT_TOK_RSH_EQ);
|
---|
2236 | YY_BREAK
|
---|
2237 | case 142:
|
---|
2238 | YY_RULE_SETUP
|
---|
2239 | #line 617 "dt_lex.l"
|
---|
2240 | return (DT_TOK_ADDADD);
|
---|
2241 | YY_BREAK
|
---|
2242 | case 143:
|
---|
2243 | YY_RULE_SETUP
|
---|
2244 | #line 618 "dt_lex.l"
|
---|
2245 | return (DT_TOK_SUBSUB);
|
---|
2246 | YY_BREAK
|
---|
2247 | case 144:
|
---|
2248 | YY_RULE_SETUP
|
---|
2249 | #line 619 "dt_lex.l"
|
---|
2250 | return (DT_TOK_ELLIPSIS);
|
---|
2251 | YY_BREAK
|
---|
2252 | case 145:
|
---|
2253 | YY_RULE_SETUP
|
---|
2254 | #line 620 "dt_lex.l"
|
---|
2255 | return (DT_TOK_COMMA);
|
---|
2256 | YY_BREAK
|
---|
2257 | case 146:
|
---|
2258 | YY_RULE_SETUP
|
---|
2259 | #line 621 "dt_lex.l"
|
---|
2260 | return (';');
|
---|
2261 | YY_BREAK
|
---|
2262 | case 147:
|
---|
2263 | YY_RULE_SETUP
|
---|
2264 | #line 622 "dt_lex.l"
|
---|
2265 | ; /* discard */
|
---|
2266 | YY_BREAK
|
---|
2267 | case 148:
|
---|
2268 | YY_RULE_SETUP
|
---|
2269 | #line 623 "dt_lex.l"
|
---|
2270 | ; /* discard */
|
---|
2271 | YY_BREAK
|
---|
2272 | case 149:
|
---|
2273 | YY_RULE_SETUP
|
---|
2274 | #line 624 "dt_lex.l"
|
---|
2275 | yyerror("syntax error near \"%c\"\n", yytext[0]);
|
---|
2276 | YY_BREAK
|
---|
2277 | case 150:
|
---|
2278 | YY_RULE_SETUP
|
---|
2279 | #line 626 "dt_lex.l"
|
---|
2280 | yyerror("/* encountered inside a comment\n");
|
---|
2281 | YY_BREAK
|
---|
2282 | case 151:
|
---|
2283 | YY_RULE_SETUP
|
---|
2284 | #line 627 "dt_lex.l"
|
---|
2285 | BEGIN(yypcb->pcb_cstate);
|
---|
2286 | YY_BREAK
|
---|
2287 | /* VBOX - START */
|
---|
2288 | case YY_STATE_EOF(S1):
|
---|
2289 | #line 629 "dt_lex.l"
|
---|
2290 | yyerror("end-of-file encountered before matching */\n");
|
---|
2291 | YY_BREAK
|
---|
2292 | /* VBOX - END */
|
---|
2293 | case 152:
|
---|
2294 | YY_RULE_SETUP
|
---|
2295 | #line 631 "dt_lex.l"
|
---|
2296 | ; /* discard */
|
---|
2297 | YY_BREAK
|
---|
2298 | case 153:
|
---|
2299 | YY_RULE_SETUP
|
---|
2300 | #line 633 "dt_lex.l"
|
---|
2301 | {
|
---|
2302 | /*
|
---|
2303 | * S2 has an ambiguity because RGX_PSPEC includes '*'
|
---|
2304 | * as a glob character and '*' also can be DT_TOK_STAR.
|
---|
2305 | * Since lex always matches the longest token, this
|
---|
2306 | * rule can be matched by an input string like "int*",
|
---|
2307 | * which could begin a global variable declaration such
|
---|
2308 | * as "int*x;" or could begin a RGX_PSPEC with globbing
|
---|
2309 | * such as "int* { trace(timestamp); }". If C_PSPEC is
|
---|
2310 | * not set, we must resolve the ambiguity in favor of
|
---|
2311 | * the type and perform lexer pushback if the fragment
|
---|
2312 | * before '*' or entire fragment matches a type name.
|
---|
2313 | * If C_PSPEC is set, we always return a PSPEC token.
|
---|
2314 | * If C_PSPEC is off, the user can avoid ambiguity by
|
---|
2315 | * including a ':' delimiter in the specifier, which
|
---|
2316 | * they should be doing anyway to specify the provider.
|
---|
2317 | */
|
---|
2318 | if (!(yypcb->pcb_cflags & DTRACE_C_PSPEC) &&
|
---|
2319 | strchr(yytext, ':') == NULL) {
|
---|
2320 |
|
---|
2321 | char *p = strchr(yytext, '*');
|
---|
2322 | char *q = yytext + yyleng - 1;
|
---|
2323 |
|
---|
2324 | if (p != NULL && p > yytext)
|
---|
2325 | *p = '\0'; /* prune yytext */
|
---|
2326 |
|
---|
2327 | if (dt_type_lookup(yytext, NULL) == 0) {
|
---|
2328 | yylval.l_str = strdup(yytext);
|
---|
2329 |
|
---|
2330 | if (yylval.l_str == NULL) {
|
---|
2331 | longjmp(yypcb->pcb_jmpbuf,
|
---|
2332 | EDT_NOMEM);
|
---|
2333 | }
|
---|
2334 |
|
---|
2335 | if (p != NULL && p > yytext) {
|
---|
2336 | for (*p = '*'; q >= p; q--)
|
---|
2337 | unput(*q);
|
---|
2338 | }
|
---|
2339 |
|
---|
2340 | yybegin(YYS_EXPR);
|
---|
2341 | return (DT_TOK_TNAME);
|
---|
2342 | }
|
---|
2343 |
|
---|
2344 | if (p != NULL && p > yytext)
|
---|
2345 | *p = '*'; /* restore yytext */
|
---|
2346 | }
|
---|
2347 |
|
---|
2348 | if ((yylval.l_str = strdup(yytext)) == NULL)
|
---|
2349 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
2350 |
|
---|
2351 | return (DT_TOK_PSPEC);
|
---|
2352 | }
|
---|
2353 | YY_BREAK
|
---|
2354 | case 154:
|
---|
2355 | YY_RULE_SETUP
|
---|
2356 | #line 686 "dt_lex.l"
|
---|
2357 | return (DT_TOK_DIV);
|
---|
2358 | YY_BREAK
|
---|
2359 | case 155:
|
---|
2360 | YY_RULE_SETUP
|
---|
2361 | #line 687 "dt_lex.l"
|
---|
2362 | return (DT_TOK_COMMA);
|
---|
2363 | YY_BREAK
|
---|
2364 | case 156:
|
---|
2365 | YY_RULE_SETUP
|
---|
2366 | #line 689 "dt_lex.l"
|
---|
2367 | ; /* discard */
|
---|
2368 | YY_BREAK
|
---|
2369 | case 157:
|
---|
2370 | YY_RULE_SETUP
|
---|
2371 | #line 690 "dt_lex.l"
|
---|
2372 | yyerror("syntax error near \"%c\"\n", yytext[0]);
|
---|
2373 | YY_BREAK
|
---|
2374 | case 158:
|
---|
2375 | YY_RULE_SETUP
|
---|
2376 | #line 692 "dt_lex.l"
|
---|
2377 | {
|
---|
2378 | dt_pragma(yypragma);
|
---|
2379 | yypragma = NULL;
|
---|
2380 | BEGIN(yypcb->pcb_cstate);
|
---|
2381 | }
|
---|
2382 | YY_BREAK
|
---|
2383 | case 159:
|
---|
2384 | YY_RULE_SETUP
|
---|
2385 | #line 698 "dt_lex.l"
|
---|
2386 | ; /* discard */
|
---|
2387 | YY_BREAK
|
---|
2388 | case 160:
|
---|
2389 | YY_RULE_SETUP
|
---|
2390 | #line 700 "dt_lex.l"
|
---|
2391 | {
|
---|
2392 | dt_node_t *dnp;
|
---|
2393 |
|
---|
2394 | if ((yylval.l_str = strdup(yytext)) == NULL)
|
---|
2395 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
2396 |
|
---|
2397 | /*
|
---|
2398 | * We want to call dt_node_ident() here, but we can't
|
---|
2399 | * because it will expand inlined identifiers, which we
|
---|
2400 | * don't want to do from #pragma context in order to
|
---|
2401 | * support pragmas that apply to the ident itself. We
|
---|
2402 | * call dt_node_string() and then reset dn_op instead.
|
---|
2403 | */
|
---|
2404 | dnp = dt_node_string(yylval.l_str);
|
---|
2405 | dnp->dn_kind = DT_NODE_IDENT;
|
---|
2406 | dnp->dn_op = DT_TOK_IDENT;
|
---|
2407 | yypragma = dt_node_link(yypragma, dnp);
|
---|
2408 | }
|
---|
2409 | YY_BREAK
|
---|
2410 | /* VBOX - BEGIN */
|
---|
2411 | case YY_STATE_EOF(S3):
|
---|
2412 | #line 720 "dt_lex.l"
|
---|
2413 | yyerror("end-of-file encountered before end of control line\n");
|
---|
2414 | YY_BREAK
|
---|
2415 | /* VBOX - END */
|
---|
2416 | case 161:
|
---|
2417 | YY_RULE_SETUP
|
---|
2418 | #line 722 "dt_lex.l"
|
---|
2419 | yyerror("syntax error near \"%c\"\n", yytext[0]);
|
---|
2420 | YY_BREAK
|
---|
2421 | case 162:
|
---|
2422 | YY_RULE_SETUP
|
---|
2423 | #line 724 "dt_lex.l"
|
---|
2424 | ECHO;
|
---|
2425 | YY_BREAK
|
---|
2426 | #line 2426 "dt_lex.c"
|
---|
2427 | case YY_STATE_EOF(INITIAL):
|
---|
2428 | case YY_STATE_EOF(S0):
|
---|
2429 | case YY_STATE_EOF(S2):
|
---|
2430 | case YY_STATE_EOF(S4):
|
---|
2431 | yyterminate();
|
---|
2432 |
|
---|
2433 | case YY_END_OF_BUFFER:
|
---|
2434 | {
|
---|
2435 | /* Amount of text matched not including the EOB char. */
|
---|
2436 | int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
|
---|
2437 |
|
---|
2438 | /* Undo the effects of YY_DO_BEFORE_ACTION. */
|
---|
2439 | *yy_cp = yy_hold_char;
|
---|
2440 | YY_RESTORE_YY_MORE_OFFSET
|
---|
2441 |
|
---|
2442 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
|
---|
2443 | {
|
---|
2444 | /* We're scanning a new file or input source. It's
|
---|
2445 | * possible that this happened because the user
|
---|
2446 | * just pointed yyin at a new source and called
|
---|
2447 | * yylex(). If so, then we have to assure
|
---|
2448 | * consistency between yy_current_buffer and our
|
---|
2449 | * globals. Here is the right place to do so, because
|
---|
2450 | * this is the first action (other than possibly a
|
---|
2451 | * back-up) that will match for the new input source.
|
---|
2452 | */
|
---|
2453 | yy_n_chars = yy_current_buffer->yy_n_chars;
|
---|
2454 | yy_current_buffer->yy_input_file = yyin;
|
---|
2455 | yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
|
---|
2456 | }
|
---|
2457 |
|
---|
2458 | /* Note that here we test for yy_c_buf_p "<=" to the position
|
---|
2459 | * of the first EOB in the buffer, since yy_c_buf_p will
|
---|
2460 | * already have been incremented past the NUL character
|
---|
2461 | * (since all states make transitions on EOB to the
|
---|
2462 | * end-of-buffer state). Contrast this with the test
|
---|
2463 | * in input().
|
---|
2464 | */
|
---|
2465 | if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
|
---|
2466 | { /* This was really a NUL. */
|
---|
2467 | yy_state_type yy_next_state;
|
---|
2468 |
|
---|
2469 | yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
|
---|
2470 |
|
---|
2471 | yy_current_state = yy_get_previous_state();
|
---|
2472 |
|
---|
2473 | /* Okay, we're now positioned to make the NUL
|
---|
2474 | * transition. We couldn't have
|
---|
2475 | * yy_get_previous_state() go ahead and do it
|
---|
2476 | * for us because it doesn't know how to deal
|
---|
2477 | * with the possibility of jamming (and we don't
|
---|
2478 | * want to build jamming into it because then it
|
---|
2479 | * will run more slowly).
|
---|
2480 | */
|
---|
2481 |
|
---|
2482 | yy_next_state = yy_try_NUL_trans( yy_current_state );
|
---|
2483 |
|
---|
2484 | yy_bp = yytext_ptr + YY_MORE_ADJ;
|
---|
2485 |
|
---|
2486 | if ( yy_next_state )
|
---|
2487 | {
|
---|
2488 | /* Consume the NUL. */
|
---|
2489 | yy_cp = ++yy_c_buf_p;
|
---|
2490 | yy_current_state = yy_next_state;
|
---|
2491 | goto yy_match;
|
---|
2492 | }
|
---|
2493 |
|
---|
2494 | else
|
---|
2495 | {
|
---|
2496 | yy_cp = yy_c_buf_p;
|
---|
2497 | goto yy_find_action;
|
---|
2498 | }
|
---|
2499 | }
|
---|
2500 |
|
---|
2501 | else switch ( yy_get_next_buffer() )
|
---|
2502 | {
|
---|
2503 | case EOB_ACT_END_OF_FILE:
|
---|
2504 | {
|
---|
2505 | yy_did_buffer_switch_on_eof = 0;
|
---|
2506 |
|
---|
2507 | if ( yywrap() )
|
---|
2508 | {
|
---|
2509 | /* Note: because we've taken care in
|
---|
2510 | * yy_get_next_buffer() to have set up
|
---|
2511 | * yytext, we can now set up
|
---|
2512 | * yy_c_buf_p so that if some total
|
---|
2513 | * hoser (like flex itself) wants to
|
---|
2514 | * call the scanner after we return the
|
---|
2515 | * YY_NULL, it'll still work - another
|
---|
2516 | * YY_NULL will get returned.
|
---|
2517 | */
|
---|
2518 | yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
|
---|
2519 |
|
---|
2520 | yy_act = YY_STATE_EOF(YY_START);
|
---|
2521 | goto do_action;
|
---|
2522 | }
|
---|
2523 |
|
---|
2524 | else
|
---|
2525 | {
|
---|
2526 | if ( ! yy_did_buffer_switch_on_eof )
|
---|
2527 | YY_NEW_FILE;
|
---|
2528 | }
|
---|
2529 | break;
|
---|
2530 | }
|
---|
2531 |
|
---|
2532 | case EOB_ACT_CONTINUE_SCAN:
|
---|
2533 | yy_c_buf_p =
|
---|
2534 | yytext_ptr + yy_amount_of_matched_text;
|
---|
2535 |
|
---|
2536 | yy_current_state = yy_get_previous_state();
|
---|
2537 |
|
---|
2538 | yy_cp = yy_c_buf_p;
|
---|
2539 | yy_bp = yytext_ptr + YY_MORE_ADJ;
|
---|
2540 | goto yy_match;
|
---|
2541 |
|
---|
2542 | case EOB_ACT_LAST_MATCH:
|
---|
2543 | yy_c_buf_p =
|
---|
2544 | &yy_current_buffer->yy_ch_buf[yy_n_chars];
|
---|
2545 |
|
---|
2546 | yy_current_state = yy_get_previous_state();
|
---|
2547 |
|
---|
2548 | yy_cp = yy_c_buf_p;
|
---|
2549 | yy_bp = yytext_ptr + YY_MORE_ADJ;
|
---|
2550 | goto yy_find_action;
|
---|
2551 | }
|
---|
2552 | break;
|
---|
2553 | }
|
---|
2554 |
|
---|
2555 | default:
|
---|
2556 | YY_FATAL_ERROR(
|
---|
2557 | "fatal flex scanner internal error--no action found" );
|
---|
2558 | } /* end of action switch */
|
---|
2559 | } /* end of scanning one token */
|
---|
2560 | } /* end of yylex */
|
---|
2561 |
|
---|
2562 |
|
---|
2563 | /* yy_get_next_buffer - try to read in a new buffer
|
---|
2564 | *
|
---|
2565 | * Returns a code representing an action:
|
---|
2566 | * EOB_ACT_LAST_MATCH -
|
---|
2567 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
---|
2568 | * EOB_ACT_END_OF_FILE - end of file
|
---|
2569 | */
|
---|
2570 |
|
---|
2571 | static int yy_get_next_buffer()
|
---|
2572 | {
|
---|
2573 | register char *dest = yy_current_buffer->yy_ch_buf;
|
---|
2574 | register char *source = yytext_ptr;
|
---|
2575 | register int number_to_move, i;
|
---|
2576 | int ret_val;
|
---|
2577 |
|
---|
2578 | if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
|
---|
2579 | YY_FATAL_ERROR(
|
---|
2580 | "fatal flex scanner internal error--end of buffer missed" );
|
---|
2581 |
|
---|
2582 | if ( yy_current_buffer->yy_fill_buffer == 0 )
|
---|
2583 | { /* Don't try to fill the buffer, so this is an EOF. */
|
---|
2584 | if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
|
---|
2585 | {
|
---|
2586 | /* We matched a single character, the EOB, so
|
---|
2587 | * treat this as a final EOF.
|
---|
2588 | */
|
---|
2589 | return EOB_ACT_END_OF_FILE;
|
---|
2590 | }
|
---|
2591 |
|
---|
2592 | else
|
---|
2593 | {
|
---|
2594 | /* We matched some text prior to the EOB, first
|
---|
2595 | * process it.
|
---|
2596 | */
|
---|
2597 | return EOB_ACT_LAST_MATCH;
|
---|
2598 | }
|
---|
2599 | }
|
---|
2600 |
|
---|
2601 | /* Try to read more data. */
|
---|
2602 |
|
---|
2603 | /* First move last chars to start of buffer. */
|
---|
2604 | number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
|
---|
2605 |
|
---|
2606 | for ( i = 0; i < number_to_move; ++i )
|
---|
2607 | *(dest++) = *(source++);
|
---|
2608 |
|
---|
2609 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
---|
2610 | /* don't do the read, it's not guaranteed to return an EOF,
|
---|
2611 | * just force an EOF
|
---|
2612 | */
|
---|
2613 | yy_current_buffer->yy_n_chars = yy_n_chars = 0;
|
---|
2614 |
|
---|
2615 | else
|
---|
2616 | {
|
---|
2617 | int num_to_read =
|
---|
2618 | yy_current_buffer->yy_buf_size - number_to_move - 1;
|
---|
2619 |
|
---|
2620 | while ( num_to_read <= 0 )
|
---|
2621 | { /* Not enough room in the buffer - grow it. */
|
---|
2622 | #ifdef YY_USES_REJECT
|
---|
2623 | YY_FATAL_ERROR(
|
---|
2624 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
|
---|
2625 | #else
|
---|
2626 |
|
---|
2627 | /* just a shorter name for the current buffer */
|
---|
2628 | YY_BUFFER_STATE b = yy_current_buffer;
|
---|
2629 |
|
---|
2630 | int yy_c_buf_p_offset =
|
---|
2631 | (int) (yy_c_buf_p - b->yy_ch_buf);
|
---|
2632 |
|
---|
2633 | if ( b->yy_is_our_buffer )
|
---|
2634 | {
|
---|
2635 | int new_size = b->yy_buf_size * 2;
|
---|
2636 |
|
---|
2637 | if ( new_size <= 0 )
|
---|
2638 | b->yy_buf_size += b->yy_buf_size / 8;
|
---|
2639 | else
|
---|
2640 | b->yy_buf_size *= 2;
|
---|
2641 |
|
---|
2642 | b->yy_ch_buf = (char *)
|
---|
2643 | /* Include room in for 2 EOB chars. */
|
---|
2644 | yy_flex_realloc( (void *) b->yy_ch_buf,
|
---|
2645 | b->yy_buf_size + 2 );
|
---|
2646 | }
|
---|
2647 | else
|
---|
2648 | /* Can't grow it, we don't own it. */
|
---|
2649 | b->yy_ch_buf = 0;
|
---|
2650 |
|
---|
2651 | if ( ! b->yy_ch_buf )
|
---|
2652 | YY_FATAL_ERROR(
|
---|
2653 | "fatal error - scanner input buffer overflow" );
|
---|
2654 |
|
---|
2655 | yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
|
---|
2656 |
|
---|
2657 | num_to_read = yy_current_buffer->yy_buf_size -
|
---|
2658 | number_to_move - 1;
|
---|
2659 | #endif
|
---|
2660 | }
|
---|
2661 |
|
---|
2662 | if ( num_to_read > YY_READ_BUF_SIZE )
|
---|
2663 | num_to_read = YY_READ_BUF_SIZE;
|
---|
2664 |
|
---|
2665 | /* Read in more data. */
|
---|
2666 | YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
|
---|
2667 | yy_n_chars, num_to_read );
|
---|
2668 |
|
---|
2669 | yy_current_buffer->yy_n_chars = yy_n_chars;
|
---|
2670 | }
|
---|
2671 |
|
---|
2672 | if ( yy_n_chars == 0 )
|
---|
2673 | {
|
---|
2674 | if ( number_to_move == YY_MORE_ADJ )
|
---|
2675 | {
|
---|
2676 | ret_val = EOB_ACT_END_OF_FILE;
|
---|
2677 | yyrestart( yyin );
|
---|
2678 | }
|
---|
2679 |
|
---|
2680 | else
|
---|
2681 | {
|
---|
2682 | ret_val = EOB_ACT_LAST_MATCH;
|
---|
2683 | yy_current_buffer->yy_buffer_status =
|
---|
2684 | YY_BUFFER_EOF_PENDING;
|
---|
2685 | }
|
---|
2686 | }
|
---|
2687 |
|
---|
2688 | else
|
---|
2689 | ret_val = EOB_ACT_CONTINUE_SCAN;
|
---|
2690 |
|
---|
2691 | yy_n_chars += number_to_move;
|
---|
2692 | yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
|
---|
2693 | yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
|
---|
2694 |
|
---|
2695 | yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
|
---|
2696 |
|
---|
2697 | return ret_val;
|
---|
2698 | }
|
---|
2699 |
|
---|
2700 |
|
---|
2701 | /* yy_get_previous_state - get the state just before the EOB char was reached */
|
---|
2702 |
|
---|
2703 | static yy_state_type yy_get_previous_state()
|
---|
2704 | {
|
---|
2705 | register yy_state_type yy_current_state;
|
---|
2706 | register char *yy_cp;
|
---|
2707 |
|
---|
2708 | yy_current_state = yy_start;
|
---|
2709 | yy_current_state += YY_AT_BOL();
|
---|
2710 | yy_state_ptr = yy_state_buf;
|
---|
2711 | *yy_state_ptr++ = yy_current_state;
|
---|
2712 |
|
---|
2713 | for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
|
---|
2714 | {
|
---|
2715 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
---|
2716 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
---|
2717 | {
|
---|
2718 | yy_current_state = (int) yy_def[yy_current_state];
|
---|
2719 | if ( yy_current_state >= 510 )
|
---|
2720 | yy_c = yy_meta[(unsigned int) yy_c];
|
---|
2721 | }
|
---|
2722 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
---|
2723 | *yy_state_ptr++ = yy_current_state;
|
---|
2724 | }
|
---|
2725 |
|
---|
2726 | return yy_current_state;
|
---|
2727 | }
|
---|
2728 |
|
---|
2729 |
|
---|
2730 | /* yy_try_NUL_trans - try to make a transition on the NUL character
|
---|
2731 | *
|
---|
2732 | * synopsis
|
---|
2733 | * next_state = yy_try_NUL_trans( current_state );
|
---|
2734 | */
|
---|
2735 |
|
---|
2736 | #ifdef YY_USE_PROTOS
|
---|
2737 | static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
|
---|
2738 | #else
|
---|
2739 | static yy_state_type yy_try_NUL_trans( yy_current_state )
|
---|
2740 | yy_state_type yy_current_state;
|
---|
2741 | #endif
|
---|
2742 | {
|
---|
2743 | register int yy_is_jam;
|
---|
2744 |
|
---|
2745 | register YY_CHAR yy_c = 1;
|
---|
2746 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
---|
2747 | {
|
---|
2748 | yy_current_state = (int) yy_def[yy_current_state];
|
---|
2749 | if ( yy_current_state >= 510 )
|
---|
2750 | yy_c = yy_meta[(unsigned int) yy_c];
|
---|
2751 | }
|
---|
2752 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
---|
2753 | yy_is_jam = (yy_current_state == 509);
|
---|
2754 | if ( ! yy_is_jam )
|
---|
2755 | *yy_state_ptr++ = yy_current_state;
|
---|
2756 |
|
---|
2757 | return yy_is_jam ? 0 : yy_current_state;
|
---|
2758 | }
|
---|
2759 |
|
---|
2760 |
|
---|
2761 | #ifndef YY_NO_UNPUT
|
---|
2762 | #ifdef YY_USE_PROTOS
|
---|
2763 | static void yyunput( int c, register char *yy_bp )
|
---|
2764 | #else
|
---|
2765 | static void yyunput( c, yy_bp )
|
---|
2766 | int c;
|
---|
2767 | register char *yy_bp;
|
---|
2768 | #endif
|
---|
2769 | {
|
---|
2770 | register char *yy_cp = yy_c_buf_p;
|
---|
2771 |
|
---|
2772 | /* undo effects of setting up yytext */
|
---|
2773 | *yy_cp = yy_hold_char;
|
---|
2774 |
|
---|
2775 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
---|
2776 | { /* need to shift things up to make room */
|
---|
2777 | /* +2 for EOB chars. */
|
---|
2778 | register int number_to_move = yy_n_chars + 2;
|
---|
2779 | register char *dest = &yy_current_buffer->yy_ch_buf[
|
---|
2780 | yy_current_buffer->yy_buf_size + 2];
|
---|
2781 | register char *source =
|
---|
2782 | &yy_current_buffer->yy_ch_buf[number_to_move];
|
---|
2783 |
|
---|
2784 | while ( source > yy_current_buffer->yy_ch_buf )
|
---|
2785 | *--dest = *--source;
|
---|
2786 |
|
---|
2787 | yy_cp += (int) (dest - source);
|
---|
2788 | yy_bp += (int) (dest - source);
|
---|
2789 | yy_current_buffer->yy_n_chars =
|
---|
2790 | yy_n_chars = yy_current_buffer->yy_buf_size;
|
---|
2791 |
|
---|
2792 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
---|
2793 | YY_FATAL_ERROR( "flex scanner push-back overflow" );
|
---|
2794 | }
|
---|
2795 |
|
---|
2796 | *--yy_cp = (char) c;
|
---|
2797 |
|
---|
2798 | if ( c == '\n' )
|
---|
2799 | --yylineno;
|
---|
2800 |
|
---|
2801 | yytext_ptr = yy_bp;
|
---|
2802 | yy_hold_char = *yy_cp;
|
---|
2803 | yy_c_buf_p = yy_cp;
|
---|
2804 | }
|
---|
2805 | #endif /* ifndef YY_NO_UNPUT */
|
---|
2806 |
|
---|
2807 |
|
---|
2808 | #ifdef __cplusplus
|
---|
2809 | static int yyinput()
|
---|
2810 | #else
|
---|
2811 | static int input()
|
---|
2812 | #endif
|
---|
2813 | {
|
---|
2814 | int c;
|
---|
2815 |
|
---|
2816 | *yy_c_buf_p = yy_hold_char;
|
---|
2817 |
|
---|
2818 | if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
|
---|
2819 | {
|
---|
2820 | /* yy_c_buf_p now points to the character we want to return.
|
---|
2821 | * If this occurs *before* the EOB characters, then it's a
|
---|
2822 | * valid NUL; if not, then we've hit the end of the buffer.
|
---|
2823 | */
|
---|
2824 | if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
|
---|
2825 | /* This was really a NUL. */
|
---|
2826 | *yy_c_buf_p = '\0';
|
---|
2827 |
|
---|
2828 | else
|
---|
2829 | { /* need more input */
|
---|
2830 | int offset = yy_c_buf_p - yytext_ptr;
|
---|
2831 | ++yy_c_buf_p;
|
---|
2832 |
|
---|
2833 | switch ( yy_get_next_buffer() )
|
---|
2834 | {
|
---|
2835 | case EOB_ACT_LAST_MATCH:
|
---|
2836 | /* This happens because yy_g_n_b()
|
---|
2837 | * sees that we've accumulated a
|
---|
2838 | * token and flags that we need to
|
---|
2839 | * try matching the token before
|
---|
2840 | * proceeding. But for input(),
|
---|
2841 | * there's no matching to consider.
|
---|
2842 | * So convert the EOB_ACT_LAST_MATCH
|
---|
2843 | * to EOB_ACT_END_OF_FILE.
|
---|
2844 | */
|
---|
2845 |
|
---|
2846 | /* Reset buffer status. */
|
---|
2847 | yyrestart( yyin );
|
---|
2848 |
|
---|
2849 | /* fall through */
|
---|
2850 |
|
---|
2851 | case EOB_ACT_END_OF_FILE:
|
---|
2852 | {
|
---|
2853 | if ( yywrap() )
|
---|
2854 | return EOF;
|
---|
2855 |
|
---|
2856 | if ( ! yy_did_buffer_switch_on_eof )
|
---|
2857 | YY_NEW_FILE;
|
---|
2858 | #ifdef __cplusplus
|
---|
2859 | return yyinput();
|
---|
2860 | #else
|
---|
2861 | return input();
|
---|
2862 | #endif
|
---|
2863 | }
|
---|
2864 |
|
---|
2865 | case EOB_ACT_CONTINUE_SCAN:
|
---|
2866 | yy_c_buf_p = yytext_ptr + offset;
|
---|
2867 | break;
|
---|
2868 | }
|
---|
2869 | }
|
---|
2870 | }
|
---|
2871 |
|
---|
2872 | c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
|
---|
2873 | *yy_c_buf_p = '\0'; /* preserve yytext */
|
---|
2874 | yy_hold_char = *++yy_c_buf_p;
|
---|
2875 |
|
---|
2876 | yy_current_buffer->yy_at_bol = (c == '\n');
|
---|
2877 | if ( yy_current_buffer->yy_at_bol )
|
---|
2878 | ++yylineno;
|
---|
2879 |
|
---|
2880 | return c;
|
---|
2881 | }
|
---|
2882 |
|
---|
2883 |
|
---|
2884 | #ifdef YY_USE_PROTOS
|
---|
2885 | void yyrestart( FILE *input_file )
|
---|
2886 | #else
|
---|
2887 | void yyrestart( input_file )
|
---|
2888 | FILE *input_file;
|
---|
2889 | #endif
|
---|
2890 | {
|
---|
2891 | if ( ! yy_current_buffer )
|
---|
2892 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
|
---|
2893 |
|
---|
2894 | yy_init_buffer( yy_current_buffer, input_file );
|
---|
2895 | yy_load_buffer_state();
|
---|
2896 | }
|
---|
2897 |
|
---|
2898 |
|
---|
2899 | #ifdef YY_USE_PROTOS
|
---|
2900 | void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
|
---|
2901 | #else
|
---|
2902 | void yy_switch_to_buffer( new_buffer )
|
---|
2903 | YY_BUFFER_STATE new_buffer;
|
---|
2904 | #endif
|
---|
2905 | {
|
---|
2906 | if ( yy_current_buffer == new_buffer )
|
---|
2907 | return;
|
---|
2908 |
|
---|
2909 | if ( yy_current_buffer )
|
---|
2910 | {
|
---|
2911 | /* Flush out information for old buffer. */
|
---|
2912 | *yy_c_buf_p = yy_hold_char;
|
---|
2913 | yy_current_buffer->yy_buf_pos = yy_c_buf_p;
|
---|
2914 | yy_current_buffer->yy_n_chars = yy_n_chars;
|
---|
2915 | }
|
---|
2916 |
|
---|
2917 | yy_current_buffer = new_buffer;
|
---|
2918 | yy_load_buffer_state();
|
---|
2919 |
|
---|
2920 | /* We don't actually know whether we did this switch during
|
---|
2921 | * EOF (yywrap()) processing, but the only time this flag
|
---|
2922 | * is looked at is after yywrap() is called, so it's safe
|
---|
2923 | * to go ahead and always set it.
|
---|
2924 | */
|
---|
2925 | yy_did_buffer_switch_on_eof = 1;
|
---|
2926 | }
|
---|
2927 |
|
---|
2928 |
|
---|
2929 | #ifdef YY_USE_PROTOS
|
---|
2930 | void yy_load_buffer_state( void )
|
---|
2931 | #else
|
---|
2932 | void yy_load_buffer_state()
|
---|
2933 | #endif
|
---|
2934 | {
|
---|
2935 | yy_n_chars = yy_current_buffer->yy_n_chars;
|
---|
2936 | yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
|
---|
2937 | yyin = yy_current_buffer->yy_input_file;
|
---|
2938 | yy_hold_char = *yy_c_buf_p;
|
---|
2939 | }
|
---|
2940 |
|
---|
2941 |
|
---|
2942 | #ifdef YY_USE_PROTOS
|
---|
2943 | YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
|
---|
2944 | #else
|
---|
2945 | YY_BUFFER_STATE yy_create_buffer( file, size )
|
---|
2946 | FILE *file;
|
---|
2947 | int size;
|
---|
2948 | #endif
|
---|
2949 | {
|
---|
2950 | YY_BUFFER_STATE b;
|
---|
2951 |
|
---|
2952 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
---|
2953 | if ( ! b )
|
---|
2954 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
---|
2955 |
|
---|
2956 | b->yy_buf_size = size;
|
---|
2957 |
|
---|
2958 | /* yy_ch_buf has to be 2 characters longer than the size given because
|
---|
2959 | * we need to put in 2 end-of-buffer characters.
|
---|
2960 | */
|
---|
2961 | b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
|
---|
2962 | if ( ! b->yy_ch_buf )
|
---|
2963 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
---|
2964 |
|
---|
2965 | b->yy_is_our_buffer = 1;
|
---|
2966 |
|
---|
2967 | yy_init_buffer( b, file );
|
---|
2968 |
|
---|
2969 | return b;
|
---|
2970 | }
|
---|
2971 |
|
---|
2972 |
|
---|
2973 | #ifdef YY_USE_PROTOS
|
---|
2974 | void yy_delete_buffer( YY_BUFFER_STATE b )
|
---|
2975 | #else
|
---|
2976 | void yy_delete_buffer( b )
|
---|
2977 | YY_BUFFER_STATE b;
|
---|
2978 | #endif
|
---|
2979 | {
|
---|
2980 | if ( ! b )
|
---|
2981 | return;
|
---|
2982 |
|
---|
2983 | if ( b == yy_current_buffer )
|
---|
2984 | yy_current_buffer = (YY_BUFFER_STATE) 0;
|
---|
2985 |
|
---|
2986 | if ( b->yy_is_our_buffer )
|
---|
2987 | yy_flex_free( (void *) b->yy_ch_buf );
|
---|
2988 |
|
---|
2989 | yy_flex_free( (void *) b );
|
---|
2990 | }
|
---|
2991 |
|
---|
2992 |
|
---|
2993 | #ifndef YY_ALWAYS_INTERACTIVE
|
---|
2994 | #ifndef YY_NEVER_INTERACTIVE
|
---|
2995 | extern int isatty YY_PROTO(( int ));
|
---|
2996 | #endif
|
---|
2997 | #endif
|
---|
2998 |
|
---|
2999 | #ifdef YY_USE_PROTOS
|
---|
3000 | void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
|
---|
3001 | #else
|
---|
3002 | void yy_init_buffer( b, file )
|
---|
3003 | YY_BUFFER_STATE b;
|
---|
3004 | FILE *file;
|
---|
3005 | #endif
|
---|
3006 |
|
---|
3007 |
|
---|
3008 | {
|
---|
3009 | yy_flush_buffer( b );
|
---|
3010 |
|
---|
3011 | b->yy_input_file = file;
|
---|
3012 | b->yy_fill_buffer = 1;
|
---|
3013 |
|
---|
3014 | #if YY_ALWAYS_INTERACTIVE
|
---|
3015 | b->yy_is_interactive = 1;
|
---|
3016 | #else
|
---|
3017 | #if YY_NEVER_INTERACTIVE
|
---|
3018 | b->yy_is_interactive = 0;
|
---|
3019 | #else
|
---|
3020 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
---|
3021 | #endif
|
---|
3022 | #endif
|
---|
3023 | }
|
---|
3024 |
|
---|
3025 |
|
---|
3026 | #ifdef YY_USE_PROTOS
|
---|
3027 | void yy_flush_buffer( YY_BUFFER_STATE b )
|
---|
3028 | #else
|
---|
3029 | void yy_flush_buffer( b )
|
---|
3030 | YY_BUFFER_STATE b;
|
---|
3031 | #endif
|
---|
3032 |
|
---|
3033 | {
|
---|
3034 | if ( ! b )
|
---|
3035 | return;
|
---|
3036 |
|
---|
3037 | b->yy_n_chars = 0;
|
---|
3038 |
|
---|
3039 | /* We always need two end-of-buffer characters. The first causes
|
---|
3040 | * a transition to the end-of-buffer state. The second causes
|
---|
3041 | * a jam in that state.
|
---|
3042 | */
|
---|
3043 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
---|
3044 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
---|
3045 |
|
---|
3046 | b->yy_buf_pos = &b->yy_ch_buf[0];
|
---|
3047 |
|
---|
3048 | b->yy_at_bol = 1;
|
---|
3049 | b->yy_buffer_status = YY_BUFFER_NEW;
|
---|
3050 |
|
---|
3051 | if ( b == yy_current_buffer )
|
---|
3052 | yy_load_buffer_state();
|
---|
3053 | }
|
---|
3054 |
|
---|
3055 |
|
---|
3056 | #ifndef YY_NO_SCAN_BUFFER
|
---|
3057 | #ifdef YY_USE_PROTOS
|
---|
3058 | YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
|
---|
3059 | #else
|
---|
3060 | YY_BUFFER_STATE yy_scan_buffer( base, size )
|
---|
3061 | char *base;
|
---|
3062 | yy_size_t size;
|
---|
3063 | #endif
|
---|
3064 | {
|
---|
3065 | YY_BUFFER_STATE b;
|
---|
3066 |
|
---|
3067 | if ( size < 2 ||
|
---|
3068 | base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
---|
3069 | base[size-1] != YY_END_OF_BUFFER_CHAR )
|
---|
3070 | /* They forgot to leave room for the EOB's. */
|
---|
3071 | return 0;
|
---|
3072 |
|
---|
3073 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
---|
3074 | if ( ! b )
|
---|
3075 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
---|
3076 |
|
---|
3077 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
---|
3078 | b->yy_buf_pos = b->yy_ch_buf = base;
|
---|
3079 | b->yy_is_our_buffer = 0;
|
---|
3080 | b->yy_input_file = 0;
|
---|
3081 | b->yy_n_chars = b->yy_buf_size;
|
---|
3082 | b->yy_is_interactive = 0;
|
---|
3083 | b->yy_at_bol = 1;
|
---|
3084 | b->yy_fill_buffer = 0;
|
---|
3085 | b->yy_buffer_status = YY_BUFFER_NEW;
|
---|
3086 |
|
---|
3087 | yy_switch_to_buffer( b );
|
---|
3088 |
|
---|
3089 | return b;
|
---|
3090 | }
|
---|
3091 | #endif
|
---|
3092 |
|
---|
3093 |
|
---|
3094 | #ifndef YY_NO_SCAN_STRING
|
---|
3095 | #ifdef YY_USE_PROTOS
|
---|
3096 | YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
|
---|
3097 | #else
|
---|
3098 | YY_BUFFER_STATE yy_scan_string( yy_str )
|
---|
3099 | yyconst char *yy_str;
|
---|
3100 | #endif
|
---|
3101 | {
|
---|
3102 | int len;
|
---|
3103 | for ( len = 0; yy_str[len]; ++len )
|
---|
3104 | ;
|
---|
3105 |
|
---|
3106 | return yy_scan_bytes( yy_str, len );
|
---|
3107 | }
|
---|
3108 | #endif
|
---|
3109 |
|
---|
3110 |
|
---|
3111 | #ifndef YY_NO_SCAN_BYTES
|
---|
3112 | #ifdef YY_USE_PROTOS
|
---|
3113 | YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
|
---|
3114 | #else
|
---|
3115 | YY_BUFFER_STATE yy_scan_bytes( bytes, len )
|
---|
3116 | yyconst char *bytes;
|
---|
3117 | int len;
|
---|
3118 | #endif
|
---|
3119 | {
|
---|
3120 | YY_BUFFER_STATE b;
|
---|
3121 | char *buf;
|
---|
3122 | yy_size_t n;
|
---|
3123 | int i;
|
---|
3124 |
|
---|
3125 | /* Get memory for full buffer, including space for trailing EOB's. */
|
---|
3126 | n = len + 2;
|
---|
3127 | buf = (char *) yy_flex_alloc( n );
|
---|
3128 | if ( ! buf )
|
---|
3129 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
---|
3130 |
|
---|
3131 | for ( i = 0; i < len; ++i )
|
---|
3132 | buf[i] = bytes[i];
|
---|
3133 |
|
---|
3134 | buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
|
---|
3135 |
|
---|
3136 | b = yy_scan_buffer( buf, n );
|
---|
3137 | if ( ! b )
|
---|
3138 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
---|
3139 |
|
---|
3140 | /* It's okay to grow etc. this buffer, and we should throw it
|
---|
3141 | * away when we're done.
|
---|
3142 | */
|
---|
3143 | b->yy_is_our_buffer = 1;
|
---|
3144 |
|
---|
3145 | return b;
|
---|
3146 | }
|
---|
3147 | #endif
|
---|
3148 |
|
---|
3149 |
|
---|
3150 | #ifndef YY_NO_PUSH_STATE
|
---|
3151 | #ifdef YY_USE_PROTOS
|
---|
3152 | static void yy_push_state( int new_state )
|
---|
3153 | #else
|
---|
3154 | static void yy_push_state( new_state )
|
---|
3155 | int new_state;
|
---|
3156 | #endif
|
---|
3157 | {
|
---|
3158 | if ( yy_start_stack_ptr >= yy_start_stack_depth )
|
---|
3159 | {
|
---|
3160 | yy_size_t new_size;
|
---|
3161 |
|
---|
3162 | yy_start_stack_depth += YY_START_STACK_INCR;
|
---|
3163 | new_size = yy_start_stack_depth * sizeof( int );
|
---|
3164 |
|
---|
3165 | if ( ! yy_start_stack )
|
---|
3166 | yy_start_stack = (int *) yy_flex_alloc( new_size );
|
---|
3167 |
|
---|
3168 | else
|
---|
3169 | yy_start_stack = (int *) yy_flex_realloc(
|
---|
3170 | (void *) yy_start_stack, new_size );
|
---|
3171 |
|
---|
3172 | if ( ! yy_start_stack )
|
---|
3173 | YY_FATAL_ERROR(
|
---|
3174 | "out of memory expanding start-condition stack" );
|
---|
3175 | }
|
---|
3176 |
|
---|
3177 | yy_start_stack[yy_start_stack_ptr++] = YY_START;
|
---|
3178 |
|
---|
3179 | BEGIN(new_state);
|
---|
3180 | }
|
---|
3181 | #endif
|
---|
3182 |
|
---|
3183 |
|
---|
3184 | #ifndef YY_NO_POP_STATE
|
---|
3185 | static void yy_pop_state()
|
---|
3186 | {
|
---|
3187 | if ( --yy_start_stack_ptr < 0 )
|
---|
3188 | YY_FATAL_ERROR( "start-condition stack underflow" );
|
---|
3189 |
|
---|
3190 | BEGIN(yy_start_stack[yy_start_stack_ptr]);
|
---|
3191 | }
|
---|
3192 | #endif
|
---|
3193 |
|
---|
3194 |
|
---|
3195 | #ifndef YY_NO_TOP_STATE
|
---|
3196 | static int yy_top_state()
|
---|
3197 | {
|
---|
3198 | return yy_start_stack[yy_start_stack_ptr - 1];
|
---|
3199 | }
|
---|
3200 | #endif
|
---|
3201 |
|
---|
3202 | #ifndef YY_EXIT_FAILURE
|
---|
3203 | #define YY_EXIT_FAILURE 2
|
---|
3204 | #endif
|
---|
3205 |
|
---|
3206 | #ifdef YY_USE_PROTOS
|
---|
3207 | static void yy_fatal_error( yyconst char msg[] )
|
---|
3208 | #else
|
---|
3209 | static void yy_fatal_error( msg )
|
---|
3210 | char msg[];
|
---|
3211 | #endif
|
---|
3212 | {
|
---|
3213 | (void) fprintf( stderr, "%s\n", msg );
|
---|
3214 | exit( YY_EXIT_FAILURE );
|
---|
3215 | }
|
---|
3216 |
|
---|
3217 |
|
---|
3218 |
|
---|
3219 | /* Redefine yyless() so it works in section 3 code. */
|
---|
3220 |
|
---|
3221 | #undef yyless
|
---|
3222 | #define yyless(n) \
|
---|
3223 | do \
|
---|
3224 | { \
|
---|
3225 | /* Undo effects of setting up yytext. */ \
|
---|
3226 | yytext[yyleng] = yy_hold_char; \
|
---|
3227 | yy_c_buf_p = yytext + n; \
|
---|
3228 | yy_hold_char = *yy_c_buf_p; \
|
---|
3229 | *yy_c_buf_p = '\0'; \
|
---|
3230 | yyleng = n; \
|
---|
3231 | } \
|
---|
3232 | while ( 0 )
|
---|
3233 |
|
---|
3234 |
|
---|
3235 | /* Internal utility routines. */
|
---|
3236 |
|
---|
3237 | #ifndef yytext_ptr
|
---|
3238 | #ifdef YY_USE_PROTOS
|
---|
3239 | static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
|
---|
3240 | #else
|
---|
3241 | static void yy_flex_strncpy( s1, s2, n )
|
---|
3242 | char *s1;
|
---|
3243 | yyconst char *s2;
|
---|
3244 | int n;
|
---|
3245 | #endif
|
---|
3246 | {
|
---|
3247 | register int i;
|
---|
3248 | for ( i = 0; i < n; ++i )
|
---|
3249 | s1[i] = s2[i];
|
---|
3250 | }
|
---|
3251 | #endif
|
---|
3252 |
|
---|
3253 | #ifdef YY_NEED_STRLEN
|
---|
3254 | #ifdef YY_USE_PROTOS
|
---|
3255 | static int yy_flex_strlen( yyconst char *s )
|
---|
3256 | #else
|
---|
3257 | static int yy_flex_strlen( s )
|
---|
3258 | yyconst char *s;
|
---|
3259 | #endif
|
---|
3260 | {
|
---|
3261 | register int n;
|
---|
3262 | for ( n = 0; s[n]; ++n )
|
---|
3263 | ;
|
---|
3264 |
|
---|
3265 | return n;
|
---|
3266 | }
|
---|
3267 | #endif
|
---|
3268 |
|
---|
3269 |
|
---|
3270 | #ifdef YY_USE_PROTOS
|
---|
3271 | static void *yy_flex_alloc( yy_size_t size )
|
---|
3272 | #else
|
---|
3273 | static void *yy_flex_alloc( size )
|
---|
3274 | yy_size_t size;
|
---|
3275 | #endif
|
---|
3276 | {
|
---|
3277 | return (void *) malloc( size );
|
---|
3278 | }
|
---|
3279 |
|
---|
3280 | #ifdef YY_USE_PROTOS
|
---|
3281 | static void *yy_flex_realloc( void *ptr, yy_size_t size )
|
---|
3282 | #else
|
---|
3283 | static void *yy_flex_realloc( ptr, size )
|
---|
3284 | void *ptr;
|
---|
3285 | yy_size_t size;
|
---|
3286 | #endif
|
---|
3287 | {
|
---|
3288 | /* The cast to (char *) in the following accommodates both
|
---|
3289 | * implementations that use char* generic pointers, and those
|
---|
3290 | * that use void* generic pointers. It works with the latter
|
---|
3291 | * because both ANSI C and C++ allow castless assignment from
|
---|
3292 | * any pointer type to void*, and deal with argument conversions
|
---|
3293 | * as though doing an assignment.
|
---|
3294 | */
|
---|
3295 | return (void *) realloc( (char *) ptr, size );
|
---|
3296 | }
|
---|
3297 |
|
---|
3298 | #ifdef YY_USE_PROTOS
|
---|
3299 | static void yy_flex_free( void *ptr )
|
---|
3300 | #else
|
---|
3301 | static void yy_flex_free( ptr )
|
---|
3302 | void *ptr;
|
---|
3303 | #endif
|
---|
3304 | {
|
---|
3305 | free( ptr );
|
---|
3306 | }
|
---|
3307 |
|
---|
3308 | #if YY_MAIN
|
---|
3309 | int main()
|
---|
3310 | {
|
---|
3311 | yylex();
|
---|
3312 | return 0;
|
---|
3313 | }
|
---|
3314 | #endif
|
---|
3315 | #line 724 "dt_lex.l"
|
---|
3316 |
|
---|
3317 |
|
---|
3318 | /*
|
---|
3319 | * yybegin provides a wrapper for use from C code around the lex BEGIN() macro.
|
---|
3320 | * We use two main states for lexing because probe descriptions use a syntax
|
---|
3321 | * that is incompatible with the normal D tokens (e.g. names can contain "-").
|
---|
3322 | * yybegin also handles the job of switching between two lists of dt_nodes
|
---|
3323 | * as we allocate persistent definitions, like inlines, and transient nodes
|
---|
3324 | * that will be freed once we are done parsing the current program file.
|
---|
3325 | */
|
---|
3326 | void
|
---|
3327 | yybegin(yystate_t state)
|
---|
3328 | {
|
---|
3329 | #if YYDEBUG /* VBOX: ifdef YYDEBUG => if YYDEBUG */
|
---|
3330 | yydebug = _dtrace_debug;
|
---|
3331 | #endif
|
---|
3332 | if (yypcb->pcb_yystate == state)
|
---|
3333 | return; /* nothing to do if we're in the state already */
|
---|
3334 |
|
---|
3335 | if (yypcb->pcb_yystate == YYS_DEFINE) {
|
---|
3336 | yypcb->pcb_list = yypcb->pcb_hold;
|
---|
3337 | yypcb->pcb_hold = NULL;
|
---|
3338 | }
|
---|
3339 |
|
---|
3340 | switch (state) {
|
---|
3341 | case YYS_CLAUSE:
|
---|
3342 | BEGIN(S2);
|
---|
3343 | break;
|
---|
3344 | case YYS_DEFINE:
|
---|
3345 | assert(yypcb->pcb_hold == NULL);
|
---|
3346 | yypcb->pcb_hold = yypcb->pcb_list;
|
---|
3347 | yypcb->pcb_list = NULL;
|
---|
3348 | /*FALLTHRU*/
|
---|
3349 | case YYS_EXPR:
|
---|
3350 | BEGIN(S0);
|
---|
3351 | break;
|
---|
3352 | case YYS_DONE:
|
---|
3353 | break;
|
---|
3354 | case YYS_CONTROL:
|
---|
3355 | BEGIN(S4);
|
---|
3356 | break;
|
---|
3357 | default:
|
---|
3358 | xyerror(D_UNKNOWN, "internal error -- bad yystate %d\n", state);
|
---|
3359 | }
|
---|
3360 |
|
---|
3361 | yypcb->pcb_yystate = state;
|
---|
3362 | }
|
---|
3363 |
|
---|
3364 | void
|
---|
3365 | yyinit(dt_pcb_t *pcb)
|
---|
3366 | {
|
---|
3367 | yypcb = pcb;
|
---|
3368 | yylineno = 1;
|
---|
3369 | yypragma = NULL;
|
---|
3370 | #ifndef USING_FLEX
|
---|
3371 | yysptr = yysbuf;
|
---|
3372 | #else
|
---|
3373 | yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
|
---|
3374 | #endif
|
---|
3375 | }
|
---|
3376 |
|
---|
3377 | /*
|
---|
3378 | * Given a lexeme 's' (typically yytext), set yylval and return an appropriate
|
---|
3379 | * token to the parser indicating either an identifier or a typedef name.
|
---|
3380 | * User-defined global variables always take precedence over types, but we do
|
---|
3381 | * use some heuristics because D programs can look at an ever-changing set of
|
---|
3382 | * kernel types and also can implicitly instantiate variables by assignment,
|
---|
3383 | * unlike in C. The code here is ordered carefully as lookups are not cheap.
|
---|
3384 | */
|
---|
3385 | static int
|
---|
3386 | id_or_type(const char *s)
|
---|
3387 | {
|
---|
3388 | dtrace_hdl_t *dtp = yypcb->pcb_hdl;
|
---|
3389 | dt_decl_t *ddp = yypcb->pcb_dstack.ds_decl;
|
---|
3390 | int c0, c1, ttok = DT_TOK_TNAME;
|
---|
3391 | dt_ident_t *idp;
|
---|
3392 |
|
---|
3393 | if ((s = yylval.l_str = strdup(s)) == NULL)
|
---|
3394 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
3395 |
|
---|
3396 | /*
|
---|
3397 | * If the lexeme is a global variable or likely identifier or *not* a
|
---|
3398 | * type_name, then it is an identifier token.
|
---|
3399 | */
|
---|
3400 | if (dt_idstack_lookup(&yypcb->pcb_globals, s) != NULL ||
|
---|
3401 | dt_idhash_lookup(yypcb->pcb_idents, s) != NULL ||
|
---|
3402 | dt_type_lookup(s, NULL) != 0)
|
---|
3403 | return (DT_TOK_IDENT);
|
---|
3404 |
|
---|
3405 | /*
|
---|
3406 | * If we're in the midst of parsing a declaration and a type_specifier
|
---|
3407 | * has already been shifted, then return DT_TOK_IDENT instead of TNAME.
|
---|
3408 | * This semantic is necessary to permit valid ISO C code such as:
|
---|
3409 | *
|
---|
3410 | * typedef int foo;
|
---|
3411 | * struct s { foo foo; };
|
---|
3412 | *
|
---|
3413 | * without causing shift/reduce conflicts in the direct_declarator part
|
---|
3414 | * of the grammar. The result is that we must check for conflicting
|
---|
3415 | * redeclarations of the same identifier as part of dt_node_decl().
|
---|
3416 | */
|
---|
3417 | if (ddp != NULL && ddp->dd_name != NULL)
|
---|
3418 | return (DT_TOK_IDENT);
|
---|
3419 |
|
---|
3420 | /*
|
---|
3421 | * If the lexeme is a type name and we are not in a program clause,
|
---|
3422 | * then always interpret it as a type and return DT_TOK_TNAME.
|
---|
3423 | */
|
---|
3424 | if ((YYSTATE) != S0)
|
---|
3425 | return (DT_TOK_TNAME);
|
---|
3426 |
|
---|
3427 | /*
|
---|
3428 | * If the lexeme matches a type name but is in a program clause, then
|
---|
3429 | * it could be a type or it could be an undefined variable. Peek at
|
---|
3430 | * the next token to decide. If we see ++, --, [, or =, we know there
|
---|
3431 | * might be an assignment that is trying to create a global variable,
|
---|
3432 | * so we optimistically return DT_TOK_IDENT. There is no harm in being
|
---|
3433 | * wrong: a type_name followed by ++, --, [, or = is a syntax error.
|
---|
3434 | */
|
---|
3435 | while ((c0 = input()) != 0) {
|
---|
3436 | if (strchr("\f\n\r\t\v ", c0) == NULL)
|
---|
3437 | break;
|
---|
3438 | }
|
---|
3439 |
|
---|
3440 | switch (c0) {
|
---|
3441 | case '+':
|
---|
3442 | case '-':
|
---|
3443 | if ((c1 = input()) == c0)
|
---|
3444 | ttok = DT_TOK_IDENT;
|
---|
3445 | if (c1 != EOF) unput(c1);
|
---|
3446 | break;
|
---|
3447 |
|
---|
3448 | case '=':
|
---|
3449 | if ((c1 = input()) != c0)
|
---|
3450 | ttok = DT_TOK_IDENT;
|
---|
3451 | if (c1 != EOF) unput(c1);
|
---|
3452 | break;
|
---|
3453 | case '[':
|
---|
3454 | ttok = DT_TOK_IDENT;
|
---|
3455 | break;
|
---|
3456 | }
|
---|
3457 |
|
---|
3458 | if (ttok == DT_TOK_IDENT) {
|
---|
3459 | idp = dt_idhash_insert(yypcb->pcb_idents, s, DT_IDENT_SCALAR, 0,
|
---|
3460 | 0, _dtrace_defattr, 0, &dt_idops_thaw, NULL, dtp->dt_gen);
|
---|
3461 |
|
---|
3462 | if (idp == NULL)
|
---|
3463 | longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
|
---|
3464 | }
|
---|
3465 |
|
---|
3466 | if (c0 != EOF) unput(c0);
|
---|
3467 | return (ttok);
|
---|
3468 | }
|
---|
3469 |
|
---|
3470 | #ifndef USING_FLEX
|
---|
3471 |
|
---|
3472 | static int
|
---|
3473 | input(void)
|
---|
3474 | {
|
---|
3475 | int c;
|
---|
3476 |
|
---|
3477 | if (yysptr > yysbuf)
|
---|
3478 | c = *--yysptr;
|
---|
3479 | else if (yypcb->pcb_fileptr != NULL)
|
---|
3480 | c = fgetc(yypcb->pcb_fileptr);
|
---|
3481 | else if (yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen)
|
---|
3482 | c = *(unsigned char *)(yypcb->pcb_strptr++);
|
---|
3483 | else
|
---|
3484 | c = EOF;
|
---|
3485 |
|
---|
3486 | if (c == '\n')
|
---|
3487 | yylineno++;
|
---|
3488 |
|
---|
3489 | if (c != EOF)
|
---|
3490 | return (c);
|
---|
3491 |
|
---|
3492 | if ((YYSTATE) == S1)
|
---|
3493 | yyerror("end-of-file encountered before matching */\n");
|
---|
3494 |
|
---|
3495 | if ((YYSTATE) == S3)
|
---|
3496 | yyerror("end-of-file encountered before end of control line\n");
|
---|
3497 |
|
---|
3498 | if (yypcb->pcb_fileptr != NULL && ferror(yypcb->pcb_fileptr))
|
---|
3499 | longjmp(yypcb->pcb_jmpbuf, EDT_FIO);
|
---|
3500 |
|
---|
3501 | return (0); /* EOF */
|
---|
3502 | }
|
---|
3503 |
|
---|
3504 | static void
|
---|
3505 | unput(int c)
|
---|
3506 | {
|
---|
3507 | if (c == '\n')
|
---|
3508 | yylineno--;
|
---|
3509 |
|
---|
3510 | *yysptr++ = c;
|
---|
3511 | yytchar = c;
|
---|
3512 | }
|
---|
3513 |
|
---|
3514 | #endif /* USING_FLEX */
|
---|