Home | History | Annotate | Line # | Download | only in gas
itbl-parse.c revision 1.1.1.3
      1  1.1.1.3  christos /* A Bison parser, made by GNU Bison 3.0.  */
      2      1.1     skrll 
      3  1.1.1.3  christos /* Bison implementation for Yacc-like parsers in C
      4  1.1.1.2  christos 
      5  1.1.1.3  christos    Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
      6      1.1     skrll 
      7  1.1.1.3  christos    This program is free software: you can redistribute it and/or modify
      8      1.1     skrll    it under the terms of the GNU General Public License as published by
      9  1.1.1.3  christos    the Free Software Foundation, either version 3 of the License, or
     10  1.1.1.3  christos    (at your option) any later version.
     11      1.1     skrll 
     12      1.1     skrll    This program is distributed in the hope that it will be useful,
     13      1.1     skrll    but WITHOUT ANY WARRANTY; without even the implied warranty of
     14      1.1     skrll    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15      1.1     skrll    GNU General Public License for more details.
     16      1.1     skrll 
     17      1.1     skrll    You should have received a copy of the GNU General Public License
     18  1.1.1.3  christos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
     19      1.1     skrll 
     20  1.1.1.2  christos /* As a special exception, you may create a larger work that contains
     21  1.1.1.2  christos    part or all of the Bison parser skeleton and distribute that work
     22  1.1.1.2  christos    under terms of your choice, so long as that work isn't itself a
     23  1.1.1.2  christos    parser generator using the skeleton or a modified version thereof
     24  1.1.1.2  christos    as a parser skeleton.  Alternatively, if you modify or redistribute
     25  1.1.1.2  christos    the parser skeleton itself, you may (at your option) remove this
     26  1.1.1.2  christos    special exception, which will cause the skeleton and the resulting
     27  1.1.1.2  christos    Bison output files to be licensed under the GNU General Public
     28  1.1.1.2  christos    License without this special exception.
     29  1.1.1.2  christos 
     30  1.1.1.2  christos    This special exception was added by the Free Software Foundation in
     31  1.1.1.2  christos    version 2.2 of Bison.  */
     32      1.1     skrll 
     33  1.1.1.2  christos /* C LALR(1) parser skeleton written by Richard Stallman, by
     34  1.1.1.2  christos    simplifying the original so-called "semantic" parser.  */
     35      1.1     skrll 
     36      1.1     skrll /* All symbols defined below should begin with yy or YY, to avoid
     37      1.1     skrll    infringing on user name space.  This should be done even for local
     38      1.1     skrll    variables, as they might otherwise be expanded by user macros.
     39      1.1     skrll    There are some unavoidable exceptions within include files to
     40      1.1     skrll    define necessary library symbols; they are noted "INFRINGES ON
     41      1.1     skrll    USER NAME SPACE" below.  */
     42      1.1     skrll 
     43      1.1     skrll /* Identify Bison output.  */
     44      1.1     skrll #define YYBISON 1
     45      1.1     skrll 
     46      1.1     skrll /* Bison version.  */
     47  1.1.1.3  christos #define YYBISON_VERSION "3.0"
     48      1.1     skrll 
     49      1.1     skrll /* Skeleton name.  */
     50      1.1     skrll #define YYSKELETON_NAME "yacc.c"
     51      1.1     skrll 
     52      1.1     skrll /* Pure parsers.  */
     53      1.1     skrll #define YYPURE 0
     54      1.1     skrll 
     55  1.1.1.3  christos /* Push parsers.  */
     56  1.1.1.3  christos #define YYPUSH 0
     57      1.1     skrll 
     58  1.1.1.3  christos /* Pull parsers.  */
     59  1.1.1.3  christos #define YYPULL 1
     60      1.1     skrll 
     61      1.1     skrll 
     62      1.1     skrll 
     63      1.1     skrll 
     64      1.1     skrll /* Copy the first part of user declarations.  */
     65  1.1.1.3  christos #line 21 "./itbl-parse.y" /* yacc.c:339  */
     66      1.1     skrll 
     67      1.1     skrll 
     68  1.1.1.3  christos /*
     69      1.1     skrll 
     70      1.1     skrll Yacc grammar for instruction table entries.
     71      1.1     skrll 
     72      1.1     skrll =======================================================================
     73      1.1     skrll Original Instruction table specification document:
     74      1.1     skrll 
     75      1.1     skrll 	    MIPS Coprocessor Table Specification
     76      1.1     skrll 	    ====================================
     77      1.1     skrll 
     78      1.1     skrll This document describes the format of the MIPS coprocessor table.  The
     79      1.1     skrll table specifies a list of valid functions, data registers and control
     80      1.1     skrll registers that can be used in coprocessor instructions.  This list,
     81      1.1     skrll together with the coprocessor instruction classes listed below,
     82      1.1     skrll specifies the complete list of coprocessor instructions that will
     83      1.1     skrll be recognized and assembled by the GNU assembler.  In effect,
     84      1.1     skrll this makes the GNU assembler table-driven, where the table is
     85      1.1     skrll specified by the programmer.
     86      1.1     skrll 
     87      1.1     skrll The table is an ordinary text file that the GNU assembler reads when
     88      1.1     skrll it starts.  Using the information in the table, the assembler
     89      1.1     skrll generates an internal list of valid coprocessor registers and
     90      1.1     skrll functions.  The assembler uses this internal list in addition to the
     91  1.1.1.3  christos standard MIPS registers and instructions which are built-in to the
     92      1.1     skrll assembler during code generation.
     93      1.1     skrll 
     94      1.1     skrll To specify the coprocessor table when invoking the GNU assembler, use
     95      1.1     skrll the command line option "--itbl file", where file is the
     96      1.1     skrll complete name of the table, including path and extension.
     97      1.1     skrll 
     98      1.1     skrll Examples:
     99      1.1     skrll 
    100      1.1     skrll 	    gas -t cop.tbl test.s -o test.o
    101      1.1     skrll 	    gas -t /usr/local/lib/cop.tbl test.s -o test.o
    102      1.1     skrll 	    gas --itbl d:\gnu\data\cop.tbl test.s -o test.o
    103      1.1     skrll 
    104      1.1     skrll Only one table may be supplied during a single invocation of
    105      1.1     skrll the assembler.
    106      1.1     skrll 
    107      1.1     skrll 
    108      1.1     skrll Instruction classes
    109      1.1     skrll ===================
    110      1.1     skrll 
    111      1.1     skrll Below is a list of the valid coprocessor instruction classes for
    112      1.1     skrll any given coprocessor "z".  These instructions are already recognized
    113      1.1     skrll by the assembler, and are listed here only for reference.
    114      1.1     skrll 
    115      1.1     skrll Class   format	    	    	      instructions
    116      1.1     skrll -------------------------------------------------
    117      1.1     skrll Class1:
    118      1.1     skrll 	op base rt offset
    119      1.1     skrll 	    	    	    	    	    	    	    LWCz rt,offset (base)
    120      1.1     skrll 	    	    	    	    	    	    	    SWCz rt,offset (base)
    121      1.1     skrll Class2:
    122      1.1     skrll 	COPz sub rt rd 0
    123      1.1     skrll 	    	    	    	    	    	    	    MTCz rt,rd
    124      1.1     skrll 	    	    	    	    	    	    	    MFCz rt,rd
    125      1.1     skrll 	    	    	    	    	    	    	    CTCz rt,rd
    126      1.1     skrll 	    	    	    	    	    	    	    CFCz rt,rd
    127      1.1     skrll Class3:
    128      1.1     skrll 	COPz CO cofun
    129      1.1     skrll 	    	    	    	    	    	    	    COPz cofun
    130      1.1     skrll Class4:
    131      1.1     skrll 	COPz BC br offset
    132      1.1     skrll 	    	    	    	    	    	    	    BCzT offset
    133      1.1     skrll 	    	    	    	    	    	    	    BCzF offset
    134      1.1     skrll Class5:
    135      1.1     skrll 	COPz sub rt rd 0
    136      1.1     skrll 	    	    	    	    	    	    	    DMFCz rt,rd
    137      1.1     skrll 	    	    	    	    	    	    	    DMTCz rt,rd
    138      1.1     skrll Class6:
    139      1.1     skrll 	op base rt offset
    140      1.1     skrll 	    	    	    	    	    	    	    LDCz rt,offset (base)
    141      1.1     skrll 	    	    	    	    	    	    	    SDCz rt,offset (base)
    142      1.1     skrll Class7:
    143      1.1     skrll 	COPz BC br offset
    144      1.1     skrll 	    	    	    	    	    	    	    BCzTL offset
    145      1.1     skrll 	    	    	    	    	    	    	    BCzFL offset
    146      1.1     skrll 
    147      1.1     skrll The coprocessor table defines coprocessor-specific registers that can
    148      1.1     skrll be used with all of the above classes of instructions, where
    149      1.1     skrll appropriate.  It also defines additional coprocessor-specific
    150      1.1     skrll functions for Class3 (COPz cofun) instructions, Thus, the table allows
    151      1.1     skrll the programmer to use convenient mnemonics and operands for these
    152      1.1     skrll functions, instead of the COPz mmenmonic and cofun operand.
    153      1.1     skrll 
    154      1.1     skrll The names of the MIPS general registers and their aliases are defined
    155      1.1     skrll by the assembler and will be recognized as valid register names by the
    156      1.1     skrll assembler when used (where allowed) in coprocessor instructions.
    157      1.1     skrll However, the names and values of all coprocessor data and control
    158      1.1     skrll register mnemonics must be specified in the coprocessor table.
    159      1.1     skrll 
    160      1.1     skrll 
    161      1.1     skrll Table Grammar
    162      1.1     skrll =============
    163      1.1     skrll 
    164      1.1     skrll Here is the grammar for the coprocessor table:
    165      1.1     skrll 
    166      1.1     skrll 	    table -> entry*
    167      1.1     skrll 
    168      1.1     skrll 	    entry -> [z entrydef] [comment] '\n'
    169      1.1     skrll 
    170      1.1     skrll 	    entrydef -> type name val
    171      1.1     skrll 	    entrydef -> 'insn' name val funcdef ; type of entry (instruction)
    172      1.1     skrll 
    173  1.1.1.3  christos 	    z -> 'p'['0'..'3']	    	     ; processor number
    174      1.1     skrll 	    type -> ['dreg' | 'creg' | 'greg' ]	     ; type of entry (register)
    175      1.1     skrll 	; 'dreg', 'creg' or 'greg' specifies a data, control, or general
    176      1.1     skrll 	;	    register mnemonic, respectively
    177      1.1     skrll 	    name -> [ltr|dec]*	    	     ; mnemonic of register/function
    178      1.1     skrll 	    val -> [dec|hex]	    	     ; register/function number (integer constant)
    179      1.1     skrll 
    180      1.1     skrll 	    funcdef -> frange flags fields
    181      1.1     skrll 	    	    	    	; bitfield range for opcode
    182      1.1     skrll 	    	    	    	; list of fields' formats
    183      1.1     skrll 	    fields -> field*
    184      1.1     skrll 	    field -> [','] ftype frange flags
    185      1.1     skrll 	    flags -> ['*' flagexpr]
    186      1.1     skrll 	    flagexpr -> '[' flagexpr ']'
    187  1.1.1.3  christos 	    flagexpr -> val '|' flagexpr
    188      1.1     skrll 	    ftype -> [ type | 'immed' | 'addr' ]
    189      1.1     skrll 	; 'immed' specifies an immediate value; see grammar for "val" above
    190  1.1.1.3  christos 	    	; 'addr' specifies a C identifier; name of symbol to be resolved at
    191      1.1     skrll 	;	    link time
    192      1.1     skrll 	    frange -> ':' val '-' val	; starting to ending bit positions, where
    193      1.1     skrll 	    	    	    	; where 0 is least significant bit
    194      1.1     skrll 	    frange -> (null)	    	; default range of 31-0 will be assumed
    195      1.1     skrll 
    196      1.1     skrll 	    comment -> [';'|'#'] [char]*
    197      1.1     skrll 	    char -> any printable character
    198  1.1.1.3  christos 	    ltr -> ['a'..'z'|'A'..'Z']
    199      1.1     skrll 	    dec -> ['0'..'9']*	    	    	    	    	     ; value in decimal
    200  1.1.1.3  christos 	    hex -> '0x'['0'..'9' | 'a'..'f' | 'A'..'F']*	; value in hexadecimal
    201      1.1     skrll 
    202      1.1     skrll 
    203      1.1     skrll Examples
    204      1.1     skrll ========
    205      1.1     skrll 
    206      1.1     skrll Example 1:
    207      1.1     skrll 
    208      1.1     skrll The table:
    209      1.1     skrll 
    210      1.1     skrll 	    p1 dreg d1 1	     ; data register "d1" for COP1 has value 1
    211      1.1     skrll 	    p1 creg c3 3	     ; ctrl register "c3" for COP1 has value 3
    212  1.1.1.3  christos 	    p3 func fill 0x1f:24-20	      ; function "fill" for COP3 has value 31 and
    213      1.1     skrll 	    	    	; no fields
    214      1.1     skrll 
    215      1.1     skrll will allow the assembler to accept the following coprocessor instructions:
    216      1.1     skrll 
    217      1.1     skrll 	    LWC1 d1,0x100 ($2)
    218      1.1     skrll 	    fill
    219      1.1     skrll 
    220  1.1.1.3  christos Here, the general purpose register "$2", and instruction "LWC1", are standard
    221  1.1.1.3  christos mnemonics built-in to the MIPS assembler.
    222      1.1     skrll 
    223      1.1     skrll 
    224      1.1     skrll Example 2:
    225      1.1     skrll 
    226      1.1     skrll The table:
    227      1.1     skrll 
    228      1.1     skrll 	    p3 dreg d3 3	     ; data register "d3" for COP3 has value 3
    229      1.1     skrll 	    p3 creg c2 22	     ; control register "c2" for COP3 has value 22
    230  1.1.1.3  christos 	    p3 func fee 0x1f:24-20 dreg:17-13 creg:12-8 immed:7-0
    231  1.1.1.3  christos 	    	; function "fee" for COP3 has value 31, and 3 fields
    232  1.1.1.3  christos 	    	; consisting of a data register, a control register,
    233      1.1     skrll 	    	; and an immediate value.
    234      1.1     skrll 
    235      1.1     skrll will allow the assembler to accept the following coprocessor instruction:
    236      1.1     skrll 
    237      1.1     skrll 	    fee d3,c2,0x1
    238      1.1     skrll 
    239      1.1     skrll and will emit the object code:
    240      1.1     skrll 
    241      1.1     skrll 	    31-26  25 24-20 19-18  17-13 12-8  7-0
    242      1.1     skrll 	    COPz   CO fun	    	      dreg  creg  immed
    243  1.1.1.3  christos 	    010011 1  11111 00	     00011 10110 00000001
    244      1.1     skrll 
    245      1.1     skrll 	    0x4ff07601
    246      1.1     skrll 
    247      1.1     skrll 
    248      1.1     skrll Example 3:
    249      1.1     skrll 
    250      1.1     skrll The table:
    251      1.1     skrll 
    252      1.1     skrll 	    p3 dreg d3 3	     ; data register "d3" for COP3 has value 3
    253      1.1     skrll 	    p3 creg c2 22	     ; control register "c2" for COP3 has value 22
    254      1.1     skrll 	    p3 func fuu 0x01f00001 dreg:17-13 creg:12-8
    255      1.1     skrll 
    256      1.1     skrll will allow the assembler to accept the following coprocessor
    257      1.1     skrll instruction:
    258      1.1     skrll 
    259      1.1     skrll 	    fuu d3,c2
    260      1.1     skrll 
    261      1.1     skrll and will emit the object code:
    262      1.1     skrll 
    263      1.1     skrll 	    31-26  25 24-20 19-18  17-13 12-8  7-0
    264  1.1.1.3  christos 	    COPz   CO fun	    	      dreg  creg
    265  1.1.1.3  christos 	    010011 1  11111 00	     00011 10110 00000001
    266      1.1     skrll 
    267      1.1     skrll 	    0x4ff07601
    268      1.1     skrll 
    269      1.1     skrll In this way, the programmer can force arbitrary bits of an instruction
    270      1.1     skrll to have predefined values.
    271      1.1     skrll 
    272      1.1     skrll =======================================================================
    273      1.1     skrll Additional notes:
    274      1.1     skrll 
    275      1.1     skrll Encoding of ranges:
    276      1.1     skrll To handle more than one bit position range within an instruction,
    277      1.1     skrll use 0s to mask out the ranges which don't apply.
    278  1.1.1.3  christos May decide to modify the syntax to allow commas separate multiple
    279      1.1     skrll ranges within an instruction (range','range).
    280      1.1     skrll 
    281      1.1     skrll Changes in grammar:
    282      1.1     skrll 	The number of parms argument to the function entry
    283      1.1     skrll was deleted from the original format such that we now count the fields.
    284      1.1     skrll 
    285      1.1     skrll ----
    286  1.1.1.3  christos FIXME! should really change lexical analyzer
    287      1.1     skrll to recognize 'dreg' etc. in context sensitive way.
    288      1.1     skrll Currently function names or mnemonics may be incorrectly parsed as keywords
    289      1.1     skrll 
    290      1.1     skrll FIXME! hex is ambiguous with any digit
    291      1.1     skrll 
    292      1.1     skrll */
    293      1.1     skrll 
    294      1.1     skrll #include "as.h"
    295      1.1     skrll #include "itbl-lex.h"
    296      1.1     skrll #include "itbl-ops.h"
    297      1.1     skrll 
    298      1.1     skrll /* #define DEBUG */
    299      1.1     skrll 
    300      1.1     skrll #ifdef DEBUG
    301      1.1     skrll #ifndef DBG_LVL
    302      1.1     skrll #define DBG_LVL 1
    303      1.1     skrll #endif
    304      1.1     skrll #else
    305      1.1     skrll #define DBG_LVL 0
    306      1.1     skrll #endif
    307      1.1     skrll 
    308      1.1     skrll #if DBG_LVL >= 1
    309      1.1     skrll #define DBG(x) printf x
    310      1.1     skrll #else
    311  1.1.1.3  christos #define DBG(x)
    312      1.1     skrll #endif
    313      1.1     skrll 
    314      1.1     skrll #if DBG_LVL >= 2
    315      1.1     skrll #define DBGL2(x) printf x
    316      1.1     skrll #else
    317  1.1.1.3  christos #define DBGL2(x)
    318      1.1     skrll #endif
    319      1.1     skrll 
    320      1.1     skrll static int sbit, ebit;
    321      1.1     skrll static struct itbl_entry *insn=0;
    322      1.1     skrll static int yyerror (const char *);
    323      1.1     skrll 
    324      1.1     skrll 
    325  1.1.1.3  christos #line 326 "itbl-parse.c" /* yacc.c:339  */
    326      1.1     skrll 
    327  1.1.1.3  christos # ifndef YY_NULL
    328  1.1.1.3  christos #  if defined __cplusplus && 201103L <= __cplusplus
    329  1.1.1.3  christos #   define YY_NULL nullptr
    330  1.1.1.3  christos #  else
    331  1.1.1.3  christos #   define YY_NULL 0
    332  1.1.1.3  christos #  endif
    333  1.1.1.3  christos # endif
    334      1.1     skrll 
    335      1.1     skrll /* Enabling verbose error messages.  */
    336      1.1     skrll #ifdef YYERROR_VERBOSE
    337      1.1     skrll # undef YYERROR_VERBOSE
    338      1.1     skrll # define YYERROR_VERBOSE 1
    339      1.1     skrll #else
    340      1.1     skrll # define YYERROR_VERBOSE 0
    341      1.1     skrll #endif
    342      1.1     skrll 
    343  1.1.1.3  christos /* In a future release of Bison, this section will be replaced
    344  1.1.1.3  christos    by #include "y.tab.h".  */
    345  1.1.1.3  christos #ifndef YY_YY_ITBL_PARSE_H_INCLUDED
    346  1.1.1.3  christos # define YY_YY_ITBL_PARSE_H_INCLUDED
    347  1.1.1.3  christos /* Debug traces.  */
    348  1.1.1.3  christos #ifndef YYDEBUG
    349  1.1.1.3  christos # define YYDEBUG 0
    350  1.1.1.3  christos #endif
    351  1.1.1.3  christos #if YYDEBUG
    352  1.1.1.3  christos extern int yydebug;
    353      1.1     skrll #endif
    354      1.1     skrll 
    355  1.1.1.3  christos /* Token type.  */
    356  1.1.1.3  christos #ifndef YYTOKENTYPE
    357  1.1.1.3  christos # define YYTOKENTYPE
    358  1.1.1.3  christos   enum yytokentype
    359  1.1.1.3  christos   {
    360  1.1.1.3  christos     DREG = 258,
    361  1.1.1.3  christos     CREG = 259,
    362  1.1.1.3  christos     GREG = 260,
    363  1.1.1.3  christos     IMMED = 261,
    364  1.1.1.3  christos     ADDR = 262,
    365  1.1.1.3  christos     INSN = 263,
    366  1.1.1.3  christos     NUM = 264,
    367  1.1.1.3  christos     ID = 265,
    368  1.1.1.3  christos     NL = 266,
    369  1.1.1.3  christos     PNUM = 267
    370  1.1.1.3  christos   };
    371  1.1.1.3  christos #endif
    372  1.1.1.3  christos /* Tokens.  */
    373  1.1.1.3  christos #define DREG 258
    374  1.1.1.3  christos #define CREG 259
    375  1.1.1.3  christos #define GREG 260
    376  1.1.1.3  christos #define IMMED 261
    377  1.1.1.3  christos #define ADDR 262
    378  1.1.1.3  christos #define INSN 263
    379  1.1.1.3  christos #define NUM 264
    380  1.1.1.3  christos #define ID 265
    381  1.1.1.3  christos #define NL 266
    382  1.1.1.3  christos #define PNUM 267
    383  1.1.1.3  christos 
    384  1.1.1.3  christos /* Value type.  */
    385  1.1.1.2  christos #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
    386  1.1.1.3  christos typedef union YYSTYPE YYSTYPE;
    387  1.1.1.3  christos union YYSTYPE
    388  1.1.1.2  christos {
    389  1.1.1.3  christos #line 282 "./itbl-parse.y" /* yacc.c:355  */
    390  1.1.1.3  christos 
    391      1.1     skrll     char *str;
    392      1.1     skrll     int num;
    393      1.1     skrll     int processor;
    394      1.1     skrll     unsigned long val;
    395  1.1.1.3  christos 
    396  1.1.1.3  christos 
    397  1.1.1.3  christos #line 398 "itbl-parse.c" /* yacc.c:355  */
    398  1.1.1.3  christos };
    399      1.1     skrll # define YYSTYPE_IS_TRIVIAL 1
    400  1.1.1.3  christos # define YYSTYPE_IS_DECLARED 1
    401      1.1     skrll #endif
    402      1.1     skrll 
    403      1.1     skrll 
    404  1.1.1.3  christos extern YYSTYPE yylval;
    405      1.1     skrll 
    406  1.1.1.3  christos int yyparse (void);
    407      1.1     skrll 
    408  1.1.1.3  christos #endif /* !YY_YY_ITBL_PARSE_H_INCLUDED  */
    409      1.1     skrll 
    410  1.1.1.3  christos /* Copy the second part of user declarations.  */
    411  1.1.1.3  christos 
    412  1.1.1.3  christos #line 413 "itbl-parse.c" /* yacc.c:358  */
    413      1.1     skrll 
    414  1.1.1.2  christos #ifdef short
    415  1.1.1.2  christos # undef short
    416      1.1     skrll #endif
    417  1.1.1.2  christos 
    418  1.1.1.2  christos #ifdef YYTYPE_UINT8
    419  1.1.1.2  christos typedef YYTYPE_UINT8 yytype_uint8;
    420  1.1.1.2  christos #else
    421  1.1.1.2  christos typedef unsigned char yytype_uint8;
    422      1.1     skrll #endif
    423  1.1.1.2  christos 
    424  1.1.1.2  christos #ifdef YYTYPE_INT8
    425  1.1.1.2  christos typedef YYTYPE_INT8 yytype_int8;
    426  1.1.1.2  christos #else
    427  1.1.1.3  christos typedef signed char yytype_int8;
    428  1.1.1.2  christos #endif
    429  1.1.1.2  christos 
    430  1.1.1.2  christos #ifdef YYTYPE_UINT16
    431  1.1.1.2  christos typedef YYTYPE_UINT16 yytype_uint16;
    432  1.1.1.2  christos #else
    433  1.1.1.2  christos typedef unsigned short int yytype_uint16;
    434  1.1.1.2  christos #endif
    435  1.1.1.2  christos 
    436  1.1.1.2  christos #ifdef YYTYPE_INT16
    437  1.1.1.2  christos typedef YYTYPE_INT16 yytype_int16;
    438  1.1.1.2  christos #else
    439  1.1.1.2  christos typedef short int yytype_int16;
    440      1.1     skrll #endif
    441  1.1.1.2  christos 
    442  1.1.1.2  christos #ifndef YYSIZE_T
    443  1.1.1.2  christos # ifdef __SIZE_TYPE__
    444  1.1.1.2  christos #  define YYSIZE_T __SIZE_TYPE__
    445  1.1.1.2  christos # elif defined size_t
    446  1.1.1.2  christos #  define YYSIZE_T size_t
    447  1.1.1.3  christos # elif ! defined YYSIZE_T
    448  1.1.1.2  christos #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
    449  1.1.1.2  christos #  define YYSIZE_T size_t
    450  1.1.1.2  christos # else
    451  1.1.1.2  christos #  define YYSIZE_T unsigned int
    452  1.1.1.2  christos # endif
    453      1.1     skrll #endif
    454      1.1     skrll 
    455  1.1.1.2  christos #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
    456  1.1.1.2  christos 
    457      1.1     skrll #ifndef YY_
    458  1.1.1.2  christos # if defined YYENABLE_NLS && YYENABLE_NLS
    459      1.1     skrll #  if ENABLE_NLS
    460      1.1     skrll #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
    461  1.1.1.3  christos #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
    462      1.1     skrll #  endif
    463      1.1     skrll # endif
    464      1.1     skrll # ifndef YY_
    465  1.1.1.3  christos #  define YY_(Msgid) Msgid
    466  1.1.1.3  christos # endif
    467  1.1.1.3  christos #endif
    468  1.1.1.3  christos 
    469  1.1.1.3  christos #ifndef __attribute__
    470  1.1.1.3  christos /* This feature is available in gcc versions 2.5 and later.  */
    471  1.1.1.3  christos # if (! defined __GNUC__ || __GNUC__ < 2 \
    472  1.1.1.3  christos       || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
    473  1.1.1.3  christos #  define __attribute__(Spec) /* empty */
    474      1.1     skrll # endif
    475      1.1     skrll #endif
    476      1.1     skrll 
    477  1.1.1.2  christos /* Suppress unused-variable warnings by "using" E.  */
    478  1.1.1.2  christos #if ! defined lint || defined __GNUC__
    479  1.1.1.3  christos # define YYUSE(E) ((void) (E))
    480  1.1.1.2  christos #else
    481  1.1.1.3  christos # define YYUSE(E) /* empty */
    482  1.1.1.2  christos #endif
    483  1.1.1.2  christos 
    484  1.1.1.3  christos #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
    485  1.1.1.3  christos /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
    486  1.1.1.3  christos # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
    487  1.1.1.3  christos     _Pragma ("GCC diagnostic push") \
    488  1.1.1.3  christos     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
    489  1.1.1.3  christos     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
    490  1.1.1.3  christos # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
    491  1.1.1.3  christos     _Pragma ("GCC diagnostic pop")
    492  1.1.1.2  christos #else
    493  1.1.1.3  christos # define YY_INITIAL_VALUE(Value) Value
    494  1.1.1.2  christos #endif
    495  1.1.1.3  christos #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    496  1.1.1.3  christos # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    497  1.1.1.3  christos # define YY_IGNORE_MAYBE_UNINITIALIZED_END
    498  1.1.1.3  christos #endif
    499  1.1.1.3  christos #ifndef YY_INITIAL_VALUE
    500  1.1.1.3  christos # define YY_INITIAL_VALUE(Value) /* Nothing. */
    501  1.1.1.2  christos #endif
    502  1.1.1.2  christos 
    503  1.1.1.3  christos 
    504  1.1.1.2  christos #if ! defined yyoverflow || YYERROR_VERBOSE
    505      1.1     skrll 
    506      1.1     skrll /* The parser invokes alloca or malloc; define the necessary symbols.  */
    507      1.1     skrll 
    508      1.1     skrll # ifdef YYSTACK_USE_ALLOCA
    509      1.1     skrll #  if YYSTACK_USE_ALLOCA
    510      1.1     skrll #   ifdef __GNUC__
    511      1.1     skrll #    define YYSTACK_ALLOC __builtin_alloca
    512  1.1.1.2  christos #   elif defined __BUILTIN_VA_ARG_INCR
    513  1.1.1.2  christos #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
    514  1.1.1.2  christos #   elif defined _AIX
    515  1.1.1.2  christos #    define YYSTACK_ALLOC __alloca
    516  1.1.1.2  christos #   elif defined _MSC_VER
    517  1.1.1.2  christos #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
    518  1.1.1.2  christos #    define alloca _alloca
    519      1.1     skrll #   else
    520      1.1     skrll #    define YYSTACK_ALLOC alloca
    521  1.1.1.3  christos #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
    522      1.1     skrll #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    523  1.1.1.3  christos       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
    524  1.1.1.3  christos #     ifndef EXIT_SUCCESS
    525  1.1.1.3  christos #      define EXIT_SUCCESS 0
    526  1.1.1.2  christos #     endif
    527      1.1     skrll #    endif
    528      1.1     skrll #   endif
    529      1.1     skrll #  endif
    530      1.1     skrll # endif
    531      1.1     skrll 
    532      1.1     skrll # ifdef YYSTACK_ALLOC
    533  1.1.1.3  christos    /* Pacify GCC's 'empty if-body' warning.  */
    534  1.1.1.3  christos #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
    535      1.1     skrll #  ifndef YYSTACK_ALLOC_MAXIMUM
    536      1.1     skrll     /* The OS might guarantee only one guard page at the bottom of the stack,
    537      1.1     skrll        and a page size can be as small as 4096 bytes.  So we cannot safely
    538      1.1     skrll        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
    539      1.1     skrll        to allow for a few compiler-allocated temporary stack slots.  */
    540  1.1.1.2  christos #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
    541      1.1     skrll #  endif
    542      1.1     skrll # else
    543      1.1     skrll #  define YYSTACK_ALLOC YYMALLOC
    544      1.1     skrll #  define YYSTACK_FREE YYFREE
    545      1.1     skrll #  ifndef YYSTACK_ALLOC_MAXIMUM
    546  1.1.1.2  christos #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
    547      1.1     skrll #  endif
    548  1.1.1.3  christos #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
    549  1.1.1.2  christos        && ! ((defined YYMALLOC || defined malloc) \
    550  1.1.1.3  christos              && (defined YYFREE || defined free)))
    551  1.1.1.2  christos #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    552  1.1.1.3  christos #   ifndef EXIT_SUCCESS
    553  1.1.1.3  christos #    define EXIT_SUCCESS 0
    554  1.1.1.2  christos #   endif
    555      1.1     skrll #  endif
    556      1.1     skrll #  ifndef YYMALLOC
    557      1.1     skrll #   define YYMALLOC malloc
    558  1.1.1.3  christos #   if ! defined malloc && ! defined EXIT_SUCCESS
    559      1.1     skrll void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
    560      1.1     skrll #   endif
    561      1.1     skrll #  endif
    562      1.1     skrll #  ifndef YYFREE
    563      1.1     skrll #   define YYFREE free
    564  1.1.1.3  christos #   if ! defined free && ! defined EXIT_SUCCESS
    565      1.1     skrll void free (void *); /* INFRINGES ON USER NAME SPACE */
    566      1.1     skrll #   endif
    567      1.1     skrll #  endif
    568      1.1     skrll # endif
    569  1.1.1.2  christos #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
    570      1.1     skrll 
    571      1.1     skrll 
    572  1.1.1.2  christos #if (! defined yyoverflow \
    573  1.1.1.2  christos      && (! defined __cplusplus \
    574  1.1.1.3  christos          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
    575      1.1     skrll 
    576      1.1     skrll /* A type that is properly aligned for any stack member.  */
    577      1.1     skrll union yyalloc
    578      1.1     skrll {
    579  1.1.1.3  christos   yytype_int16 yyss_alloc;
    580  1.1.1.3  christos   YYSTYPE yyvs_alloc;
    581  1.1.1.3  christos };
    582      1.1     skrll 
    583      1.1     skrll /* The size of the maximum gap between one aligned stack and the next.  */
    584      1.1     skrll # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
    585      1.1     skrll 
    586      1.1     skrll /* The size of an array large to enough to hold all stacks, each with
    587      1.1     skrll    N elements.  */
    588      1.1     skrll # define YYSTACK_BYTES(N) \
    589  1.1.1.2  christos      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
    590      1.1     skrll       + YYSTACK_GAP_MAXIMUM)
    591      1.1     skrll 
    592  1.1.1.3  christos # define YYCOPY_NEEDED 1
    593      1.1     skrll 
    594      1.1     skrll /* Relocate STACK from its old location to the new one.  The
    595      1.1     skrll    local variables YYSIZE and YYSTACKSIZE give the old and new number of
    596      1.1     skrll    elements in the stack, and YYPTR gives the new location of the
    597      1.1     skrll    stack.  Advance YYPTR to a properly aligned location for the next
    598      1.1     skrll    stack.  */
    599  1.1.1.3  christos # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    600  1.1.1.3  christos     do                                                                  \
    601  1.1.1.3  christos       {                                                                 \
    602  1.1.1.3  christos         YYSIZE_T yynewbytes;                                            \
    603  1.1.1.3  christos         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
    604  1.1.1.3  christos         Stack = &yyptr->Stack_alloc;                                    \
    605  1.1.1.3  christos         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
    606  1.1.1.3  christos         yyptr += yynewbytes / sizeof (*yyptr);                          \
    607  1.1.1.3  christos       }                                                                 \
    608  1.1.1.3  christos     while (0)
    609      1.1     skrll 
    610      1.1     skrll #endif
    611      1.1     skrll 
    612  1.1.1.3  christos #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
    613  1.1.1.3  christos /* Copy COUNT objects from SRC to DST.  The source and destination do
    614  1.1.1.3  christos    not overlap.  */
    615  1.1.1.3  christos # ifndef YYCOPY
    616  1.1.1.3  christos #  if defined __GNUC__ && 1 < __GNUC__
    617  1.1.1.3  christos #   define YYCOPY(Dst, Src, Count) \
    618  1.1.1.3  christos       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
    619  1.1.1.3  christos #  else
    620  1.1.1.3  christos #   define YYCOPY(Dst, Src, Count)              \
    621  1.1.1.3  christos       do                                        \
    622  1.1.1.3  christos         {                                       \
    623  1.1.1.3  christos           YYSIZE_T yyi;                         \
    624  1.1.1.3  christos           for (yyi = 0; yyi < (Count); yyi++)   \
    625  1.1.1.3  christos             (Dst)[yyi] = (Src)[yyi];            \
    626  1.1.1.3  christos         }                                       \
    627  1.1.1.3  christos       while (0)
    628  1.1.1.3  christos #  endif
    629  1.1.1.3  christos # endif
    630  1.1.1.3  christos #endif /* !YYCOPY_NEEDED */
    631  1.1.1.3  christos 
    632  1.1.1.2  christos /* YYFINAL -- State number of the termination state.  */
    633      1.1     skrll #define YYFINAL  9
    634      1.1     skrll /* YYLAST -- Last index in YYTABLE.  */
    635      1.1     skrll #define YYLAST   46
    636      1.1     skrll 
    637  1.1.1.2  christos /* YYNTOKENS -- Number of terminals.  */
    638      1.1     skrll #define YYNTOKENS  20
    639  1.1.1.2  christos /* YYNNTS -- Number of nonterminals.  */
    640      1.1     skrll #define YYNNTS  15
    641  1.1.1.2  christos /* YYNRULES -- Number of rules.  */
    642      1.1     skrll #define YYNRULES  29
    643  1.1.1.3  christos /* YYNSTATES -- Number of states.  */
    644      1.1     skrll #define YYNSTATES  51
    645      1.1     skrll 
    646  1.1.1.3  christos /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
    647  1.1.1.3  christos    by yylex, with out-of-bounds checking.  */
    648      1.1     skrll #define YYUNDEFTOK  2
    649      1.1     skrll #define YYMAXUTOK   267
    650      1.1     skrll 
    651  1.1.1.3  christos #define YYTRANSLATE(YYX)                                                \
    652      1.1     skrll   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
    653      1.1     skrll 
    654  1.1.1.3  christos /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
    655  1.1.1.3  christos    as returned by yylex, without out-of-bounds checking.  */
    656  1.1.1.2  christos static const yytype_uint8 yytranslate[] =
    657      1.1     skrll {
    658      1.1     skrll        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    659      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    660      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    661      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    662      1.1     skrll        2,     2,    17,     2,    13,    19,     2,     2,     2,     2,
    663      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,    18,     2,
    664      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    665      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    666      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    667      1.1     skrll        2,    15,     2,    16,     2,     2,     2,     2,     2,     2,
    668      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    669      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    670      1.1     skrll        2,     2,     2,     2,    14,     2,     2,     2,     2,     2,
    671      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    672      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    673      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    674      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    675      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    676      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    677      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    678      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    679      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    680      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    681      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    682      1.1     skrll        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    683      1.1     skrll        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
    684      1.1     skrll        5,     6,     7,     8,     9,    10,    11,    12
    685      1.1     skrll };
    686      1.1     skrll 
    687      1.1     skrll #if YYDEBUG
    688  1.1.1.3  christos   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
    689  1.1.1.2  christos static const yytype_uint16 yyrline[] =
    690      1.1     skrll {
    691      1.1     skrll        0,   299,   299,   303,   304,   308,   315,   314,   323,   324,
    692      1.1     skrll      328,   329,   330,   334,   339,   344,   352,   361,   365,   369,
    693      1.1     skrll      376,   382,   388,   395,   402,   410,   415,   420,   428,   444
    694      1.1     skrll };
    695      1.1     skrll #endif
    696      1.1     skrll 
    697  1.1.1.3  christos #if YYDEBUG || YYERROR_VERBOSE || 0
    698      1.1     skrll /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    699  1.1.1.2  christos    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
    700      1.1     skrll static const char *const yytname[] =
    701      1.1     skrll {
    702      1.1     skrll   "$end", "error", "$undefined", "DREG", "CREG", "GREG", "IMMED", "ADDR",
    703      1.1     skrll   "INSN", "NUM", "ID", "NL", "PNUM", "','", "'|'", "'['", "']'", "'*'",
    704  1.1.1.3  christos   "':'", "'-'", "$accept", "insntbl", "entrys", "entry", "$@1",
    705      1.1     skrll   "fieldspecs", "ftype", "fieldspec", "flagexpr", "flags", "range", "pnum",
    706  1.1.1.3  christos   "regtype", "name", "value", YY_NULL
    707      1.1     skrll };
    708      1.1     skrll #endif
    709      1.1     skrll 
    710      1.1     skrll # ifdef YYPRINT
    711  1.1.1.3  christos /* YYTOKNUM[NUM] -- (External) token number corresponding to the
    712  1.1.1.3  christos    (internal) symbol number NUM (which must be that of a token).  */
    713  1.1.1.2  christos static const yytype_uint16 yytoknum[] =
    714      1.1     skrll {
    715      1.1     skrll        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
    716      1.1     skrll      265,   266,   267,    44,   124,    91,    93,    42,    58,    45
    717      1.1     skrll };
    718      1.1     skrll # endif
    719      1.1     skrll 
    720  1.1.1.3  christos #define YYPACT_NINF -16
    721      1.1     skrll 
    722  1.1.1.3  christos #define yypact_value_is_default(Yystate) \
    723  1.1.1.3  christos   (!!((Yystate) == (-16)))
    724      1.1     skrll 
    725  1.1.1.3  christos #define YYTABLE_NINF -5
    726      1.1     skrll 
    727  1.1.1.3  christos #define yytable_value_is_error(Yytable_value) \
    728  1.1.1.3  christos   0
    729      1.1     skrll 
    730  1.1.1.3  christos   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    731  1.1.1.3  christos      STATE-NUM.  */
    732  1.1.1.2  christos static const yytype_int8 yypact[] =
    733      1.1     skrll {
    734      1.1     skrll        0,    -9,   -16,   -16,    10,   -16,     0,    12,   -16,   -16,
    735      1.1     skrll      -16,   -16,   -16,   -16,     3,     3,   -16,     9,     9,   -16,
    736      1.1     skrll       11,     8,    19,    15,   -16,    14,    -6,   -16,    25,    21,
    737      1.1     skrll       -6,   -16,     1,   -16,    -6,    20,   -16,   -16,    18,    26,
    738      1.1     skrll       11,     1,   -16,   -16,   -16,     1,   -16,    15,   -16,   -16,
    739      1.1     skrll      -16
    740      1.1     skrll };
    741      1.1     skrll 
    742  1.1.1.3  christos   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
    743  1.1.1.3  christos      Performed when YYTABLE does not specify something else to do.  Zero
    744  1.1.1.3  christos      means the default is an error.  */
    745  1.1.1.3  christos static const yytype_uint8 yydefact[] =
    746  1.1.1.3  christos {
    747  1.1.1.3  christos        0,     0,     8,    24,     0,     2,     0,     0,     9,     1,
    748  1.1.1.3  christos        3,    25,    26,    27,     0,     0,    28,     0,     0,    29,
    749  1.1.1.3  christos       23,     0,     0,    21,     5,     0,     0,     6,     0,    19,
    750  1.1.1.3  christos        0,    20,    12,    22,     0,     0,    15,    14,     0,     0,
    751  1.1.1.3  christos       23,    12,    13,    17,    18,    12,     7,    21,    11,    10,
    752  1.1.1.3  christos       16
    753  1.1.1.3  christos };
    754  1.1.1.3  christos 
    755  1.1.1.3  christos   /* YYPGOTO[NTERM-NUM].  */
    756  1.1.1.2  christos static const yytype_int8 yypgoto[] =
    757      1.1     skrll {
    758      1.1     skrll      -16,   -16,    32,   -16,   -16,   -15,   -16,     2,    -3,    -8,
    759      1.1     skrll        4,   -16,    34,    27,    28
    760      1.1     skrll };
    761      1.1     skrll 
    762  1.1.1.3  christos   /* YYDEFGOTO[NTERM-NUM].  */
    763  1.1.1.3  christos static const yytype_int8 yydefgoto[] =
    764  1.1.1.3  christos {
    765  1.1.1.3  christos       -1,     4,     5,     6,    32,    39,    40,    41,    31,    27,
    766  1.1.1.3  christos       23,     7,    42,    17,    20
    767  1.1.1.3  christos };
    768  1.1.1.3  christos 
    769  1.1.1.3  christos   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
    770  1.1.1.3  christos      positive, shift that token.  If negative, reduce the rule whose
    771  1.1.1.3  christos      number is the opposite.  If YYTABLE_NINF, syntax error.  */
    772  1.1.1.2  christos static const yytype_int8 yytable[] =
    773      1.1     skrll {
    774      1.1     skrll       -4,     1,     8,    29,    11,    12,    13,    36,    37,    30,
    775      1.1     skrll        9,     2,     3,    16,    38,    11,    12,    13,    19,    24,
    776      1.1     skrll       14,    11,    12,    13,    36,    37,    48,    35,    25,    22,
    777      1.1     skrll       49,    43,    26,    28,    33,    34,    44,    46,    10,    50,
    778      1.1     skrll       45,    15,    18,     0,    47,     0,    21
    779      1.1     skrll };
    780      1.1     skrll 
    781  1.1.1.2  christos static const yytype_int8 yycheck[] =
    782      1.1     skrll {
    783      1.1     skrll        0,     1,    11,     9,     3,     4,     5,     6,     7,    15,
    784      1.1     skrll        0,    11,    12,    10,    13,     3,     4,     5,     9,    11,
    785      1.1     skrll        8,     3,     4,     5,     6,     7,    41,    30,     9,    18,
    786      1.1     skrll       45,    34,    17,    19,     9,    14,    16,    11,     6,    47,
    787      1.1     skrll       38,     7,    15,    -1,    40,    -1,    18
    788      1.1     skrll };
    789      1.1     skrll 
    790  1.1.1.3  christos   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    791  1.1.1.3  christos      symbol of state STATE-NUM.  */
    792  1.1.1.2  christos static const yytype_uint8 yystos[] =
    793      1.1     skrll {
    794      1.1     skrll        0,     1,    11,    12,    21,    22,    23,    31,    11,     0,
    795      1.1     skrll       22,     3,     4,     5,     8,    32,    10,    33,    33,     9,
    796      1.1     skrll       34,    34,    18,    30,    11,     9,    17,    29,    19,     9,
    797      1.1     skrll       15,    28,    24,     9,    14,    28,     6,     7,    13,    25,
    798      1.1     skrll       26,    27,    32,    28,    16,    27,    11,    30,    25,    25,
    799      1.1     skrll       29
    800      1.1     skrll };
    801      1.1     skrll 
    802  1.1.1.3  christos   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
    803  1.1.1.3  christos static const yytype_uint8 yyr1[] =
    804  1.1.1.3  christos {
    805  1.1.1.3  christos        0,    20,    21,    22,    22,    23,    24,    23,    23,    23,
    806  1.1.1.3  christos       25,    25,    25,    26,    26,    26,    27,    28,    28,    28,
    807  1.1.1.3  christos       29,    29,    30,    30,    31,    32,    32,    32,    33,    34
    808  1.1.1.3  christos };
    809      1.1     skrll 
    810  1.1.1.3  christos   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
    811  1.1.1.3  christos static const yytype_uint8 yyr2[] =
    812  1.1.1.3  christos {
    813  1.1.1.3  christos        0,     2,     1,     2,     0,     5,     0,     9,     1,     2,
    814  1.1.1.3  christos        3,     2,     0,     1,     1,     1,     3,     3,     3,     1,
    815  1.1.1.3  christos        2,     0,     4,     0,     1,     1,     1,     1,     1,     1
    816  1.1.1.3  christos };
    817      1.1     skrll 
    818      1.1     skrll 
    819  1.1.1.3  christos #define yyerrok         (yyerrstatus = 0)
    820  1.1.1.3  christos #define yyclearin       (yychar = YYEMPTY)
    821  1.1.1.3  christos #define YYEMPTY         (-2)
    822  1.1.1.3  christos #define YYEOF           0
    823  1.1.1.3  christos 
    824  1.1.1.3  christos #define YYACCEPT        goto yyacceptlab
    825  1.1.1.3  christos #define YYABORT         goto yyabortlab
    826  1.1.1.3  christos #define YYERROR         goto yyerrorlab
    827      1.1     skrll 
    828      1.1     skrll 
    829      1.1     skrll #define YYRECOVERING()  (!!yyerrstatus)
    830      1.1     skrll 
    831  1.1.1.3  christos #define YYBACKUP(Token, Value)                                  \
    832  1.1.1.3  christos do                                                              \
    833  1.1.1.3  christos   if (yychar == YYEMPTY)                                        \
    834  1.1.1.3  christos     {                                                           \
    835  1.1.1.3  christos       yychar = (Token);                                         \
    836  1.1.1.3  christos       yylval = (Value);                                         \
    837  1.1.1.3  christos       YYPOPSTACK (yylen);                                       \
    838  1.1.1.3  christos       yystate = *yyssp;                                         \
    839  1.1.1.3  christos       goto yybackup;                                            \
    840  1.1.1.3  christos     }                                                           \
    841  1.1.1.3  christos   else                                                          \
    842  1.1.1.3  christos     {                                                           \
    843      1.1     skrll       yyerror (YY_("syntax error: cannot back up")); \
    844  1.1.1.3  christos       YYERROR;                                                  \
    845  1.1.1.3  christos     }                                                           \
    846  1.1.1.3  christos while (0)
    847  1.1.1.3  christos 
    848  1.1.1.3  christos /* Error token number */
    849  1.1.1.3  christos #define YYTERROR        1
    850  1.1.1.3  christos #define YYERRCODE       256
    851      1.1     skrll 
    852      1.1     skrll 
    853      1.1     skrll 
    854      1.1     skrll /* Enable debugging if requested.  */
    855      1.1     skrll #if YYDEBUG
    856      1.1     skrll 
    857      1.1     skrll # ifndef YYFPRINTF
    858      1.1     skrll #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
    859      1.1     skrll #  define YYFPRINTF fprintf
    860      1.1     skrll # endif
    861      1.1     skrll 
    862  1.1.1.3  christos # define YYDPRINTF(Args)                        \
    863  1.1.1.3  christos do {                                            \
    864  1.1.1.3  christos   if (yydebug)                                  \
    865  1.1.1.3  christos     YYFPRINTF Args;                             \
    866  1.1.1.3  christos } while (0)
    867  1.1.1.2  christos 
    868  1.1.1.3  christos /* This macro is provided for backward compatibility. */
    869  1.1.1.3  christos #ifndef YY_LOCATION_PRINT
    870  1.1.1.3  christos # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
    871  1.1.1.3  christos #endif
    872  1.1.1.2  christos 
    873  1.1.1.2  christos 
    874  1.1.1.3  christos # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
    875  1.1.1.3  christos do {                                                                      \
    876  1.1.1.3  christos   if (yydebug)                                                            \
    877  1.1.1.3  christos     {                                                                     \
    878  1.1.1.3  christos       YYFPRINTF (stderr, "%s ", Title);                                   \
    879  1.1.1.3  christos       yy_symbol_print (stderr,                                            \
    880  1.1.1.3  christos                   Type, Value); \
    881  1.1.1.3  christos       YYFPRINTF (stderr, "\n");                                           \
    882  1.1.1.3  christos     }                                                                     \
    883  1.1.1.3  christos } while (0)
    884  1.1.1.3  christos 
    885  1.1.1.3  christos 
    886  1.1.1.3  christos /*----------------------------------------.
    887  1.1.1.3  christos | Print this symbol's value on YYOUTPUT.  |
    888  1.1.1.3  christos `----------------------------------------*/
    889  1.1.1.3  christos 
    890  1.1.1.2  christos static void
    891  1.1.1.2  christos yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
    892  1.1.1.2  christos {
    893  1.1.1.3  christos   FILE *yyo = yyoutput;
    894  1.1.1.3  christos   YYUSE (yyo);
    895  1.1.1.2  christos   if (!yyvaluep)
    896  1.1.1.2  christos     return;
    897  1.1.1.2  christos # ifdef YYPRINT
    898  1.1.1.2  christos   if (yytype < YYNTOKENS)
    899  1.1.1.2  christos     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
    900  1.1.1.2  christos # endif
    901  1.1.1.3  christos   YYUSE (yytype);
    902  1.1.1.2  christos }
    903  1.1.1.2  christos 
    904  1.1.1.2  christos 
    905  1.1.1.2  christos /*--------------------------------.
    906  1.1.1.2  christos | Print this symbol on YYOUTPUT.  |
    907  1.1.1.2  christos `--------------------------------*/
    908  1.1.1.2  christos 
    909  1.1.1.2  christos static void
    910  1.1.1.2  christos yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
    911  1.1.1.2  christos {
    912  1.1.1.3  christos   YYFPRINTF (yyoutput, "%s %s (",
    913  1.1.1.3  christos              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
    914  1.1.1.2  christos 
    915  1.1.1.2  christos   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
    916  1.1.1.2  christos   YYFPRINTF (yyoutput, ")");
    917  1.1.1.2  christos }
    918      1.1     skrll 
    919      1.1     skrll /*------------------------------------------------------------------.
    920      1.1     skrll | yy_stack_print -- Print the state stack from its BOTTOM up to its |
    921      1.1     skrll | TOP (included).                                                   |
    922      1.1     skrll `------------------------------------------------------------------*/
    923      1.1     skrll 
    924      1.1     skrll static void
    925  1.1.1.3  christos yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
    926      1.1     skrll {
    927      1.1     skrll   YYFPRINTF (stderr, "Stack now");
    928  1.1.1.3  christos   for (; yybottom <= yytop; yybottom++)
    929  1.1.1.3  christos     {
    930  1.1.1.3  christos       int yybot = *yybottom;
    931  1.1.1.3  christos       YYFPRINTF (stderr, " %d", yybot);
    932  1.1.1.3  christos     }
    933      1.1     skrll   YYFPRINTF (stderr, "\n");
    934      1.1     skrll }
    935      1.1     skrll 
    936  1.1.1.3  christos # define YY_STACK_PRINT(Bottom, Top)                            \
    937  1.1.1.3  christos do {                                                            \
    938  1.1.1.3  christos   if (yydebug)                                                  \
    939  1.1.1.3  christos     yy_stack_print ((Bottom), (Top));                           \
    940  1.1.1.3  christos } while (0)
    941      1.1     skrll 
    942      1.1     skrll 
    943      1.1     skrll /*------------------------------------------------.
    944      1.1     skrll | Report that the YYRULE is going to be reduced.  |
    945      1.1     skrll `------------------------------------------------*/
    946      1.1     skrll 
    947      1.1     skrll static void
    948  1.1.1.3  christos yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
    949      1.1     skrll {
    950  1.1.1.3  christos   unsigned long int yylno = yyrline[yyrule];
    951  1.1.1.2  christos   int yynrhs = yyr2[yyrule];
    952      1.1     skrll   int yyi;
    953  1.1.1.2  christos   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
    954  1.1.1.3  christos              yyrule - 1, yylno);
    955  1.1.1.2  christos   /* The symbols being reduced.  */
    956  1.1.1.2  christos   for (yyi = 0; yyi < yynrhs; yyi++)
    957  1.1.1.2  christos     {
    958  1.1.1.3  christos       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
    959  1.1.1.3  christos       yy_symbol_print (stderr,
    960  1.1.1.3  christos                        yystos[yyssp[yyi + 1 - yynrhs]],
    961  1.1.1.3  christos                        &(yyvsp[(yyi + 1) - (yynrhs)])
    962  1.1.1.3  christos                                               );
    963  1.1.1.3  christos       YYFPRINTF (stderr, "\n");
    964  1.1.1.2  christos     }
    965      1.1     skrll }
    966      1.1     skrll 
    967  1.1.1.3  christos # define YY_REDUCE_PRINT(Rule)          \
    968  1.1.1.3  christos do {                                    \
    969  1.1.1.3  christos   if (yydebug)                          \
    970  1.1.1.3  christos     yy_reduce_print (yyssp, yyvsp, Rule); \
    971  1.1.1.3  christos } while (0)
    972      1.1     skrll 
    973      1.1     skrll /* Nonzero means print parse trace.  It is left uninitialized so that
    974      1.1     skrll    multiple parsers can coexist.  */
    975      1.1     skrll int yydebug;
    976      1.1     skrll #else /* !YYDEBUG */
    977      1.1     skrll # define YYDPRINTF(Args)
    978      1.1     skrll # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
    979      1.1     skrll # define YY_STACK_PRINT(Bottom, Top)
    980      1.1     skrll # define YY_REDUCE_PRINT(Rule)
    981      1.1     skrll #endif /* !YYDEBUG */
    982      1.1     skrll 
    983      1.1     skrll 
    984      1.1     skrll /* YYINITDEPTH -- initial size of the parser's stacks.  */
    985  1.1.1.3  christos #ifndef YYINITDEPTH
    986      1.1     skrll # define YYINITDEPTH 200
    987      1.1     skrll #endif
    988      1.1     skrll 
    989      1.1     skrll /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
    990      1.1     skrll    if the built-in stack extension method is used).
    991      1.1     skrll 
    992      1.1     skrll    Do not make this value too large; the results are undefined if
    993      1.1     skrll    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
    994      1.1     skrll    evaluated with infinite-precision integer arithmetic.  */
    995      1.1     skrll 
    996      1.1     skrll #ifndef YYMAXDEPTH
    997      1.1     skrll # define YYMAXDEPTH 10000
    998      1.1     skrll #endif
    999      1.1     skrll 
   1000      1.1     skrll 
   1001      1.1     skrll #if YYERROR_VERBOSE
   1002      1.1     skrll 
   1003      1.1     skrll # ifndef yystrlen
   1004  1.1.1.2  christos #  if defined __GLIBC__ && defined _STRING_H
   1005      1.1     skrll #   define yystrlen strlen
   1006      1.1     skrll #  else
   1007      1.1     skrll /* Return the length of YYSTR.  */
   1008      1.1     skrll static YYSIZE_T
   1009      1.1     skrll yystrlen (const char *yystr)
   1010      1.1     skrll {
   1011  1.1.1.2  christos   YYSIZE_T yylen;
   1012  1.1.1.2  christos   for (yylen = 0; yystr[yylen]; yylen++)
   1013      1.1     skrll     continue;
   1014  1.1.1.2  christos   return yylen;
   1015      1.1     skrll }
   1016      1.1     skrll #  endif
   1017      1.1     skrll # endif
   1018      1.1     skrll 
   1019      1.1     skrll # ifndef yystpcpy
   1020  1.1.1.2  christos #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
   1021      1.1     skrll #   define yystpcpy stpcpy
   1022      1.1     skrll #  else
   1023      1.1     skrll /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   1024      1.1     skrll    YYDEST.  */
   1025      1.1     skrll static char *
   1026      1.1     skrll yystpcpy (char *yydest, const char *yysrc)
   1027      1.1     skrll {
   1028      1.1     skrll   char *yyd = yydest;
   1029      1.1     skrll   const char *yys = yysrc;
   1030      1.1     skrll 
   1031      1.1     skrll   while ((*yyd++ = *yys++) != '\0')
   1032      1.1     skrll     continue;
   1033      1.1     skrll 
   1034      1.1     skrll   return yyd - 1;
   1035      1.1     skrll }
   1036      1.1     skrll #  endif
   1037      1.1     skrll # endif
   1038      1.1     skrll 
   1039      1.1     skrll # ifndef yytnamerr
   1040      1.1     skrll /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
   1041      1.1     skrll    quotes and backslashes, so that it's suitable for yyerror.  The
   1042      1.1     skrll    heuristic is that double-quoting is unnecessary unless the string
   1043      1.1     skrll    contains an apostrophe, a comma, or backslash (other than
   1044      1.1     skrll    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
   1045      1.1     skrll    null, do not copy; instead, return the length of what the result
   1046      1.1     skrll    would have been.  */
   1047      1.1     skrll static YYSIZE_T
   1048      1.1     skrll yytnamerr (char *yyres, const char *yystr)
   1049      1.1     skrll {
   1050      1.1     skrll   if (*yystr == '"')
   1051      1.1     skrll     {
   1052  1.1.1.2  christos       YYSIZE_T yyn = 0;
   1053      1.1     skrll       char const *yyp = yystr;
   1054      1.1     skrll 
   1055      1.1     skrll       for (;;)
   1056  1.1.1.3  christos         switch (*++yyp)
   1057  1.1.1.3  christos           {
   1058  1.1.1.3  christos           case '\'':
   1059  1.1.1.3  christos           case ',':
   1060  1.1.1.3  christos             goto do_not_strip_quotes;
   1061  1.1.1.3  christos 
   1062  1.1.1.3  christos           case '\\':
   1063  1.1.1.3  christos             if (*++yyp != '\\')
   1064  1.1.1.3  christos               goto do_not_strip_quotes;
   1065  1.1.1.3  christos             /* Fall through.  */
   1066  1.1.1.3  christos           default:
   1067  1.1.1.3  christos             if (yyres)
   1068  1.1.1.3  christos               yyres[yyn] = *yyp;
   1069  1.1.1.3  christos             yyn++;
   1070  1.1.1.3  christos             break;
   1071  1.1.1.3  christos 
   1072  1.1.1.3  christos           case '"':
   1073  1.1.1.3  christos             if (yyres)
   1074  1.1.1.3  christos               yyres[yyn] = '\0';
   1075  1.1.1.3  christos             return yyn;
   1076  1.1.1.3  christos           }
   1077      1.1     skrll     do_not_strip_quotes: ;
   1078      1.1     skrll     }
   1079      1.1     skrll 
   1080      1.1     skrll   if (! yyres)
   1081      1.1     skrll     return yystrlen (yystr);
   1082      1.1     skrll 
   1083      1.1     skrll   return yystpcpy (yyres, yystr) - yyres;
   1084      1.1     skrll }
   1085      1.1     skrll # endif
   1086      1.1     skrll 
   1087  1.1.1.3  christos /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
   1088  1.1.1.3  christos    about the unexpected token YYTOKEN for the state stack whose top is
   1089  1.1.1.3  christos    YYSSP.
   1090  1.1.1.3  christos 
   1091  1.1.1.3  christos    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
   1092  1.1.1.3  christos    not large enough to hold the message.  In that case, also set
   1093  1.1.1.3  christos    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
   1094  1.1.1.3  christos    required number of bytes is too large to store.  */
   1095  1.1.1.3  christos static int
   1096  1.1.1.3  christos yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
   1097  1.1.1.3  christos                 yytype_int16 *yyssp, int yytoken)
   1098  1.1.1.2  christos {
   1099  1.1.1.3  christos   YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
   1100  1.1.1.3  christos   YYSIZE_T yysize = yysize0;
   1101  1.1.1.3  christos   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
   1102  1.1.1.3  christos   /* Internationalized format string. */
   1103  1.1.1.3  christos   const char *yyformat = YY_NULL;
   1104  1.1.1.3  christos   /* Arguments of yyformat. */
   1105  1.1.1.3  christos   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
   1106  1.1.1.3  christos   /* Number of reported tokens (one for the "unexpected", one per
   1107  1.1.1.3  christos      "expected"). */
   1108  1.1.1.3  christos   int yycount = 0;
   1109  1.1.1.3  christos 
   1110  1.1.1.3  christos   /* There are many possibilities here to consider:
   1111  1.1.1.3  christos      - If this state is a consistent state with a default action, then
   1112  1.1.1.3  christos        the only way this function was invoked is if the default action
   1113  1.1.1.3  christos        is an error action.  In that case, don't check for expected
   1114  1.1.1.3  christos        tokens because there are none.
   1115  1.1.1.3  christos      - The only way there can be no lookahead present (in yychar) is if
   1116  1.1.1.3  christos        this state is a consistent state with a default action.  Thus,
   1117  1.1.1.3  christos        detecting the absence of a lookahead is sufficient to determine
   1118  1.1.1.3  christos        that there is no unexpected or expected token to report.  In that
   1119  1.1.1.3  christos        case, just report a simple "syntax error".
   1120  1.1.1.3  christos      - Don't assume there isn't a lookahead just because this state is a
   1121  1.1.1.3  christos        consistent state with a default action.  There might have been a
   1122  1.1.1.3  christos        previous inconsistent state, consistent state with a non-default
   1123  1.1.1.3  christos        action, or user semantic action that manipulated yychar.
   1124  1.1.1.3  christos      - Of course, the expected token list depends on states to have
   1125  1.1.1.3  christos        correct lookahead information, and it depends on the parser not
   1126  1.1.1.3  christos        to perform extra reductions after fetching a lookahead from the
   1127  1.1.1.3  christos        scanner and before detecting a syntax error.  Thus, state merging
   1128  1.1.1.3  christos        (from LALR or IELR) and default reductions corrupt the expected
   1129  1.1.1.3  christos        token list.  However, the list is correct for canonical LR with
   1130  1.1.1.3  christos        one exception: it will still contain any token that will not be
   1131  1.1.1.3  christos        accepted due to an error action in a later state.
   1132  1.1.1.3  christos   */
   1133  1.1.1.3  christos   if (yytoken != YYEMPTY)
   1134  1.1.1.3  christos     {
   1135  1.1.1.3  christos       int yyn = yypact[*yyssp];
   1136  1.1.1.3  christos       yyarg[yycount++] = yytname[yytoken];
   1137  1.1.1.3  christos       if (!yypact_value_is_default (yyn))
   1138  1.1.1.3  christos         {
   1139  1.1.1.3  christos           /* Start YYX at -YYN if negative to avoid negative indexes in
   1140  1.1.1.3  christos              YYCHECK.  In other words, skip the first -YYN actions for
   1141  1.1.1.3  christos              this state because they are default actions.  */
   1142  1.1.1.3  christos           int yyxbegin = yyn < 0 ? -yyn : 0;
   1143  1.1.1.3  christos           /* Stay within bounds of both yycheck and yytname.  */
   1144  1.1.1.3  christos           int yychecklim = YYLAST - yyn + 1;
   1145  1.1.1.3  christos           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
   1146  1.1.1.3  christos           int yyx;
   1147  1.1.1.3  christos 
   1148  1.1.1.3  christos           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
   1149  1.1.1.3  christos             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
   1150  1.1.1.3  christos                 && !yytable_value_is_error (yytable[yyx + yyn]))
   1151  1.1.1.3  christos               {
   1152  1.1.1.3  christos                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
   1153  1.1.1.3  christos                   {
   1154  1.1.1.3  christos                     yycount = 1;
   1155  1.1.1.3  christos                     yysize = yysize0;
   1156  1.1.1.3  christos                     break;
   1157  1.1.1.3  christos                   }
   1158  1.1.1.3  christos                 yyarg[yycount++] = yytname[yyx];
   1159  1.1.1.3  christos                 {
   1160  1.1.1.3  christos                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
   1161  1.1.1.3  christos                   if (! (yysize <= yysize1
   1162  1.1.1.3  christos                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
   1163  1.1.1.3  christos                     return 2;
   1164  1.1.1.3  christos                   yysize = yysize1;
   1165  1.1.1.3  christos                 }
   1166  1.1.1.3  christos               }
   1167  1.1.1.3  christos         }
   1168  1.1.1.3  christos     }
   1169      1.1     skrll 
   1170  1.1.1.3  christos   switch (yycount)
   1171  1.1.1.2  christos     {
   1172  1.1.1.3  christos # define YYCASE_(N, S)                      \
   1173  1.1.1.3  christos       case N:                               \
   1174  1.1.1.3  christos         yyformat = S;                       \
   1175  1.1.1.3  christos       break
   1176  1.1.1.3  christos       YYCASE_(0, YY_("syntax error"));
   1177  1.1.1.3  christos       YYCASE_(1, YY_("syntax error, unexpected %s"));
   1178  1.1.1.3  christos       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
   1179  1.1.1.3  christos       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
   1180  1.1.1.3  christos       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
   1181  1.1.1.3  christos       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
   1182  1.1.1.3  christos # undef YYCASE_
   1183  1.1.1.3  christos     }
   1184  1.1.1.3  christos 
   1185  1.1.1.3  christos   {
   1186  1.1.1.3  christos     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
   1187  1.1.1.3  christos     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
   1188  1.1.1.3  christos       return 2;
   1189  1.1.1.3  christos     yysize = yysize1;
   1190  1.1.1.3  christos   }
   1191      1.1     skrll 
   1192  1.1.1.3  christos   if (*yymsg_alloc < yysize)
   1193  1.1.1.3  christos     {
   1194  1.1.1.3  christos       *yymsg_alloc = 2 * yysize;
   1195  1.1.1.3  christos       if (! (yysize <= *yymsg_alloc
   1196  1.1.1.3  christos              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
   1197  1.1.1.3  christos         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
   1198  1.1.1.3  christos       return 1;
   1199      1.1     skrll     }
   1200  1.1.1.3  christos 
   1201  1.1.1.3  christos   /* Avoid sprintf, as that infringes on the user's name space.
   1202  1.1.1.3  christos      Don't have undefined behavior even if the translation
   1203  1.1.1.3  christos      produced a string with the wrong number of "%s"s.  */
   1204  1.1.1.3  christos   {
   1205  1.1.1.3  christos     char *yyp = *yymsg;
   1206  1.1.1.3  christos     int yyi = 0;
   1207  1.1.1.3  christos     while ((*yyp = *yyformat) != '\0')
   1208  1.1.1.3  christos       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
   1209  1.1.1.3  christos         {
   1210  1.1.1.3  christos           yyp += yytnamerr (yyp, yyarg[yyi++]);
   1211  1.1.1.3  christos           yyformat += 2;
   1212  1.1.1.3  christos         }
   1213  1.1.1.3  christos       else
   1214  1.1.1.3  christos         {
   1215  1.1.1.3  christos           yyp++;
   1216  1.1.1.3  christos           yyformat++;
   1217  1.1.1.3  christos         }
   1218  1.1.1.3  christos   }
   1219  1.1.1.3  christos   return 0;
   1220      1.1     skrll }
   1221  1.1.1.2  christos #endif /* YYERROR_VERBOSE */
   1222      1.1     skrll 
   1223      1.1     skrll /*-----------------------------------------------.
   1224      1.1     skrll | Release the memory associated to this symbol.  |
   1225      1.1     skrll `-----------------------------------------------*/
   1226      1.1     skrll 
   1227      1.1     skrll static void
   1228      1.1     skrll yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
   1229      1.1     skrll {
   1230  1.1.1.2  christos   YYUSE (yyvaluep);
   1231      1.1     skrll   if (!yymsg)
   1232      1.1     skrll     yymsg = "Deleting";
   1233      1.1     skrll   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
   1234      1.1     skrll 
   1235  1.1.1.3  christos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1236  1.1.1.3  christos   YYUSE (yytype);
   1237  1.1.1.3  christos   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1238      1.1     skrll }
   1239      1.1     skrll 
   1240      1.1     skrll 
   1241      1.1     skrll 
   1242      1.1     skrll 
   1243  1.1.1.3  christos /* The lookahead symbol.  */
   1244      1.1     skrll int yychar;
   1245      1.1     skrll 
   1246  1.1.1.3  christos /* The semantic value of the lookahead symbol.  */
   1247      1.1     skrll YYSTYPE yylval;
   1248      1.1     skrll /* Number of syntax errors so far.  */
   1249      1.1     skrll int yynerrs;
   1250      1.1     skrll 
   1251      1.1     skrll 
   1252      1.1     skrll /*----------.
   1253      1.1     skrll | yyparse.  |
   1254      1.1     skrll `----------*/
   1255      1.1     skrll 
   1256      1.1     skrll int
   1257      1.1     skrll yyparse (void)
   1258      1.1     skrll {
   1259  1.1.1.3  christos     int yystate;
   1260  1.1.1.3  christos     /* Number of tokens to shift before error messages enabled.  */
   1261  1.1.1.3  christos     int yyerrstatus;
   1262  1.1.1.3  christos 
   1263  1.1.1.3  christos     /* The stacks and their tools:
   1264  1.1.1.3  christos        'yyss': related to states.
   1265  1.1.1.3  christos        'yyvs': related to semantic values.
   1266  1.1.1.3  christos 
   1267  1.1.1.3  christos        Refer to the stacks through separate pointers, to allow yyoverflow
   1268  1.1.1.3  christos        to reallocate them elsewhere.  */
   1269  1.1.1.3  christos 
   1270  1.1.1.3  christos     /* The state stack.  */
   1271  1.1.1.3  christos     yytype_int16 yyssa[YYINITDEPTH];
   1272  1.1.1.3  christos     yytype_int16 *yyss;
   1273  1.1.1.3  christos     yytype_int16 *yyssp;
   1274  1.1.1.3  christos 
   1275  1.1.1.3  christos     /* The semantic value stack.  */
   1276  1.1.1.3  christos     YYSTYPE yyvsa[YYINITDEPTH];
   1277  1.1.1.3  christos     YYSTYPE *yyvs;
   1278  1.1.1.3  christos     YYSTYPE *yyvsp;
   1279  1.1.1.3  christos 
   1280  1.1.1.3  christos     YYSIZE_T yystacksize;
   1281  1.1.1.3  christos 
   1282      1.1     skrll   int yyn;
   1283      1.1     skrll   int yyresult;
   1284  1.1.1.3  christos   /* Lookahead token as an internal (translated) token number.  */
   1285      1.1     skrll   int yytoken = 0;
   1286  1.1.1.3  christos   /* The variables used to return semantic value and location from the
   1287  1.1.1.3  christos      action routines.  */
   1288  1.1.1.3  christos   YYSTYPE yyval;
   1289  1.1.1.3  christos 
   1290  1.1.1.2  christos #if YYERROR_VERBOSE
   1291  1.1.1.2  christos   /* Buffer for error messages, and its allocated size.  */
   1292  1.1.1.2  christos   char yymsgbuf[128];
   1293  1.1.1.2  christos   char *yymsg = yymsgbuf;
   1294  1.1.1.2  christos   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
   1295  1.1.1.2  christos #endif
   1296      1.1     skrll 
   1297  1.1.1.2  christos #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
   1298      1.1     skrll 
   1299  1.1.1.2  christos   /* The number of symbols on the RHS of the reduced rule.
   1300  1.1.1.2  christos      Keep to zero when no symbol should be popped.  */
   1301  1.1.1.2  christos   int yylen = 0;
   1302      1.1     skrll 
   1303  1.1.1.3  christos   yyssp = yyss = yyssa;
   1304  1.1.1.3  christos   yyvsp = yyvs = yyvsa;
   1305  1.1.1.3  christos   yystacksize = YYINITDEPTH;
   1306  1.1.1.3  christos 
   1307      1.1     skrll   YYDPRINTF ((stderr, "Starting parse\n"));
   1308      1.1     skrll 
   1309      1.1     skrll   yystate = 0;
   1310      1.1     skrll   yyerrstatus = 0;
   1311      1.1     skrll   yynerrs = 0;
   1312  1.1.1.3  christos   yychar = YYEMPTY; /* Cause a token to be read.  */
   1313      1.1     skrll   goto yysetstate;
   1314      1.1     skrll 
   1315      1.1     skrll /*------------------------------------------------------------.
   1316      1.1     skrll | yynewstate -- Push a new state, which is found in yystate.  |
   1317      1.1     skrll `------------------------------------------------------------*/
   1318      1.1     skrll  yynewstate:
   1319      1.1     skrll   /* In all cases, when you get here, the value and location stacks
   1320  1.1.1.2  christos      have just been pushed.  So pushing a state here evens the stacks.  */
   1321      1.1     skrll   yyssp++;
   1322      1.1     skrll 
   1323      1.1     skrll  yysetstate:
   1324      1.1     skrll   *yyssp = yystate;
   1325      1.1     skrll 
   1326      1.1     skrll   if (yyss + yystacksize - 1 <= yyssp)
   1327      1.1     skrll     {
   1328      1.1     skrll       /* Get the current used size of the three stacks, in elements.  */
   1329      1.1     skrll       YYSIZE_T yysize = yyssp - yyss + 1;
   1330      1.1     skrll 
   1331      1.1     skrll #ifdef yyoverflow
   1332      1.1     skrll       {
   1333  1.1.1.3  christos         /* Give user a chance to reallocate the stack.  Use copies of
   1334  1.1.1.3  christos            these so that the &'s don't force the real ones into
   1335  1.1.1.3  christos            memory.  */
   1336  1.1.1.3  christos         YYSTYPE *yyvs1 = yyvs;
   1337  1.1.1.3  christos         yytype_int16 *yyss1 = yyss;
   1338  1.1.1.3  christos 
   1339  1.1.1.3  christos         /* Each stack pointer address is followed by the size of the
   1340  1.1.1.3  christos            data in use in that stack, in bytes.  This used to be a
   1341  1.1.1.3  christos            conditional around just the two extra args, but that might
   1342  1.1.1.3  christos            be undefined if yyoverflow is a macro.  */
   1343  1.1.1.3  christos         yyoverflow (YY_("memory exhausted"),
   1344  1.1.1.3  christos                     &yyss1, yysize * sizeof (*yyssp),
   1345  1.1.1.3  christos                     &yyvs1, yysize * sizeof (*yyvsp),
   1346  1.1.1.3  christos                     &yystacksize);
   1347      1.1     skrll 
   1348  1.1.1.3  christos         yyss = yyss1;
   1349  1.1.1.3  christos         yyvs = yyvs1;
   1350      1.1     skrll       }
   1351      1.1     skrll #else /* no yyoverflow */
   1352      1.1     skrll # ifndef YYSTACK_RELOCATE
   1353      1.1     skrll       goto yyexhaustedlab;
   1354      1.1     skrll # else
   1355      1.1     skrll       /* Extend the stack our own way.  */
   1356      1.1     skrll       if (YYMAXDEPTH <= yystacksize)
   1357  1.1.1.3  christos         goto yyexhaustedlab;
   1358      1.1     skrll       yystacksize *= 2;
   1359      1.1     skrll       if (YYMAXDEPTH < yystacksize)
   1360  1.1.1.3  christos         yystacksize = YYMAXDEPTH;
   1361      1.1     skrll 
   1362      1.1     skrll       {
   1363  1.1.1.3  christos         yytype_int16 *yyss1 = yyss;
   1364  1.1.1.3  christos         union yyalloc *yyptr =
   1365  1.1.1.3  christos           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
   1366  1.1.1.3  christos         if (! yyptr)
   1367  1.1.1.3  christos           goto yyexhaustedlab;
   1368  1.1.1.3  christos         YYSTACK_RELOCATE (yyss_alloc, yyss);
   1369  1.1.1.3  christos         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
   1370      1.1     skrll #  undef YYSTACK_RELOCATE
   1371  1.1.1.3  christos         if (yyss1 != yyssa)
   1372  1.1.1.3  christos           YYSTACK_FREE (yyss1);
   1373      1.1     skrll       }
   1374      1.1     skrll # endif
   1375      1.1     skrll #endif /* no yyoverflow */
   1376      1.1     skrll 
   1377      1.1     skrll       yyssp = yyss + yysize - 1;
   1378      1.1     skrll       yyvsp = yyvs + yysize - 1;
   1379      1.1     skrll 
   1380      1.1     skrll       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
   1381  1.1.1.3  christos                   (unsigned long int) yystacksize));
   1382      1.1     skrll 
   1383      1.1     skrll       if (yyss + yystacksize - 1 <= yyssp)
   1384  1.1.1.3  christos         YYABORT;
   1385      1.1     skrll     }
   1386      1.1     skrll 
   1387      1.1     skrll   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
   1388      1.1     skrll 
   1389  1.1.1.3  christos   if (yystate == YYFINAL)
   1390  1.1.1.3  christos     YYACCEPT;
   1391  1.1.1.3  christos 
   1392      1.1     skrll   goto yybackup;
   1393      1.1     skrll 
   1394      1.1     skrll /*-----------.
   1395      1.1     skrll | yybackup.  |
   1396      1.1     skrll `-----------*/
   1397      1.1     skrll yybackup:
   1398      1.1     skrll 
   1399  1.1.1.2  christos   /* Do appropriate processing given the current state.  Read a
   1400  1.1.1.3  christos      lookahead token if we need one and don't already have one.  */
   1401      1.1     skrll 
   1402  1.1.1.3  christos   /* First try to decide what to do without reference to lookahead token.  */
   1403      1.1     skrll   yyn = yypact[yystate];
   1404  1.1.1.3  christos   if (yypact_value_is_default (yyn))
   1405      1.1     skrll     goto yydefault;
   1406      1.1     skrll 
   1407  1.1.1.3  christos   /* Not known => get a lookahead token if don't already have one.  */
   1408      1.1     skrll 
   1409  1.1.1.3  christos   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   1410      1.1     skrll   if (yychar == YYEMPTY)
   1411      1.1     skrll     {
   1412      1.1     skrll       YYDPRINTF ((stderr, "Reading a token: "));
   1413  1.1.1.3  christos       yychar = yylex ();
   1414      1.1     skrll     }
   1415      1.1     skrll 
   1416      1.1     skrll   if (yychar <= YYEOF)
   1417      1.1     skrll     {
   1418      1.1     skrll       yychar = yytoken = YYEOF;
   1419      1.1     skrll       YYDPRINTF ((stderr, "Now at end of input.\n"));
   1420      1.1     skrll     }
   1421      1.1     skrll   else
   1422      1.1     skrll     {
   1423      1.1     skrll       yytoken = YYTRANSLATE (yychar);
   1424      1.1     skrll       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
   1425      1.1     skrll     }
   1426      1.1     skrll 
   1427      1.1     skrll   /* If the proper action on seeing token YYTOKEN is to reduce or to
   1428      1.1     skrll      detect an error, take that action.  */
   1429      1.1     skrll   yyn += yytoken;
   1430      1.1     skrll   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
   1431      1.1     skrll     goto yydefault;
   1432      1.1     skrll   yyn = yytable[yyn];
   1433      1.1     skrll   if (yyn <= 0)
   1434      1.1     skrll     {
   1435  1.1.1.3  christos       if (yytable_value_is_error (yyn))
   1436  1.1.1.3  christos         goto yyerrlab;
   1437      1.1     skrll       yyn = -yyn;
   1438      1.1     skrll       goto yyreduce;
   1439      1.1     skrll     }
   1440      1.1     skrll 
   1441  1.1.1.2  christos   /* Count tokens shifted since error; after three, turn off error
   1442  1.1.1.2  christos      status.  */
   1443  1.1.1.2  christos   if (yyerrstatus)
   1444  1.1.1.2  christos     yyerrstatus--;
   1445  1.1.1.2  christos 
   1446  1.1.1.3  christos   /* Shift the lookahead token.  */
   1447      1.1     skrll   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
   1448      1.1     skrll 
   1449  1.1.1.3  christos   /* Discard the shifted token.  */
   1450  1.1.1.3  christos   yychar = YYEMPTY;
   1451      1.1     skrll 
   1452  1.1.1.2  christos   yystate = yyn;
   1453  1.1.1.3  christos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1454      1.1     skrll   *++yyvsp = yylval;
   1455  1.1.1.3  christos   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1456      1.1     skrll 
   1457      1.1     skrll   goto yynewstate;
   1458      1.1     skrll 
   1459      1.1     skrll 
   1460      1.1     skrll /*-----------------------------------------------------------.
   1461      1.1     skrll | yydefault -- do the default action for the current state.  |
   1462      1.1     skrll `-----------------------------------------------------------*/
   1463      1.1     skrll yydefault:
   1464      1.1     skrll   yyn = yydefact[yystate];
   1465      1.1     skrll   if (yyn == 0)
   1466      1.1     skrll     goto yyerrlab;
   1467      1.1     skrll   goto yyreduce;
   1468      1.1     skrll 
   1469      1.1     skrll 
   1470      1.1     skrll /*-----------------------------.
   1471      1.1     skrll | yyreduce -- Do a reduction.  |
   1472      1.1     skrll `-----------------------------*/
   1473      1.1     skrll yyreduce:
   1474      1.1     skrll   /* yyn is the number of a rule to reduce with.  */
   1475      1.1     skrll   yylen = yyr2[yyn];
   1476      1.1     skrll 
   1477      1.1     skrll   /* If YYLEN is nonzero, implement the default value of the action:
   1478  1.1.1.3  christos      '$$ = $1'.
   1479      1.1     skrll 
   1480      1.1     skrll      Otherwise, the following line sets YYVAL to garbage.
   1481      1.1     skrll      This behavior is undocumented and Bison
   1482      1.1     skrll      users should not rely upon it.  Assigning to YYVAL
   1483      1.1     skrll      unconditionally makes the parser a bit smaller, and it avoids a
   1484      1.1     skrll      GCC warning that YYVAL may be used uninitialized.  */
   1485      1.1     skrll   yyval = yyvsp[1-yylen];
   1486      1.1     skrll 
   1487      1.1     skrll 
   1488      1.1     skrll   YY_REDUCE_PRINT (yyn);
   1489      1.1     skrll   switch (yyn)
   1490      1.1     skrll     {
   1491      1.1     skrll         case 5:
   1492  1.1.1.3  christos #line 309 "./itbl-parse.y" /* yacc.c:1661  */
   1493      1.1     skrll     {
   1494  1.1.1.3  christos 	    DBG (("line %d: entry pnum=%d type=%d name=%s value=x%x\n",
   1495  1.1.1.3  christos 	    	    insntbl_line, (yyvsp[-4].num), (yyvsp[-3].num), (yyvsp[-2].str), (yyvsp[-1].val)));
   1496  1.1.1.3  christos 	    itbl_add_reg ((yyvsp[-4].num), (yyvsp[-3].num), (yyvsp[-2].str), (yyvsp[-1].val));
   1497      1.1     skrll 	  }
   1498  1.1.1.3  christos #line 1499 "itbl-parse.c" /* yacc.c:1661  */
   1499      1.1     skrll     break;
   1500      1.1     skrll 
   1501      1.1     skrll   case 6:
   1502  1.1.1.3  christos #line 315 "./itbl-parse.y" /* yacc.c:1661  */
   1503      1.1     skrll     {
   1504      1.1     skrll 	    DBG (("line %d: entry pnum=%d type=INSN name=%s value=x%x",
   1505  1.1.1.3  christos 	    	    insntbl_line, (yyvsp[-5].num), (yyvsp[-3].str), (yyvsp[-2].val)));
   1506  1.1.1.3  christos 	    DBG ((" sbit=%d ebit=%d flags=0x%x\n", sbit, ebit, (yyvsp[0].val)));
   1507  1.1.1.3  christos 	    insn=itbl_add_insn ((yyvsp[-5].num), (yyvsp[-3].str), (yyvsp[-2].val), sbit, ebit, (yyvsp[0].val));
   1508      1.1     skrll 	  }
   1509  1.1.1.3  christos #line 1510 "itbl-parse.c" /* yacc.c:1661  */
   1510      1.1     skrll     break;
   1511      1.1     skrll 
   1512      1.1     skrll   case 7:
   1513  1.1.1.3  christos #line 322 "./itbl-parse.y" /* yacc.c:1661  */
   1514      1.1     skrll     {}
   1515  1.1.1.3  christos #line 1516 "itbl-parse.c" /* yacc.c:1661  */
   1516      1.1     skrll     break;
   1517      1.1     skrll 
   1518      1.1     skrll   case 13:
   1519  1.1.1.3  christos #line 335 "./itbl-parse.y" /* yacc.c:1661  */
   1520      1.1     skrll     {
   1521      1.1     skrll 	    DBGL2 (("ftype\n"));
   1522  1.1.1.3  christos 	    (yyval.num) = (yyvsp[0].num);
   1523      1.1     skrll 	  }
   1524  1.1.1.3  christos #line 1525 "itbl-parse.c" /* yacc.c:1661  */
   1525      1.1     skrll     break;
   1526      1.1     skrll 
   1527      1.1     skrll   case 14:
   1528  1.1.1.3  christos #line 340 "./itbl-parse.y" /* yacc.c:1661  */
   1529      1.1     skrll     {
   1530      1.1     skrll 	    DBGL2 (("addr\n"));
   1531      1.1     skrll 	    (yyval.num) = ADDR;
   1532      1.1     skrll 	  }
   1533  1.1.1.3  christos #line 1534 "itbl-parse.c" /* yacc.c:1661  */
   1534      1.1     skrll     break;
   1535      1.1     skrll 
   1536      1.1     skrll   case 15:
   1537  1.1.1.3  christos #line 345 "./itbl-parse.y" /* yacc.c:1661  */
   1538      1.1     skrll     {
   1539      1.1     skrll 	    DBGL2 (("immed\n"));
   1540      1.1     skrll 	    (yyval.num) = IMMED;
   1541      1.1     skrll 	  }
   1542  1.1.1.3  christos #line 1543 "itbl-parse.c" /* yacc.c:1661  */
   1543      1.1     skrll     break;
   1544      1.1     skrll 
   1545      1.1     skrll   case 16:
   1546  1.1.1.3  christos #line 353 "./itbl-parse.y" /* yacc.c:1661  */
   1547      1.1     skrll     {
   1548  1.1.1.3  christos 	    DBG (("line %d: field type=%d sbit=%d ebit=%d, flags=0x%x\n",
   1549  1.1.1.3  christos 	    	    insntbl_line, (yyvsp[-2].num), sbit, ebit, (yyvsp[0].val)));
   1550  1.1.1.3  christos 	    itbl_add_operand (insn, (yyvsp[-2].num), sbit, ebit, (yyvsp[0].val));
   1551      1.1     skrll 	  }
   1552  1.1.1.3  christos #line 1553 "itbl-parse.c" /* yacc.c:1661  */
   1553      1.1     skrll     break;
   1554      1.1     skrll 
   1555      1.1     skrll   case 17:
   1556  1.1.1.3  christos #line 362 "./itbl-parse.y" /* yacc.c:1661  */
   1557      1.1     skrll     {
   1558  1.1.1.3  christos 	    (yyval.val) = (yyvsp[-2].num) | (yyvsp[0].val);
   1559      1.1     skrll 	  }
   1560  1.1.1.3  christos #line 1561 "itbl-parse.c" /* yacc.c:1661  */
   1561      1.1     skrll     break;
   1562      1.1     skrll 
   1563      1.1     skrll   case 18:
   1564  1.1.1.3  christos #line 366 "./itbl-parse.y" /* yacc.c:1661  */
   1565      1.1     skrll     {
   1566  1.1.1.3  christos 	    (yyval.val) = (yyvsp[-1].val);
   1567      1.1     skrll 	  }
   1568  1.1.1.3  christos #line 1569 "itbl-parse.c" /* yacc.c:1661  */
   1569      1.1     skrll     break;
   1570      1.1     skrll 
   1571      1.1     skrll   case 19:
   1572  1.1.1.3  christos #line 370 "./itbl-parse.y" /* yacc.c:1661  */
   1573      1.1     skrll     {
   1574  1.1.1.3  christos 	    (yyval.val) = (yyvsp[0].num);
   1575      1.1     skrll 	  }
   1576  1.1.1.3  christos #line 1577 "itbl-parse.c" /* yacc.c:1661  */
   1577      1.1     skrll     break;
   1578      1.1     skrll 
   1579      1.1     skrll   case 20:
   1580  1.1.1.3  christos #line 377 "./itbl-parse.y" /* yacc.c:1661  */
   1581      1.1     skrll     {
   1582  1.1.1.3  christos 	    DBGL2 (("flags=%d\n", (yyvsp[0].val)));
   1583  1.1.1.3  christos 	    (yyval.val) = (yyvsp[0].val);
   1584      1.1     skrll 	  }
   1585  1.1.1.3  christos #line 1586 "itbl-parse.c" /* yacc.c:1661  */
   1586      1.1     skrll     break;
   1587      1.1     skrll 
   1588      1.1     skrll   case 21:
   1589  1.1.1.3  christos #line 382 "./itbl-parse.y" /* yacc.c:1661  */
   1590      1.1     skrll     {
   1591      1.1     skrll 	    (yyval.val) = 0;
   1592      1.1     skrll 	  }
   1593  1.1.1.3  christos #line 1594 "itbl-parse.c" /* yacc.c:1661  */
   1594      1.1     skrll     break;
   1595      1.1     skrll 
   1596      1.1     skrll   case 22:
   1597  1.1.1.3  christos #line 389 "./itbl-parse.y" /* yacc.c:1661  */
   1598      1.1     skrll     {
   1599  1.1.1.3  christos 	    DBGL2 (("range %d %d\n", (yyvsp[-2].num), (yyvsp[0].num)));
   1600  1.1.1.3  christos 	    sbit = (yyvsp[-2].num);
   1601  1.1.1.3  christos 	    ebit = (yyvsp[0].num);
   1602      1.1     skrll 	  }
   1603  1.1.1.3  christos #line 1604 "itbl-parse.c" /* yacc.c:1661  */
   1604      1.1     skrll     break;
   1605      1.1     skrll 
   1606      1.1     skrll   case 23:
   1607  1.1.1.3  christos #line 395 "./itbl-parse.y" /* yacc.c:1661  */
   1608      1.1     skrll     {
   1609      1.1     skrll 	    sbit = 31;
   1610      1.1     skrll 	    ebit = 0;
   1611      1.1     skrll 	  }
   1612  1.1.1.3  christos #line 1613 "itbl-parse.c" /* yacc.c:1661  */
   1613      1.1     skrll     break;
   1614      1.1     skrll 
   1615      1.1     skrll   case 24:
   1616  1.1.1.3  christos #line 403 "./itbl-parse.y" /* yacc.c:1661  */
   1617      1.1     skrll     {
   1618  1.1.1.3  christos 	    DBGL2 (("pnum=%d\n",(yyvsp[0].num)));
   1619  1.1.1.3  christos 	    (yyval.num) = (yyvsp[0].num);
   1620      1.1     skrll 	  }
   1621  1.1.1.3  christos #line 1622 "itbl-parse.c" /* yacc.c:1661  */
   1622      1.1     skrll     break;
   1623      1.1     skrll 
   1624      1.1     skrll   case 25:
   1625  1.1.1.3  christos #line 411 "./itbl-parse.y" /* yacc.c:1661  */
   1626      1.1     skrll     {
   1627      1.1     skrll 	    DBGL2 (("dreg\n"));
   1628      1.1     skrll 	    (yyval.num) = DREG;
   1629      1.1     skrll 	  }
   1630  1.1.1.3  christos #line 1631 "itbl-parse.c" /* yacc.c:1661  */
   1631      1.1     skrll     break;
   1632      1.1     skrll 
   1633      1.1     skrll   case 26:
   1634  1.1.1.3  christos #line 416 "./itbl-parse.y" /* yacc.c:1661  */
   1635      1.1     skrll     {
   1636      1.1     skrll 	    DBGL2 (("creg\n"));
   1637      1.1     skrll 	    (yyval.num) = CREG;
   1638      1.1     skrll 	  }
   1639  1.1.1.3  christos #line 1640 "itbl-parse.c" /* yacc.c:1661  */
   1640      1.1     skrll     break;
   1641      1.1     skrll 
   1642      1.1     skrll   case 27:
   1643  1.1.1.3  christos #line 421 "./itbl-parse.y" /* yacc.c:1661  */
   1644      1.1     skrll     {
   1645      1.1     skrll 	    DBGL2 (("greg\n"));
   1646      1.1     skrll 	    (yyval.num) = GREG;
   1647      1.1     skrll 	  }
   1648  1.1.1.3  christos #line 1649 "itbl-parse.c" /* yacc.c:1661  */
   1649      1.1     skrll     break;
   1650      1.1     skrll 
   1651      1.1     skrll   case 28:
   1652  1.1.1.3  christos #line 429 "./itbl-parse.y" /* yacc.c:1661  */
   1653      1.1     skrll     {
   1654  1.1.1.3  christos 	    DBGL2 (("name=%s\n",(yyvsp[0].str)));
   1655  1.1.1.3  christos 	    (yyval.str) = (yyvsp[0].str);
   1656      1.1     skrll 	  }
   1657  1.1.1.3  christos #line 1658 "itbl-parse.c" /* yacc.c:1661  */
   1658      1.1     skrll     break;
   1659      1.1     skrll 
   1660      1.1     skrll   case 29:
   1661  1.1.1.3  christos #line 445 "./itbl-parse.y" /* yacc.c:1661  */
   1662      1.1     skrll     {
   1663  1.1.1.3  christos 	    DBGL2 (("val=x%x\n",(yyvsp[0].num)));
   1664  1.1.1.3  christos 	    (yyval.val) = (yyvsp[0].num);
   1665      1.1     skrll 	  }
   1666  1.1.1.3  christos #line 1667 "itbl-parse.c" /* yacc.c:1661  */
   1667      1.1     skrll     break;
   1668      1.1     skrll 
   1669      1.1     skrll 
   1670  1.1.1.3  christos #line 1671 "itbl-parse.c" /* yacc.c:1661  */
   1671      1.1     skrll       default: break;
   1672      1.1     skrll     }
   1673  1.1.1.3  christos   /* User semantic actions sometimes alter yychar, and that requires
   1674  1.1.1.3  christos      that yytoken be updated with the new translation.  We take the
   1675  1.1.1.3  christos      approach of translating immediately before every use of yytoken.
   1676  1.1.1.3  christos      One alternative is translating here after every semantic action,
   1677  1.1.1.3  christos      but that translation would be missed if the semantic action invokes
   1678  1.1.1.3  christos      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
   1679  1.1.1.3  christos      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
   1680  1.1.1.3  christos      incorrect destructor might then be invoked immediately.  In the
   1681  1.1.1.3  christos      case of YYERROR or YYBACKUP, subsequent parser actions might lead
   1682  1.1.1.3  christos      to an incorrect destructor call or verbose syntax error message
   1683  1.1.1.3  christos      before the lookahead is translated.  */
   1684  1.1.1.2  christos   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
   1685      1.1     skrll 
   1686  1.1.1.2  christos   YYPOPSTACK (yylen);
   1687  1.1.1.2  christos   yylen = 0;
   1688      1.1     skrll   YY_STACK_PRINT (yyss, yyssp);
   1689      1.1     skrll 
   1690      1.1     skrll   *++yyvsp = yyval;
   1691      1.1     skrll 
   1692  1.1.1.3  christos   /* Now 'shift' the result of the reduction.  Determine what state
   1693      1.1     skrll      that goes to, based on the state we popped back to and the rule
   1694      1.1     skrll      number reduced by.  */
   1695      1.1     skrll 
   1696      1.1     skrll   yyn = yyr1[yyn];
   1697      1.1     skrll 
   1698      1.1     skrll   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
   1699      1.1     skrll   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
   1700      1.1     skrll     yystate = yytable[yystate];
   1701      1.1     skrll   else
   1702      1.1     skrll     yystate = yydefgoto[yyn - YYNTOKENS];
   1703      1.1     skrll 
   1704      1.1     skrll   goto yynewstate;
   1705      1.1     skrll 
   1706      1.1     skrll 
   1707  1.1.1.3  christos /*--------------------------------------.
   1708  1.1.1.3  christos | yyerrlab -- here on detecting error.  |
   1709  1.1.1.3  christos `--------------------------------------*/
   1710      1.1     skrll yyerrlab:
   1711  1.1.1.3  christos   /* Make sure we have latest lookahead translation.  See comments at
   1712  1.1.1.3  christos      user semantic actions for why this is necessary.  */
   1713  1.1.1.3  christos   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
   1714  1.1.1.3  christos 
   1715      1.1     skrll   /* If not already recovering from an error, report this error.  */
   1716      1.1     skrll   if (!yyerrstatus)
   1717      1.1     skrll     {
   1718      1.1     skrll       ++yynerrs;
   1719  1.1.1.2  christos #if ! YYERROR_VERBOSE
   1720  1.1.1.2  christos       yyerror (YY_("syntax error"));
   1721  1.1.1.2  christos #else
   1722  1.1.1.3  christos # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
   1723  1.1.1.3  christos                                         yyssp, yytoken)
   1724  1.1.1.2  christos       {
   1725  1.1.1.3  christos         char const *yymsgp = YY_("syntax error");
   1726  1.1.1.3  christos         int yysyntax_error_status;
   1727  1.1.1.3  christos         yysyntax_error_status = YYSYNTAX_ERROR;
   1728  1.1.1.3  christos         if (yysyntax_error_status == 0)
   1729  1.1.1.3  christos           yymsgp = yymsg;
   1730  1.1.1.3  christos         else if (yysyntax_error_status == 1)
   1731  1.1.1.3  christos           {
   1732  1.1.1.3  christos             if (yymsg != yymsgbuf)
   1733  1.1.1.3  christos               YYSTACK_FREE (yymsg);
   1734  1.1.1.3  christos             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
   1735  1.1.1.3  christos             if (!yymsg)
   1736  1.1.1.3  christos               {
   1737  1.1.1.3  christos                 yymsg = yymsgbuf;
   1738  1.1.1.3  christos                 yymsg_alloc = sizeof yymsgbuf;
   1739  1.1.1.3  christos                 yysyntax_error_status = 2;
   1740  1.1.1.3  christos               }
   1741  1.1.1.3  christos             else
   1742  1.1.1.3  christos               {
   1743  1.1.1.3  christos                 yysyntax_error_status = YYSYNTAX_ERROR;
   1744  1.1.1.3  christos                 yymsgp = yymsg;
   1745  1.1.1.3  christos               }
   1746  1.1.1.3  christos           }
   1747  1.1.1.3  christos         yyerror (yymsgp);
   1748  1.1.1.3  christos         if (yysyntax_error_status == 2)
   1749  1.1.1.3  christos           goto yyexhaustedlab;
   1750  1.1.1.2  christos       }
   1751  1.1.1.3  christos # undef YYSYNTAX_ERROR
   1752  1.1.1.2  christos #endif
   1753      1.1     skrll     }
   1754      1.1     skrll 
   1755      1.1     skrll 
   1756      1.1     skrll 
   1757      1.1     skrll   if (yyerrstatus == 3)
   1758      1.1     skrll     {
   1759  1.1.1.3  christos       /* If just tried and failed to reuse lookahead token after an
   1760  1.1.1.3  christos          error, discard it.  */
   1761      1.1     skrll 
   1762      1.1     skrll       if (yychar <= YYEOF)
   1763  1.1.1.3  christos         {
   1764  1.1.1.3  christos           /* Return failure if at end of input.  */
   1765  1.1.1.3  christos           if (yychar == YYEOF)
   1766  1.1.1.3  christos             YYABORT;
   1767  1.1.1.3  christos         }
   1768      1.1     skrll       else
   1769  1.1.1.3  christos         {
   1770  1.1.1.3  christos           yydestruct ("Error: discarding",
   1771  1.1.1.3  christos                       yytoken, &yylval);
   1772  1.1.1.3  christos           yychar = YYEMPTY;
   1773  1.1.1.3  christos         }
   1774      1.1     skrll     }
   1775      1.1     skrll 
   1776  1.1.1.3  christos   /* Else will try to reuse lookahead token after shifting the error
   1777      1.1     skrll      token.  */
   1778      1.1     skrll   goto yyerrlab1;
   1779      1.1     skrll 
   1780      1.1     skrll 
   1781      1.1     skrll /*---------------------------------------------------.
   1782      1.1     skrll | yyerrorlab -- error raised explicitly by YYERROR.  |
   1783      1.1     skrll `---------------------------------------------------*/
   1784      1.1     skrll yyerrorlab:
   1785      1.1     skrll 
   1786      1.1     skrll   /* Pacify compilers like GCC when the user code never invokes
   1787      1.1     skrll      YYERROR and the label yyerrorlab therefore never appears in user
   1788      1.1     skrll      code.  */
   1789  1.1.1.2  christos   if (/*CONSTCOND*/ 0)
   1790      1.1     skrll      goto yyerrorlab;
   1791      1.1     skrll 
   1792  1.1.1.3  christos   /* Do not reclaim the symbols of the rule whose action triggered
   1793  1.1.1.2  christos      this YYERROR.  */
   1794  1.1.1.2  christos   YYPOPSTACK (yylen);
   1795  1.1.1.2  christos   yylen = 0;
   1796  1.1.1.2  christos   YY_STACK_PRINT (yyss, yyssp);
   1797      1.1     skrll   yystate = *yyssp;
   1798      1.1     skrll   goto yyerrlab1;
   1799      1.1     skrll 
   1800      1.1     skrll 
   1801      1.1     skrll /*-------------------------------------------------------------.
   1802      1.1     skrll | yyerrlab1 -- common code for both syntax error and YYERROR.  |
   1803      1.1     skrll `-------------------------------------------------------------*/
   1804      1.1     skrll yyerrlab1:
   1805  1.1.1.3  christos   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
   1806      1.1     skrll 
   1807      1.1     skrll   for (;;)
   1808      1.1     skrll     {
   1809      1.1     skrll       yyn = yypact[yystate];
   1810  1.1.1.3  christos       if (!yypact_value_is_default (yyn))
   1811  1.1.1.3  christos         {
   1812  1.1.1.3  christos           yyn += YYTERROR;
   1813  1.1.1.3  christos           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
   1814  1.1.1.3  christos             {
   1815  1.1.1.3  christos               yyn = yytable[yyn];
   1816  1.1.1.3  christos               if (0 < yyn)
   1817  1.1.1.3  christos                 break;
   1818  1.1.1.3  christos             }
   1819  1.1.1.3  christos         }
   1820      1.1     skrll 
   1821      1.1     skrll       /* Pop the current state because it cannot handle the error token.  */
   1822      1.1     skrll       if (yyssp == yyss)
   1823  1.1.1.3  christos         YYABORT;
   1824      1.1     skrll 
   1825      1.1     skrll 
   1826  1.1.1.2  christos       yydestruct ("Error: popping",
   1827  1.1.1.3  christos                   yystos[yystate], yyvsp);
   1828  1.1.1.2  christos       YYPOPSTACK (1);
   1829      1.1     skrll       yystate = *yyssp;
   1830      1.1     skrll       YY_STACK_PRINT (yyss, yyssp);
   1831      1.1     skrll     }
   1832      1.1     skrll 
   1833  1.1.1.3  christos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1834      1.1     skrll   *++yyvsp = yylval;
   1835  1.1.1.3  christos   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1836      1.1     skrll 
   1837      1.1     skrll 
   1838  1.1.1.2  christos   /* Shift the error token.  */
   1839      1.1     skrll   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
   1840      1.1     skrll 
   1841      1.1     skrll   yystate = yyn;
   1842      1.1     skrll   goto yynewstate;
   1843      1.1     skrll 
   1844      1.1     skrll 
   1845      1.1     skrll /*-------------------------------------.
   1846      1.1     skrll | yyacceptlab -- YYACCEPT comes here.  |
   1847      1.1     skrll `-------------------------------------*/
   1848      1.1     skrll yyacceptlab:
   1849      1.1     skrll   yyresult = 0;
   1850      1.1     skrll   goto yyreturn;
   1851      1.1     skrll 
   1852      1.1     skrll /*-----------------------------------.
   1853      1.1     skrll | yyabortlab -- YYABORT comes here.  |
   1854      1.1     skrll `-----------------------------------*/
   1855      1.1     skrll yyabortlab:
   1856      1.1     skrll   yyresult = 1;
   1857      1.1     skrll   goto yyreturn;
   1858      1.1     skrll 
   1859  1.1.1.3  christos #if !defined yyoverflow || YYERROR_VERBOSE
   1860      1.1     skrll /*-------------------------------------------------.
   1861      1.1     skrll | yyexhaustedlab -- memory exhaustion comes here.  |
   1862      1.1     skrll `-------------------------------------------------*/
   1863      1.1     skrll yyexhaustedlab:
   1864      1.1     skrll   yyerror (YY_("memory exhausted"));
   1865      1.1     skrll   yyresult = 2;
   1866      1.1     skrll   /* Fall through.  */
   1867      1.1     skrll #endif
   1868      1.1     skrll 
   1869      1.1     skrll yyreturn:
   1870  1.1.1.3  christos   if (yychar != YYEMPTY)
   1871  1.1.1.3  christos     {
   1872  1.1.1.3  christos       /* Make sure we have latest lookahead translation.  See comments at
   1873  1.1.1.3  christos          user semantic actions for why this is necessary.  */
   1874  1.1.1.3  christos       yytoken = YYTRANSLATE (yychar);
   1875  1.1.1.3  christos       yydestruct ("Cleanup: discarding lookahead",
   1876  1.1.1.3  christos                   yytoken, &yylval);
   1877  1.1.1.3  christos     }
   1878  1.1.1.3  christos   /* Do not reclaim the symbols of the rule whose action triggered
   1879  1.1.1.2  christos      this YYABORT or YYACCEPT.  */
   1880  1.1.1.2  christos   YYPOPSTACK (yylen);
   1881  1.1.1.2  christos   YY_STACK_PRINT (yyss, yyssp);
   1882      1.1     skrll   while (yyssp != yyss)
   1883      1.1     skrll     {
   1884      1.1     skrll       yydestruct ("Cleanup: popping",
   1885  1.1.1.3  christos                   yystos[*yyssp], yyvsp);
   1886  1.1.1.2  christos       YYPOPSTACK (1);
   1887      1.1     skrll     }
   1888      1.1     skrll #ifndef yyoverflow
   1889      1.1     skrll   if (yyss != yyssa)
   1890      1.1     skrll     YYSTACK_FREE (yyss);
   1891      1.1     skrll #endif
   1892  1.1.1.2  christos #if YYERROR_VERBOSE
   1893  1.1.1.2  christos   if (yymsg != yymsgbuf)
   1894  1.1.1.2  christos     YYSTACK_FREE (yymsg);
   1895  1.1.1.2  christos #endif
   1896  1.1.1.3  christos   return yyresult;
   1897      1.1     skrll }
   1898  1.1.1.3  christos #line 450 "./itbl-parse.y" /* yacc.c:1906  */
   1899      1.1     skrll 
   1900      1.1     skrll 
   1901      1.1     skrll static int
   1902      1.1     skrll yyerror (msg)
   1903      1.1     skrll      const char *msg;
   1904      1.1     skrll {
   1905      1.1     skrll   printf ("line %d: %s\n", insntbl_line, msg);
   1906      1.1     skrll   return 0;
   1907      1.1     skrll }
   1908