2 static const char yysccsid
[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
17 #define yyclearin (yychar = YYEMPTY)
18 #define yyerrok (yyerrflag = 0)
19 #define YYRECOVERING() (yyerrflag != 0)
21 /* compatibility with bison */
23 /* compatibility with FreeBSD */
24 #ifdef YYPARSE_PARAM_TYPE
25 #define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
27 #define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
30 #define YYPARSE_DECL() yyparse(void)
31 #endif /* YYPARSE_PARAM */
33 static int yygrowstack(void);
35 #line 37 "/usr/src/external/bsd/flex/dist/parse.y"
36 /* Copyright (c) 1990 The Regents of the University of California. */
37 /* All rights reserved. */
39 /* This code is derived from software contributed to Berkeley by */
42 /* The United States Government has rights in this work pursuant */
43 /* to contract no. DE-AC03-76SF00098 between the United States */
44 /* Department of Energy and the University of California. */
46 /* This file is part of flex. */
48 /* Redistribution and use in source and binary forms, with or without */
49 /* modification, are permitted provided that the following conditions */
52 /* 1. Redistributions of source code must retain the above copyright */
53 /* notice, this list of conditions and the following disclaimer. */
54 /* 2. Redistributions in binary form must reproduce the above copyright */
55 /* notice, this list of conditions and the following disclaimer in the */
56 /* documentation and/or other materials provided with the distribution. */
58 /* Neither the name of the University nor the names of its contributors */
59 /* may be used to endorse or promote products derived from this software */
60 /* without specific prior written permission. */
62 /* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
63 /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
64 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
70 int pat
, scnum
, eps
, headcnt
, trailcnt
, lastchar
, i
, rulelen
;
71 int trlcontxt
, xcluflg
, currccl
, cclsorted
, varlength
, variable_trail_rule
;
76 static int madeany
= false; /* whether we've made the '.' character class */
77 static int ccldot
, cclany
;
78 int previous_continued_action
; /* whether the previous rule's action was '|' */
80 #define format_warn3(fmt, a1, a2) \
82 char fw3_msg[MAXLINE];\
83 snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\
87 /* Expand a POSIX character class expression. */
88 #define CCL_EXPR(func) \
91 for ( c = 0; c < csize; ++c ) \
92 if ( isascii(c) && func(c) ) \
93 ccladd( currccl, c ); \
97 #define CCL_NEG_EXPR(func) \
100 for ( c = 0; c < csize; ++c ) \
102 ccladd( currccl, c ); \
105 /* While POSIX defines isblank(), it's not ANSI C. */
106 #define IS_BLANK(c) ((c) == ' ' || (c) == '\t')
108 /* On some over-ambitious machines, such as DEC Alpha's, the default
109 * token type is "long" instead of "int"; this leads to problems with
110 * declaring yylval in flexdef.h. But so far, all the yacc's I've seen
111 * wrap their definitions of YYSTYPE with "#ifndef YYSTYPE"'s, so the
112 * following should ensure that the default token type is "int".
116 #line 116 "/usr/src/external/bsd/flex/dist/parse.c"
125 #define OPTION_OP 265
126 #define OPT_OUTFILE 266
127 #define OPT_PREFIX 267
128 #define OPT_YYCLASS 268
129 #define OPT_HEADER 269
130 #define OPT_EXTRA_TYPE 270
131 #define OPT_TABLES 271
132 #define CCE_ALNUM 272
133 #define CCE_ALPHA 273
134 #define CCE_BLANK 274
135 #define CCE_CNTRL 275
136 #define CCE_DIGIT 276
137 #define CCE_GRAPH 277
138 #define CCE_LOWER 278
139 #define CCE_PRINT 279
140 #define CCE_PUNCT 280
141 #define CCE_SPACE 281
142 #define CCE_UPPER 282
143 #define CCE_XDIGIT 283
144 #define CCE_NEG_ALNUM 284
145 #define CCE_NEG_ALPHA 285
146 #define CCE_NEG_BLANK 286
147 #define CCE_NEG_CNTRL 287
148 #define CCE_NEG_DIGIT 288
149 #define CCE_NEG_GRAPH 289
150 #define CCE_NEG_LOWER 290
151 #define CCE_NEG_PRINT 291
152 #define CCE_NEG_PUNCT 292
153 #define CCE_NEG_SPACE 293
154 #define CCE_NEG_UPPER 294
155 #define CCE_NEG_XDIGIT 295
156 #define CCL_OP_DIFF 296
157 #define CCL_OP_UNION 297
158 #define BEGIN_REPEAT_POSIX 298
159 #define END_REPEAT_POSIX 299
160 #define BEGIN_REPEAT_FLEX 300
161 #define END_REPEAT_FLEX 301
162 #define YYERRCODE 256
163 static const short yylhs
[] = { -1,
164 0, 1, 2, 2, 2, 2, 3, 6, 6, 7,
165 7, 7, 8, 9, 9, 10, 10, 10, 10, 10,
166 10, 4, 4, 4, 5, 12, 12, 12, 12, 14,
167 11, 11, 11, 15, 15, 15, 16, 13, 13, 13,
168 13, 18, 18, 17, 19, 19, 19, 19, 19, 20,
169 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
170 20, 21, 21, 21, 23, 23, 24, 24, 24, 24,
171 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
172 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
173 25, 25, 25, 25, 22, 22,
175 static const short yylen
[] = { 2,
176 5, 0, 3, 2, 0, 1, 1, 1, 1, 2,
177 1, 1, 2, 2, 0, 3, 3, 3, 3, 3,
178 3, 5, 5, 0, 0, 2, 1, 1, 1, 0,
179 4, 3, 0, 3, 1, 1, 1, 2, 3, 2,
180 1, 3, 1, 2, 2, 1, 6, 5, 4, 2,
181 2, 2, 6, 5, 4, 1, 1, 1, 3, 3,
182 1, 3, 3, 1, 3, 4, 4, 2, 2, 0,
183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
184 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
187 static const short yydefred
[] = { 2,
188 0, 0, 6, 0, 7, 8, 9, 15, 24, 0,
189 4, 0, 0, 12, 11, 0, 0, 0, 0, 0,
190 0, 0, 14, 0, 1, 0, 10, 0, 0, 0,
191 0, 0, 0, 0, 0, 24, 0, 16, 18, 19,
192 20, 17, 21, 32, 36, 37, 0, 35, 0, 29,
193 61, 58, 28, 0, 56, 96, 0, 0, 0, 27,
194 0, 0, 0, 0, 0, 64, 31, 0, 23, 26,
195 0, 0, 70, 0, 22, 0, 40, 0, 44, 0,
196 0, 0, 50, 51, 52, 0, 0, 34, 95, 59,
197 60, 0, 0, 71, 72, 73, 74, 75, 76, 77,
198 78, 79, 80, 82, 81, 83, 84, 85, 86, 87,
199 88, 93, 89, 90, 91, 94, 92, 65, 69, 39,
200 0, 0, 0, 62, 63, 66, 0, 49, 0, 55,
201 0, 67, 0, 48, 0, 54, 47, 53,
203 static const short yydgoto
[] = { 1,
204 2, 4, 9, 13, 25, 10, 16, 11, 12, 23,
205 26, 59, 60, 35, 47, 48, 61, 62, 63, 64,
208 static const short yysindex
[] = { 0,
209 0, -222, 0, -155, 0, 0, 0, 0, 0, -215,
210 0, -123, 6, 0, 0, -193, 10, 21, 26, 31,
211 35, 37, 0, 59, 0, -44, 0, -147, -145, -140,
212 -133, -132, -129, 75, -214, 0, -19, 0, 0, 0,
213 0, 0, 0, 0, 0, 0, 23, 0, -48, 0,
214 0, 0, 0, -17, 0, 0, -17, 27, 128, 0,
215 -17, -1, -30, -41, -189, 0, 0, -121, 0, 0,
216 -31, -34, 0, -87, 0, -25, 0, -17, 0, -109,
217 -41, -108, 0, 0, 0, 60, 60, 0, 0, 0,
218 0, 46, 107, 0, 0, 0, 0, 0, 0, 0,
219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
221 -30, -36, -39, 0, 0, 0, -104, 0, -219, 0,
222 -238, 0, -144, 0, -143, 0, 0, 0,
224 static const short yyrindex
[] = { 0,
225 0, -141, 0, 0, 0, 0, 0, 0, 0, 0,
226 0, -134, 9, 0, 0, -125, 0, 0, 0, 0,
227 0, 0, 0, -178, 0, 22, 0, 0, 0, 0,
228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
229 0, 0, 0, 0, 0, 0, 0, 0, -21, 0,
230 0, 0, 0, 0, 0, 0, 0, 85, 0, 0,
231 0, 144, 47, 4, -10, 0, 0, 0, 0, 0,
232 0, 0, 0, 0, 0, 146, 0, 0, 0, 0,
233 18, 0, 0, 0, 0, 0, 0, 0, 0, 0,
234 0, 0, 124, 0, 0, 0, 0, 0, 0, 0,
235 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
237 50, 0, 0, 0, 0, 0, 0, 0, 0, 0,
238 0, 0, 0, 0, 0, 0, 0, 0,
240 static const short yygindex
[] = { 0,
241 0, 0, 0, 121, 133, 0, 0, 0, 0, 0,
242 0, 0, 106, 0, 0, 93, 0, 32, 84, -45,
245 #define YYTABLESIZE 419
246 static const short yytable
[] = { 57,
247 83, 84, 90, 56, 131, 118, 91, 129, 25, 57,
248 120, 24, 33, 46, 56, 55, 56, 81, 33, 135,
249 57, 85, 57, 57, 33, 57, 55, 45, 55, 57,
250 57, 57, 57, 3, 77, 57, 57, 46, 133, 46,
251 14, 45, 33, 46, 46, 79, 15, 46, 33, 46,
252 46, 45, 57, 45, 33, 25, 43, 45, 45, 42,
253 58, 25, 136, 45, 45, 24, 68, 25, 27, 33,
254 28, 58, 33, 58, 54, 81, 69, 30, 36, 134,
255 57, 29, 43, 30, 67, 42, 30, 43, 72, 78,
256 42, 31, 76, 43, 46, 32, 42, 33, 78, 33,
257 34, 33, 33, 5, 6, 7, 86, 87, 45, 8,
258 124, 125, 25, 57, 38, 25, 39, 5, 5, 5,
259 73, 40, 78, 5, 13, 13, 13, 46, 41, 42,
260 13, 33, 43, 3, 3, 3, 44, 75, 126, 3,
261 46, 45, 17, 18, 19, 20, 21, 22, 122, 123,
262 58, 127, 132, 41, 137, 38, 49, 138, 37, 70,
263 88, 121, 92, 0, 0, 0, 0, 0, 0, 93,
264 43, 0, 0, 42, 0, 0, 0, 70, 0, 0,
265 0, 0, 0, 0, 94, 95, 96, 97, 98, 99,
266 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
267 110, 111, 112, 113, 114, 115, 116, 117, 0, 0,
268 0, 0, 0, 0, 0, 0, 68, 0, 0, 0,
269 0, 0, 0, 0, 0, 89, 51, 0, 0, 0,
270 0, 0, 52, 0, 33, 33, 50, 51, 0, 51,
271 0, 33, 33, 52, 53, 52, 57, 0, 0, 0,
272 0, 0, 57, 0, 0, 0, 0, 0, 82, 0,
273 46, 130, 128, 0, 33, 33, 46, 80, 0, 0,
274 0, 33, 33, 0, 45, 0, 0, 25, 25, 0,
275 45, 0, 0, 0, 25, 25, 0, 57, 0, 57,
276 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
277 0, 46, 93, 0, 0, 0, 0, 0, 0, 0,
278 0, 0, 0, 0, 0, 45, 0, 94, 95, 96,
279 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
280 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
281 117, 70, 0, 0, 0, 0, 0, 0, 0, 0,
282 0, 0, 0, 0, 0, 0, 70, 70, 70, 70,
283 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
284 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
285 68, 0, 0, 0, 0, 0, 0, 0, 0, 0,
286 0, 0, 0, 0, 0, 68, 68, 68, 68, 68,
287 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
288 68, 68, 68, 68, 68, 68, 68, 68, 68,
290 static const short yycheck
[] = { 10,
291 42, 43, 34, 34, 44, 93, 41, 44, 0, 40,
292 36, 60, 34, 10, 34, 46, 34, 63, 40, 258,
293 40, 63, 40, 34, 46, 36, 46, 10, 46, 40,
294 41, 42, 43, 256, 36, 46, 47, 34, 258, 36,
295 256, 256, 34, 40, 41, 47, 262, 262, 40, 46,
296 47, 34, 63, 36, 46, 34, 10, 40, 41, 10,
297 91, 40, 301, 46, 47, 60, 44, 46, 262, 91,
298 61, 91, 94, 91, 94, 121, 125, 256, 123, 299,
299 91, 61, 36, 262, 62, 36, 61, 41, 57, 124,
300 41, 61, 61, 47, 91, 61, 47, 61, 124, 91,
301 42, 123, 94, 259, 260, 261, 296, 297, 91, 265,
302 86, 87, 91, 124, 262, 94, 262, 259, 260, 261,
303 94, 262, 124, 265, 259, 260, 261, 124, 262, 262,
304 265, 123, 262, 259, 260, 261, 62, 10, 93, 265,
305 262, 124, 266, 267, 268, 269, 270, 271, 258, 258,
306 91, 45, 257, 10, 299, 10, 36, 301, 26, 54,
307 68, 78, 73, -1, -1, -1, -1, -1, -1, 257,
308 124, -1, -1, 124, -1, -1, -1, 93, -1, -1,
309 -1, -1, -1, -1, 272, 273, 274, 275, 276, 277,
310 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
311 288, 289, 290, 291, 292, 293, 294, 295, -1, -1,
312 -1, -1, -1, -1, -1, -1, 93, -1, -1, -1,
313 -1, -1, -1, -1, -1, 257, 257, -1, -1, -1,
314 -1, -1, 263, -1, 256, 257, 256, 257, -1, 257,
315 -1, 263, 264, 263, 264, 263, 257, -1, -1, -1,
316 -1, -1, 263, -1, -1, -1, -1, -1, 300, -1,
317 257, 301, 299, -1, 256, 257, 263, 298, -1, -1,
318 -1, 263, 264, -1, 257, -1, -1, 256, 257, -1,
319 263, -1, -1, -1, 263, 264, -1, 298, -1, 300,
320 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
321 -1, 298, 257, -1, -1, -1, -1, -1, -1, -1,
322 -1, -1, -1, -1, -1, 298, -1, 272, 273, 274,
323 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
324 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
325 295, 257, -1, -1, -1, -1, -1, -1, -1, -1,
326 -1, -1, -1, -1, -1, -1, 272, 273, 274, 275,
327 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
328 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
329 257, -1, -1, -1, -1, -1, -1, -1, -1, -1,
330 -1, -1, -1, -1, -1, 272, 273, 274, 275, 276,
331 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
332 287, 288, 289, 290, 291, 292, 293, 294, 295,
338 #define YYMAXTOKEN 301
340 static const char *yyname
[] = {
342 "end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
343 0,0,0,"'\"'",0,"'$'",0,0,0,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",0,0,
344 0,0,0,0,0,0,0,0,0,0,"'<'","'='","'>'","'?'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
345 0,0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
346 0,0,0,0,0,0,0,"'{'","'|'","'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
347 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
348 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
349 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"CHAR","NUMBER","SECTEND",
350 "SCDECL","XSCDECL","NAME","PREVCCL","EOF_OP","OPTION_OP","OPT_OUTFILE",
351 "OPT_PREFIX","OPT_YYCLASS","OPT_HEADER","OPT_EXTRA_TYPE","OPT_TABLES",
352 "CCE_ALNUM","CCE_ALPHA","CCE_BLANK","CCE_CNTRL","CCE_DIGIT","CCE_GRAPH",
353 "CCE_LOWER","CCE_PRINT","CCE_PUNCT","CCE_SPACE","CCE_UPPER","CCE_XDIGIT",
354 "CCE_NEG_ALNUM","CCE_NEG_ALPHA","CCE_NEG_BLANK","CCE_NEG_CNTRL","CCE_NEG_DIGIT",
355 "CCE_NEG_GRAPH","CCE_NEG_LOWER","CCE_NEG_PRINT","CCE_NEG_PUNCT","CCE_NEG_SPACE",
356 "CCE_NEG_UPPER","CCE_NEG_XDIGIT","CCL_OP_DIFF","CCL_OP_UNION",
357 "BEGIN_REPEAT_POSIX","END_REPEAT_POSIX","BEGIN_REPEAT_FLEX","END_REPEAT_FLEX",
359 static const char *yyrule
[] = {
361 "goal : initlex sect1 sect1end sect2 initforrule",
363 "sect1 : sect1 startconddecl namelist1",
364 "sect1 : sect1 options",
367 "sect1end : SECTEND",
368 "startconddecl : SCDECL",
369 "startconddecl : XSCDECL",
370 "namelist1 : namelist1 NAME",
373 "options : OPTION_OP optionlist",
374 "optionlist : optionlist option",
376 "option : OPT_OUTFILE '=' NAME",
377 "option : OPT_EXTRA_TYPE '=' NAME",
378 "option : OPT_PREFIX '=' NAME",
379 "option : OPT_YYCLASS '=' NAME",
380 "option : OPT_HEADER '=' NAME",
381 "option : OPT_TABLES '=' NAME",
382 "sect2 : sect2 scon initforrule flexrule '\\n'",
383 "sect2 : sect2 scon '{' sect2 '}'",
386 "flexrule : '^' rule",
391 "scon : '<' scon_stk_ptr namelist2 '>'",
392 "scon : '<' '*' '>'",
394 "namelist2 : namelist2 ',' sconname",
395 "namelist2 : sconname",
402 "re : re '|' series",
405 "series : series singleton",
406 "series : singleton",
407 "series : series BEGIN_REPEAT_POSIX NUMBER ',' NUMBER END_REPEAT_POSIX",
408 "series : series BEGIN_REPEAT_POSIX NUMBER ',' END_REPEAT_POSIX",
409 "series : series BEGIN_REPEAT_POSIX NUMBER END_REPEAT_POSIX",
410 "singleton : singleton '*'",
411 "singleton : singleton '+'",
412 "singleton : singleton '?'",
413 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' NUMBER END_REPEAT_FLEX",
414 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' END_REPEAT_FLEX",
415 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER END_REPEAT_FLEX",
417 "singleton : fullccl",
418 "singleton : PREVCCL",
419 "singleton : '\"' string '\"'",
420 "singleton : '(' re ')'",
422 "fullccl : fullccl CCL_OP_DIFF braceccl",
423 "fullccl : fullccl CCL_OP_UNION braceccl",
424 "fullccl : braceccl",
425 "braceccl : '[' ccl ']'",
426 "braceccl : '[' '^' ccl ']'",
427 "ccl : ccl CHAR '-' CHAR",
429 "ccl : ccl ccl_expr",
431 "ccl_expr : CCE_ALNUM",
432 "ccl_expr : CCE_ALPHA",
433 "ccl_expr : CCE_BLANK",
434 "ccl_expr : CCE_CNTRL",
435 "ccl_expr : CCE_DIGIT",
436 "ccl_expr : CCE_GRAPH",
437 "ccl_expr : CCE_LOWER",
438 "ccl_expr : CCE_PRINT",
439 "ccl_expr : CCE_PUNCT",
440 "ccl_expr : CCE_SPACE",
441 "ccl_expr : CCE_XDIGIT",
442 "ccl_expr : CCE_UPPER",
443 "ccl_expr : CCE_NEG_ALNUM",
444 "ccl_expr : CCE_NEG_ALPHA",
445 "ccl_expr : CCE_NEG_BLANK",
446 "ccl_expr : CCE_NEG_CNTRL",
447 "ccl_expr : CCE_NEG_DIGIT",
448 "ccl_expr : CCE_NEG_GRAPH",
449 "ccl_expr : CCE_NEG_PRINT",
450 "ccl_expr : CCE_NEG_PUNCT",
451 "ccl_expr : CCE_NEG_SPACE",
452 "ccl_expr : CCE_NEG_XDIGIT",
453 "ccl_expr : CCE_NEG_LOWER",
454 "ccl_expr : CCE_NEG_UPPER",
455 "string : string CHAR",
467 extern int YYPARSE_DECL();
469 /* define the initial stack-sizes */
472 #define YYMAXDEPTH YYSTACKSIZE
475 #define YYSTACKSIZE YYMAXDEPTH
477 #define YYSTACKSIZE 500
478 #define YYMAXDEPTH 500
482 #define YYINITSTACKSIZE 500
493 /* variables for the parser stack */
495 static short *yysslim
;
496 static YYSTYPE
*yyvs
;
497 static unsigned yystacksize
;
498 #line 952 "/usr/src/external/bsd/flex/dist/parse.y"
501 /* build_eof_action - build the "<<EOF>>" action for the active start
505 void build_eof_action()
508 char action_text
[MAXLINE
];
510 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
512 if ( sceof
[scon_stk
[i
]] )
513 format_pinpoint_message(
514 "multiple <<EOF>> rules for start condition %s",
515 scname
[scon_stk
[i
]] );
519 sceof
[scon_stk
[i
]] = true;
520 snprintf( action_text
, sizeof(action_text
), "case YY_STATE_EOF(%s):\n",
521 scname
[scon_stk
[i
]] );
522 add_action( action_text
);
526 line_directive_out( (FILE *) 0, 1 );
528 /* This isn't a normal rule after all - don't count it as
529 * such, so we don't have any holes in the rule numbering
530 * (which make generating "rule can never match" warnings
538 /* format_synerr - write out formatted syntax error */
540 void format_synerr( msg
, arg
)
541 const char *msg
, arg
[];
543 char errmsg
[MAXLINE
];
545 (void) snprintf( errmsg
, sizeof(errmsg
), msg
, arg
);
550 /* synerr - report a syntax error */
556 pinpoint_message( str
);
560 /* format_warn - write out formatted warning */
562 void format_warn( msg
, arg
)
563 const char *msg
, arg
[];
565 char warn_msg
[MAXLINE
];
567 snprintf( warn_msg
, sizeof(warn_msg
), msg
, arg
);
572 /* lwarn - report a warning, unless -w was given */
577 line_warning( str
, linenum
);
580 /* format_pinpoint_message - write out a message formatted with one string,
581 * pinpointing its location
584 void format_pinpoint_message( msg
, arg
)
585 const char *msg
, arg
[];
587 char errmsg
[MAXLINE
];
589 snprintf( errmsg
, sizeof(errmsg
), msg
, arg
);
590 pinpoint_message( errmsg
);
594 /* pinpoint_message - write out a message, pinpointing its location */
596 void pinpoint_message( str
)
599 line_pinpoint( str
, linenum
);
603 /* line_warning - report a warning at a given line, unless -w was given */
605 void line_warning( str
, line
)
609 char warning
[MAXLINE
];
613 snprintf( warning
, sizeof(warning
), "warning, %s", str
);
614 line_pinpoint( warning
, line
);
619 /* line_pinpoint - write out a message, pinpointing it at the given line */
621 void line_pinpoint( str
, line
)
625 fprintf( stderr
, "%s:%d: %s\n", infilename
, line
, str
);
629 /* yyerror - eat up an error message from the parser;
630 * currently, messages are ignore
637 #line 637 "/usr/src/external/bsd/flex/dist/parse.c"
638 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
639 static int yygrowstack(void)
646 if ((newsize
= yystacksize
) == 0)
647 newsize
= YYINITSTACKSIZE
;
648 else if (newsize
>= YYMAXDEPTH
)
650 else if ((newsize
*= 2) > YYMAXDEPTH
)
651 newsize
= YYMAXDEPTH
;
655 ? (short *)realloc(yyss
, newsize
* sizeof(*newss
))
656 : (short *)malloc(newsize
* sizeof(*newss
));
663 ? (YYSTYPE
*)realloc(yyvs
, newsize
* sizeof(*newvs
))
664 : (YYSTYPE
*)malloc(newsize
* sizeof(*newvs
));
670 yystacksize
= newsize
;
671 yysslim
= yyss
+ newsize
- 1;
675 #define YYABORT goto yyabort
676 #define YYREJECT goto yyabort
677 #define YYACCEPT goto yyaccept
678 #define YYERROR goto yyerrlab
683 int yym
, yyn
, yystate
;
687 if ((yys
= getenv("YYDEBUG")) != 0)
690 if (yyn
>= '0' && yyn
<= '9')
700 if (yyss
== NULL
&& yygrowstack()) goto yyoverflow
;
707 if ((yyn
= yydefred
[yystate
]) != 0) goto yyreduce
;
710 if ((yychar
= yylex()) < 0) yychar
= 0;
715 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
716 if (!yys
) yys
= "illegal-symbol";
717 printf("%sdebug: state %d, reading %d (%s)\n",
718 YYPREFIX
, yystate
, yychar
, yys
);
722 if ((yyn
= yysindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
723 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
727 printf("%sdebug: state %d, shifting to state %d\n",
728 YYPREFIX
, yystate
, yytable
[yyn
]);
730 if (yyssp
>= yysslim
&& yygrowstack())
734 yystate
= yytable
[yyn
];
735 *++yyssp
= yytable
[yyn
];
738 if (yyerrflag
> 0) --yyerrflag
;
741 if ((yyn
= yyrindex
[yystate
]) && (yyn
+= yychar
) >= 0 &&
742 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yychar
)
747 if (yyerrflag
) goto yyinrecovery
;
749 yyerror("syntax error");
762 if ((yyn
= yysindex
[*yyssp
]) && (yyn
+= YYERRCODE
) >= 0 &&
763 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == YYERRCODE
)
767 printf("%sdebug: state %d, error recovery shifting\
768 to state %d\n", YYPREFIX
, *yyssp
, yytable
[yyn
]);
770 if (yyssp
>= yysslim
&& yygrowstack())
774 yystate
= yytable
[yyn
];
775 *++yyssp
= yytable
[yyn
];
783 printf("%sdebug: error recovery discarding state %d\n",
786 if (yyssp
<= yyss
) goto yyabort
;
794 if (yychar
== 0) goto yyabort
;
799 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
800 if (!yys
) yys
= "illegal-symbol";
801 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
802 YYPREFIX
, yystate
, yychar
, yys
);
812 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
813 YYPREFIX
, yystate
, yyn
, yyrule
[yyn
]);
817 yyval
= yyvsp
[1-yym
];
819 memset(&yyval
, 0, sizeof yyval
);
823 #line 121 "/usr/src/external/bsd/flex/dist/parse.y"
824 { /* add default rule */
830 def_rule
= mkstate( -pat
);
832 /* Remember the number of the default rule so we
833 * don't generate "can't match" warnings for it.
835 default_rule
= num_rules
;
837 finish_rule( def_rule
, false, 0, 0, 0);
839 for ( i
= 1; i
<= lastsc
; ++i
)
840 scset
[i
] = mkbranch( scset
[i
], def_rule
);
844 "YY_FATAL_ERROR( \"flex scanner jammed\" )" );
846 add_action( "ECHO" );
848 add_action( ";\n\tYY_BREAK\n" );
852 #line 150 "/usr/src/external/bsd/flex/dist/parse.y"
853 { /* initialize for processing rules */
855 /* Create default DFA start condition. */
856 scinstal( "INITIAL", false );
860 #line 161 "/usr/src/external/bsd/flex/dist/parse.y"
861 { synerr( _("unknown error processing section 1") ); }
864 #line 165 "/usr/src/external/bsd/flex/dist/parse.y"
867 scon_stk
= allocate_integer_array( lastsc
+ 1 );
872 #line 173 "/usr/src/external/bsd/flex/dist/parse.y"
876 #line 176 "/usr/src/external/bsd/flex/dist/parse.y"
880 #line 180 "/usr/src/external/bsd/flex/dist/parse.y"
881 { scinstal( nmstr
, xcluflg
); }
884 #line 183 "/usr/src/external/bsd/flex/dist/parse.y"
885 { scinstal( nmstr
, xcluflg
); }
888 #line 186 "/usr/src/external/bsd/flex/dist/parse.y"
889 { synerr( _("bad start condition list") ); }
892 #line 197 "/usr/src/external/bsd/flex/dist/parse.y"
894 outfilename
= copy_string( nmstr
);
899 #line 202 "/usr/src/external/bsd/flex/dist/parse.y"
900 { extra_type
= copy_string( nmstr
); }
903 #line 204 "/usr/src/external/bsd/flex/dist/parse.y"
904 { prefix
= copy_string( nmstr
); }
907 #line 206 "/usr/src/external/bsd/flex/dist/parse.y"
908 { yyclass
= copy_string( nmstr
); }
911 #line 208 "/usr/src/external/bsd/flex/dist/parse.y"
912 { headerfilename
= copy_string( nmstr
); }
915 #line 210 "/usr/src/external/bsd/flex/dist/parse.y"
916 { tablesext
= true; tablesfilename
= copy_string( nmstr
); }
919 #line 214 "/usr/src/external/bsd/flex/dist/parse.y"
920 { scon_stk_ptr
= yyvsp
[-3]; }
923 #line 216 "/usr/src/external/bsd/flex/dist/parse.y"
924 { scon_stk_ptr
= yyvsp
[-3]; }
927 #line 221 "/usr/src/external/bsd/flex/dist/parse.y"
929 /* Initialize for a parse of one rule. */
930 trlcontxt
= variable_trail_rule
= varlength
= false;
931 trailcnt
= headcnt
= rulelen
= 0;
932 current_state_type
= STATE_NORMAL
;
933 previous_continued_action
= continued_action
;
940 #line 234 "/usr/src/external/bsd/flex/dist/parse.y"
943 finish_rule( pat
, variable_trail_rule
,
944 headcnt
, trailcnt
, previous_continued_action
);
946 if ( scon_stk_ptr
> 0 )
948 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
950 mkbranch( scbol
[scon_stk
[i
]],
956 /* Add to all non-exclusive start conditions,
957 * including the default (0) start condition.
960 for ( i
= 1; i
<= lastsc
; ++i
)
962 scbol
[i
] = mkbranch( scbol
[i
],
970 if ( performance_report
> 1 )
972 "'^' operator results in sub-optimal performance" );
977 #line 270 "/usr/src/external/bsd/flex/dist/parse.y"
980 finish_rule( pat
, variable_trail_rule
,
981 headcnt
, trailcnt
, previous_continued_action
);
983 if ( scon_stk_ptr
> 0 )
985 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
987 mkbranch( scset
[scon_stk
[i
]],
993 for ( i
= 1; i
<= lastsc
; ++i
)
1002 #line 294 "/usr/src/external/bsd/flex/dist/parse.y"
1004 if ( scon_stk_ptr
> 0 )
1009 /* This EOF applies to all start conditions
1010 * which don't already have EOF actions.
1012 for ( i
= 1; i
<= lastsc
; ++i
)
1014 scon_stk
[++scon_stk_ptr
] = i
;
1016 if ( scon_stk_ptr
== 0 )
1018 "all start conditions already have <<EOF>> rules" );
1026 #line 317 "/usr/src/external/bsd/flex/dist/parse.y"
1027 { synerr( _("unrecognized rule") ); }
1030 #line 321 "/usr/src/external/bsd/flex/dist/parse.y"
1031 { yyval
= scon_stk_ptr
; }
1034 #line 325 "/usr/src/external/bsd/flex/dist/parse.y"
1035 { yyval
= yyvsp
[-2]; }
1038 #line 328 "/usr/src/external/bsd/flex/dist/parse.y"
1040 yyval
= scon_stk_ptr
;
1042 for ( i
= 1; i
<= lastsc
; ++i
)
1046 for ( j
= 1; j
<= scon_stk_ptr
; ++j
)
1047 if ( scon_stk
[j
] == i
)
1050 if ( j
> scon_stk_ptr
)
1051 scon_stk
[++scon_stk_ptr
] = i
;
1056 #line 345 "/usr/src/external/bsd/flex/dist/parse.y"
1057 { yyval
= scon_stk_ptr
; }
1060 #line 353 "/usr/src/external/bsd/flex/dist/parse.y"
1061 { synerr( _("bad start condition list") ); }
1064 #line 357 "/usr/src/external/bsd/flex/dist/parse.y"
1066 if ( (scnum
= sclookup( nmstr
)) == 0 )
1067 format_pinpoint_message(
1068 "undeclared start condition %s",
1072 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
1073 if ( scon_stk
[i
] == scnum
)
1076 "<%s> specified twice",
1081 if ( i
> scon_stk_ptr
)
1082 scon_stk
[++scon_stk_ptr
] = scnum
;
1087 #line 380 "/usr/src/external/bsd/flex/dist/parse.y"
1089 if ( transchar
[lastst
[yyvsp
[0]]] != SYM_EPSILON
)
1090 /* Provide final transition \now/ so it
1091 * will be marked as a trailing context
1094 yyvsp
[0] = link_machines( yyvsp
[0],
1095 mkstate( SYM_EPSILON
) );
1097 mark_beginning_as_normal( yyvsp
[0] );
1098 current_state_type
= STATE_NORMAL
;
1100 if ( previous_continued_action
)
1102 /* We need to treat this as variable trailing
1103 * context so that the backup does not happen
1104 * in the action but before the action switch
1105 * statement. If the backup happens in the
1106 * action, then the rules "falling into" this
1107 * one's action will *also* do the backup,
1110 if ( ! varlength
|| headcnt
!= 0 )
1112 "trailing context made variable due to preceding '|' action" );
1114 /* Mark as variable. */
1120 if ( lex_compat
|| (varlength
&& headcnt
== 0) )
1121 { /* variable trailing context rule */
1122 /* Mark the first part of the rule as the
1123 * accepting "head" part of a trailing
1126 * By the way, we didn't do this at the
1127 * beginning of this production because back
1128 * then current_state_type was set up for a
1129 * trail rule, and add_accept() can create
1132 add_accept( yyvsp
[-1],
1133 num_rules
| YY_TRAILING_HEAD_MASK
);
1134 variable_trail_rule
= true;
1140 yyval
= link_machines( yyvsp
[-1], yyvsp
[0] );
1144 #line 436 "/usr/src/external/bsd/flex/dist/parse.y"
1145 { synerr( _("trailing context used twice") ); }
1148 #line 439 "/usr/src/external/bsd/flex/dist/parse.y"
1155 current_state_type
= STATE_TRAILING_CONTEXT
;
1159 synerr( _("trailing context used twice") );
1160 yyval
= mkstate( SYM_EPSILON
);
1163 else if ( previous_continued_action
)
1165 /* See the comment in the rule for "re2 re"
1169 "trailing context made variable due to preceding '|' action" );
1174 if ( lex_compat
|| varlength
)
1176 /* Again, see the comment in the rule for
1179 add_accept( yyvsp
[-1],
1180 num_rules
| YY_TRAILING_HEAD_MASK
);
1181 variable_trail_rule
= true;
1186 eps
= mkstate( SYM_EPSILON
);
1187 yyval
= link_machines( yyvsp
[-1],
1188 link_machines( eps
, mkstate( '\n' ) ) );
1192 #line 482 "/usr/src/external/bsd/flex/dist/parse.y"
1198 if ( lex_compat
|| (varlength
&& headcnt
== 0) )
1199 /* Both head and trail are
1202 variable_trail_rule
= true;
1209 #line 500 "/usr/src/external/bsd/flex/dist/parse.y"
1212 yyval
= mkor( yyvsp
[-2], yyvsp
[0] );
1216 #line 506 "/usr/src/external/bsd/flex/dist/parse.y"
1217 { yyval
= yyvsp
[0]; }
1220 #line 511 "/usr/src/external/bsd/flex/dist/parse.y"
1222 /* This rule is written separately so the
1223 * reduction will occur before the trailing
1228 synerr( _("trailing context used twice") );
1233 /* We hope the trailing context is
1242 current_state_type
= STATE_TRAILING_CONTEXT
;
1247 #line 538 "/usr/src/external/bsd/flex/dist/parse.y"
1249 /* This is where concatenation of adjacent patterns
1252 yyval
= link_machines( yyvsp
[-1], yyvsp
[0] );
1256 #line 546 "/usr/src/external/bsd/flex/dist/parse.y"
1257 { yyval
= yyvsp
[0]; }
1260 #line 549 "/usr/src/external/bsd/flex/dist/parse.y"
1264 if ( yyvsp
[-3] > yyvsp
[-1] || yyvsp
[-3] < 0 )
1266 synerr( _("bad iteration values") );
1271 if ( yyvsp
[-3] == 0 )
1273 if ( yyvsp
[-1] <= 0 )
1276 _("bad iteration values") );
1281 mkrep( yyvsp
[-5], 1, yyvsp
[-1] ) );
1284 yyval
= mkrep( yyvsp
[-5], yyvsp
[-3], yyvsp
[-1] );
1289 #line 577 "/usr/src/external/bsd/flex/dist/parse.y"
1293 if ( yyvsp
[-2] <= 0 )
1295 synerr( _("iteration value must be positive") );
1300 yyval
= mkrep( yyvsp
[-4], yyvsp
[-2], INFINITE_REPEAT
);
1304 #line 591 "/usr/src/external/bsd/flex/dist/parse.y"
1306 /* The series could be something like "(foo)",
1307 * in which case we have no idea what its length
1308 * is, so we punt here.
1312 if ( yyvsp
[-1] <= 0 )
1314 synerr( _("iteration value must be positive")
1320 yyval
= link_machines( yyvsp
[-3],
1321 copysingl( yyvsp
[-3], yyvsp
[-1] - 1 ) );
1325 #line 613 "/usr/src/external/bsd/flex/dist/parse.y"
1329 yyval
= mkclos( yyvsp
[-1] );
1333 #line 620 "/usr/src/external/bsd/flex/dist/parse.y"
1336 yyval
= mkposcl( yyvsp
[-1] );
1340 #line 626 "/usr/src/external/bsd/flex/dist/parse.y"
1343 yyval
= mkopt( yyvsp
[-1] );
1347 #line 632 "/usr/src/external/bsd/flex/dist/parse.y"
1351 if ( yyvsp
[-3] > yyvsp
[-1] || yyvsp
[-3] < 0 )
1353 synerr( _("bad iteration values") );
1358 if ( yyvsp
[-3] == 0 )
1360 if ( yyvsp
[-1] <= 0 )
1363 _("bad iteration values") );
1368 mkrep( yyvsp
[-5], 1, yyvsp
[-1] ) );
1371 yyval
= mkrep( yyvsp
[-5], yyvsp
[-3], yyvsp
[-1] );
1376 #line 660 "/usr/src/external/bsd/flex/dist/parse.y"
1380 if ( yyvsp
[-2] <= 0 )
1382 synerr( _("iteration value must be positive") );
1387 yyval
= mkrep( yyvsp
[-4], yyvsp
[-2], INFINITE_REPEAT
);
1391 #line 674 "/usr/src/external/bsd/flex/dist/parse.y"
1393 /* The singleton could be something like "(foo)",
1394 * in which case we have no idea what its length
1395 * is, so we punt here.
1399 if ( yyvsp
[-1] <= 0 )
1401 synerr( _("iteration value must be positive") );
1406 yyval
= link_machines( yyvsp
[-3],
1407 copysingl( yyvsp
[-3], yyvsp
[-1] - 1 ) );
1411 #line 693 "/usr/src/external/bsd/flex/dist/parse.y"
1415 /* Create the '.' character class. */
1417 ccladd( ccldot
, '\n' );
1418 cclnegate( ccldot
);
1421 mkeccl( ccltbl
+ cclmap
[ccldot
],
1422 ccllen
[ccldot
], nextecm
,
1423 ecgroup
, csize
, csize
);
1425 /* Create the (?s:'.') character class. */
1427 cclnegate( cclany
);
1430 mkeccl( ccltbl
+ cclmap
[cclany
],
1431 ccllen
[cclany
], nextecm
,
1432 ecgroup
, csize
, csize
);
1440 yyval
= mkstate( -cclany
);
1442 yyval
= mkstate( -ccldot
);
1446 #line 727 "/usr/src/external/bsd/flex/dist/parse.y"
1448 /* Sort characters for fast searching. We
1449 * use a shell sort since this list could
1452 cshell( ccltbl
+ cclmap
[yyvsp
[0]], ccllen
[yyvsp
[0]], true );
1455 mkeccl( ccltbl
+ cclmap
[yyvsp
[0]], ccllen
[yyvsp
[0]],
1456 nextecm
, ecgroup
, csize
, csize
);
1460 if (ccl_has_nl
[yyvsp
[0]])
1461 rule_has_nl
[num_rules
] = true;
1463 yyval
= mkstate( -yyvsp
[0] );
1467 #line 747 "/usr/src/external/bsd/flex/dist/parse.y"
1471 if (ccl_has_nl
[yyvsp
[0]])
1472 rule_has_nl
[num_rules
] = true;
1474 yyval
= mkstate( -yyvsp
[0] );
1478 #line 757 "/usr/src/external/bsd/flex/dist/parse.y"
1479 { yyval
= yyvsp
[-1]; }
1482 #line 760 "/usr/src/external/bsd/flex/dist/parse.y"
1483 { yyval
= yyvsp
[-1]; }
1486 #line 763 "/usr/src/external/bsd/flex/dist/parse.y"
1490 if (yyvsp
[0] == nlch
)
1491 rule_has_nl
[num_rules
] = true;
1493 if (sf_case_ins() && has_case(yyvsp
[0]))
1494 /* create an alternation, as in (a|A) */
1495 yyval
= mkor (mkstate(yyvsp
[0]), mkstate(reverse_case(yyvsp
[0])));
1497 yyval
= mkstate( yyvsp
[0] );
1501 #line 777 "/usr/src/external/bsd/flex/dist/parse.y"
1502 { yyval
= ccl_set_diff (yyvsp
[-2], yyvsp
[0]); }
1505 #line 778 "/usr/src/external/bsd/flex/dist/parse.y"
1506 { yyval
= ccl_set_union (yyvsp
[-2], yyvsp
[0]); }
1509 #line 784 "/usr/src/external/bsd/flex/dist/parse.y"
1510 { yyval
= yyvsp
[-1]; }
1513 #line 787 "/usr/src/external/bsd/flex/dist/parse.y"
1515 cclnegate( yyvsp
[-1] );
1520 #line 794 "/usr/src/external/bsd/flex/dist/parse.y"
1526 /* If one end of the range has case and the other
1527 * does not, or the cases are different, then we're not
1528 * sure what range the user is trying to express.
1529 * Examples: [@-z] or [S-t]
1531 if (has_case (yyvsp
[-2]) != has_case (yyvsp
[0])
1532 || (has_case (yyvsp
[-2]) && (b_islower (yyvsp
[-2]) != b_islower (yyvsp
[0])))
1533 || (has_case (yyvsp
[-2]) && (b_isupper (yyvsp
[-2]) != b_isupper (yyvsp
[0]))))
1535 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
1536 yyvsp
[-2], yyvsp
[0]);
1538 /* If the range spans uppercase characters but not
1539 * lowercase (or vice-versa), then should we automatically
1540 * include lowercase characters in the range?
1541 * Example: [@-_] spans [a-z] but not [A-Z]
1543 else if (!has_case (yyvsp
[-2]) && !has_case (yyvsp
[0]) && !range_covers_case (yyvsp
[-2], yyvsp
[0]))
1545 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
1546 yyvsp
[-2], yyvsp
[0]);
1549 if ( yyvsp
[-2] > yyvsp
[0] )
1550 synerr( _("negative range in character class") );
1554 for ( i
= yyvsp
[-2]; i
<= yyvsp
[0]; ++i
)
1555 ccladd( yyvsp
[-3], i
);
1557 /* Keep track if this ccl is staying in
1558 * alphabetical order.
1560 cclsorted
= cclsorted
&& (yyvsp
[-2] > lastchar
);
1561 lastchar
= yyvsp
[0];
1563 /* Do it again for upper/lowercase */
1564 if (sf_case_ins() && has_case(yyvsp
[-2]) && has_case(yyvsp
[0])){
1565 yyvsp
[-2] = reverse_case (yyvsp
[-2]);
1566 yyvsp
[0] = reverse_case (yyvsp
[0]);
1568 for ( i
= yyvsp
[-2]; i
<= yyvsp
[0]; ++i
)
1569 ccladd( yyvsp
[-3], i
);
1571 cclsorted
= cclsorted
&& (yyvsp
[-2] > lastchar
);
1572 lastchar
= yyvsp
[0];
1581 #line 854 "/usr/src/external/bsd/flex/dist/parse.y"
1583 ccladd( yyvsp
[-1], yyvsp
[0] );
1584 cclsorted
= cclsorted
&& (yyvsp
[0] > lastchar
);
1585 lastchar
= yyvsp
[0];
1587 /* Do it again for upper/lowercase */
1588 if (sf_case_ins() && has_case(yyvsp
[0])){
1589 yyvsp
[0] = reverse_case (yyvsp
[0]);
1590 ccladd (yyvsp
[-1], yyvsp
[0]);
1592 cclsorted
= cclsorted
&& (yyvsp
[0] > lastchar
);
1593 lastchar
= yyvsp
[0];
1600 #line 872 "/usr/src/external/bsd/flex/dist/parse.y"
1602 /* Too hard to properly maintain cclsorted. */
1608 #line 879 "/usr/src/external/bsd/flex/dist/parse.y"
1612 currccl
= yyval
= cclinit();
1616 #line 887 "/usr/src/external/bsd/flex/dist/parse.y"
1617 { CCL_EXPR(isalnum
); }
1620 #line 888 "/usr/src/external/bsd/flex/dist/parse.y"
1621 { CCL_EXPR(isalpha
); }
1624 #line 889 "/usr/src/external/bsd/flex/dist/parse.y"
1625 { CCL_EXPR(IS_BLANK
); }
1628 #line 890 "/usr/src/external/bsd/flex/dist/parse.y"
1629 { CCL_EXPR(iscntrl
); }
1632 #line 891 "/usr/src/external/bsd/flex/dist/parse.y"
1633 { CCL_EXPR(isdigit
); }
1636 #line 892 "/usr/src/external/bsd/flex/dist/parse.y"
1637 { CCL_EXPR(isgraph
); }
1640 #line 893 "/usr/src/external/bsd/flex/dist/parse.y"
1648 #line 898 "/usr/src/external/bsd/flex/dist/parse.y"
1649 { CCL_EXPR(isprint
); }
1652 #line 899 "/usr/src/external/bsd/flex/dist/parse.y"
1653 { CCL_EXPR(ispunct
); }
1656 #line 900 "/usr/src/external/bsd/flex/dist/parse.y"
1657 { CCL_EXPR(isspace
); }
1660 #line 901 "/usr/src/external/bsd/flex/dist/parse.y"
1661 { CCL_EXPR(isxdigit
); }
1664 #line 902 "/usr/src/external/bsd/flex/dist/parse.y"
1672 #line 908 "/usr/src/external/bsd/flex/dist/parse.y"
1673 { CCL_NEG_EXPR(isalnum
); }
1676 #line 909 "/usr/src/external/bsd/flex/dist/parse.y"
1677 { CCL_NEG_EXPR(isalpha
); }
1680 #line 910 "/usr/src/external/bsd/flex/dist/parse.y"
1681 { CCL_NEG_EXPR(IS_BLANK
); }
1684 #line 911 "/usr/src/external/bsd/flex/dist/parse.y"
1685 { CCL_NEG_EXPR(iscntrl
); }
1688 #line 912 "/usr/src/external/bsd/flex/dist/parse.y"
1689 { CCL_NEG_EXPR(isdigit
); }
1692 #line 913 "/usr/src/external/bsd/flex/dist/parse.y"
1693 { CCL_NEG_EXPR(isgraph
); }
1696 #line 914 "/usr/src/external/bsd/flex/dist/parse.y"
1697 { CCL_NEG_EXPR(isprint
); }
1700 #line 915 "/usr/src/external/bsd/flex/dist/parse.y"
1701 { CCL_NEG_EXPR(ispunct
); }
1704 #line 916 "/usr/src/external/bsd/flex/dist/parse.y"
1705 { CCL_NEG_EXPR(isspace
); }
1708 #line 917 "/usr/src/external/bsd/flex/dist/parse.y"
1709 { CCL_NEG_EXPR(isxdigit
); }
1712 #line 918 "/usr/src/external/bsd/flex/dist/parse.y"
1714 if ( sf_case_ins() )
1715 lwarn(_("[:^lower:] is ambiguous in case insensitive scanner"));
1717 CCL_NEG_EXPR(islower
);
1721 #line 924 "/usr/src/external/bsd/flex/dist/parse.y"
1723 if ( sf_case_ins() )
1724 lwarn(_("[:^upper:] ambiguous in case insensitive scanner"));
1726 CCL_NEG_EXPR(isupper
);
1730 #line 933 "/usr/src/external/bsd/flex/dist/parse.y"
1732 if ( yyvsp
[0] == nlch
)
1733 rule_has_nl
[num_rules
] = true;
1737 if (sf_case_ins() && has_case(yyvsp
[0]))
1738 yyval
= mkor (mkstate(yyvsp
[0]), mkstate(reverse_case(yyvsp
[0])));
1740 yyval
= mkstate (yyvsp
[0]);
1742 yyval
= link_machines( yyvsp
[-1], yyval
);
1746 #line 948 "/usr/src/external/bsd/flex/dist/parse.y"
1747 { yyval
= mkstate( SYM_EPSILON
); }
1749 #line 1749 "/usr/src/external/bsd/flex/dist/parse.c"
1755 if (yystate
== 0 && yym
== 0)
1759 printf("%sdebug: after reduction, shifting from state 0 to\
1760 state %d\n", YYPREFIX
, YYFINAL
);
1767 if ((yychar
= yylex()) < 0) yychar
= 0;
1772 if (yychar
<= YYMAXTOKEN
) yys
= yyname
[yychar
];
1773 if (!yys
) yys
= "illegal-symbol";
1774 printf("%sdebug: state %d, reading %d (%s)\n",
1775 YYPREFIX
, YYFINAL
, yychar
, yys
);
1779 if (yychar
== 0) goto yyaccept
;
1782 if ((yyn
= yygindex
[yym
]) && (yyn
+= yystate
) >= 0 &&
1783 yyn
<= YYTABLESIZE
&& yycheck
[yyn
] == yystate
)
1784 yystate
= yytable
[yyn
];
1786 yystate
= yydgoto
[yym
];
1789 printf("%sdebug: after reduction, shifting from state %d \
1790 to state %d\n", YYPREFIX
, *yyssp
, yystate
);
1792 if (yyssp
>= yysslim
&& yygrowstack())
1796 *++yyssp
= (short) yystate
;
1801 yyerror("yacc stack overflow");