Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/mty-makai/expr_parse.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 249 - (show annotations) (download) (as text)
Mon Nov 22 08:48:04 2010 UTC (13 years, 4 months ago) by notanpe
File MIME type: text/x-csrc
File size: 54112 byte(s)
GNU Bison 2.4.2 で生成したものでおきかえ。
1 /* A Bison parser, made by GNU Bison 2.4.2. */
2
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
6 Foundation, Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
43
44 /* Identify Bison output. */
45 #define YYBISON 1
46
47 /* Bison version. */
48 #define YYBISON_VERSION "2.4.2"
49
50 /* Skeleton name. */
51 #define YYSKELETON_NAME "yacc.c"
52
53 /* Pure parsers. */
54 #define YYPURE 0
55
56 /* Push parsers. */
57 #define YYPUSH 0
58
59 /* Pull parsers. */
60 #define YYPULL 1
61
62 /* Using locations. */
63 #define YYLSP_NEEDED 0
64
65
66
67 /* Copy the first part of user declarations. */
68
69 /* Line 189 of yacc.c */
70 #line 9 "expr_parse.y"
71
72
73 #include <assert.h>
74 #include <stdarg.h>
75 #include <stdio.h>
76 #include <stdlib.h>
77 #include <string.h>
78 #include "config.h"
79 #include "expr_parse.h"
80 #include "mtytypes.h"
81 #include "synth.h"
82 #include "wdict.h"
83
84 #if !defined(YYDEBUG) && DEBUG>=1
85 #define YYDEBUG 1
86 #endif
87
88 char *g_filename;
89 int g_lineno;
90
91 /* �����������A�P�����v���� */
92 struct ELEMS_ARY
93 {
94 union
95 {
96 uint64_t rng;
97 struct DICT_CHAR dict;
98 } ch[10];
99 unsigned rng :10; /* RNG �������������� */
100 unsigned len : 4;
101 };
102
103
104
105 /* Line 189 of yacc.c */
106 #line 107 "expr_parse.c"
107
108 /* Enabling traces. */
109 #ifndef YYDEBUG
110 # define YYDEBUG 1
111 #endif
112
113 /* Enabling verbose error messages. */
114 #ifdef YYERROR_VERBOSE
115 # undef YYERROR_VERBOSE
116 # define YYERROR_VERBOSE 1
117 #else
118 # define YYERROR_VERBOSE 0
119 #endif
120
121 /* Enabling the token table. */
122 #ifndef YYTOKEN_TABLE
123 # define YYTOKEN_TABLE 0
124 #endif
125
126
127 /* Tokens. */
128 #ifndef YYTOKENTYPE
129 # define YYTOKENTYPE
130 /* Put the tokens into the symbol table, so that GDB and other debuggers
131 know about them. */
132 enum yytokentype {
133 JUNK = 258,
134 DICT = 259,
135 CHX = 260,
136 CHXE = 261,
137 OR = 262,
138 CLS = 263,
139 CLS_CMPL = 264,
140 RNGS = 265
141 };
142 #endif
143
144
145
146 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
147 typedef union YYSTYPE
148 {
149
150 /* Line 214 of yacc.c */
151 #line 43 "expr_parse.y"
152
153 int a;
154 struct ITREE *tree;
155 struct ELEMS_ARY *elems;
156 char *str;
157 uint64_t bmp;
158 struct DICT_CHAR dict;
159
160
161
162 /* Line 214 of yacc.c */
163 #line 164 "expr_parse.c"
164 } YYSTYPE;
165 # define YYSTYPE_IS_TRIVIAL 1
166 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
167 # define YYSTYPE_IS_DECLARED 1
168 #endif
169
170
171 /* Copy the second part of user declarations. */
172
173 /* Line 264 of yacc.c */
174 #line 52 "expr_parse.y"
175
176
177 #define YY_DECL static int yylex(void)
178
179 YY_DECL;
180 static void yyerror(char const *msg);
181 static void expr_error(char const *fmt, ...);
182 static unsigned cv64(int c);
183 static uint64_t mkrng(unsigned a, unsigned z);
184 static int mkdict(unsigned attr, unsigned e);
185 static int mkchx(int c, unsigned e);
186
187 static struct ITREE *g_node;
188
189
190
191 /* Line 264 of yacc.c */
192 #line 193 "expr_parse.c"
193
194 #ifdef short
195 # undef short
196 #endif
197
198 #ifdef YYTYPE_UINT8
199 typedef YYTYPE_UINT8 yytype_uint8;
200 #else
201 typedef unsigned char yytype_uint8;
202 #endif
203
204 #ifdef YYTYPE_INT8
205 typedef YYTYPE_INT8 yytype_int8;
206 #elif (defined __STDC__ || defined __C99__FUNC__ \
207 || defined __cplusplus || defined _MSC_VER)
208 typedef signed char yytype_int8;
209 #else
210 typedef short int yytype_int8;
211 #endif
212
213 #ifdef YYTYPE_UINT16
214 typedef YYTYPE_UINT16 yytype_uint16;
215 #else
216 typedef unsigned short int yytype_uint16;
217 #endif
218
219 #ifdef YYTYPE_INT16
220 typedef YYTYPE_INT16 yytype_int16;
221 #else
222 typedef short int yytype_int16;
223 #endif
224
225 #ifndef YYSIZE_T
226 # ifdef __SIZE_TYPE__
227 # define YYSIZE_T __SIZE_TYPE__
228 # elif defined size_t
229 # define YYSIZE_T size_t
230 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
231 || defined __cplusplus || defined _MSC_VER)
232 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
233 # define YYSIZE_T size_t
234 # else
235 # define YYSIZE_T unsigned int
236 # endif
237 #endif
238
239 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
240
241 #ifndef YY_
242 # if defined YYENABLE_NLS && YYENABLE_NLS
243 # if ENABLE_NLS
244 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
245 # define YY_(msgid) dgettext ("bison-runtime", msgid)
246 # endif
247 # endif
248 # ifndef YY_
249 # define YY_(msgid) msgid
250 # endif
251 #endif
252
253 /* Suppress unused-variable warnings by "using" E. */
254 #if ! defined lint || defined __GNUC__
255 # define YYUSE(e) ((void) (e))
256 #else
257 # define YYUSE(e) /* empty */
258 #endif
259
260 /* Identity function, used to suppress warnings about constant conditions. */
261 #ifndef lint
262 # define YYID(n) (n)
263 #else
264 #if (defined __STDC__ || defined __C99__FUNC__ \
265 || defined __cplusplus || defined _MSC_VER)
266 static int
267 YYID (int yyi)
268 #else
269 static int
270 YYID (yyi)
271 int yyi;
272 #endif
273 {
274 return yyi;
275 }
276 #endif
277
278 #if ! defined yyoverflow || YYERROR_VERBOSE
279
280 /* The parser invokes alloca or malloc; define the necessary symbols. */
281
282 # ifdef YYSTACK_USE_ALLOCA
283 # if YYSTACK_USE_ALLOCA
284 # ifdef __GNUC__
285 # define YYSTACK_ALLOC __builtin_alloca
286 # elif defined __BUILTIN_VA_ARG_INCR
287 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
288 # elif defined _AIX
289 # define YYSTACK_ALLOC __alloca
290 # elif defined _MSC_VER
291 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
292 # define alloca _alloca
293 # else
294 # define YYSTACK_ALLOC alloca
295 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
296 || defined __cplusplus || defined _MSC_VER)
297 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
298 # ifndef _STDLIB_H
299 # define _STDLIB_H 1
300 # endif
301 # endif
302 # endif
303 # endif
304 # endif
305
306 # ifdef YYSTACK_ALLOC
307 /* Pacify GCC's `empty if-body' warning. */
308 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
309 # ifndef YYSTACK_ALLOC_MAXIMUM
310 /* The OS might guarantee only one guard page at the bottom of the stack,
311 and a page size can be as small as 4096 bytes. So we cannot safely
312 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
313 to allow for a few compiler-allocated temporary stack slots. */
314 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
315 # endif
316 # else
317 # define YYSTACK_ALLOC YYMALLOC
318 # define YYSTACK_FREE YYFREE
319 # ifndef YYSTACK_ALLOC_MAXIMUM
320 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
321 # endif
322 # if (defined __cplusplus && ! defined _STDLIB_H \
323 && ! ((defined YYMALLOC || defined malloc) \
324 && (defined YYFREE || defined free)))
325 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
326 # ifndef _STDLIB_H
327 # define _STDLIB_H 1
328 # endif
329 # endif
330 # ifndef YYMALLOC
331 # define YYMALLOC malloc
332 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
333 || defined __cplusplus || defined _MSC_VER)
334 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
335 # endif
336 # endif
337 # ifndef YYFREE
338 # define YYFREE free
339 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
340 || defined __cplusplus || defined _MSC_VER)
341 void free (void *); /* INFRINGES ON USER NAME SPACE */
342 # endif
343 # endif
344 # endif
345 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
346
347
348 #if (! defined yyoverflow \
349 && (! defined __cplusplus \
350 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
351
352 /* A type that is properly aligned for any stack member. */
353 union yyalloc
354 {
355 yytype_int16 yyss_alloc;
356 YYSTYPE yyvs_alloc;
357 };
358
359 /* The size of the maximum gap between one aligned stack and the next. */
360 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
361
362 /* The size of an array large to enough to hold all stacks, each with
363 N elements. */
364 # define YYSTACK_BYTES(N) \
365 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
366 + YYSTACK_GAP_MAXIMUM)
367
368 /* Copy COUNT objects from FROM to TO. The source and destination do
369 not overlap. */
370 # ifndef YYCOPY
371 # if defined __GNUC__ && 1 < __GNUC__
372 # define YYCOPY(To, From, Count) \
373 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
374 # else
375 # define YYCOPY(To, From, Count) \
376 do \
377 { \
378 YYSIZE_T yyi; \
379 for (yyi = 0; yyi < (Count); yyi++) \
380 (To)[yyi] = (From)[yyi]; \
381 } \
382 while (YYID (0))
383 # endif
384 # endif
385
386 /* Relocate STACK from its old location to the new one. The
387 local variables YYSIZE and YYSTACKSIZE give the old and new number of
388 elements in the stack, and YYPTR gives the new location of the
389 stack. Advance YYPTR to a properly aligned location for the next
390 stack. */
391 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
392 do \
393 { \
394 YYSIZE_T yynewbytes; \
395 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
396 Stack = &yyptr->Stack_alloc; \
397 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
398 yyptr += yynewbytes / sizeof (*yyptr); \
399 } \
400 while (YYID (0))
401
402 #endif
403
404 /* YYFINAL -- State number of the termination state. */
405 #define YYFINAL 5
406 /* YYLAST -- Last index in YYTABLE. */
407 #define YYLAST 39
408
409 /* YYNTOKENS -- Number of terminals. */
410 #define YYNTOKENS 14
411 /* YYNNTS -- Number of nonterminals. */
412 #define YYNNTS 13
413 /* YYNRULES -- Number of rules. */
414 #define YYNRULES 28
415 /* YYNRULES -- Number of states. */
416 #define YYNSTATES 33
417
418 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
419 #define YYUNDEFTOK 2
420 #define YYMAXUTOK 265
421
422 #define YYTRANSLATE(YYX) \
423 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
424
425 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
426 static const yytype_uint8 yytranslate[] =
427 {
428 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 5, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 6, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 1, 2, 3, 7,
454 8, 9, 10, 11, 12, 13
455 };
456
457 #if YYDEBUG
458 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
459 YYRHS. */
460 static const yytype_uint8 yyprhs[] =
461 {
462 0, 0, 3, 7, 9, 13, 15, 16, 18, 21,
463 23, 27, 28, 30, 31, 33, 36, 38, 40, 43,
464 46, 48, 50, 53, 55, 58, 60, 62, 64
465 };
466
467 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
468 static const yytype_int8 yyrhs[] =
469 {
470 15, 0, -1, 17, 16, 17, -1, 17, -1, 16,
471 18, 19, -1, 19, -1, -1, 18, -1, 18, 10,
472 -1, 10, -1, 20, 22, 21, -1, -1, 4, -1,
473 -1, 5, -1, 22, 23, -1, 23, -1, 25, -1,
474 11, 24, -1, 12, 24, -1, 6, -1, 3, -1,
475 24, 13, -1, 13, -1, 25, 26, -1, 26, -1,
476 7, -1, 8, -1, 9, -1
477 };
478
479 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
480 static const yytype_uint16 yyrline[] =
481 {
482 0, 84, 84, 85, 88, 92, 98, 100, 103, 104,
483 107, 209, 210, 213, 214, 217, 246, 249, 263, 270,
484 277, 285, 289, 290, 293, 316, 319, 320, 321
485 };
486 #endif
487
488 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
489 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
490 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
491 static const char *const yytname[] =
492 {
493 "$end", "error", "$undefined", "JUNK", "'^'", "'$'", "'?'", "DICT",
494 "CHX", "CHXE", "OR", "CLS", "CLS_CMPL", "RNGS", "$accept", "file",
495 "exprs", "delims_op", "orz", "expr", "acc_op", "dol_op", "elems", "elem",
496 "rngs", "dict", "d_el", 0
497 };
498 #endif
499
500 # ifdef YYPRINT
501 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
502 token YYLEX-NUM. */
503 static const yytype_uint16 yytoknum[] =
504 {
505 0, 256, 257, 258, 94, 36, 63, 259, 260, 261,
506 262, 263, 264, 265
507 };
508 # endif
509
510 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
511 static const yytype_uint8 yyr1[] =
512 {
513 0, 14, 15, 15, 16, 16, 17, 17, 18, 18,
514 19, 20, 20, 21, 21, 22, 22, 23, 23, 23,
515 23, 23, 24, 24, 25, 25, 26, 26, 26
516 };
517
518 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
519 static const yytype_uint8 yyr2[] =
520 {
521 0, 2, 3, 1, 3, 1, 0, 1, 2, 1,
522 3, 0, 1, 0, 1, 2, 1, 1, 2, 2,
523 1, 1, 2, 1, 2, 1, 1, 1, 1
524 };
525
526 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
527 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
528 means the default is an error. */
529 static const yytype_uint8 yydefact[] =
530 {
531 6, 9, 0, 11, 7, 1, 12, 6, 5, 0,
532 8, 2, 11, 21, 20, 26, 27, 28, 0, 0,
533 13, 16, 17, 25, 4, 23, 18, 19, 14, 10,
534 15, 24, 22
535 };
536
537 /* YYDEFGOTO[NTERM-NUM]. */
538 static const yytype_int8 yydefgoto[] =
539 {
540 -1, 2, 7, 3, 4, 8, 9, 29, 20, 21,
541 26, 22, 23
542 };
543
544 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
545 STATE-NUM. */
546 #define YYPACT_NINF -9
547 static const yytype_int8 yypact[] =
548 {
549 -8, -9, 3, 1, 16, -9, -9, -8, -9, 13,
550 -9, -9, 0, -9, -9, -9, -9, -9, 10, 10,
551 6, -9, -1, -9, -9, -9, 14, 14, -9, -9,
552 -9, -9, -9
553 };
554
555 /* YYPGOTO[NTERM-NUM]. */
556 static const yytype_int8 yypgoto[] =
557 {
558 -9, -9, -9, 21, 22, 18, -9, -9, -9, 11,
559 15, -9, 17
560 };
561
562 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
563 positive, shift that token. If negative, reduce the rule which
564 number is the opposite. If zero, do what YYDEFACT says.
565 If YYTABLE_NINF, syntax error. */
566 #define YYTABLE_NINF -8
567 static const yytype_int8 yytable[] =
568 {
569 -7, -3, 1, 5, 6, 6, 15, 16, 17, 13,
570 10, 28, 14, 15, 16, 17, 13, 18, 19, 14,
571 15, 16, 17, 25, 18, 19, 10, 32, 11, 12,
572 24, 30, 0, 0, 27, 0, 0, 0, 0, 31
573 };
574
575 static const yytype_int8 yycheck[] =
576 {
577 0, 0, 10, 0, 4, 4, 7, 8, 9, 3,
578 10, 5, 6, 7, 8, 9, 3, 11, 12, 6,
579 7, 8, 9, 13, 11, 12, 10, 13, 7, 7,
580 12, 20, -1, -1, 19, -1, -1, -1, -1, 22
581 };
582
583 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
584 symbol of state STATE-NUM. */
585 static const yytype_uint8 yystos[] =
586 {
587 0, 10, 15, 17, 18, 0, 4, 16, 19, 20,
588 10, 17, 18, 3, 6, 7, 8, 9, 11, 12,
589 22, 23, 25, 26, 19, 13, 24, 24, 5, 21,
590 23, 26, 13
591 };
592
593 #define yyerrok (yyerrstatus = 0)
594 #define yyclearin (yychar = YYEMPTY)
595 #define YYEMPTY (-2)
596 #define YYEOF 0
597
598 #define YYACCEPT goto yyacceptlab
599 #define YYABORT goto yyabortlab
600 #define YYERROR goto yyerrorlab
601
602
603 /* Like YYERROR except do call yyerror. This remains here temporarily
604 to ease the transition to the new meaning of YYERROR, for GCC.
605 Once GCC version 2 has supplanted version 1, this can go. However,
606 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
607 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
608 discussed. */
609
610 #define YYFAIL goto yyerrlab
611 #if defined YYFAIL
612 /* This is here to suppress warnings from the GCC cpp's
613 -Wunused-macros. Normally we don't worry about that warning, but
614 some users do, and we want to make it easy for users to remove
615 YYFAIL uses, which will produce warnings from Bison 2.5. */
616 #endif
617
618 #define YYRECOVERING() (!!yyerrstatus)
619
620 #define YYBACKUP(Token, Value) \
621 do \
622 if (yychar == YYEMPTY && yylen == 1) \
623 { \
624 yychar = (Token); \
625 yylval = (Value); \
626 yytoken = YYTRANSLATE (yychar); \
627 YYPOPSTACK (1); \
628 goto yybackup; \
629 } \
630 else \
631 { \
632 yyerror (YY_("syntax error: cannot back up")); \
633 YYERROR; \
634 } \
635 while (YYID (0))
636
637
638 #define YYTERROR 1
639 #define YYERRCODE 256
640
641
642 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
643 If N is 0, then set CURRENT to the empty location which ends
644 the previous symbol: RHS[0] (always defined). */
645
646 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
647 #ifndef YYLLOC_DEFAULT
648 # define YYLLOC_DEFAULT(Current, Rhs, N) \
649 do \
650 if (YYID (N)) \
651 { \
652 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
653 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
654 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
655 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
656 } \
657 else \
658 { \
659 (Current).first_line = (Current).last_line = \
660 YYRHSLOC (Rhs, 0).last_line; \
661 (Current).first_column = (Current).last_column = \
662 YYRHSLOC (Rhs, 0).last_column; \
663 } \
664 while (YYID (0))
665 #endif
666
667
668 /* YY_LOCATION_PRINT -- Print the location on the stream.
669 This macro was not mandated originally: define only if we know
670 we won't break user code: when these are the locations we know. */
671
672 #ifndef YY_LOCATION_PRINT
673 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
674 # define YY_LOCATION_PRINT(File, Loc) \
675 fprintf (File, "%d.%d-%d.%d", \
676 (Loc).first_line, (Loc).first_column, \
677 (Loc).last_line, (Loc).last_column)
678 # else
679 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
680 # endif
681 #endif
682
683
684 /* YYLEX -- calling `yylex' with the right arguments. */
685
686 #ifdef YYLEX_PARAM
687 # define YYLEX yylex (YYLEX_PARAM)
688 #else
689 # define YYLEX yylex ()
690 #endif
691
692 /* Enable debugging if requested. */
693 #if YYDEBUG
694
695 # ifndef YYFPRINTF
696 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
697 # define YYFPRINTF fprintf
698 # endif
699
700 # define YYDPRINTF(Args) \
701 do { \
702 if (yydebug) \
703 YYFPRINTF Args; \
704 } while (YYID (0))
705
706 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
707 do { \
708 if (yydebug) \
709 { \
710 YYFPRINTF (stderr, "%s ", Title); \
711 yy_symbol_print (stderr, \
712 Type, Value); \
713 YYFPRINTF (stderr, "\n"); \
714 } \
715 } while (YYID (0))
716
717
718 /*--------------------------------.
719 | Print this symbol on YYOUTPUT. |
720 `--------------------------------*/
721
722 /*ARGSUSED*/
723 #if (defined __STDC__ || defined __C99__FUNC__ \
724 || defined __cplusplus || defined _MSC_VER)
725 static void
726 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
727 #else
728 static void
729 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
730 FILE *yyoutput;
731 int yytype;
732 YYSTYPE const * const yyvaluep;
733 #endif
734 {
735 if (!yyvaluep)
736 return;
737 # ifdef YYPRINT
738 if (yytype < YYNTOKENS)
739 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
740 # else
741 YYUSE (yyoutput);
742 # endif
743 switch (yytype)
744 {
745 default:
746 break;
747 }
748 }
749
750
751 /*--------------------------------.
752 | Print this symbol on YYOUTPUT. |
753 `--------------------------------*/
754
755 #if (defined __STDC__ || defined __C99__FUNC__ \
756 || defined __cplusplus || defined _MSC_VER)
757 static void
758 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
759 #else
760 static void
761 yy_symbol_print (yyoutput, yytype, yyvaluep)
762 FILE *yyoutput;
763 int yytype;
764 YYSTYPE const * const yyvaluep;
765 #endif
766 {
767 if (yytype < YYNTOKENS)
768 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
769 else
770 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
771
772 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
773 YYFPRINTF (yyoutput, ")");
774 }
775
776 /*------------------------------------------------------------------.
777 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
778 | TOP (included). |
779 `------------------------------------------------------------------*/
780
781 #if (defined __STDC__ || defined __C99__FUNC__ \
782 || defined __cplusplus || defined _MSC_VER)
783 static void
784 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
785 #else
786 static void
787 yy_stack_print (yybottom, yytop)
788 yytype_int16 *yybottom;
789 yytype_int16 *yytop;
790 #endif
791 {
792 YYFPRINTF (stderr, "Stack now");
793 for (; yybottom <= yytop; yybottom++)
794 {
795 int yybot = *yybottom;
796 YYFPRINTF (stderr, " %d", yybot);
797 }
798 YYFPRINTF (stderr, "\n");
799 }
800
801 # define YY_STACK_PRINT(Bottom, Top) \
802 do { \
803 if (yydebug) \
804 yy_stack_print ((Bottom), (Top)); \
805 } while (YYID (0))
806
807
808 /*------------------------------------------------.
809 | Report that the YYRULE is going to be reduced. |
810 `------------------------------------------------*/
811
812 #if (defined __STDC__ || defined __C99__FUNC__ \
813 || defined __cplusplus || defined _MSC_VER)
814 static void
815 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
816 #else
817 static void
818 yy_reduce_print (yyvsp, yyrule)
819 YYSTYPE *yyvsp;
820 int yyrule;
821 #endif
822 {
823 int yynrhs = yyr2[yyrule];
824 int yyi;
825 unsigned long int yylno = yyrline[yyrule];
826 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
827 yyrule - 1, yylno);
828 /* The symbols being reduced. */
829 for (yyi = 0; yyi < yynrhs; yyi++)
830 {
831 YYFPRINTF (stderr, " $%d = ", yyi + 1);
832 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
833 &(yyvsp[(yyi + 1) - (yynrhs)])
834 );
835 YYFPRINTF (stderr, "\n");
836 }
837 }
838
839 # define YY_REDUCE_PRINT(Rule) \
840 do { \
841 if (yydebug) \
842 yy_reduce_print (yyvsp, Rule); \
843 } while (YYID (0))
844
845 /* Nonzero means print parse trace. It is left uninitialized so that
846 multiple parsers can coexist. */
847 int yydebug;
848 #else /* !YYDEBUG */
849 # define YYDPRINTF(Args)
850 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
851 # define YY_STACK_PRINT(Bottom, Top)
852 # define YY_REDUCE_PRINT(Rule)
853 #endif /* !YYDEBUG */
854
855
856 /* YYINITDEPTH -- initial size of the parser's stacks. */
857 #ifndef YYINITDEPTH
858 # define YYINITDEPTH 200
859 #endif
860
861 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
862 if the built-in stack extension method is used).
863
864 Do not make this value too large; the results are undefined if
865 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
866 evaluated with infinite-precision integer arithmetic. */
867
868 #ifndef YYMAXDEPTH
869 # define YYMAXDEPTH 10000
870 #endif
871
872
873
874 #if YYERROR_VERBOSE
875
876 # ifndef yystrlen
877 # if defined __GLIBC__ && defined _STRING_H
878 # define yystrlen strlen
879 # else
880 /* Return the length of YYSTR. */
881 #if (defined __STDC__ || defined __C99__FUNC__ \
882 || defined __cplusplus || defined _MSC_VER)
883 static YYSIZE_T
884 yystrlen (const char *yystr)
885 #else
886 static YYSIZE_T
887 yystrlen (yystr)
888 const char *yystr;
889 #endif
890 {
891 YYSIZE_T yylen;
892 for (yylen = 0; yystr[yylen]; yylen++)
893 continue;
894 return yylen;
895 }
896 # endif
897 # endif
898
899 # ifndef yystpcpy
900 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
901 # define yystpcpy stpcpy
902 # else
903 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
904 YYDEST. */
905 #if (defined __STDC__ || defined __C99__FUNC__ \
906 || defined __cplusplus || defined _MSC_VER)
907 static char *
908 yystpcpy (char *yydest, const char *yysrc)
909 #else
910 static char *
911 yystpcpy (yydest, yysrc)
912 char *yydest;
913 const char *yysrc;
914 #endif
915 {
916 char *yyd = yydest;
917 const char *yys = yysrc;
918
919 while ((*yyd++ = *yys++) != '\0')
920 continue;
921
922 return yyd - 1;
923 }
924 # endif
925 # endif
926
927 # ifndef yytnamerr
928 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
929 quotes and backslashes, so that it's suitable for yyerror. The
930 heuristic is that double-quoting is unnecessary unless the string
931 contains an apostrophe, a comma, or backslash (other than
932 backslash-backslash). YYSTR is taken from yytname. If YYRES is
933 null, do not copy; instead, return the length of what the result
934 would have been. */
935 static YYSIZE_T
936 yytnamerr (char *yyres, const char *yystr)
937 {
938 if (*yystr == '"')
939 {
940 YYSIZE_T yyn = 0;
941 char const *yyp = yystr;
942
943 for (;;)
944 switch (*++yyp)
945 {
946 case '\'':
947 case ',':
948 goto do_not_strip_quotes;
949
950 case '\\':
951 if (*++yyp != '\\')
952 goto do_not_strip_quotes;
953 /* Fall through. */
954 default:
955 if (yyres)
956 yyres[yyn] = *yyp;
957 yyn++;
958 break;
959
960 case '"':
961 if (yyres)
962 yyres[yyn] = '\0';
963 return yyn;
964 }
965 do_not_strip_quotes: ;
966 }
967
968 if (! yyres)
969 return yystrlen (yystr);
970
971 return yystpcpy (yyres, yystr) - yyres;
972 }
973 # endif
974
975 /* Copy into YYRESULT an error message about the unexpected token
976 YYCHAR while in state YYSTATE. Return the number of bytes copied,
977 including the terminating null byte. If YYRESULT is null, do not
978 copy anything; just return the number of bytes that would be
979 copied. As a special case, return 0 if an ordinary "syntax error"
980 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
981 size calculation. */
982 static YYSIZE_T
983 yysyntax_error (char *yyresult, int yystate, int yychar)
984 {
985 int yyn = yypact[yystate];
986
987 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
988 return 0;
989 else
990 {
991 int yytype = YYTRANSLATE (yychar);
992 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
993 YYSIZE_T yysize = yysize0;
994 YYSIZE_T yysize1;
995 int yysize_overflow = 0;
996 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
997 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
998 int yyx;
999
1000 # if 0
1001 /* This is so xgettext sees the translatable formats that are
1002 constructed on the fly. */
1003 YY_("syntax error, unexpected %s");
1004 YY_("syntax error, unexpected %s, expecting %s");
1005 YY_("syntax error, unexpected %s, expecting %s or %s");
1006 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1007 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1008 # endif
1009 char *yyfmt;
1010 char const *yyf;
1011 static char const yyunexpected[] = "syntax error, unexpected %s";
1012 static char const yyexpecting[] = ", expecting %s";
1013 static char const yyor[] = " or %s";
1014 char yyformat[sizeof yyunexpected
1015 + sizeof yyexpecting - 1
1016 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1017 * (sizeof yyor - 1))];
1018 char const *yyprefix = yyexpecting;
1019
1020 /* Start YYX at -YYN if negative to avoid negative indexes in
1021 YYCHECK. */
1022 int yyxbegin = yyn < 0 ? -yyn : 0;
1023
1024 /* Stay within bounds of both yycheck and yytname. */
1025 int yychecklim = YYLAST - yyn + 1;
1026 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1027 int yycount = 1;
1028
1029 yyarg[0] = yytname[yytype];
1030 yyfmt = yystpcpy (yyformat, yyunexpected);
1031
1032 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1033 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1034 {
1035 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1036 {
1037 yycount = 1;
1038 yysize = yysize0;
1039 yyformat[sizeof yyunexpected - 1] = '\0';
1040 break;
1041 }
1042 yyarg[yycount++] = yytname[yyx];
1043 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1044 yysize_overflow |= (yysize1 < yysize);
1045 yysize = yysize1;
1046 yyfmt = yystpcpy (yyfmt, yyprefix);
1047 yyprefix = yyor;
1048 }
1049
1050 yyf = YY_(yyformat);
1051 yysize1 = yysize + yystrlen (yyf);
1052 yysize_overflow |= (yysize1 < yysize);
1053 yysize = yysize1;
1054
1055 if (yysize_overflow)
1056 return YYSIZE_MAXIMUM;
1057
1058 if (yyresult)
1059 {
1060 /* Avoid sprintf, as that infringes on the user's name space.
1061 Don't have undefined behavior even if the translation
1062 produced a string with the wrong number of "%s"s. */
1063 char *yyp = yyresult;
1064 int yyi = 0;
1065 while ((*yyp = *yyf) != '\0')
1066 {
1067 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1068 {
1069 yyp += yytnamerr (yyp, yyarg[yyi++]);
1070 yyf += 2;
1071 }
1072 else
1073 {
1074 yyp++;
1075 yyf++;
1076 }
1077 }
1078 }
1079 return yysize;
1080 }
1081 }
1082 #endif /* YYERROR_VERBOSE */
1083
1084
1085 /*-----------------------------------------------.
1086 | Release the memory associated to this symbol. |
1087 `-----------------------------------------------*/
1088
1089 /*ARGSUSED*/
1090 #if (defined __STDC__ || defined __C99__FUNC__ \
1091 || defined __cplusplus || defined _MSC_VER)
1092 static void
1093 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1094 #else
1095 static void
1096 yydestruct (yymsg, yytype, yyvaluep)
1097 const char *yymsg;
1098 int yytype;
1099 YYSTYPE *yyvaluep;
1100 #endif
1101 {
1102 YYUSE (yyvaluep);
1103
1104 if (!yymsg)
1105 yymsg = "Deleting";
1106 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1107
1108 switch (yytype)
1109 {
1110
1111 default:
1112 break;
1113 }
1114 }
1115
1116 /* Prevent warnings from -Wmissing-prototypes. */
1117 #ifdef YYPARSE_PARAM
1118 #if defined __STDC__ || defined __cplusplus
1119 int yyparse (void *YYPARSE_PARAM);
1120 #else
1121 int yyparse ();
1122 #endif
1123 #else /* ! YYPARSE_PARAM */
1124 #if defined __STDC__ || defined __cplusplus
1125 int yyparse (void);
1126 #else
1127 int yyparse ();
1128 #endif
1129 #endif /* ! YYPARSE_PARAM */
1130
1131
1132 /* The lookahead symbol. */
1133 int yychar;
1134
1135 /* The semantic value of the lookahead symbol. */
1136 YYSTYPE yylval;
1137
1138 /* Number of syntax errors so far. */
1139 int yynerrs;
1140
1141
1142
1143 /*-------------------------.
1144 | yyparse or yypush_parse. |
1145 `-------------------------*/
1146
1147 #ifdef YYPARSE_PARAM
1148 #if (defined __STDC__ || defined __C99__FUNC__ \
1149 || defined __cplusplus || defined _MSC_VER)
1150 int
1151 yyparse (void *YYPARSE_PARAM)
1152 #else
1153 int
1154 yyparse (YYPARSE_PARAM)
1155 void *YYPARSE_PARAM;
1156 #endif
1157 #else /* ! YYPARSE_PARAM */
1158 #if (defined __STDC__ || defined __C99__FUNC__ \
1159 || defined __cplusplus || defined _MSC_VER)
1160 int
1161 yyparse (void)
1162 #else
1163 int
1164 yyparse ()
1165
1166 #endif
1167 #endif
1168 {
1169
1170
1171 int yystate;
1172 /* Number of tokens to shift before error messages enabled. */
1173 int yyerrstatus;
1174
1175 /* The stacks and their tools:
1176 `yyss': related to states.
1177 `yyvs': related to semantic values.
1178
1179 Refer to the stacks thru separate pointers, to allow yyoverflow
1180 to reallocate them elsewhere. */
1181
1182 /* The state stack. */
1183 yytype_int16 yyssa[YYINITDEPTH];
1184 yytype_int16 *yyss;
1185 yytype_int16 *yyssp;
1186
1187 /* The semantic value stack. */
1188 YYSTYPE yyvsa[YYINITDEPTH];
1189 YYSTYPE *yyvs;
1190 YYSTYPE *yyvsp;
1191
1192 YYSIZE_T yystacksize;
1193
1194 int yyn;
1195 int yyresult;
1196 /* Lookahead token as an internal (translated) token number. */
1197 int yytoken;
1198 /* The variables used to return semantic value and location from the
1199 action routines. */
1200 YYSTYPE yyval;
1201
1202 #if YYERROR_VERBOSE
1203 /* Buffer for error messages, and its allocated size. */
1204 char yymsgbuf[128];
1205 char *yymsg = yymsgbuf;
1206 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1207 #endif
1208
1209 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1210
1211 /* The number of symbols on the RHS of the reduced rule.
1212 Keep to zero when no symbol should be popped. */
1213 int yylen = 0;
1214
1215 yytoken = 0;
1216 yyss = yyssa;
1217 yyvs = yyvsa;
1218 yystacksize = YYINITDEPTH;
1219
1220 YYDPRINTF ((stderr, "Starting parse\n"));
1221
1222 yystate = 0;
1223 yyerrstatus = 0;
1224 yynerrs = 0;
1225 yychar = YYEMPTY; /* Cause a token to be read. */
1226
1227 /* Initialize stack pointers.
1228 Waste one element of value and location stack
1229 so that they stay on the same level as the state stack.
1230 The wasted elements are never initialized. */
1231 yyssp = yyss;
1232 yyvsp = yyvs;
1233
1234 goto yysetstate;
1235
1236 /*------------------------------------------------------------.
1237 | yynewstate -- Push a new state, which is found in yystate. |
1238 `------------------------------------------------------------*/
1239 yynewstate:
1240 /* In all cases, when you get here, the value and location stacks
1241 have just been pushed. So pushing a state here evens the stacks. */
1242 yyssp++;
1243
1244 yysetstate:
1245 *yyssp = yystate;
1246
1247 if (yyss + yystacksize - 1 <= yyssp)
1248 {
1249 /* Get the current used size of the three stacks, in elements. */
1250 YYSIZE_T yysize = yyssp - yyss + 1;
1251
1252 #ifdef yyoverflow
1253 {
1254 /* Give user a chance to reallocate the stack. Use copies of
1255 these so that the &'s don't force the real ones into
1256 memory. */
1257 YYSTYPE *yyvs1 = yyvs;
1258 yytype_int16 *yyss1 = yyss;
1259
1260 /* Each stack pointer address is followed by the size of the
1261 data in use in that stack, in bytes. This used to be a
1262 conditional around just the two extra args, but that might
1263 be undefined if yyoverflow is a macro. */
1264 yyoverflow (YY_("memory exhausted"),
1265 &yyss1, yysize * sizeof (*yyssp),
1266 &yyvs1, yysize * sizeof (*yyvsp),
1267 &yystacksize);
1268
1269 yyss = yyss1;
1270 yyvs = yyvs1;
1271 }
1272 #else /* no yyoverflow */
1273 # ifndef YYSTACK_RELOCATE
1274 goto yyexhaustedlab;
1275 # else
1276 /* Extend the stack our own way. */
1277 if (YYMAXDEPTH <= yystacksize)
1278 goto yyexhaustedlab;
1279 yystacksize *= 2;
1280 if (YYMAXDEPTH < yystacksize)
1281 yystacksize = YYMAXDEPTH;
1282
1283 {
1284 yytype_int16 *yyss1 = yyss;
1285 union yyalloc *yyptr =
1286 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1287 if (! yyptr)
1288 goto yyexhaustedlab;
1289 YYSTACK_RELOCATE (yyss_alloc, yyss);
1290 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1291 # undef YYSTACK_RELOCATE
1292 if (yyss1 != yyssa)
1293 YYSTACK_FREE (yyss1);
1294 }
1295 # endif
1296 #endif /* no yyoverflow */
1297
1298 yyssp = yyss + yysize - 1;
1299 yyvsp = yyvs + yysize - 1;
1300
1301 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1302 (unsigned long int) yystacksize));
1303
1304 if (yyss + yystacksize - 1 <= yyssp)
1305 YYABORT;
1306 }
1307
1308 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1309
1310 if (yystate == YYFINAL)
1311 YYACCEPT;
1312
1313 goto yybackup;
1314
1315 /*-----------.
1316 | yybackup. |
1317 `-----------*/
1318 yybackup:
1319
1320 /* Do appropriate processing given the current state. Read a
1321 lookahead token if we need one and don't already have one. */
1322
1323 /* First try to decide what to do without reference to lookahead token. */
1324 yyn = yypact[yystate];
1325 if (yyn == YYPACT_NINF)
1326 goto yydefault;
1327
1328 /* Not known => get a lookahead token if don't already have one. */
1329
1330 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1331 if (yychar == YYEMPTY)
1332 {
1333 YYDPRINTF ((stderr, "Reading a token: "));
1334 yychar = YYLEX;
1335 }
1336
1337 if (yychar <= YYEOF)
1338 {
1339 yychar = yytoken = YYEOF;
1340 YYDPRINTF ((stderr, "Now at end of input.\n"));
1341 }
1342 else
1343 {
1344 yytoken = YYTRANSLATE (yychar);
1345 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1346 }
1347
1348 /* If the proper action on seeing token YYTOKEN is to reduce or to
1349 detect an error, take that action. */
1350 yyn += yytoken;
1351 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1352 goto yydefault;
1353 yyn = yytable[yyn];
1354 if (yyn <= 0)
1355 {
1356 if (yyn == 0 || yyn == YYTABLE_NINF)
1357 goto yyerrlab;
1358 yyn = -yyn;
1359 goto yyreduce;
1360 }
1361
1362 /* Count tokens shifted since error; after three, turn off error
1363 status. */
1364 if (yyerrstatus)
1365 yyerrstatus--;
1366
1367 /* Shift the lookahead token. */
1368 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1369
1370 /* Discard the shifted token. */
1371 yychar = YYEMPTY;
1372
1373 yystate = yyn;
1374 *++yyvsp = yylval;
1375
1376 goto yynewstate;
1377
1378
1379 /*-----------------------------------------------------------.
1380 | yydefault -- do the default action for the current state. |
1381 `-----------------------------------------------------------*/
1382 yydefault:
1383 yyn = yydefact[yystate];
1384 if (yyn == 0)
1385 goto yyerrlab;
1386 goto yyreduce;
1387
1388
1389 /*-----------------------------.
1390 | yyreduce -- Do a reduction. |
1391 `-----------------------------*/
1392 yyreduce:
1393 /* yyn is the number of a rule to reduce with. */
1394 yylen = yyr2[yyn];
1395
1396 /* If YYLEN is nonzero, implement the default value of the action:
1397 `$$ = $1'.
1398
1399 Otherwise, the following line sets YYVAL to garbage.
1400 This behavior is undocumented and Bison
1401 users should not rely upon it. Assigning to YYVAL
1402 unconditionally makes the parser a bit smaller, and it avoids a
1403 GCC warning that YYVAL may be used uninitialized. */
1404 yyval = yyvsp[1-yylen];
1405
1406
1407 YY_REDUCE_PRINT (yyn);
1408 switch (yyn)
1409 {
1410 case 4:
1411
1412 /* Line 1464 of yacc.c */
1413 #line 89 "expr_parse.y"
1414 {
1415 synth_add(g_node, (yyvsp[(3) - (3)].tree), NULL);
1416 ;}
1417 break;
1418
1419 case 5:
1420
1421 /* Line 1464 of yacc.c */
1422 #line 93 "expr_parse.y"
1423 {
1424 synth_add(g_node, (yyvsp[(1) - (1)].tree), NULL);
1425 ;}
1426 break;
1427
1428 case 10:
1429
1430 /* Line 1464 of yacc.c */
1431 #line 108 "expr_parse.y"
1432 {
1433 int i, j;
1434 int ne = 0; /* ���������� */
1435
1436 (yyval.tree) = NULL;
1437 for (i = 1; (yyvsp[(2) - (3)].elems) && i <= 11 - (yyvsp[(2) - (3)].elems)->len; i++)
1438 {
1439 struct ITREE *pc;
1440
1441 /* �������� */
1442 if ((yyvsp[(1) - (3)].a) && i > 1)
1443 continue;
1444 /* �������� */
1445 if (i == 11 - (yyvsp[(2) - (3)].elems)->len)
1446 {
1447 /* ���������������� */
1448 if (((yyvsp[(2) - (3)].elems)->rng & (1 << ((yyvsp[(2) - (3)].elems)->len - 1))))
1449 {
1450 if (!((yyvsp[(2) - (3)].elems)->ch[(yyvsp[(2) - (3)].elems)->len - 1].rng & 0x1111111111111111ULL))
1451 continue;
1452 }
1453 else
1454 {
1455 if (!(yyvsp[(2) - (3)].elems)->ch[(yyvsp[(2) - (3)].elems)->len - 1].dict.e)
1456 continue;
1457 }
1458 }
1459 else if ((yyvsp[(3) - (3)].a)) /* �������� $ */
1460 continue;
1461
1462 /* �W�J */
1463 if (!((yyvsp[(2) - (3)].elems)->rng & 1)
1464 && (yyvsp[(2) - (3)].elems)->ch[0].dict.len == (yyvsp[(2) - (3)].elems)->len
1465 && (yyvsp[(2) - (3)].elems)->len >=4)
1466 {
1467 /* �P������ */
1468 pc = synth_make_dict(i, /* ���u */
1469 &(yyvsp[(2) - (3)].elems)->ch[0].dict);
1470 ne++;
1471
1472 /* NULL �������������������A
1473 ����������������������������
1474 ��������������(��������?) */
1475 if (pc == NULL)
1476 continue;
1477 }
1478 else for (j = 0, pc = synth_make_and();
1479 j < (yyvsp[(2) - (3)].elems)->len;
1480 j += (((yyvsp[(2) - (3)].elems)->rng & (1 << j))
1481 ? 1
1482 : (yyvsp[(2) - (3)].elems)->ch[j].dict.len))
1483 if ((yyvsp[(2) - (3)].elems)->rng & (1 << j))
1484 {
1485 /* ���p������ */
1486 synth_add(pc,
1487 synth_make_lr((yyvsp[(2) - (3)].elems)->ch[j].rng, i + j),
1488 NULL);
1489 ne++;
1490 }
1491 else
1492 {
1493 /* �_�����Z���W�J */
1494 int k;
1495 uint64_t m = (yyvsp[(2) - (3)].elems)->ch[j].dict.bmp;
1496 for (k = 0; k < (yyvsp[(2) - (3)].elems)->ch[j].dict.len; k++, m >>= 6)
1497 {
1498 unsigned c = m & 0x3F;
1499 synth_add(pc,
1500 synth_make_lr((mkrng(c, c)
1501 | (((yyvsp[(2) - (3)].elems)->ch[j].dict.xp & (1 << k))
1502 ? (c >= 014
1503 ? mkrng(c + 26, c + 26)
1504 : c == 0
1505 ? mkrng(c, c + 1)
1506 : 0)
1507 : 0)),
1508 i + j + k),
1509 NULL);
1510 ne++;
1511 }
1512 }
1513
1514 if (!(yyval.tree))
1515 (yyval.tree) = synth_make_or();
1516
1517 synth_add((yyval.tree), pc, NULL);
1518 }
1519
1520 if ((yyvsp[(2) - (3)].elems) != NULL)
1521 {
1522 free((yyvsp[(2) - (3)].elems)); /* elems ���s�v */
1523
1524 if (!ne)
1525 {
1526 (yyval.tree) = NULL;
1527 expr_error("���v��������������������?(��������)");
1528 }
1529 }
1530 ;}
1531 break;
1532
1533 case 11:
1534
1535 /* Line 1464 of yacc.c */
1536 #line 209 "expr_parse.y"
1537 { (yyval.a) = 0; ;}
1538 break;
1539
1540 case 12:
1541
1542 /* Line 1464 of yacc.c */
1543 #line 210 "expr_parse.y"
1544 { (yyval.a) = 1; ;}
1545 break;
1546
1547 case 13:
1548
1549 /* Line 1464 of yacc.c */
1550 #line 213 "expr_parse.y"
1551 { (yyval.a) = 0; ;}
1552 break;
1553
1554 case 14:
1555
1556 /* Line 1464 of yacc.c */
1557 #line 214 "expr_parse.y"
1558 { (yyval.a) = 1; ;}
1559 break;
1560
1561 case 15:
1562
1563 /* Line 1464 of yacc.c */
1564 #line 218 "expr_parse.y"
1565 {
1566 if ((yyvsp[(1) - (2)].elems) == NULL || (yyvsp[(2) - (2)].elems) == NULL)
1567 {
1568 /* fallthru */
1569 if ((yyvsp[(1) - (2)].elems) != NULL)
1570 free((yyvsp[(1) - (2)].elems));
1571 if ((yyvsp[(2) - (2)].elems) != NULL)
1572 free((yyvsp[(1) - (2)].elems));
1573 (yyval.elems) = NULL;
1574 }
1575 else if ((yyvsp[(1) - (2)].elems)->len + (yyvsp[(2) - (2)].elems)->len <= 10)
1576 {
1577 assert(0 < (yyvsp[(1) - (2)].elems)->len + (yyvsp[(2) - (2)].elems)->len);
1578 (yyval.elems)->rng = (yyvsp[(1) - (2)].elems)->rng | ((yyvsp[(2) - (2)].elems)->rng << (yyvsp[(1) - (2)].elems)->len);
1579 memcpy(&(yyval.elems)->ch[(yyval.elems)->len], &(yyvsp[(2) - (2)].elems)->ch[0], (yyvsp[(2) - (2)].elems)->len * sizeof((yyvsp[(2) - (2)].elems)->ch[0]));
1580 (yyval.elems)->len += (yyvsp[(2) - (2)].elems)->len;
1581 free((yyvsp[(2) - (2)].elems));
1582 }
1583 else
1584 {
1585 expr_error("���������^�Q��10����������������?");
1586 assert((yyvsp[(1) - (2)].elems) != NULL);
1587 assert((yyvsp[(2) - (2)].elems) != NULL);
1588 free((yyvsp[(1) - (2)].elems));
1589 free((yyvsp[(2) - (2)].elems));
1590 (yyval.elems) = NULL;
1591 }
1592 ;}
1593 break;
1594
1595 case 17:
1596
1597 /* Line 1464 of yacc.c */
1598 #line 250 "expr_parse.y"
1599 {
1600 int i;
1601 if ((yyvsp[(1) - (1)].dict).len > 0)
1602 {
1603 (yyval.elems) = calloc(1, sizeof(struct ELEMS_ARY));
1604 (yyval.elems)->len = i = (yyvsp[(1) - (1)].dict).len;
1605 (yyval.elems)->rng = 0;
1606 while (--i >= 0)
1607 (yyval.elems)->ch[i].dict = (yyvsp[(1) - (1)].dict);
1608 }
1609 else
1610 (yyval.elems) = NULL;
1611 ;}
1612 break;
1613
1614 case 18:
1615
1616 /* Line 1464 of yacc.c */
1617 #line 264 "expr_parse.y"
1618 {
1619 (yyval.elems) = calloc(1, sizeof(struct ELEMS_ARY));
1620 (yyval.elems)->len = 1;
1621 (yyval.elems)->rng = 1;
1622 (yyval.elems)->ch[0].rng = (yyvsp[(2) - (2)].bmp);
1623 ;}
1624 break;
1625
1626 case 19:
1627
1628 /* Line 1464 of yacc.c */
1629 #line 271 "expr_parse.y"
1630 {
1631 (yyval.elems) = calloc(1, sizeof(struct ELEMS_ARY));
1632 (yyval.elems)->len = 1;
1633 (yyval.elems)->rng = 1;
1634 (yyval.elems)->ch[0].rng = ~(yyvsp[(2) - (2)].bmp);
1635 ;}
1636 break;
1637
1638 case 20:
1639
1640 /* Line 1464 of yacc.c */
1641 #line 278 "expr_parse.y"
1642 {
1643 (yyval.elems) = calloc(1, sizeof(struct ELEMS_ARY));
1644 (yyval.elems)->len = 1;
1645 (yyval.elems)->rng = 1;
1646 /* �����������v���� Placeholder(��������������) */
1647 (yyval.elems)->ch[0].rng = (uint64_t)-1;
1648 ;}
1649 break;
1650
1651 case 21:
1652
1653 /* Line 1464 of yacc.c */
1654 #line 286 "expr_parse.y"
1655 { (yyval.elems) = NULL; ;}
1656 break;
1657
1658 case 22:
1659
1660 /* Line 1464 of yacc.c */
1661 #line 289 "expr_parse.y"
1662 { (yyval.bmp) = (yyvsp[(1) - (2)].bmp) | (yyvsp[(2) - (2)].bmp); ;}
1663 break;
1664
1665 case 23:
1666
1667 /* Line 1464 of yacc.c */
1668 #line 290 "expr_parse.y"
1669 { (yyval.bmp) = (yyvsp[(1) - (1)].bmp); ;}
1670 break;
1671
1672 case 24:
1673
1674 /* Line 1464 of yacc.c */
1675 #line 294 "expr_parse.y"
1676 {
1677 unsigned len1 = (yyvsp[(1) - (2)].dict).len;
1678 if (len1 == 0 || (yyvsp[(2) - (2)].dict).len == 0)
1679 {
1680 /* fallthru */
1681 }
1682 else if (len1 + (yyvsp[(2) - (2)].dict).len <= 9 + (yyvsp[(2) - (2)].dict).e)
1683 {
1684 /* $2 �� $1 �����������`���}�[�W
1685 $2.e �������p������ */
1686 (yyval.dict) = (yyvsp[(2) - (2)].dict);
1687 (yyval.dict).len += len1;
1688 (yyval.dict).xp = ((yyval.dict).xp << len1) | (yyvsp[(1) - (2)].dict).xp;
1689 (yyval.dict).bmp = ((yyval.dict).bmp << (6 * len1)) | (yyvsp[(1) - (2)].dict).bmp;
1690 (yyval.dict).attr |= (yyvsp[(1) - (2)].dict).attr;
1691 }
1692 else
1693 {
1694 expr_error("���������P����������?");
1695 (yyval.dict).len = 0;
1696 }
1697 ;}
1698 break;
1699
1700
1701
1702 /* Line 1464 of yacc.c */
1703 #line 1704 "expr_parse.c"
1704 default: break;
1705 }
1706 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1707
1708 YYPOPSTACK (yylen);
1709 yylen = 0;
1710 YY_STACK_PRINT (yyss, yyssp);
1711
1712 *++yyvsp = yyval;
1713
1714 /* Now `shift' the result of the reduction. Determine what state
1715 that goes to, based on the state we popped back to and the rule
1716 number reduced by. */
1717
1718 yyn = yyr1[yyn];
1719
1720 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1721 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1722 yystate = yytable[yystate];
1723 else
1724 yystate = yydefgoto[yyn - YYNTOKENS];
1725
1726 goto yynewstate;
1727
1728
1729 /*------------------------------------.
1730 | yyerrlab -- here on detecting error |
1731 `------------------------------------*/
1732 yyerrlab:
1733 /* If not already recovering from an error, report this error. */
1734 if (!yyerrstatus)
1735 {
1736 ++yynerrs;
1737 #if ! YYERROR_VERBOSE
1738 yyerror (YY_("syntax error"));
1739 #else
1740 {
1741 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1742 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1743 {
1744 YYSIZE_T yyalloc = 2 * yysize;
1745 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1746 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1747 if (yymsg != yymsgbuf)
1748 YYSTACK_FREE (yymsg);
1749 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1750 if (yymsg)
1751 yymsg_alloc = yyalloc;
1752 else
1753 {
1754 yymsg = yymsgbuf;
1755 yymsg_alloc = sizeof yymsgbuf;
1756 }
1757 }
1758
1759 if (0 < yysize && yysize <= yymsg_alloc)
1760 {
1761 (void) yysyntax_error (yymsg, yystate, yychar);
1762 yyerror (yymsg);
1763 }
1764 else
1765 {
1766 yyerror (YY_("syntax error"));
1767 if (yysize != 0)
1768 goto yyexhaustedlab;
1769 }
1770 }
1771 #endif
1772 }
1773
1774
1775
1776 if (yyerrstatus == 3)
1777 {
1778 /* If just tried and failed to reuse lookahead token after an
1779 error, discard it. */
1780
1781 if (yychar <= YYEOF)
1782 {
1783 /* Return failure if at end of input. */
1784 if (yychar == YYEOF)
1785 YYABORT;
1786 }
1787 else
1788 {
1789 yydestruct ("Error: discarding",
1790 yytoken, &yylval);
1791 yychar = YYEMPTY;
1792 }
1793 }
1794
1795 /* Else will try to reuse lookahead token after shifting the error
1796 token. */
1797 goto yyerrlab1;
1798
1799
1800 /*---------------------------------------------------.
1801 | yyerrorlab -- error raised explicitly by YYERROR. |
1802 `---------------------------------------------------*/
1803 yyerrorlab:
1804
1805 /* Pacify compilers like GCC when the user code never invokes
1806 YYERROR and the label yyerrorlab therefore never appears in user
1807 code. */
1808 if (/*CONSTCOND*/ 0)
1809 goto yyerrorlab;
1810
1811 /* Do not reclaim the symbols of the rule which action triggered
1812 this YYERROR. */
1813 YYPOPSTACK (yylen);
1814 yylen = 0;
1815 YY_STACK_PRINT (yyss, yyssp);
1816 yystate = *yyssp;
1817 goto yyerrlab1;
1818
1819
1820 /*-------------------------------------------------------------.
1821 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1822 `-------------------------------------------------------------*/
1823 yyerrlab1:
1824 yyerrstatus = 3; /* Each real token shifted decrements this. */
1825
1826 for (;;)
1827 {
1828 yyn = yypact[yystate];
1829 if (yyn != YYPACT_NINF)
1830 {
1831 yyn += YYTERROR;
1832 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1833 {
1834 yyn = yytable[yyn];
1835 if (0 < yyn)
1836 break;
1837 }
1838 }
1839
1840 /* Pop the current state because it cannot handle the error token. */
1841 if (yyssp == yyss)
1842 YYABORT;
1843
1844
1845 yydestruct ("Error: popping",
1846 yystos[yystate], yyvsp);
1847 YYPOPSTACK (1);
1848 yystate = *yyssp;
1849 YY_STACK_PRINT (yyss, yyssp);
1850 }
1851
1852 *++yyvsp = yylval;
1853
1854
1855 /* Shift the error token. */
1856 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1857
1858 yystate = yyn;
1859 goto yynewstate;
1860
1861
1862 /*-------------------------------------.
1863 | yyacceptlab -- YYACCEPT comes here. |
1864 `-------------------------------------*/
1865 yyacceptlab:
1866 yyresult = 0;
1867 goto yyreturn;
1868
1869 /*-----------------------------------.
1870 | yyabortlab -- YYABORT comes here. |
1871 `-----------------------------------*/
1872 yyabortlab:
1873 yyresult = 1;
1874 goto yyreturn;
1875
1876 #if !defined(yyoverflow) || YYERROR_VERBOSE
1877 /*-------------------------------------------------.
1878 | yyexhaustedlab -- memory exhaustion comes here. |
1879 `-------------------------------------------------*/
1880 yyexhaustedlab:
1881 yyerror (YY_("memory exhausted"));
1882 yyresult = 2;
1883 /* Fall through. */
1884 #endif
1885
1886 yyreturn:
1887 if (yychar != YYEMPTY)
1888 yydestruct ("Cleanup: discarding lookahead",
1889 yytoken, &yylval);
1890 /* Do not reclaim the symbols of the rule which action triggered
1891 this YYABORT or YYACCEPT. */
1892 YYPOPSTACK (yylen);
1893 YY_STACK_PRINT (yyss, yyssp);
1894 while (yyssp != yyss)
1895 {
1896 yydestruct ("Cleanup: popping",
1897 yystos[*yyssp], yyvsp);
1898 YYPOPSTACK (1);
1899 }
1900 #ifndef yyoverflow
1901 if (yyss != yyssa)
1902 YYSTACK_FREE (yyss);
1903 #endif
1904 #if YYERROR_VERBOSE
1905 if (yymsg != yymsgbuf)
1906 YYSTACK_FREE (yymsg);
1907 #endif
1908 /* Make sure YYID is used. */
1909 return YYID (yyresult);
1910 }
1911
1912
1913
1914 /* Line 1684 of yacc.c */
1915 #line 324 "expr_parse.y"
1916
1917
1918 /***************************************************************
1919 *
1920 * �����������R�[�h(0�`63)�������B
1921 *
1922 * �X�L���i�������������������A
1923 * �G���[���������������\�������c�n�Y�B
1924 *
1925 */
1926
1927 static
1928 unsigned
1929 cv64(int c)
1930 {
1931 if ('.' <= c && c <= '/')
1932 return c - '.';
1933 else if ('0' <= c && c <= '9')
1934 return c - '0' + 2;
1935 else if ('A' <= c && c <= 'Z')
1936 return c - 'A' + 2 + 10;
1937 else if ('a' <= c && c <= 'z')
1938 return c - 'a' + 2 + 10 + 26;
1939
1940 expr_error("<%02X>�������o�O�����B", c & 0xFF);
1941 assert(!"char range is impossible");
1942 return -1;
1943 }
1944
1945 /***************************************************************
1946 *
1947 * [a-z] �����������r�b�g�}�b�v������
1948 *
1949 */
1950
1951 static
1952 uint64_t
1953 mkrng(unsigned a, unsigned z)
1954 {
1955 assert(a < 64);
1956 if (z >= 64)
1957 return mkrng(a, a);
1958 if (a > z)
1959 return mkrng(z, a);
1960 /* �V�t�g�J�E���g�� +1 �������A
1961 1 << 64 �� 1 << 0 ���v�Z�����������P�[�X����������
1962 �O�������r�V�t�g���������g */
1963 return (2 * ((uint64_t)1 << (z - a)) - 1) << a;
1964 }
1965
1966 /***************************************************************
1967 *
1968 * �X�L���i
1969 *
1970 */
1971
1972 #include "expr_scan.c"
1973
1974 int yywrap(void)
1975 {
1976 return (yyin == NULL
1977 || feof(yyin));
1978 }
1979
1980 static
1981 void yyerror(char const *msg)
1982 {
1983 expr_error("�����G���[<%s>�������������B", msg);
1984 }
1985
1986 /***************************************************************
1987 *
1988 * �G���[����������������
1989 *
1990 */
1991
1992 static
1993 void
1994 expr_error(char const *fmt, ...)
1995 {
1996 va_list ap;
1997 fprintf(stderr, "%s:%d:", g_filename, g_lineno);
1998 va_start(ap, fmt);
1999 vfprintf(stderr, fmt, ap);
2000 va_end(ap);
2001 fputc('\n', stderr);
2002 }
2003
2004 /***************************************************************
2005 *
2006 * DICT_CHAR ������(yytext, yyleng, yylval)
2007 *
2008 */
2009
2010 static
2011 int
2012 mkdict(unsigned attr, unsigned e)
2013 {
2014 int i;
2015 yylval.dict.xp = 0;
2016 yylval.dict.len = yyleng;
2017 yylval.dict.e = e;
2018 yylval.dict.attr = attr;
2019 yylval.dict.bmp = 0;
2020 for (i = yyleng - 1; i >= 0; i--)
2021 yylval.dict.bmp = (yylval.dict.bmp << 6) | cv64(yytext[i]);
2022 return DICT;
2023 }
2024
2025 static
2026 int
2027 mkchx(int c, unsigned e)
2028 {
2029 yylval.dict.len = 1;
2030 yylval.dict.e = e;
2031 yylval.dict.attr = CA_C;
2032 if (c == '.' || c == '/')
2033 yylval.dict.bmp = 000; /* dot �����\ */
2034 else
2035 yylval.dict.bmp = cv64(c & ~0x20);
2036 yylval.dict.xp = 0x01U;
2037 return DICT;
2038 }
2039
2040 /***************************************************************
2041 *
2042 * �t�@�C���������W�J����
2043 *
2044 */
2045
2046 struct ITREE *
2047 expr_parse(char const *filename)
2048 {
2049 int r;
2050
2051 #if defined(YYDEBUG) && DEBUG>=2
2052 yydebug = 1;
2053 #endif
2054
2055 #if DEBUG>=1
2056 fprintf(stderr, "target:<%s>\n", filename);
2057 #endif
2058
2059 yyin = fopen(filename, "rt");
2060 if (!yyin)
2061 {
2062 perror(filename);
2063 return NULL;
2064 }
2065 if (g_filename)
2066 free(g_filename);
2067 g_filename = strdup(filename);
2068 g_lineno = 1;
2069
2070 fprintf(stderr, "�t�@�C��<%s>�������������c\n", filename);
2071
2072 YY_NEW_FILE;
2073 g_node = synth_make_or();
2074 g_node->ref++;
2075 r = yyparse();
2076 assert(r == 0);
2077
2078 if (g_node->n_ops == 0)
2079 {
2080 synth_unlink(g_node);
2081 g_node = NULL;
2082 }
2083
2084 fclose(yyin);
2085 yyin = NULL;
2086
2087 return g_node;
2088 }
2089
2090 /*
2091 * Local Variables:
2092 * tab-width: 4
2093 * End:
2094 *
2095 * EOF */
2096

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26