xref: /openbsd-src/gnu/usr.bin/binutils/gas/itbl-parse.c (revision cf2f2c5620d6d9a4fd01930983c4b9a1f76d7aa3)
1f7cc78ecSespie /* A Bison parser, made from itbl-parse.y
2d2201f2fSdrahn    by GNU bison 1.35.  */
3fddef416Sniklas 
4fddef416Sniklas #define YYBISON 1  /* Identify Bison output.  */
5fddef416Sniklas 
6f7cc78ecSespie # define	DREG	257
7f7cc78ecSespie # define	CREG	258
8f7cc78ecSespie # define	GREG	259
9f7cc78ecSespie # define	IMMED	260
10f7cc78ecSespie # define	ADDR	261
11f7cc78ecSespie # define	INSN	262
12f7cc78ecSespie # define	NUM	263
13f7cc78ecSespie # define	ID	264
14f7cc78ecSespie # define	NL	265
15f7cc78ecSespie # define	PNUM	266
16fddef416Sniklas 
17f7cc78ecSespie #line 21 "itbl-parse.y"
18fddef416Sniklas 
19fddef416Sniklas 
20fddef416Sniklas /*
21fddef416Sniklas 
22fddef416Sniklas Yacc grammar for instruction table entries.
23fddef416Sniklas 
24fddef416Sniklas =======================================================================
25fddef416Sniklas Original Instruction table specification document:
26fddef416Sniklas 
27fddef416Sniklas 	    MIPS Coprocessor Table Specification
28fddef416Sniklas 	    ====================================
29fddef416Sniklas 
30fddef416Sniklas This document describes the format of the MIPS coprocessor table.  The
31fddef416Sniklas table specifies a list of valid functions, data registers and control
32fddef416Sniklas registers that can be used in coprocessor instructions.  This list,
33fddef416Sniklas together with the coprocessor instruction classes listed below,
34fddef416Sniklas specifies the complete list of coprocessor instructions that will
35fddef416Sniklas be recognized and assembled by the GNU assembler.  In effect,
36fddef416Sniklas this makes the GNU assembler table-driven, where the table is
37fddef416Sniklas specified by the programmer.
38fddef416Sniklas 
39fddef416Sniklas The table is an ordinary text file that the GNU assembler reads when
40fddef416Sniklas it starts.  Using the information in the table, the assembler
41fddef416Sniklas generates an internal list of valid coprocessor registers and
42fddef416Sniklas functions.  The assembler uses this internal list in addition to the
43fddef416Sniklas standard MIPS registers and instructions which are built-in to the
44fddef416Sniklas assembler during code generation.
45fddef416Sniklas 
46fddef416Sniklas To specify the coprocessor table when invoking the GNU assembler, use
47fddef416Sniklas the command line option "--itbl file", where file is the
48fddef416Sniklas complete name of the table, including path and extension.
49fddef416Sniklas 
50fddef416Sniklas Examples:
51fddef416Sniklas 
52fddef416Sniklas 	    gas -t cop.tbl test.s -o test.o
53fddef416Sniklas 	    gas -t /usr/local/lib/cop.tbl test.s -o test.o
54fddef416Sniklas 	    gas --itbl d:\gnu\data\cop.tbl test.s -o test.o
55fddef416Sniklas 
56fddef416Sniklas Only one table may be supplied during a single invocation of
57fddef416Sniklas the assembler.
58fddef416Sniklas 
59fddef416Sniklas 
60fddef416Sniklas Instruction classes
61fddef416Sniklas ===================
62fddef416Sniklas 
63fddef416Sniklas Below is a list of the valid coprocessor instruction classes for
64fddef416Sniklas any given coprocessor "z".  These instructions are already recognized
65fddef416Sniklas by the assembler, and are listed here only for reference.
66fddef416Sniklas 
67fddef416Sniklas Class   format	    	    	      instructions
68fddef416Sniklas -------------------------------------------------
69fddef416Sniklas Class1:
70fddef416Sniklas 	op base rt offset
71fddef416Sniklas 	    	    	    	    	    	    	    LWCz rt,offset (base)
72fddef416Sniklas 	    	    	    	    	    	    	    SWCz rt,offset (base)
73fddef416Sniklas Class2:
74fddef416Sniklas 	COPz sub rt rd 0
75fddef416Sniklas 	    	    	    	    	    	    	    MTCz rt,rd
76fddef416Sniklas 	    	    	    	    	    	    	    MFCz rt,rd
77fddef416Sniklas 	    	    	    	    	    	    	    CTCz rt,rd
78fddef416Sniklas 	    	    	    	    	    	    	    CFCz rt,rd
79fddef416Sniklas Class3:
80fddef416Sniklas 	COPz CO cofun
81fddef416Sniklas 	    	    	    	    	    	    	    COPz cofun
82fddef416Sniklas Class4:
83fddef416Sniklas 	COPz BC br offset
84fddef416Sniklas 	    	    	    	    	    	    	    BCzT offset
85fddef416Sniklas 	    	    	    	    	    	    	    BCzF offset
86fddef416Sniklas Class5:
87fddef416Sniklas 	COPz sub rt rd 0
88fddef416Sniklas 	    	    	    	    	    	    	    DMFCz rt,rd
89fddef416Sniklas 	    	    	    	    	    	    	    DMTCz rt,rd
90fddef416Sniklas Class6:
91fddef416Sniklas 	op base rt offset
92fddef416Sniklas 	    	    	    	    	    	    	    LDCz rt,offset (base)
93fddef416Sniklas 	    	    	    	    	    	    	    SDCz rt,offset (base)
94fddef416Sniklas Class7:
95fddef416Sniklas 	COPz BC br offset
96fddef416Sniklas 	    	    	    	    	    	    	    BCzTL offset
97fddef416Sniklas 	    	    	    	    	    	    	    BCzFL offset
98fddef416Sniklas 
99fddef416Sniklas The coprocessor table defines coprocessor-specific registers that can
100fddef416Sniklas be used with all of the above classes of instructions, where
101fddef416Sniklas appropriate.  It also defines additional coprocessor-specific
102fddef416Sniklas functions for Class3 (COPz cofun) instructions, Thus, the table allows
103fddef416Sniklas the programmer to use convenient mnemonics and operands for these
104fddef416Sniklas functions, instead of the COPz mmenmonic and cofun operand.
105fddef416Sniklas 
106fddef416Sniklas The names of the MIPS general registers and their aliases are defined
107fddef416Sniklas by the assembler and will be recognized as valid register names by the
108fddef416Sniklas assembler when used (where allowed) in coprocessor instructions.
109fddef416Sniklas However, the names and values of all coprocessor data and control
110fddef416Sniklas register mnemonics must be specified in the coprocessor table.
111fddef416Sniklas 
112fddef416Sniklas 
113fddef416Sniklas Table Grammar
114fddef416Sniklas =============
115fddef416Sniklas 
116fddef416Sniklas Here is the grammar for the coprocessor table:
117fddef416Sniklas 
118fddef416Sniklas 	    table -> entry*
119fddef416Sniklas 
120fddef416Sniklas 	    entry -> [z entrydef] [comment] '\n'
121fddef416Sniklas 
122fddef416Sniklas 	    entrydef -> type name val
123fddef416Sniklas 	    entrydef -> 'insn' name val funcdef ; type of entry (instruction)
124fddef416Sniklas 
125fddef416Sniklas 	    z -> 'p'['0'..'3']	    	     ; processor number
126fddef416Sniklas 	    type -> ['dreg' | 'creg' | 'greg' ]	     ; type of entry (register)
127fddef416Sniklas 	; 'dreg', 'creg' or 'greg' specifies a data, control, or general
128fddef416Sniklas 	;	    register mnemonic, respectively
129fddef416Sniklas 	    name -> [ltr|dec]*	    	     ; mnemonic of register/function
130fddef416Sniklas 	    val -> [dec|hex]	    	     ; register/function number (integer constant)
131fddef416Sniklas 
132fddef416Sniklas 	    funcdef -> frange flags fields
133fddef416Sniklas 	    	    	    	; bitfield range for opcode
134fddef416Sniklas 	    	    	    	; list of fields' formats
135fddef416Sniklas 	    fields -> field*
136fddef416Sniklas 	    field -> [','] ftype frange flags
137fddef416Sniklas 	    flags -> ['*' flagexpr]
138fddef416Sniklas 	    flagexpr -> '[' flagexpr ']'
139fddef416Sniklas 	    flagexpr -> val '|' flagexpr
140fddef416Sniklas 	    ftype -> [ type | 'immed' | 'addr' ]
141fddef416Sniklas 	; 'immed' specifies an immediate value; see grammar for "val" above
142fddef416Sniklas 	    	; 'addr' specifies a C identifier; name of symbol to be resolved at
143fddef416Sniklas 	;	    link time
144fddef416Sniklas 	    frange -> ':' val '-' val	; starting to ending bit positions, where
145fddef416Sniklas 	    	    	    	; where 0 is least significant bit
146fddef416Sniklas 	    frange -> (null)	    	; default range of 31-0 will be assumed
147fddef416Sniklas 
148fddef416Sniklas 	    comment -> [';'|'#'] [char]*
149fddef416Sniklas 	    char -> any printable character
150fddef416Sniklas 	    ltr -> ['a'..'z'|'A'..'Z']
151fddef416Sniklas 	    dec -> ['0'..'9']*	    	    	    	    	     ; value in decimal
152*cf2f2c56Smiod 	    hex -> '0x'['0'..'9' | 'a'..'f' | 'A'..'F']*	; value in hexadecimal
153fddef416Sniklas 
154fddef416Sniklas 
155fddef416Sniklas Examples
156fddef416Sniklas ========
157fddef416Sniklas 
158fddef416Sniklas Example 1:
159fddef416Sniklas 
160fddef416Sniklas The table:
161fddef416Sniklas 
162fddef416Sniklas 	    p1 dreg d1 1	     ; data register "d1" for COP1 has value 1
163fddef416Sniklas 	    p1 creg c3 3	     ; ctrl register "c3" for COP1 has value 3
164fddef416Sniklas 	    p3 func fill 0x1f:24-20	      ; function "fill" for COP3 has value 31 and
165fddef416Sniklas 	    	    	; no fields
166fddef416Sniklas 
167fddef416Sniklas will allow the assembler to accept the following coprocessor instructions:
168fddef416Sniklas 
169fddef416Sniklas 	    LWC1 d1,0x100 ($2)
170fddef416Sniklas 	    fill
171fddef416Sniklas 
172fddef416Sniklas Here, the general purpose register "$2", and instruction "LWC1", are standard
173fddef416Sniklas mnemonics built-in to the MIPS assembler.
174fddef416Sniklas 
175fddef416Sniklas 
176fddef416Sniklas Example 2:
177fddef416Sniklas 
178fddef416Sniklas The table:
179fddef416Sniklas 
180fddef416Sniklas 	    p3 dreg d3 3	     ; data register "d3" for COP3 has value 3
181fddef416Sniklas 	    p3 creg c2 22	     ; control register "c2" for COP3 has value 22
182fddef416Sniklas 	    p3 func fee 0x1f:24-20 dreg:17-13 creg:12-8 immed:7-0
183fddef416Sniklas 	    	; function "fee" for COP3 has value 31, and 3 fields
184fddef416Sniklas 	    	; consisting of a data register, a control register,
185fddef416Sniklas 	    	; and an immediate value.
186fddef416Sniklas 
187fddef416Sniklas will allow the assembler to accept the following coprocessor instruction:
188fddef416Sniklas 
189fddef416Sniklas 	    fee d3,c2,0x1
190fddef416Sniklas 
191fddef416Sniklas and will emit the object code:
192fddef416Sniklas 
193fddef416Sniklas 	    31-26  25 24-20 19-18  17-13 12-8  7-0
194fddef416Sniklas 	    COPz   CO fun	    	      dreg  creg  immed
195fddef416Sniklas 	    010011 1  11111 00	     00011 10110 00000001
196fddef416Sniklas 
197fddef416Sniklas 	    0x4ff07601
198fddef416Sniklas 
199fddef416Sniklas 
200fddef416Sniklas Example 3:
201fddef416Sniklas 
202fddef416Sniklas The table:
203fddef416Sniklas 
204fddef416Sniklas 	    p3 dreg d3 3	     ; data register "d3" for COP3 has value 3
205fddef416Sniklas 	    p3 creg c2 22	     ; control register "c2" for COP3 has value 22
206fddef416Sniklas 	    p3 func fuu 0x01f00001 dreg:17-13 creg:12-8
207fddef416Sniklas 
208fddef416Sniklas will allow the assembler to accept the following coprocessor
209fddef416Sniklas instruction:
210fddef416Sniklas 
211fddef416Sniklas 	    fuu d3,c2
212fddef416Sniklas 
213fddef416Sniklas and will emit the object code:
214fddef416Sniklas 
215fddef416Sniklas 	    31-26  25 24-20 19-18  17-13 12-8  7-0
216fddef416Sniklas 	    COPz   CO fun	    	      dreg  creg
217fddef416Sniklas 	    010011 1  11111 00	     00011 10110 00000001
218fddef416Sniklas 
219fddef416Sniklas 	    0x4ff07601
220fddef416Sniklas 
221fddef416Sniklas In this way, the programmer can force arbitrary bits of an instruction
222fddef416Sniklas to have predefined values.
223fddef416Sniklas 
224fddef416Sniklas =======================================================================
225fddef416Sniklas Additional notes:
226fddef416Sniklas 
227fddef416Sniklas Encoding of ranges:
228fddef416Sniklas To handle more than one bit position range within an instruction,
229fddef416Sniklas use 0s to mask out the ranges which don't apply.
230fddef416Sniklas May decide to modify the syntax to allow commas separate multiple
231fddef416Sniklas ranges within an instruction (range','range).
232fddef416Sniklas 
233fddef416Sniklas Changes in grammar:
234fddef416Sniklas 	The number of parms argument to the function entry
235fddef416Sniklas was deleted from the original format such that we now count the fields.
236fddef416Sniklas 
237fddef416Sniklas ----
238fddef416Sniklas FIXME! should really change lexical analyzer
239*cf2f2c56Smiod to recognize 'dreg' etc. in context sensitive way.
240fddef416Sniklas Currently function names or mnemonics may be incorrectly parsed as keywords
241fddef416Sniklas 
242fddef416Sniklas FIXME! hex is ambiguous with any digit
243fddef416Sniklas 
244fddef416Sniklas */
245fddef416Sniklas 
246fddef416Sniklas #include <stdio.h>
247fddef416Sniklas #include "itbl-ops.h"
248fddef416Sniklas 
249fddef416Sniklas /* #define DEBUG */
250fddef416Sniklas 
251fddef416Sniklas #ifdef DEBUG
252fddef416Sniklas #ifndef DBG_LVL
253fddef416Sniklas #define DBG_LVL 1
254fddef416Sniklas #endif
255fddef416Sniklas #else
256fddef416Sniklas #define DBG_LVL 0
257fddef416Sniklas #endif
258fddef416Sniklas 
259fddef416Sniklas #if DBG_LVL >= 1
260fddef416Sniklas #define DBG(x) printf x
261fddef416Sniklas #else
262fddef416Sniklas #define DBG(x)
263fddef416Sniklas #endif
264fddef416Sniklas 
265fddef416Sniklas #if DBG_LVL >= 2
266fddef416Sniklas #define DBGL2(x) printf x
267fddef416Sniklas #else
268fddef416Sniklas #define DBGL2(x)
269fddef416Sniklas #endif
270fddef416Sniklas 
271fddef416Sniklas static int sbit, ebit;
272fddef416Sniklas static struct itbl_entry *insn=0;
273fddef416Sniklas extern int insntbl_line;
274fddef416Sniklas int yyparse PARAMS ((void));
275fddef416Sniklas int yylex PARAMS ((void));
276fddef416Sniklas static int yyerror PARAMS ((const char *));
277fddef416Sniklas 
278fddef416Sniklas 
279f7cc78ecSespie #line 283 "itbl-parse.y"
280d2201f2fSdrahn #ifndef YYSTYPE
281fddef416Sniklas typedef union
282fddef416Sniklas   {
283fddef416Sniklas     char *str;
284fddef416Sniklas     int num;
285fddef416Sniklas     int processor;
286fddef416Sniklas     unsigned long val;
287d2201f2fSdrahn   } yystype;
288d2201f2fSdrahn # define YYSTYPE yystype
289d2201f2fSdrahn # define YYSTYPE_IS_TRIVIAL 1
290fddef416Sniklas #endif
291d2201f2fSdrahn #ifndef YYDEBUG
292d2201f2fSdrahn # define YYDEBUG 0
293fddef416Sniklas #endif
294fddef416Sniklas 
295fddef416Sniklas 
296fddef416Sniklas 
297fddef416Sniklas #define	YYFINAL		51
298fddef416Sniklas #define	YYFLAG		-32768
299fddef416Sniklas #define	YYNTBASE	20
300fddef416Sniklas 
301d2201f2fSdrahn /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
302f7cc78ecSespie #define YYTRANSLATE(x) ((unsigned)(x) <= 266 ? yytranslate[x] : 34)
303fddef416Sniklas 
304d2201f2fSdrahn /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
305d2201f2fSdrahn static const char yytranslate[] =
306d2201f2fSdrahn {
307d2201f2fSdrahn        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
308fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
309fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
310fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
311d2201f2fSdrahn        2,     2,    17,     2,    13,    19,     2,     2,     2,     2,
312d2201f2fSdrahn        2,     2,     2,     2,     2,     2,     2,     2,    18,     2,
313fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
314fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
315fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
316d2201f2fSdrahn        2,    15,     2,    16,     2,     2,     2,     2,     2,     2,
317fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
318fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
319d2201f2fSdrahn        2,     2,     2,     2,    14,     2,     2,     2,     2,     2,
320fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
321fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
322fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
323fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
324fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
325fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
326fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
327fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
328fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
329fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
330fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
331fddef416Sniklas        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
332d2201f2fSdrahn        2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
333d2201f2fSdrahn        6,     7,     8,     9,    10,    11,    12
334fddef416Sniklas };
335fddef416Sniklas 
336d2201f2fSdrahn #if YYDEBUG
337d2201f2fSdrahn static const short yyprhs[] =
338d2201f2fSdrahn {
339d2201f2fSdrahn        0,     0,     2,     5,     6,    12,    13,    23,    25,    28,
340d2201f2fSdrahn       32,    35,    36,    38,    40,    42,    46,    50,    54,    56,
341d2201f2fSdrahn       59,    60,    65,    66,    68,    70,    72,    74,    76,    78
342fddef416Sniklas };
343d2201f2fSdrahn static const short yyrhs[] =
344d2201f2fSdrahn {
345d2201f2fSdrahn       21,     0,    22,    21,     0,     0,    30,    31,    32,    33,
346d2201f2fSdrahn       11,     0,     0,    30,     8,    32,    33,    29,    28,    23,
347d2201f2fSdrahn       24,    11,     0,    11,     0,     1,    11,     0,    13,    26,
348d2201f2fSdrahn       24,     0,    26,    24,     0,     0,    31,     0,     7,     0,
349d2201f2fSdrahn        6,     0,    25,    29,    28,     0,     9,    14,    27,     0,
350d2201f2fSdrahn       15,    27,    16,     0,     9,     0,    17,    27,     0,     0,
351d2201f2fSdrahn       18,     9,    19,     9,     0,     0,    12,     0,     3,     0,
352d2201f2fSdrahn        4,     0,     5,     0,    10,     0,     9,     0,     9,     0
353fddef416Sniklas };
354fddef416Sniklas 
355fddef416Sniklas #endif
356fddef416Sniklas 
357d2201f2fSdrahn #if YYDEBUG
358d2201f2fSdrahn /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
359d2201f2fSdrahn static const short yyrline[] =
360d2201f2fSdrahn {
361d2201f2fSdrahn        0,   300,   304,   306,   309,   316,   316,   325,   326,   329,
362d2201f2fSdrahn      331,   332,   335,   341,   346,   353,   362,   367,   371,   377,
363d2201f2fSdrahn      383,   389,   396,   403,   411,   417,   422,   429,   437,   445
364fddef416Sniklas };
365f7cc78ecSespie #endif
366f7cc78ecSespie 
367f7cc78ecSespie 
368d2201f2fSdrahn #if (YYDEBUG) || defined YYERROR_VERBOSE
369fddef416Sniklas 
370d2201f2fSdrahn /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
371d2201f2fSdrahn static const char *const yytname[] =
372d2201f2fSdrahn {
373d2201f2fSdrahn   "$", "error", "$undefined.", "DREG", "CREG", "GREG", "IMMED", "ADDR",
374d2201f2fSdrahn   "INSN", "NUM", "ID", "NL", "PNUM", "','", "'|'", "'['", "']'", "'*'",
375d2201f2fSdrahn   "':'", "'-'", "insntbl", "entrys", "entry", "@1", "fieldspecs", "ftype",
376d2201f2fSdrahn   "fieldspec", "flagexpr", "flags", "range", "pnum", "regtype", "name",
377d2201f2fSdrahn   "value", 0
378fddef416Sniklas };
379fddef416Sniklas #endif
380fddef416Sniklas 
381d2201f2fSdrahn /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
382d2201f2fSdrahn static const short yyr1[] =
383d2201f2fSdrahn {
384d2201f2fSdrahn        0,    20,    21,    21,    22,    23,    22,    22,    22,    24,
385d2201f2fSdrahn       24,    24,    25,    25,    25,    26,    27,    27,    27,    28,
386d2201f2fSdrahn       28,    29,    29,    30,    31,    31,    31,    32,    34,    33
387fddef416Sniklas };
388fddef416Sniklas 
389d2201f2fSdrahn /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
390d2201f2fSdrahn static const short yyr2[] =
391d2201f2fSdrahn {
392d2201f2fSdrahn        0,     1,     2,     0,     5,     0,     9,     1,     2,     3,
393d2201f2fSdrahn        2,     0,     1,     1,     1,     3,     3,     3,     1,     2,
394d2201f2fSdrahn        0,     4,     0,     1,     1,     1,     1,     1,     1,     1
395fddef416Sniklas };
396fddef416Sniklas 
397d2201f2fSdrahn /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
398d2201f2fSdrahn    doesn't specify something else to do.  Zero means the default is an
399d2201f2fSdrahn    error. */
400d2201f2fSdrahn static const short yydefact[] =
401d2201f2fSdrahn {
402d2201f2fSdrahn        0,     0,     7,    23,     1,     0,     0,     8,     2,    24,
403d2201f2fSdrahn       25,    26,     0,     0,    27,     0,     0,    29,    22,     0,
404d2201f2fSdrahn        0,    20,     4,     0,     0,     5,     0,    18,     0,    19,
405d2201f2fSdrahn       11,    21,     0,     0,    14,    13,     0,     0,    22,    11,
406d2201f2fSdrahn       12,    16,    17,    11,     6,    20,    10,     9,    15,     0,
407d2201f2fSdrahn        0,     0
408fddef416Sniklas };
409fddef416Sniklas 
410d2201f2fSdrahn static const short yydefgoto[] =
411d2201f2fSdrahn {
412d2201f2fSdrahn       49,     4,     5,    30,    37,    38,    39,    29,    25,    21,
413d2201f2fSdrahn        6,    40,    15,    18
414fddef416Sniklas };
415fddef416Sniklas 
416d2201f2fSdrahn static const short yypact[] =
417d2201f2fSdrahn {
418d2201f2fSdrahn        0,    -9,-32768,-32768,-32768,     0,    12,-32768,-32768,-32768,
419d2201f2fSdrahn   -32768,-32768,     3,     3,-32768,     9,     9,-32768,    -8,     8,
420d2201f2fSdrahn       19,    15,-32768,    10,    -6,-32768,    24,    20,    -6,-32768,
421d2201f2fSdrahn        1,-32768,    -6,    21,-32768,-32768,    18,    25,    -8,     1,
422d2201f2fSdrahn   -32768,-32768,-32768,     1,-32768,    15,-32768,-32768,-32768,    35,
423d2201f2fSdrahn       38,-32768
424fddef416Sniklas };
425fddef416Sniklas 
426d2201f2fSdrahn static const short yypgoto[] =
427d2201f2fSdrahn {
428d2201f2fSdrahn   -32768,    34,-32768,-32768,   -13,-32768,     4,    -1,    -4,     5,
429d2201f2fSdrahn   -32768,    36,    31,    29
430fddef416Sniklas };
431fddef416Sniklas 
432fddef416Sniklas 
433fddef416Sniklas #define	YYLAST		45
434fddef416Sniklas 
435fddef416Sniklas 
436d2201f2fSdrahn static const short yytable[] =
437d2201f2fSdrahn {
438d2201f2fSdrahn       -3,     1,     7,    27,     9,    10,    11,    34,    35,    28,
439d2201f2fSdrahn       20,     2,     3,    14,    36,     9,    10,    11,    17,    22,
440d2201f2fSdrahn       12,     9,    10,    11,    34,    35,    46,    33,    23,    26,
441d2201f2fSdrahn       47,    41,    24,    31,    32,    50,    44,    42,    51,     8,
442d2201f2fSdrahn       43,    48,    13,    45,    16,    19
443fddef416Sniklas };
444fddef416Sniklas 
445d2201f2fSdrahn static const short yycheck[] =
446d2201f2fSdrahn {
447d2201f2fSdrahn        0,     1,    11,     9,     3,     4,     5,     6,     7,    15,
448d2201f2fSdrahn       18,    11,    12,    10,    13,     3,     4,     5,     9,    11,
449d2201f2fSdrahn        8,     3,     4,     5,     6,     7,    39,    28,     9,    19,
450d2201f2fSdrahn       43,    32,    17,     9,    14,     0,    11,    16,     0,     5,
451d2201f2fSdrahn       36,    45,     6,    38,    13,    16
452fddef416Sniklas };
453fddef416Sniklas /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
454d2201f2fSdrahn #line 3 "/usr/share/bison-1.35/bison.simple"
455fddef416Sniklas 
456fddef416Sniklas /* Skeleton output parser for bison,
457d2201f2fSdrahn 
458d2201f2fSdrahn    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
459d2201f2fSdrahn    Foundation, Inc.
460fddef416Sniklas 
461fddef416Sniklas    This program is free software; you can redistribute it and/or modify
462fddef416Sniklas    it under the terms of the GNU General Public License as published by
463fddef416Sniklas    the Free Software Foundation; either version 2, or (at your option)
464fddef416Sniklas    any later version.
465fddef416Sniklas 
466fddef416Sniklas    This program is distributed in the hope that it will be useful,
467fddef416Sniklas    but WITHOUT ANY WARRANTY; without even the implied warranty of
468fddef416Sniklas    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
469fddef416Sniklas    GNU General Public License for more details.
470fddef416Sniklas 
471fddef416Sniklas    You should have received a copy of the GNU General Public License
472fddef416Sniklas    along with this program; if not, write to the Free Software
473f7cc78ecSespie    Foundation, Inc., 59 Temple Place - Suite 330,
474f7cc78ecSespie    Boston, MA 02111-1307, USA.  */
475fddef416Sniklas 
476fddef416Sniklas /* As a special exception, when this file is copied by Bison into a
477fddef416Sniklas    Bison output file, you may use that output file without restriction.
478fddef416Sniklas    This special exception was added by the Free Software Foundation
479fddef416Sniklas    in version 1.24 of Bison.  */
480fddef416Sniklas 
481d2201f2fSdrahn /* This is the parser code that is written into each bison parser when
482d2201f2fSdrahn    the %semantic_parser declaration is not specified in the grammar.
483fddef416Sniklas    It was written by Richard Stallman by simplifying the hairy parser
484fddef416Sniklas    used when %semantic_parser is specified.  */
485fddef416Sniklas 
486d2201f2fSdrahn /* All symbols defined below should begin with yy or YY, to avoid
487d2201f2fSdrahn    infringing on user name space.  This should be done even for local
488d2201f2fSdrahn    variables, as they might otherwise be expanded by user macros.
489d2201f2fSdrahn    There are some unavoidable exceptions within include files to
490d2201f2fSdrahn    define necessary library symbols; they are noted "INFRINGES ON
491d2201f2fSdrahn    USER NAME SPACE" below.  */
492f7cc78ecSespie 
493d2201f2fSdrahn #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
494d2201f2fSdrahn 
495d2201f2fSdrahn /* The parser invokes alloca or malloc; define the necessary symbols.  */
496d2201f2fSdrahn 
497d2201f2fSdrahn # if YYSTACK_USE_ALLOCA
498f7cc78ecSespie #  define YYSTACK_ALLOC alloca
499f7cc78ecSespie # else
500d2201f2fSdrahn #  ifndef YYSTACK_USE_ALLOCA
501d2201f2fSdrahn #   if defined (alloca) || defined (_ALLOCA_H)
502d2201f2fSdrahn #    define YYSTACK_ALLOC alloca
503d2201f2fSdrahn #   else
504d2201f2fSdrahn #    ifdef __GNUC__
505d2201f2fSdrahn #     define YYSTACK_ALLOC __builtin_alloca
506d2201f2fSdrahn #    endif
507d2201f2fSdrahn #   endif
508d2201f2fSdrahn #  endif
509f7cc78ecSespie # endif
510f7cc78ecSespie 
511d2201f2fSdrahn # ifdef YYSTACK_ALLOC
512d2201f2fSdrahn    /* Pacify GCC's `empty if-body' warning. */
513d2201f2fSdrahn #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
514d2201f2fSdrahn # else
515d2201f2fSdrahn #  if defined (__STDC__) || defined (__cplusplus)
516d2201f2fSdrahn #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
517d2201f2fSdrahn #   define YYSIZE_T size_t
518d2201f2fSdrahn #  endif
519d2201f2fSdrahn #  define YYSTACK_ALLOC malloc
520d2201f2fSdrahn #  define YYSTACK_FREE free
521d2201f2fSdrahn # endif
522d2201f2fSdrahn #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
523d2201f2fSdrahn 
524d2201f2fSdrahn 
525d2201f2fSdrahn #if (! defined (yyoverflow) \
526d2201f2fSdrahn      && (! defined (__cplusplus) \
527d2201f2fSdrahn 	 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
528d2201f2fSdrahn 
529d2201f2fSdrahn /* A type that is properly aligned for any stack member.  */
530d2201f2fSdrahn union yyalloc
531d2201f2fSdrahn {
532d2201f2fSdrahn   short yyss;
533d2201f2fSdrahn   YYSTYPE yyvs;
534d2201f2fSdrahn # if YYLSP_NEEDED
535d2201f2fSdrahn   YYLTYPE yyls;
536d2201f2fSdrahn # endif
537d2201f2fSdrahn };
538d2201f2fSdrahn 
539d2201f2fSdrahn /* The size of the maximum gap between one aligned stack and the next.  */
540d2201f2fSdrahn # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
541d2201f2fSdrahn 
542d2201f2fSdrahn /* The size of an array large to enough to hold all stacks, each with
543d2201f2fSdrahn    N elements.  */
544d2201f2fSdrahn # if YYLSP_NEEDED
545d2201f2fSdrahn #  define YYSTACK_BYTES(N) \
546d2201f2fSdrahn      ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
547d2201f2fSdrahn       + 2 * YYSTACK_GAP_MAX)
548d2201f2fSdrahn # else
549d2201f2fSdrahn #  define YYSTACK_BYTES(N) \
550d2201f2fSdrahn      ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
551d2201f2fSdrahn       + YYSTACK_GAP_MAX)
552d2201f2fSdrahn # endif
553d2201f2fSdrahn 
554d2201f2fSdrahn /* Copy COUNT objects from FROM to TO.  The source and destination do
555d2201f2fSdrahn    not overlap.  */
556d2201f2fSdrahn # ifndef YYCOPY
557d2201f2fSdrahn #  if 1 < __GNUC__
558d2201f2fSdrahn #   define YYCOPY(To, From, Count) \
559d2201f2fSdrahn       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
560d2201f2fSdrahn #  else
561d2201f2fSdrahn #   define YYCOPY(To, From, Count)		\
562d2201f2fSdrahn       do					\
563d2201f2fSdrahn 	{					\
564d2201f2fSdrahn 	  register YYSIZE_T yyi;		\
565d2201f2fSdrahn 	  for (yyi = 0; yyi < (Count); yyi++)	\
566d2201f2fSdrahn 	    (To)[yyi] = (From)[yyi];		\
567d2201f2fSdrahn 	}					\
568d2201f2fSdrahn       while (0)
569d2201f2fSdrahn #  endif
570d2201f2fSdrahn # endif
571d2201f2fSdrahn 
572d2201f2fSdrahn /* Relocate STACK from its old location to the new one.  The
573d2201f2fSdrahn    local variables YYSIZE and YYSTACKSIZE give the old and new number of
574d2201f2fSdrahn    elements in the stack, and YYPTR gives the new location of the
575d2201f2fSdrahn    stack.  Advance YYPTR to a properly aligned location for the next
576d2201f2fSdrahn    stack.  */
577d2201f2fSdrahn # define YYSTACK_RELOCATE(Stack)					\
578d2201f2fSdrahn     do									\
579d2201f2fSdrahn       {									\
580d2201f2fSdrahn 	YYSIZE_T yynewbytes;						\
581d2201f2fSdrahn 	YYCOPY (&yyptr->Stack, Stack, yysize);				\
582d2201f2fSdrahn 	Stack = &yyptr->Stack;						\
583d2201f2fSdrahn 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;	\
584d2201f2fSdrahn 	yyptr += yynewbytes / sizeof (*yyptr);				\
585d2201f2fSdrahn       }									\
586d2201f2fSdrahn     while (0)
587d2201f2fSdrahn 
588d2201f2fSdrahn #endif
589d2201f2fSdrahn 
590d2201f2fSdrahn 
591d2201f2fSdrahn #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
592d2201f2fSdrahn # define YYSIZE_T __SIZE_TYPE__
593d2201f2fSdrahn #endif
594d2201f2fSdrahn #if ! defined (YYSIZE_T) && defined (size_t)
595d2201f2fSdrahn # define YYSIZE_T size_t
596d2201f2fSdrahn #endif
597d2201f2fSdrahn #if ! defined (YYSIZE_T)
598d2201f2fSdrahn # if defined (__STDC__) || defined (__cplusplus)
599d2201f2fSdrahn #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
600d2201f2fSdrahn #  define YYSIZE_T size_t
601d2201f2fSdrahn # endif
602d2201f2fSdrahn #endif
603d2201f2fSdrahn #if ! defined (YYSIZE_T)
604d2201f2fSdrahn # define YYSIZE_T unsigned int
605d2201f2fSdrahn #endif
606fddef416Sniklas 
607fddef416Sniklas #define yyerrok		(yyerrstatus = 0)
608fddef416Sniklas #define yyclearin	(yychar = YYEMPTY)
609fddef416Sniklas #define YYEMPTY		-2
610fddef416Sniklas #define YYEOF		0
611f7cc78ecSespie #define YYACCEPT	goto yyacceptlab
612f7cc78ecSespie #define YYABORT 	goto yyabortlab
613fddef416Sniklas #define YYERROR		goto yyerrlab1
614d2201f2fSdrahn /* Like YYERROR except do call yyerror.  This remains here temporarily
615d2201f2fSdrahn    to ease the transition to the new meaning of YYERROR, for GCC.
616fddef416Sniklas    Once GCC version 2 has supplanted version 1, this can go.  */
617fddef416Sniklas #define YYFAIL		goto yyerrlab
618fddef416Sniklas #define YYRECOVERING()  (!!yyerrstatus)
619d2201f2fSdrahn #define YYBACKUP(Token, Value)					\
620fddef416Sniklas do								\
621fddef416Sniklas   if (yychar == YYEMPTY && yylen == 1)				\
622d2201f2fSdrahn     {								\
623d2201f2fSdrahn       yychar = (Token);						\
624d2201f2fSdrahn       yylval = (Value);						\
625fddef416Sniklas       yychar1 = YYTRANSLATE (yychar);				\
626fddef416Sniklas       YYPOPSTACK;						\
627fddef416Sniklas       goto yybackup;						\
628fddef416Sniklas     }								\
629fddef416Sniklas   else								\
630d2201f2fSdrahn     { 								\
631d2201f2fSdrahn       yyerror ("syntax error: cannot back up");			\
632d2201f2fSdrahn       YYERROR;							\
633d2201f2fSdrahn     }								\
634fddef416Sniklas while (0)
635fddef416Sniklas 
636fddef416Sniklas #define YYTERROR	1
637fddef416Sniklas #define YYERRCODE	256
638fddef416Sniklas 
639d2201f2fSdrahn 
640d2201f2fSdrahn /* YYLLOC_DEFAULT -- Compute the default location (before the actions
641d2201f2fSdrahn    are run).
642d2201f2fSdrahn 
643d2201f2fSdrahn    When YYLLOC_DEFAULT is run, CURRENT is set the location of the
644d2201f2fSdrahn    first token.  By default, to implement support for ranges, extend
645d2201f2fSdrahn    its range to the last symbol.  */
646d2201f2fSdrahn 
647d2201f2fSdrahn #ifndef YYLLOC_DEFAULT
648d2201f2fSdrahn # define YYLLOC_DEFAULT(Current, Rhs, N)       	\
649d2201f2fSdrahn    Current.last_line   = Rhs[N].last_line;	\
650d2201f2fSdrahn    Current.last_column = Rhs[N].last_column;
651fddef416Sniklas #endif
652fddef416Sniklas 
653d2201f2fSdrahn 
654d2201f2fSdrahn /* YYLEX -- calling `yylex' with the right arguments.  */
655d2201f2fSdrahn 
656d2201f2fSdrahn #if YYPURE
657d2201f2fSdrahn # if YYLSP_NEEDED
658fddef416Sniklas #  ifdef YYLEX_PARAM
659fddef416Sniklas #   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
660fddef416Sniklas #  else
661fddef416Sniklas #   define YYLEX		yylex (&yylval, &yylloc)
662fddef416Sniklas #  endif
663d2201f2fSdrahn # else /* !YYLSP_NEEDED */
664fddef416Sniklas #  ifdef YYLEX_PARAM
665fddef416Sniklas #   define YYLEX		yylex (&yylval, YYLEX_PARAM)
666fddef416Sniklas #  else
667fddef416Sniklas #   define YYLEX		yylex (&yylval)
668fddef416Sniklas #  endif
669d2201f2fSdrahn # endif /* !YYLSP_NEEDED */
670d2201f2fSdrahn #else /* !YYPURE */
671d2201f2fSdrahn # define YYLEX			yylex ()
672d2201f2fSdrahn #endif /* !YYPURE */
673d2201f2fSdrahn 
674d2201f2fSdrahn 
675d2201f2fSdrahn /* Enable debugging if requested.  */
676d2201f2fSdrahn #if YYDEBUG
677d2201f2fSdrahn 
678d2201f2fSdrahn # ifndef YYFPRINTF
679d2201f2fSdrahn #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
680d2201f2fSdrahn #  define YYFPRINTF fprintf
681fddef416Sniklas # endif
682fddef416Sniklas 
683d2201f2fSdrahn # define YYDPRINTF(Args)			\
684d2201f2fSdrahn do {						\
685d2201f2fSdrahn   if (yydebug)					\
686d2201f2fSdrahn     YYFPRINTF Args;				\
687d2201f2fSdrahn } while (0)
688d2201f2fSdrahn /* Nonzero means print parse trace.  It is left uninitialized so that
689d2201f2fSdrahn    multiple parsers can coexist.  */
690d2201f2fSdrahn int yydebug;
691d2201f2fSdrahn #else /* !YYDEBUG */
692d2201f2fSdrahn # define YYDPRINTF(Args)
693d2201f2fSdrahn #endif /* !YYDEBUG */
694fddef416Sniklas 
695d2201f2fSdrahn /* YYINITDEPTH -- initial size of the parser's stacks.  */
696fddef416Sniklas #ifndef	YYINITDEPTH
697fddef416Sniklas # define YYINITDEPTH 200
698fddef416Sniklas #endif
699fddef416Sniklas 
700d2201f2fSdrahn /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
701d2201f2fSdrahn    if the built-in stack extension method is used).
702d2201f2fSdrahn 
703d2201f2fSdrahn    Do not make this value too large; the results are undefined if
704d2201f2fSdrahn    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
705d2201f2fSdrahn    evaluated with infinite-precision integer arithmetic.  */
706fddef416Sniklas 
707fddef416Sniklas #if YYMAXDEPTH == 0
708fddef416Sniklas # undef YYMAXDEPTH
709fddef416Sniklas #endif
710fddef416Sniklas 
711fddef416Sniklas #ifndef YYMAXDEPTH
712fddef416Sniklas # define YYMAXDEPTH 10000
713fddef416Sniklas #endif
714fddef416Sniklas 
715d2201f2fSdrahn #ifdef YYERROR_VERBOSE
716f7cc78ecSespie 
717d2201f2fSdrahn # ifndef yystrlen
718d2201f2fSdrahn #  if defined (__GLIBC__) && defined (_STRING_H)
719d2201f2fSdrahn #   define yystrlen strlen
720d2201f2fSdrahn #  else
721d2201f2fSdrahn /* Return the length of YYSTR.  */
722d2201f2fSdrahn static YYSIZE_T
723d2201f2fSdrahn #   if defined (__STDC__) || defined (__cplusplus)
yystrlen(const char * yystr)724d2201f2fSdrahn yystrlen (const char *yystr)
725d2201f2fSdrahn #   else
726d2201f2fSdrahn yystrlen (yystr)
727d2201f2fSdrahn      const char *yystr;
728d2201f2fSdrahn #   endif
729fddef416Sniklas {
730d2201f2fSdrahn   register const char *yys = yystr;
731fddef416Sniklas 
732d2201f2fSdrahn   while (*yys++ != '\0')
733d2201f2fSdrahn     continue;
734d2201f2fSdrahn 
735d2201f2fSdrahn   return yys - yystr - 1;
736fddef416Sniklas }
737d2201f2fSdrahn #  endif
738d2201f2fSdrahn # endif
739fddef416Sniklas 
740d2201f2fSdrahn # ifndef yystpcpy
741d2201f2fSdrahn #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
742d2201f2fSdrahn #   define yystpcpy stpcpy
743d2201f2fSdrahn #  else
744d2201f2fSdrahn /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
745d2201f2fSdrahn    YYDEST.  */
746d2201f2fSdrahn static char *
747d2201f2fSdrahn #   if defined (__STDC__) || defined (__cplusplus)
yystpcpy(char * yydest,const char * yysrc)748d2201f2fSdrahn yystpcpy (char *yydest, const char *yysrc)
749d2201f2fSdrahn #   else
750d2201f2fSdrahn yystpcpy (yydest, yysrc)
751d2201f2fSdrahn      char *yydest;
752d2201f2fSdrahn      const char *yysrc;
753d2201f2fSdrahn #   endif
754fddef416Sniklas {
755d2201f2fSdrahn   register char *yyd = yydest;
756d2201f2fSdrahn   register const char *yys = yysrc;
757fddef416Sniklas 
758d2201f2fSdrahn   while ((*yyd++ = *yys++) != '\0')
759d2201f2fSdrahn     continue;
760d2201f2fSdrahn 
761d2201f2fSdrahn   return yyd - 1;
762fddef416Sniklas }
763d2201f2fSdrahn #  endif
764fddef416Sniklas # endif
765fddef416Sniklas #endif
766fddef416Sniklas 
767d2201f2fSdrahn #line 315 "/usr/share/bison-1.35/bison.simple"
768d2201f2fSdrahn 
769fddef416Sniklas 
770fddef416Sniklas /* The user can define YYPARSE_PARAM as the name of an argument to be passed
771fddef416Sniklas    into yyparse.  The argument should have type void *.
772fddef416Sniklas    It should actually point to an object.
773fddef416Sniklas    Grammar actions can access the variable by casting it
774fddef416Sniklas    to the proper pointer type.  */
775fddef416Sniklas 
776fddef416Sniklas #ifdef YYPARSE_PARAM
777d2201f2fSdrahn # if defined (__STDC__) || defined (__cplusplus)
778f7cc78ecSespie #  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
779fddef416Sniklas #  define YYPARSE_PARAM_DECL
780d2201f2fSdrahn # else
781f7cc78ecSespie #  define YYPARSE_PARAM_ARG YYPARSE_PARAM
782f7cc78ecSespie #  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
783d2201f2fSdrahn # endif
784d2201f2fSdrahn #else /* !YYPARSE_PARAM */
785f7cc78ecSespie # define YYPARSE_PARAM_ARG
786f7cc78ecSespie # define YYPARSE_PARAM_DECL
787d2201f2fSdrahn #endif /* !YYPARSE_PARAM */
788f7cc78ecSespie 
789f7cc78ecSespie /* Prevent warning if -Wstrict-prototypes.  */
790f7cc78ecSespie #ifdef __GNUC__
791f7cc78ecSespie # ifdef YYPARSE_PARAM
792f7cc78ecSespie int yyparse (void *);
793f7cc78ecSespie # else
794f7cc78ecSespie int yyparse (void);
795f7cc78ecSespie # endif
796fddef416Sniklas #endif
797fddef416Sniklas 
798d2201f2fSdrahn /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
799d2201f2fSdrahn    variables are global, or local to YYPARSE.  */
800d2201f2fSdrahn 
801d2201f2fSdrahn #define YY_DECL_NON_LSP_VARIABLES			\
802d2201f2fSdrahn /* The lookahead symbol.  */				\
803d2201f2fSdrahn int yychar;						\
804d2201f2fSdrahn 							\
805d2201f2fSdrahn /* The semantic value of the lookahead symbol. */	\
806d2201f2fSdrahn YYSTYPE yylval;						\
807d2201f2fSdrahn 							\
808d2201f2fSdrahn /* Number of parse errors so far.  */			\
809d2201f2fSdrahn int yynerrs;
810d2201f2fSdrahn 
811d2201f2fSdrahn #if YYLSP_NEEDED
812d2201f2fSdrahn # define YY_DECL_VARIABLES			\
813d2201f2fSdrahn YY_DECL_NON_LSP_VARIABLES			\
814d2201f2fSdrahn 						\
815d2201f2fSdrahn /* Location data for the lookahead symbol.  */	\
816d2201f2fSdrahn YYLTYPE yylloc;
817d2201f2fSdrahn #else
818d2201f2fSdrahn # define YY_DECL_VARIABLES			\
819d2201f2fSdrahn YY_DECL_NON_LSP_VARIABLES
820d2201f2fSdrahn #endif
821d2201f2fSdrahn 
822d2201f2fSdrahn 
823d2201f2fSdrahn /* If nonreentrant, generate the variables here. */
824d2201f2fSdrahn 
825d2201f2fSdrahn #if !YYPURE
826d2201f2fSdrahn YY_DECL_VARIABLES
827d2201f2fSdrahn #endif  /* !YYPURE */
828d2201f2fSdrahn 
829fddef416Sniklas int
yyparse(YYPARSE_PARAM_ARG)830f7cc78ecSespie yyparse (YYPARSE_PARAM_ARG)
831fddef416Sniklas      YYPARSE_PARAM_DECL
832fddef416Sniklas {
833d2201f2fSdrahn   /* If reentrant, generate the variables here. */
834d2201f2fSdrahn #if YYPURE
835d2201f2fSdrahn   YY_DECL_VARIABLES
836d2201f2fSdrahn #endif  /* !YYPURE */
837d2201f2fSdrahn 
838fddef416Sniklas   register int yystate;
839fddef416Sniklas   register int yyn;
840d2201f2fSdrahn   int yyresult;
841d2201f2fSdrahn   /* Number of tokens to shift before error messages enabled.  */
842d2201f2fSdrahn   int yyerrstatus;
843d2201f2fSdrahn   /* Lookahead token as an internal (translated) token number.  */
844d2201f2fSdrahn   int yychar1 = 0;
845d2201f2fSdrahn 
846d2201f2fSdrahn   /* Three stacks and their tools:
847d2201f2fSdrahn      `yyss': related to states,
848d2201f2fSdrahn      `yyvs': related to semantic values,
849d2201f2fSdrahn      `yyls': related to locations.
850d2201f2fSdrahn 
851d2201f2fSdrahn      Refer to the stacks thru separate pointers, to allow yyoverflow
852d2201f2fSdrahn      to reallocate them elsewhere.  */
853d2201f2fSdrahn 
854d2201f2fSdrahn   /* The state stack. */
855d2201f2fSdrahn   short	yyssa[YYINITDEPTH];
856d2201f2fSdrahn   short *yyss = yyssa;
857fddef416Sniklas   register short *yyssp;
858d2201f2fSdrahn 
859d2201f2fSdrahn   /* The semantic value stack.  */
860d2201f2fSdrahn   YYSTYPE yyvsa[YYINITDEPTH];
861d2201f2fSdrahn   YYSTYPE *yyvs = yyvsa;
862fddef416Sniklas   register YYSTYPE *yyvsp;
863fddef416Sniklas 
864d2201f2fSdrahn #if YYLSP_NEEDED
865d2201f2fSdrahn   /* The location stack.  */
866d2201f2fSdrahn   YYLTYPE yylsa[YYINITDEPTH];
867fddef416Sniklas   YYLTYPE *yyls = yylsa;
868fddef416Sniklas   YYLTYPE *yylsp;
869d2201f2fSdrahn #endif
870fddef416Sniklas 
871d2201f2fSdrahn #if YYLSP_NEEDED
872fddef416Sniklas # define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
873fddef416Sniklas #else
874fddef416Sniklas # define YYPOPSTACK   (yyvsp--, yyssp--)
875fddef416Sniklas #endif
876fddef416Sniklas 
877d2201f2fSdrahn   YYSIZE_T yystacksize = YYINITDEPTH;
878fddef416Sniklas 
879d2201f2fSdrahn 
880d2201f2fSdrahn   /* The variables used to return semantic value and location from the
881d2201f2fSdrahn      action routines.  */
882d2201f2fSdrahn   YYSTYPE yyval;
883d2201f2fSdrahn #if YYLSP_NEEDED
884d2201f2fSdrahn   YYLTYPE yyloc;
885fddef416Sniklas #endif
886fddef416Sniklas 
887d2201f2fSdrahn   /* When reducing, the number of symbols on the RHS of the reduced
888d2201f2fSdrahn      rule. */
889fddef416Sniklas   int yylen;
890fddef416Sniklas 
891d2201f2fSdrahn   YYDPRINTF ((stderr, "Starting parse\n"));
892fddef416Sniklas 
893fddef416Sniklas   yystate = 0;
894fddef416Sniklas   yyerrstatus = 0;
895fddef416Sniklas   yynerrs = 0;
896fddef416Sniklas   yychar = YYEMPTY;		/* Cause a token to be read.  */
897fddef416Sniklas 
898fddef416Sniklas   /* Initialize stack pointers.
899fddef416Sniklas      Waste one element of value and location stack
900fddef416Sniklas      so that they stay on the same level as the state stack.
901fddef416Sniklas      The wasted elements are never initialized.  */
902fddef416Sniklas 
903d2201f2fSdrahn   yyssp = yyss;
904fddef416Sniklas   yyvsp = yyvs;
905d2201f2fSdrahn #if YYLSP_NEEDED
906fddef416Sniklas   yylsp = yyls;
907fddef416Sniklas #endif
908d2201f2fSdrahn   goto yysetstate;
909fddef416Sniklas 
910d2201f2fSdrahn /*------------------------------------------------------------.
911d2201f2fSdrahn | yynewstate -- Push a new state, which is found in yystate.  |
912d2201f2fSdrahn `------------------------------------------------------------*/
913fddef416Sniklas  yynewstate:
914d2201f2fSdrahn   /* In all cases, when you get here, the value and location stacks
915d2201f2fSdrahn      have just been pushed. so pushing a state here evens the stacks.
916d2201f2fSdrahn      */
917d2201f2fSdrahn   yyssp++;
918fddef416Sniklas 
919d2201f2fSdrahn  yysetstate:
920d2201f2fSdrahn   *yyssp = yystate;
921fddef416Sniklas 
922fddef416Sniklas   if (yyssp >= yyss + yystacksize - 1)
923fddef416Sniklas     {
924fddef416Sniklas       /* Get the current used size of the three stacks, in elements.  */
925d2201f2fSdrahn       YYSIZE_T yysize = yyssp - yyss + 1;
926fddef416Sniklas 
927fddef416Sniklas #ifdef yyoverflow
928d2201f2fSdrahn       {
929d2201f2fSdrahn 	/* Give user a chance to reallocate the stack. Use copies of
930d2201f2fSdrahn 	   these so that the &'s don't force the real ones into
931d2201f2fSdrahn 	   memory.  */
932d2201f2fSdrahn 	YYSTYPE *yyvs1 = yyvs;
933d2201f2fSdrahn 	short *yyss1 = yyss;
934d2201f2fSdrahn 
935d2201f2fSdrahn 	/* Each stack pointer address is followed by the size of the
936d2201f2fSdrahn 	   data in use in that stack, in bytes.  */
937d2201f2fSdrahn # if YYLSP_NEEDED
938d2201f2fSdrahn 	YYLTYPE *yyls1 = yyls;
939fddef416Sniklas 	/* This used to be a conditional around just the two extra args,
940fddef416Sniklas 	   but that might be undefined if yyoverflow is a macro.  */
941fddef416Sniklas 	yyoverflow ("parser stack overflow",
942d2201f2fSdrahn 		    &yyss1, yysize * sizeof (*yyssp),
943d2201f2fSdrahn 		    &yyvs1, yysize * sizeof (*yyvsp),
944d2201f2fSdrahn 		    &yyls1, yysize * sizeof (*yylsp),
945fddef416Sniklas 		    &yystacksize);
946d2201f2fSdrahn 	yyls = yyls1;
947fddef416Sniklas # else
948fddef416Sniklas 	yyoverflow ("parser stack overflow",
949d2201f2fSdrahn 		    &yyss1, yysize * sizeof (*yyssp),
950d2201f2fSdrahn 		    &yyvs1, yysize * sizeof (*yyvsp),
951fddef416Sniklas 		    &yystacksize);
952fddef416Sniklas # endif
953d2201f2fSdrahn 	yyss = yyss1;
954d2201f2fSdrahn 	yyvs = yyvs1;
955d2201f2fSdrahn       }
956fddef416Sniklas #else /* no yyoverflow */
957d2201f2fSdrahn # ifndef YYSTACK_RELOCATE
958d2201f2fSdrahn       goto yyoverflowlab;
959d2201f2fSdrahn # else
960fddef416Sniklas       /* Extend the stack our own way.  */
961fddef416Sniklas       if (yystacksize >= YYMAXDEPTH)
962d2201f2fSdrahn 	goto yyoverflowlab;
963fddef416Sniklas       yystacksize *= 2;
964fddef416Sniklas       if (yystacksize > YYMAXDEPTH)
965fddef416Sniklas 	yystacksize = YYMAXDEPTH;
966d2201f2fSdrahn 
967d2201f2fSdrahn       {
968d2201f2fSdrahn 	short *yyss1 = yyss;
969d2201f2fSdrahn 	union yyalloc *yyptr =
970d2201f2fSdrahn 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
971d2201f2fSdrahn 	if (! yyptr)
972d2201f2fSdrahn 	  goto yyoverflowlab;
973d2201f2fSdrahn 	YYSTACK_RELOCATE (yyss);
974d2201f2fSdrahn 	YYSTACK_RELOCATE (yyvs);
975d2201f2fSdrahn # if YYLSP_NEEDED
976d2201f2fSdrahn 	YYSTACK_RELOCATE (yyls);
977f7cc78ecSespie # endif
978d2201f2fSdrahn # undef YYSTACK_RELOCATE
979d2201f2fSdrahn 	if (yyss1 != yyssa)
980d2201f2fSdrahn 	  YYSTACK_FREE (yyss1);
981d2201f2fSdrahn       }
982fddef416Sniklas # endif
983fddef416Sniklas #endif /* no yyoverflow */
984fddef416Sniklas 
985d2201f2fSdrahn       yyssp = yyss + yysize - 1;
986d2201f2fSdrahn       yyvsp = yyvs + yysize - 1;
987d2201f2fSdrahn #if YYLSP_NEEDED
988d2201f2fSdrahn       yylsp = yyls + yysize - 1;
989fddef416Sniklas #endif
990fddef416Sniklas 
991d2201f2fSdrahn       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
992d2201f2fSdrahn 		  (unsigned long int) yystacksize));
993fddef416Sniklas 
994fddef416Sniklas       if (yyssp >= yyss + yystacksize - 1)
995fddef416Sniklas 	YYABORT;
996fddef416Sniklas     }
997fddef416Sniklas 
998d2201f2fSdrahn   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
999fddef416Sniklas 
1000fddef416Sniklas   goto yybackup;
1001d2201f2fSdrahn 
1002d2201f2fSdrahn 
1003d2201f2fSdrahn /*-----------.
1004d2201f2fSdrahn | yybackup.  |
1005d2201f2fSdrahn `-----------*/
1006fddef416Sniklas yybackup:
1007fddef416Sniklas 
1008fddef416Sniklas /* Do appropriate processing given the current state.  */
1009fddef416Sniklas /* Read a lookahead token if we need one and don't already have one.  */
1010fddef416Sniklas /* yyresume: */
1011fddef416Sniklas 
1012fddef416Sniklas   /* First try to decide what to do without reference to lookahead token.  */
1013fddef416Sniklas 
1014fddef416Sniklas   yyn = yypact[yystate];
1015fddef416Sniklas   if (yyn == YYFLAG)
1016fddef416Sniklas     goto yydefault;
1017fddef416Sniklas 
1018fddef416Sniklas   /* Not known => get a lookahead token if don't already have one.  */
1019fddef416Sniklas 
1020fddef416Sniklas   /* yychar is either YYEMPTY or YYEOF
1021fddef416Sniklas      or a valid token in external form.  */
1022fddef416Sniklas 
1023fddef416Sniklas   if (yychar == YYEMPTY)
1024fddef416Sniklas     {
1025d2201f2fSdrahn       YYDPRINTF ((stderr, "Reading a token: "));
1026fddef416Sniklas       yychar = YYLEX;
1027fddef416Sniklas     }
1028fddef416Sniklas 
1029fddef416Sniklas   /* Convert token to internal form (in yychar1) for indexing tables with */
1030fddef416Sniklas 
1031fddef416Sniklas   if (yychar <= 0)		/* This means end of input. */
1032fddef416Sniklas     {
1033fddef416Sniklas       yychar1 = 0;
1034fddef416Sniklas       yychar = YYEOF;		/* Don't call YYLEX any more */
1035fddef416Sniklas 
1036d2201f2fSdrahn       YYDPRINTF ((stderr, "Now at end of input.\n"));
1037fddef416Sniklas     }
1038fddef416Sniklas   else
1039fddef416Sniklas     {
1040fddef416Sniklas       yychar1 = YYTRANSLATE (yychar);
1041fddef416Sniklas 
1042d2201f2fSdrahn #if YYDEBUG
1043d2201f2fSdrahn      /* We have to keep this `#if YYDEBUG', since we use variables
1044d2201f2fSdrahn 	which are defined only if `YYDEBUG' is set.  */
1045fddef416Sniklas       if (yydebug)
1046fddef416Sniklas 	{
1047d2201f2fSdrahn 	  YYFPRINTF (stderr, "Next token is %d (%s",
1048d2201f2fSdrahn 		     yychar, yytname[yychar1]);
1049d2201f2fSdrahn 	  /* Give the individual parser a way to print the precise
1050d2201f2fSdrahn 	     meaning of a token, for further debugging info.  */
1051fddef416Sniklas # ifdef YYPRINT
1052fddef416Sniklas 	  YYPRINT (stderr, yychar, yylval);
1053fddef416Sniklas # endif
1054d2201f2fSdrahn 	  YYFPRINTF (stderr, ")\n");
1055fddef416Sniklas 	}
1056fddef416Sniklas #endif
1057fddef416Sniklas     }
1058fddef416Sniklas 
1059fddef416Sniklas   yyn += yychar1;
1060fddef416Sniklas   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1061fddef416Sniklas     goto yydefault;
1062fddef416Sniklas 
1063fddef416Sniklas   yyn = yytable[yyn];
1064fddef416Sniklas 
1065fddef416Sniklas   /* yyn is what to do for this token type in this state.
1066fddef416Sniklas      Negative => reduce, -yyn is rule number.
1067fddef416Sniklas      Positive => shift, yyn is new state.
1068fddef416Sniklas        New state is final state => don't bother to shift,
1069fddef416Sniklas        just return success.
1070fddef416Sniklas      0, or most negative number => error.  */
1071fddef416Sniklas 
1072fddef416Sniklas   if (yyn < 0)
1073fddef416Sniklas     {
1074fddef416Sniklas       if (yyn == YYFLAG)
1075fddef416Sniklas 	goto yyerrlab;
1076fddef416Sniklas       yyn = -yyn;
1077fddef416Sniklas       goto yyreduce;
1078fddef416Sniklas     }
1079fddef416Sniklas   else if (yyn == 0)
1080fddef416Sniklas     goto yyerrlab;
1081fddef416Sniklas 
1082fddef416Sniklas   if (yyn == YYFINAL)
1083fddef416Sniklas     YYACCEPT;
1084fddef416Sniklas 
1085fddef416Sniklas   /* Shift the lookahead token.  */
1086d2201f2fSdrahn   YYDPRINTF ((stderr, "Shifting token %d (%s), ",
1087d2201f2fSdrahn 	      yychar, yytname[yychar1]));
1088fddef416Sniklas 
1089fddef416Sniklas   /* Discard the token being shifted unless it is eof.  */
1090fddef416Sniklas   if (yychar != YYEOF)
1091fddef416Sniklas     yychar = YYEMPTY;
1092fddef416Sniklas 
1093fddef416Sniklas   *++yyvsp = yylval;
1094d2201f2fSdrahn #if YYLSP_NEEDED
1095fddef416Sniklas   *++yylsp = yylloc;
1096fddef416Sniklas #endif
1097fddef416Sniklas 
1098d2201f2fSdrahn   /* Count tokens shifted since error; after three, turn off error
1099d2201f2fSdrahn      status.  */
1100d2201f2fSdrahn   if (yyerrstatus)
1101d2201f2fSdrahn     yyerrstatus--;
1102fddef416Sniklas 
1103fddef416Sniklas   yystate = yyn;
1104fddef416Sniklas   goto yynewstate;
1105fddef416Sniklas 
1106fddef416Sniklas 
1107d2201f2fSdrahn /*-----------------------------------------------------------.
1108d2201f2fSdrahn | yydefault -- do the default action for the current state.  |
1109d2201f2fSdrahn `-----------------------------------------------------------*/
1110d2201f2fSdrahn yydefault:
1111fddef416Sniklas   yyn = yydefact[yystate];
1112fddef416Sniklas   if (yyn == 0)
1113fddef416Sniklas     goto yyerrlab;
1114d2201f2fSdrahn   goto yyreduce;
1115fddef416Sniklas 
1116d2201f2fSdrahn 
1117d2201f2fSdrahn /*-----------------------------.
1118d2201f2fSdrahn | yyreduce -- Do a reduction.  |
1119d2201f2fSdrahn `-----------------------------*/
1120fddef416Sniklas yyreduce:
1121d2201f2fSdrahn   /* yyn is the number of a rule to reduce with.  */
1122fddef416Sniklas   yylen = yyr2[yyn];
1123fddef416Sniklas 
1124d2201f2fSdrahn   /* If YYLEN is nonzero, implement the default value of the action:
1125d2201f2fSdrahn      `$$ = $1'.
1126d2201f2fSdrahn 
1127d2201f2fSdrahn      Otherwise, the following line sets YYVAL to the semantic value of
1128d2201f2fSdrahn      the lookahead token.  This behavior is undocumented and Bison
1129d2201f2fSdrahn      users should not rely upon it.  Assigning to YYVAL
1130d2201f2fSdrahn      unconditionally makes the parser a bit smaller, and it avoids a
1131d2201f2fSdrahn      GCC warning that YYVAL may be used uninitialized.  */
1132d2201f2fSdrahn   yyval = yyvsp[1-yylen];
1133d2201f2fSdrahn 
1134d2201f2fSdrahn #if YYLSP_NEEDED
1135d2201f2fSdrahn   /* Similarly for the default location.  Let the user run additional
1136d2201f2fSdrahn      commands if for instance locations are ranges.  */
1137d2201f2fSdrahn   yyloc = yylsp[1-yylen];
1138d2201f2fSdrahn   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1139d2201f2fSdrahn #endif
1140d2201f2fSdrahn 
1141d2201f2fSdrahn #if YYDEBUG
1142d2201f2fSdrahn   /* We have to keep this `#if YYDEBUG', since we use variables which
1143d2201f2fSdrahn      are defined only if `YYDEBUG' is set.  */
1144fddef416Sniklas   if (yydebug)
1145fddef416Sniklas     {
1146d2201f2fSdrahn       int yyi;
1147fddef416Sniklas 
1148d2201f2fSdrahn       YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1149fddef416Sniklas 		 yyn, yyrline[yyn]);
1150fddef416Sniklas 
1151fddef416Sniklas       /* Print the symbols being reduced, and their result.  */
1152d2201f2fSdrahn       for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1153d2201f2fSdrahn 	YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1154d2201f2fSdrahn       YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1155fddef416Sniklas     }
1156fddef416Sniklas #endif
1157fddef416Sniklas 
1158fddef416Sniklas   switch (yyn) {
1159fddef416Sniklas 
1160fddef416Sniklas case 4:
1161f7cc78ecSespie #line 311 "itbl-parse.y"
1162fddef416Sniklas {
1163fddef416Sniklas 	    DBG (("line %d: entry pnum=%d type=%d name=%s value=x%x\n",
1164fddef416Sniklas 	    	    insntbl_line, yyvsp[-4].num, yyvsp[-3].num, yyvsp[-2].str, yyvsp[-1].val));
1165fddef416Sniklas 	    itbl_add_reg (yyvsp[-4].num, yyvsp[-3].num, yyvsp[-2].str, yyvsp[-1].val);
1166d2201f2fSdrahn 	  }
1167d2201f2fSdrahn     break;
1168fddef416Sniklas case 5:
1169f7cc78ecSespie #line 317 "itbl-parse.y"
1170fddef416Sniklas {
1171fddef416Sniklas 	    DBG (("line %d: entry pnum=%d type=INSN name=%s value=x%x",
1172fddef416Sniklas 	    	    insntbl_line, yyvsp[-5].num, yyvsp[-3].str, yyvsp[-2].val));
1173fddef416Sniklas 	    DBG ((" sbit=%d ebit=%d flags=0x%x\n", sbit, ebit, yyvsp[0].val));
1174fddef416Sniklas 	    insn=itbl_add_insn (yyvsp[-5].num, yyvsp[-3].str, yyvsp[-2].val, sbit, ebit, yyvsp[0].val);
1175d2201f2fSdrahn 	  }
1176d2201f2fSdrahn     break;
1177d2201f2fSdrahn case 6:
1178d2201f2fSdrahn #line 324 "itbl-parse.y"
1179d2201f2fSdrahn {}
1180d2201f2fSdrahn     break;
1181fddef416Sniklas case 12:
1182d2201f2fSdrahn #line 337 "itbl-parse.y"
1183fddef416Sniklas {
1184fddef416Sniklas 	    DBGL2 (("ftype\n"));
1185fddef416Sniklas 	    yyval.num = yyvsp[0].num;
1186d2201f2fSdrahn 	  }
1187d2201f2fSdrahn     break;
1188fddef416Sniklas case 13:
1189d2201f2fSdrahn #line 342 "itbl-parse.y"
1190fddef416Sniklas {
1191fddef416Sniklas 	    DBGL2 (("addr\n"));
1192fddef416Sniklas 	    yyval.num = ADDR;
1193d2201f2fSdrahn 	  }
1194d2201f2fSdrahn     break;
1195fddef416Sniklas case 14:
1196d2201f2fSdrahn #line 347 "itbl-parse.y"
1197fddef416Sniklas {
1198fddef416Sniklas 	    DBGL2 (("immed\n"));
1199fddef416Sniklas 	    yyval.num = IMMED;
1200d2201f2fSdrahn 	  }
1201d2201f2fSdrahn     break;
1202fddef416Sniklas case 15:
1203d2201f2fSdrahn #line 355 "itbl-parse.y"
1204fddef416Sniklas {
1205fddef416Sniklas 	    DBG (("line %d: field type=%d sbit=%d ebit=%d, flags=0x%x\n",
1206fddef416Sniklas 	    	    insntbl_line, yyvsp[-2].num, sbit, ebit, yyvsp[0].val));
1207fddef416Sniklas 	    itbl_add_operand (insn, yyvsp[-2].num, sbit, ebit, yyvsp[0].val);
1208d2201f2fSdrahn 	  }
1209d2201f2fSdrahn     break;
1210fddef416Sniklas case 16:
1211d2201f2fSdrahn #line 364 "itbl-parse.y"
1212fddef416Sniklas {
1213fddef416Sniklas 	    yyval.val = yyvsp[-2].num | yyvsp[0].val;
1214d2201f2fSdrahn 	  }
1215d2201f2fSdrahn     break;
1216fddef416Sniklas case 17:
1217d2201f2fSdrahn #line 368 "itbl-parse.y"
1218fddef416Sniklas {
1219fddef416Sniklas 	    yyval.val = yyvsp[-1].val;
1220d2201f2fSdrahn 	  }
1221d2201f2fSdrahn     break;
1222fddef416Sniklas case 18:
1223d2201f2fSdrahn #line 372 "itbl-parse.y"
1224fddef416Sniklas {
1225fddef416Sniklas 	    yyval.val = yyvsp[0].num;
1226d2201f2fSdrahn 	  }
1227d2201f2fSdrahn     break;
1228fddef416Sniklas case 19:
1229d2201f2fSdrahn #line 379 "itbl-parse.y"
1230fddef416Sniklas {
1231fddef416Sniklas 	    DBGL2 (("flags=%d\n", yyvsp[0].val));
1232fddef416Sniklas 	    yyval.val = yyvsp[0].val;
1233d2201f2fSdrahn 	  }
1234d2201f2fSdrahn     break;
1235fddef416Sniklas case 20:
1236d2201f2fSdrahn #line 384 "itbl-parse.y"
1237fddef416Sniklas {
1238fddef416Sniklas 	    yyval.val = 0;
1239d2201f2fSdrahn 	  }
1240d2201f2fSdrahn     break;
1241fddef416Sniklas case 21:
1242d2201f2fSdrahn #line 391 "itbl-parse.y"
1243fddef416Sniklas {
1244fddef416Sniklas 	    DBGL2 (("range %d %d\n", yyvsp[-2].num, yyvsp[0].num));
1245fddef416Sniklas 	    sbit = yyvsp[-2].num;
1246fddef416Sniklas 	    ebit = yyvsp[0].num;
1247d2201f2fSdrahn 	  }
1248d2201f2fSdrahn     break;
1249fddef416Sniklas case 22:
1250d2201f2fSdrahn #line 397 "itbl-parse.y"
1251fddef416Sniklas {
1252fddef416Sniklas 	    sbit = 31;
1253fddef416Sniklas 	    ebit = 0;
1254d2201f2fSdrahn 	  }
1255d2201f2fSdrahn     break;
1256fddef416Sniklas case 23:
1257d2201f2fSdrahn #line 405 "itbl-parse.y"
1258fddef416Sniklas {
1259fddef416Sniklas 	    DBGL2 (("pnum=%d\n",yyvsp[0].num));
1260fddef416Sniklas 	    yyval.num = yyvsp[0].num;
1261d2201f2fSdrahn 	  }
1262d2201f2fSdrahn     break;
1263fddef416Sniklas case 24:
1264d2201f2fSdrahn #line 413 "itbl-parse.y"
1265fddef416Sniklas {
1266fddef416Sniklas 	    DBGL2 (("dreg\n"));
1267fddef416Sniklas 	    yyval.num = DREG;
1268d2201f2fSdrahn 	  }
1269d2201f2fSdrahn     break;
1270fddef416Sniklas case 25:
1271d2201f2fSdrahn #line 418 "itbl-parse.y"
1272fddef416Sniklas {
1273fddef416Sniklas 	    DBGL2 (("creg\n"));
1274fddef416Sniklas 	    yyval.num = CREG;
1275d2201f2fSdrahn 	  }
1276d2201f2fSdrahn     break;
1277fddef416Sniklas case 26:
1278d2201f2fSdrahn #line 423 "itbl-parse.y"
1279fddef416Sniklas {
1280fddef416Sniklas 	    DBGL2 (("greg\n"));
1281fddef416Sniklas 	    yyval.num = GREG;
1282d2201f2fSdrahn 	  }
1283d2201f2fSdrahn     break;
1284fddef416Sniklas case 27:
1285d2201f2fSdrahn #line 431 "itbl-parse.y"
1286fddef416Sniklas {
1287fddef416Sniklas 	    DBGL2 (("name=%s\n",yyvsp[0].str));
1288fddef416Sniklas 	    yyval.str = yyvsp[0].str;
1289d2201f2fSdrahn 	  }
1290d2201f2fSdrahn     break;
1291fddef416Sniklas case 28:
1292d2201f2fSdrahn #line 439 "itbl-parse.y"
1293fddef416Sniklas {
1294fddef416Sniklas 	    DBGL2 (("num=%d\n",yyvsp[0].num));
1295fddef416Sniklas 	    yyval.num = yyvsp[0].num;
1296d2201f2fSdrahn 	  }
1297d2201f2fSdrahn     break;
1298fddef416Sniklas case 29:
1299d2201f2fSdrahn #line 447 "itbl-parse.y"
1300fddef416Sniklas {
1301fddef416Sniklas 	    DBGL2 (("val=x%x\n",yyvsp[0].num));
1302fddef416Sniklas 	    yyval.val = yyvsp[0].num;
1303fddef416Sniklas 	  }
1304d2201f2fSdrahn     break;
1305d2201f2fSdrahn }
1306d2201f2fSdrahn 
1307d2201f2fSdrahn #line 705 "/usr/share/bison-1.35/bison.simple"
1308d2201f2fSdrahn 
1309fddef416Sniklas 
1310fddef416Sniklas   yyvsp -= yylen;
1311fddef416Sniklas   yyssp -= yylen;
1312d2201f2fSdrahn #if YYLSP_NEEDED
1313fddef416Sniklas   yylsp -= yylen;
1314fddef416Sniklas #endif
1315fddef416Sniklas 
1316d2201f2fSdrahn #if YYDEBUG
1317fddef416Sniklas   if (yydebug)
1318fddef416Sniklas     {
1319d2201f2fSdrahn       short *yyssp1 = yyss - 1;
1320d2201f2fSdrahn       YYFPRINTF (stderr, "state stack now");
1321d2201f2fSdrahn       while (yyssp1 != yyssp)
1322d2201f2fSdrahn 	YYFPRINTF (stderr, " %d", *++yyssp1);
1323d2201f2fSdrahn       YYFPRINTF (stderr, "\n");
1324fddef416Sniklas     }
1325fddef416Sniklas #endif
1326fddef416Sniklas 
1327fddef416Sniklas   *++yyvsp = yyval;
1328d2201f2fSdrahn #if YYLSP_NEEDED
1329d2201f2fSdrahn   *++yylsp = yyloc;
1330fddef416Sniklas #endif
1331fddef416Sniklas 
1332d2201f2fSdrahn   /* Now `shift' the result of the reduction.  Determine what state
1333d2201f2fSdrahn      that goes to, based on the state we popped back to and the rule
1334d2201f2fSdrahn      number reduced by.  */
1335fddef416Sniklas 
1336fddef416Sniklas   yyn = yyr1[yyn];
1337fddef416Sniklas 
1338fddef416Sniklas   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1339fddef416Sniklas   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1340fddef416Sniklas     yystate = yytable[yystate];
1341fddef416Sniklas   else
1342fddef416Sniklas     yystate = yydefgoto[yyn - YYNTBASE];
1343fddef416Sniklas 
1344fddef416Sniklas   goto yynewstate;
1345fddef416Sniklas 
1346fddef416Sniklas 
1347d2201f2fSdrahn /*------------------------------------.
1348d2201f2fSdrahn | yyerrlab -- here on detecting error |
1349d2201f2fSdrahn `------------------------------------*/
1350d2201f2fSdrahn yyerrlab:
1351fddef416Sniklas   /* If not already recovering from an error, report this error.  */
1352d2201f2fSdrahn   if (!yyerrstatus)
1353fddef416Sniklas     {
1354fddef416Sniklas       ++yynerrs;
1355fddef416Sniklas 
1356fddef416Sniklas #ifdef YYERROR_VERBOSE
1357fddef416Sniklas       yyn = yypact[yystate];
1358fddef416Sniklas 
1359fddef416Sniklas       if (yyn > YYFLAG && yyn < YYLAST)
1360fddef416Sniklas 	{
1361d2201f2fSdrahn 	  YYSIZE_T yysize = 0;
1362d2201f2fSdrahn 	  char *yymsg;
1363d2201f2fSdrahn 	  int yyx, yycount;
1364fddef416Sniklas 
1365d2201f2fSdrahn 	  yycount = 0;
1366d2201f2fSdrahn 	  /* Start YYX at -YYN if negative to avoid negative indexes in
1367d2201f2fSdrahn 	     YYCHECK.  */
1368d2201f2fSdrahn 	  for (yyx = yyn < 0 ? -yyn : 0;
1369d2201f2fSdrahn 	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1370d2201f2fSdrahn 	    if (yycheck[yyx + yyn] == yyx)
1371d2201f2fSdrahn 	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1372d2201f2fSdrahn 	  yysize += yystrlen ("parse error, unexpected ") + 1;
1373d2201f2fSdrahn 	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1374d2201f2fSdrahn 	  yymsg = (char *) YYSTACK_ALLOC (yysize);
1375d2201f2fSdrahn 	  if (yymsg != 0)
1376fddef416Sniklas 	    {
1377d2201f2fSdrahn 	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1378d2201f2fSdrahn 	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1379fddef416Sniklas 
1380d2201f2fSdrahn 	      if (yycount < 5)
1381fddef416Sniklas 		{
1382d2201f2fSdrahn 		  yycount = 0;
1383d2201f2fSdrahn 		  for (yyx = yyn < 0 ? -yyn : 0;
1384d2201f2fSdrahn 		       yyx < (int) (sizeof (yytname) / sizeof (char *));
1385d2201f2fSdrahn 		       yyx++)
1386d2201f2fSdrahn 		    if (yycheck[yyx + yyn] == yyx)
1387fddef416Sniklas 		      {
1388d2201f2fSdrahn 			const char *yyq = ! yycount ? ", expecting " : " or ";
1389d2201f2fSdrahn 			yyp = yystpcpy (yyp, yyq);
1390d2201f2fSdrahn 			yyp = yystpcpy (yyp, yytname[yyx]);
1391d2201f2fSdrahn 			yycount++;
1392fddef416Sniklas 		      }
1393fddef416Sniklas 		}
1394d2201f2fSdrahn 	      yyerror (yymsg);
1395d2201f2fSdrahn 	      YYSTACK_FREE (yymsg);
1396fddef416Sniklas 	    }
1397fddef416Sniklas 	  else
1398d2201f2fSdrahn 	    yyerror ("parse error; also virtual memory exhausted");
1399fddef416Sniklas 	}
1400fddef416Sniklas       else
1401d2201f2fSdrahn #endif /* defined (YYERROR_VERBOSE) */
1402fddef416Sniklas 	yyerror ("parse error");
1403fddef416Sniklas     }
1404fddef416Sniklas   goto yyerrlab1;
1405fddef416Sniklas 
1406d2201f2fSdrahn 
1407d2201f2fSdrahn /*--------------------------------------------------.
1408d2201f2fSdrahn | yyerrlab1 -- error raised explicitly by an action |
1409d2201f2fSdrahn `--------------------------------------------------*/
1410d2201f2fSdrahn yyerrlab1:
1411fddef416Sniklas   if (yyerrstatus == 3)
1412fddef416Sniklas     {
1413d2201f2fSdrahn       /* If just tried and failed to reuse lookahead token after an
1414d2201f2fSdrahn 	 error, discard it.  */
1415fddef416Sniklas 
1416fddef416Sniklas       /* return failure if at end of input */
1417fddef416Sniklas       if (yychar == YYEOF)
1418fddef416Sniklas 	YYABORT;
1419d2201f2fSdrahn       YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1420d2201f2fSdrahn 		  yychar, yytname[yychar1]));
1421fddef416Sniklas       yychar = YYEMPTY;
1422fddef416Sniklas     }
1423fddef416Sniklas 
1424d2201f2fSdrahn   /* Else will try to reuse lookahead token after shifting the error
1425d2201f2fSdrahn      token.  */
1426fddef416Sniklas 
1427fddef416Sniklas   yyerrstatus = 3;		/* Each real token shifted decrements this */
1428fddef416Sniklas 
1429fddef416Sniklas   goto yyerrhandle;
1430fddef416Sniklas 
1431fddef416Sniklas 
1432d2201f2fSdrahn /*-------------------------------------------------------------------.
1433d2201f2fSdrahn | yyerrdefault -- current state does not do anything special for the |
1434d2201f2fSdrahn | error token.                                                       |
1435d2201f2fSdrahn `-------------------------------------------------------------------*/
1436d2201f2fSdrahn yyerrdefault:
1437fddef416Sniklas #if 0
1438fddef416Sniklas   /* This is wrong; only states that explicitly want error tokens
1439fddef416Sniklas      should shift them.  */
1440d2201f2fSdrahn 
1441d2201f2fSdrahn   /* If its default is to accept any token, ok.  Otherwise pop it.  */
1442d2201f2fSdrahn   yyn = yydefact[yystate];
1443d2201f2fSdrahn   if (yyn)
1444d2201f2fSdrahn     goto yydefault;
1445fddef416Sniklas #endif
1446fddef416Sniklas 
1447fddef416Sniklas 
1448d2201f2fSdrahn /*---------------------------------------------------------------.
1449d2201f2fSdrahn | yyerrpop -- pop the current state because it cannot handle the |
1450d2201f2fSdrahn | error token                                                    |
1451d2201f2fSdrahn `---------------------------------------------------------------*/
1452d2201f2fSdrahn yyerrpop:
1453d2201f2fSdrahn   if (yyssp == yyss)
1454d2201f2fSdrahn     YYABORT;
1455fddef416Sniklas   yyvsp--;
1456fddef416Sniklas   yystate = *--yyssp;
1457d2201f2fSdrahn #if YYLSP_NEEDED
1458fddef416Sniklas   yylsp--;
1459fddef416Sniklas #endif
1460fddef416Sniklas 
1461d2201f2fSdrahn #if YYDEBUG
1462fddef416Sniklas   if (yydebug)
1463fddef416Sniklas     {
1464d2201f2fSdrahn       short *yyssp1 = yyss - 1;
1465d2201f2fSdrahn       YYFPRINTF (stderr, "Error: state stack now");
1466d2201f2fSdrahn       while (yyssp1 != yyssp)
1467d2201f2fSdrahn 	YYFPRINTF (stderr, " %d", *++yyssp1);
1468d2201f2fSdrahn       YYFPRINTF (stderr, "\n");
1469fddef416Sniklas     }
1470fddef416Sniklas #endif
1471fddef416Sniklas 
1472d2201f2fSdrahn /*--------------.
1473d2201f2fSdrahn | yyerrhandle.  |
1474d2201f2fSdrahn `--------------*/
1475fddef416Sniklas yyerrhandle:
1476fddef416Sniklas   yyn = yypact[yystate];
1477fddef416Sniklas   if (yyn == YYFLAG)
1478fddef416Sniklas     goto yyerrdefault;
1479fddef416Sniklas 
1480fddef416Sniklas   yyn += YYTERROR;
1481fddef416Sniklas   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1482fddef416Sniklas     goto yyerrdefault;
1483fddef416Sniklas 
1484fddef416Sniklas   yyn = yytable[yyn];
1485fddef416Sniklas   if (yyn < 0)
1486fddef416Sniklas     {
1487fddef416Sniklas       if (yyn == YYFLAG)
1488fddef416Sniklas 	goto yyerrpop;
1489fddef416Sniklas       yyn = -yyn;
1490fddef416Sniklas       goto yyreduce;
1491fddef416Sniklas     }
1492fddef416Sniklas   else if (yyn == 0)
1493fddef416Sniklas     goto yyerrpop;
1494fddef416Sniklas 
1495fddef416Sniklas   if (yyn == YYFINAL)
1496fddef416Sniklas     YYACCEPT;
1497fddef416Sniklas 
1498d2201f2fSdrahn   YYDPRINTF ((stderr, "Shifting error token, "));
1499fddef416Sniklas 
1500fddef416Sniklas   *++yyvsp = yylval;
1501d2201f2fSdrahn #if YYLSP_NEEDED
1502fddef416Sniklas   *++yylsp = yylloc;
1503fddef416Sniklas #endif
1504fddef416Sniklas 
1505fddef416Sniklas   yystate = yyn;
1506fddef416Sniklas   goto yynewstate;
1507f7cc78ecSespie 
1508f7cc78ecSespie 
1509d2201f2fSdrahn /*-------------------------------------.
1510d2201f2fSdrahn | yyacceptlab -- YYACCEPT comes here.  |
1511d2201f2fSdrahn `-------------------------------------*/
1512d2201f2fSdrahn yyacceptlab:
1513d2201f2fSdrahn   yyresult = 0;
1514d2201f2fSdrahn   goto yyreturn;
1515d2201f2fSdrahn 
1516d2201f2fSdrahn /*-----------------------------------.
1517d2201f2fSdrahn | yyabortlab -- YYABORT comes here.  |
1518d2201f2fSdrahn `-----------------------------------*/
1519f7cc78ecSespie yyabortlab:
1520d2201f2fSdrahn   yyresult = 1;
1521d2201f2fSdrahn   goto yyreturn;
1522d2201f2fSdrahn 
1523d2201f2fSdrahn /*---------------------------------------------.
1524d2201f2fSdrahn | yyoverflowab -- parser overflow comes here.  |
1525d2201f2fSdrahn `---------------------------------------------*/
1526d2201f2fSdrahn yyoverflowlab:
1527d2201f2fSdrahn   yyerror ("parser stack overflow");
1528d2201f2fSdrahn   yyresult = 2;
1529d2201f2fSdrahn   /* Fall through.  */
1530d2201f2fSdrahn 
1531d2201f2fSdrahn yyreturn:
1532d2201f2fSdrahn #ifndef yyoverflow
1533d2201f2fSdrahn   if (yyss != yyssa)
1534d2201f2fSdrahn     YYSTACK_FREE (yyss);
1535f7cc78ecSespie #endif
1536d2201f2fSdrahn   return yyresult;
1537f7cc78ecSespie }
1538d2201f2fSdrahn #line 452 "itbl-parse.y"
1539fddef416Sniklas 
1540fddef416Sniklas 
1541fddef416Sniklas static int
yyerror(msg)1542fddef416Sniklas yyerror (msg)
1543fddef416Sniklas      const char *msg;
1544fddef416Sniklas {
1545fddef416Sniklas   printf ("line %d: %s\n", insntbl_line, msg);
1546fddef416Sniklas   return 0;
1547fddef416Sniklas }
1548