Home | History | Annotate | Line # | Download | only in config
loongarch-parse.c revision 1.1.1.3
      1      1.1  christos /* A Bison parser, made by GNU Bison 3.8.2.  */
      2      1.1  christos 
      3      1.1  christos /* Bison implementation for Yacc-like parsers in C
      4      1.1  christos 
      5      1.1  christos    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
      6      1.1  christos    Inc.
      7      1.1  christos 
      8      1.1  christos    This program is free software: you can redistribute it and/or modify
      9      1.1  christos    it under the terms of the GNU General Public License as published by
     10      1.1  christos    the Free Software Foundation, either version 3 of the License, or
     11      1.1  christos    (at your option) any later version.
     12      1.1  christos 
     13      1.1  christos    This program is distributed in the hope that it will be useful,
     14      1.1  christos    but WITHOUT ANY WARRANTY; without even the implied warranty of
     15      1.1  christos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16      1.1  christos    GNU General Public License for more details.
     17      1.1  christos 
     18      1.1  christos    You should have received a copy of the GNU General Public License
     19      1.1  christos    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
     20      1.1  christos 
     21      1.1  christos /* As a special exception, you may create a larger work that contains
     22      1.1  christos    part or all of the Bison parser skeleton and distribute that work
     23      1.1  christos    under terms of your choice, so long as that work isn't itself a
     24      1.1  christos    parser generator using the skeleton or a modified version thereof
     25      1.1  christos    as a parser skeleton.  Alternatively, if you modify or redistribute
     26      1.1  christos    the parser skeleton itself, you may (at your option) remove this
     27      1.1  christos    special exception, which will cause the skeleton and the resulting
     28      1.1  christos    Bison output files to be licensed under the GNU General Public
     29      1.1  christos    License without this special exception.
     30      1.1  christos 
     31      1.1  christos    This special exception was added by the Free Software Foundation in
     32      1.1  christos    version 2.2 of Bison.  */
     33      1.1  christos 
     34      1.1  christos /* C LALR(1) parser skeleton written by Richard Stallman, by
     35      1.1  christos    simplifying the original so-called "semantic" parser.  */
     36      1.1  christos 
     37      1.1  christos /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
     38      1.1  christos    especially those whose name start with YY_ or yy_.  They are
     39      1.1  christos    private implementation details that can be changed or removed.  */
     40      1.1  christos 
     41      1.1  christos /* All symbols defined below should begin with yy or YY, to avoid
     42      1.1  christos    infringing on user name space.  This should be done even for local
     43      1.1  christos    variables, as they might otherwise be expanded by user macros.
     44      1.1  christos    There are some unavoidable exceptions within include files to
     45      1.1  christos    define necessary library symbols; they are noted "INFRINGES ON
     46      1.1  christos    USER NAME SPACE" below.  */
     47      1.1  christos 
     48      1.1  christos /* Identify Bison output, and Bison version.  */
     49      1.1  christos #define YYBISON 30802
     50      1.1  christos 
     51      1.1  christos /* Bison version string.  */
     52      1.1  christos #define YYBISON_VERSION "3.8.2"
     53      1.1  christos 
     54      1.1  christos /* Skeleton name.  */
     55      1.1  christos #define YYSKELETON_NAME "yacc.c"
     56      1.1  christos 
     57      1.1  christos /* Pure parsers.  */
     58      1.1  christos #define YYPURE 0
     59      1.1  christos 
     60      1.1  christos /* Push parsers.  */
     61      1.1  christos #define YYPUSH 0
     62      1.1  christos 
     63      1.1  christos /* Pull parsers.  */
     64      1.1  christos #define YYPULL 1
     65      1.1  christos 
     66      1.1  christos 
     67      1.1  christos 
     68      1.1  christos 
     69      1.1  christos /* First part of user prologue.  */
     70      1.1  christos #line 19 "./config/loongarch-parse.y"
     71      1.1  christos 
     72      1.1  christos #include "as.h"
     73      1.1  christos #include "loongarch-lex.h"
     74      1.1  christos #include "loongarch-parse.h"
     75      1.1  christos static void yyerror (const char *s ATTRIBUTE_UNUSED)
     76      1.1  christos {
     77      1.1  christos };
     78      1.1  christos int yylex (void);
     79      1.1  christos 
     80      1.1  christos 
     81      1.1  christos static struct reloc_info *top, *end;
     82      1.1  christos 
     83      1.1  christos static expressionS const_0 =
     84      1.1  christos {
     85      1.1  christos   .X_op = O_constant,
     86      1.1  christos   .X_add_number = 0
     87      1.1  christos };
     88      1.1  christos 
     89      1.1  christos static int
     90      1.1  christos is_const (struct reloc_info *info)
     91      1.1  christos {
     92      1.1  christos   return (info->type == BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE
     93      1.1  christos 	  && info->value.X_op == O_constant);
     94      1.1  christos }
     95      1.1  christos 
     96      1.1  christos int
     97  1.1.1.3  christos loongarch_parse_expr (const char *exp,
     98      1.1  christos 		      struct reloc_info *reloc_stack_top,
     99      1.1  christos 		      size_t max_reloc_num,
    100      1.1  christos 		      size_t *reloc_num,
    101      1.1  christos 		      offsetT *imm)
    102      1.1  christos {
    103      1.1  christos   int ret;
    104      1.1  christos   struct yy_buffer_state *buffstate;
    105      1.1  christos   top = reloc_stack_top;
    106      1.1  christos   end = top + max_reloc_num;
    107  1.1.1.3  christos   buffstate = yy_scan_string (exp);
    108      1.1  christos   ret = yyparse ();
    109      1.1  christos 
    110      1.1  christos   if (ret == 0)
    111      1.1  christos     {
    112      1.1  christos       if (is_const (top - 1))
    113      1.1  christos 	*imm = (--top)->value.X_add_number;
    114      1.1  christos       else
    115      1.1  christos 	*imm = 0;
    116      1.1  christos       *reloc_num = top - reloc_stack_top;
    117      1.1  christos     }
    118      1.1  christos   yy_delete_buffer (buffstate);
    119      1.1  christos 
    120      1.1  christos   return ret;
    121      1.1  christos }
    122      1.1  christos 
    123      1.1  christos static void
    124      1.1  christos emit_const (offsetT imm)
    125      1.1  christos {
    126      1.1  christos   if (end <= top)
    127      1.1  christos     as_fatal (_("expr too huge"));
    128      1.1  christos   top->type = BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE;
    129      1.1  christos   top->value.X_op = O_constant;
    130      1.1  christos   top->value.X_add_number = imm;
    131      1.1  christos   top++;
    132      1.1  christos }
    133      1.1  christos 
    134      1.1  christos static const char *
    135      1.1  christos my_getExpression (expressionS *ep, const char *str)
    136      1.1  christos {
    137      1.1  christos   char *save_in, *ret;
    138  1.1.1.2  christos 
    139      1.1  christos   if (*str == ':')
    140      1.1  christos     {
    141      1.1  christos       unsigned long j;
    142      1.1  christos       char *str_1 = (char *) str;
    143      1.1  christos       j = strtol (str_1, &str_1, 10);
    144      1.1  christos       get_internal_label (ep, j, *str_1 == 'f');
    145      1.1  christos       return NULL;
    146      1.1  christos     }
    147      1.1  christos   save_in = input_line_pointer;
    148      1.1  christos   input_line_pointer = (char *)str;
    149      1.1  christos   expression (ep);
    150      1.1  christos   ret = input_line_pointer;
    151      1.1  christos   input_line_pointer = save_in;
    152      1.1  christos   return ret;
    153      1.1  christos }
    154      1.1  christos 
    155      1.1  christos static void
    156  1.1.1.2  christos emit_const_var (const char *op)
    157  1.1.1.2  christos {
    158  1.1.1.2  christos   expressionS ep;
    159  1.1.1.2  christos 
    160  1.1.1.2  christos   if (end <= top)
    161  1.1.1.2  christos     as_fatal (_("expr too huge"));
    162  1.1.1.2  christos 
    163  1.1.1.2  christos   my_getExpression (&ep, op);
    164  1.1.1.2  christos 
    165  1.1.1.2  christos   if (ep.X_op != O_constant)
    166  1.1.1.2  christos     as_bad ("illegal operand: %s", op);
    167  1.1.1.2  christos 
    168  1.1.1.2  christos   top->value.X_op = O_constant;
    169  1.1.1.2  christos   top->value.X_add_number = ep.X_add_number;
    170  1.1.1.2  christos   top->type = BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE;
    171  1.1.1.2  christos   top++;
    172  1.1.1.2  christos }
    173  1.1.1.2  christos 
    174  1.1.1.2  christos static void
    175      1.1  christos reloc (const char *op_c_str, const char *id_c_str, offsetT addend)
    176      1.1  christos {
    177      1.1  christos   expressionS id_sym_expr;
    178  1.1.1.2  christos   bfd_reloc_code_real_type btype;
    179      1.1  christos 
    180      1.1  christos   if (end <= top)
    181      1.1  christos     as_fatal (_("expr too huge"));
    182      1.1  christos 
    183  1.1.1.2  christos   /* For compatible old asm code.  */
    184  1.1.1.2  christos   if (0 == strcmp (op_c_str, "plt"))
    185  1.1.1.2  christos     btype = BFD_RELOC_LARCH_B26;
    186      1.1  christos   else
    187      1.1  christos     {
    188  1.1.1.2  christos       btype = loongarch_larch_reloc_name_lookup (NULL, op_c_str);
    189  1.1.1.2  christos       if (btype == BFD_RELOC_NONE)
    190  1.1.1.2  christos 	as_fatal (_("unsupported modifier %s"), op_c_str);
    191      1.1  christos     }
    192      1.1  christos 
    193  1.1.1.2  christos   if (id_c_str)
    194  1.1.1.2  christos   {
    195  1.1.1.2  christos     my_getExpression (&id_sym_expr, id_c_str);
    196  1.1.1.2  christos     id_sym_expr.X_add_number += addend;
    197  1.1.1.2  christos   }
    198      1.1  christos   else
    199  1.1.1.2  christos   {
    200  1.1.1.2  christos     id_sym_expr.X_op = O_constant;
    201  1.1.1.2  christos     id_sym_expr.X_add_number = addend;
    202  1.1.1.2  christos   }
    203  1.1.1.2  christos 
    204  1.1.1.2  christos   top->value = id_sym_expr;
    205  1.1.1.2  christos   top->type = btype;
    206  1.1.1.2  christos   top++;
    207      1.1  christos }
    208      1.1  christos 
    209      1.1  christos static void
    210      1.1  christos emit_unary (char op)
    211      1.1  christos {
    212      1.1  christos   struct reloc_info *s_top = top - 1;
    213      1.1  christos   if (is_const (s_top))
    214      1.1  christos     {
    215      1.1  christos       offsetT opr = s_top->value.X_add_number;
    216      1.1  christos       switch (op)
    217      1.1  christos 	{
    218      1.1  christos 	case '+':
    219      1.1  christos 	  break;
    220      1.1  christos 	case '-':
    221      1.1  christos 	  opr = -opr;
    222      1.1  christos 	  break;
    223      1.1  christos 	case '~':
    224      1.1  christos 	  opr = ~opr;
    225      1.1  christos 	  break;
    226      1.1  christos 	case '!':
    227      1.1  christos 	  opr = !opr;
    228      1.1  christos 	  break;
    229      1.1  christos 	default:
    230      1.1  christos 	  abort ();
    231      1.1  christos 	}
    232      1.1  christos       s_top->value.X_add_number = opr;
    233      1.1  christos     }
    234      1.1  christos   else
    235      1.1  christos     {
    236      1.1  christos       if (end <= top)
    237      1.1  christos 	as_fatal (_("expr too huge"));
    238      1.1  christos       switch (op)
    239      1.1  christos 	{
    240      1.1  christos 	case '!':
    241      1.1  christos 	  top->type = BFD_RELOC_LARCH_SOP_NOT;
    242      1.1  christos 	  break;
    243      1.1  christos 	default:
    244      1.1  christos 	  abort ();
    245      1.1  christos 	}
    246      1.1  christos       top->value = const_0;
    247      1.1  christos       top++;
    248      1.1  christos     }
    249      1.1  christos }
    250      1.1  christos 
    251      1.1  christos static void
    252      1.1  christos emit_bin (int op)
    253      1.1  christos {
    254      1.1  christos   struct reloc_info *last_1st = top - 1, *last_2nd = top - 2;
    255      1.1  christos   if (is_const (last_1st) && is_const (last_2nd))
    256      1.1  christos     {
    257      1.1  christos       offsetT opr1 = last_2nd->value.X_add_number;
    258      1.1  christos       offsetT opr2 = last_1st->value.X_add_number;
    259      1.1  christos       switch (op)
    260      1.1  christos 	{
    261      1.1  christos 	case '*':
    262  1.1.1.3  christos 	  opr1 = (valueT) opr1 * (valueT) opr2;
    263      1.1  christos 	  break;
    264      1.1  christos 	case '/':
    265  1.1.1.3  christos 	  if (opr2 == 0)
    266  1.1.1.3  christos 	    {
    267  1.1.1.3  christos 	      as_warn (_("Divide by zero!"));
    268  1.1.1.3  christos 	      opr1 = 0;
    269  1.1.1.3  christos 	    }
    270  1.1.1.3  christos 	  else
    271  1.1.1.3  christos 	    opr1 = opr1 / opr2;
    272      1.1  christos 	  break;
    273      1.1  christos 	case '%':
    274  1.1.1.3  christos 	  if (opr2 == 0)
    275  1.1.1.3  christos 	    {
    276  1.1.1.3  christos 	      as_warn (_("Divide by zero!"));
    277  1.1.1.3  christos 	      opr1 = 0;
    278  1.1.1.3  christos 	    }
    279  1.1.1.3  christos 	  else
    280  1.1.1.3  christos 	    opr1 = opr1 % opr2;
    281      1.1  christos 	  break;
    282      1.1  christos 	case '+':
    283  1.1.1.3  christos 	  opr1 = (valueT) opr1 + (valueT) opr2;
    284      1.1  christos 	  break;
    285      1.1  christos 	case '-':
    286  1.1.1.3  christos 	  opr1 = (valueT) opr1 - (valueT) opr2;
    287      1.1  christos 	  break;
    288      1.1  christos 	case LEFT_OP:
    289  1.1.1.3  christos 	  opr1 = (valueT) opr1 << opr2;
    290      1.1  christos 	  break;
    291      1.1  christos 	case RIGHT_OP:
    292  1.1.1.3  christos 	  if (opr1 < 0)
    293  1.1.1.3  christos 	    as_warn (_("Right shift of negative numbers may be changed "
    294  1.1.1.3  christos 		       "from arithmetic right shift to logical right shift!"));
    295  1.1.1.3  christos 	  /* Arithmetic right shift.  */
    296  1.1.1.3  christos 	  opr1 = opr1 >> opr2;
    297      1.1  christos 	  break;
    298      1.1  christos 	case '<':
    299      1.1  christos 	  opr1 = opr1 < opr2;
    300      1.1  christos 	  break;
    301      1.1  christos 	case '>':
    302      1.1  christos 	  opr1 = opr1 > opr2;
    303      1.1  christos 	  break;
    304      1.1  christos 	case LE_OP:
    305      1.1  christos 	  opr1 = opr1 <= opr2;
    306      1.1  christos 	  break;
    307      1.1  christos 	case GE_OP:
    308      1.1  christos 	  opr1 = opr1 >= opr2;
    309      1.1  christos 	  break;
    310      1.1  christos 	case EQ_OP:
    311      1.1  christos 	  opr1 = opr1 == opr2;
    312      1.1  christos 	  break;
    313      1.1  christos 	case NE_OP:
    314      1.1  christos 	  opr1 = opr1 != opr2;
    315      1.1  christos 	  break;
    316      1.1  christos 	case '&':
    317      1.1  christos 	  opr1 = opr1 & opr2;
    318      1.1  christos 	  break;
    319      1.1  christos 	case '^':
    320      1.1  christos 	  opr1 = opr1 ^ opr2;
    321      1.1  christos 	  break;
    322      1.1  christos 	case '|':
    323      1.1  christos 	  opr1 = opr1 | opr2;
    324      1.1  christos 	  break;
    325      1.1  christos 	case AND_OP:
    326      1.1  christos 	  opr1 = opr1 && opr2;
    327      1.1  christos 	  break;
    328      1.1  christos 	case OR_OP:
    329      1.1  christos 	  opr1 = opr1 || opr2;
    330      1.1  christos 	  break;
    331      1.1  christos 	default:
    332      1.1  christos 	  abort ();
    333      1.1  christos 	}
    334      1.1  christos       last_2nd->value.X_add_number = opr1;
    335      1.1  christos       last_1st->type = 0;
    336      1.1  christos       top--;
    337      1.1  christos     }
    338      1.1  christos   else
    339      1.1  christos     {
    340      1.1  christos       if (end <= top)
    341      1.1  christos 	as_fatal (_("expr too huge"));
    342      1.1  christos       switch (op)
    343      1.1  christos 	{
    344      1.1  christos 	case '+':
    345      1.1  christos 	  top->type = BFD_RELOC_LARCH_SOP_ADD;
    346      1.1  christos 	  break;
    347      1.1  christos 	case '-':
    348      1.1  christos 	  top->type = BFD_RELOC_LARCH_SOP_SUB;
    349      1.1  christos 	  break;
    350      1.1  christos 	case LEFT_OP:
    351      1.1  christos 	  top->type = BFD_RELOC_LARCH_SOP_SL;
    352      1.1  christos 	  break;
    353      1.1  christos 	case RIGHT_OP:
    354      1.1  christos 	  top->type = BFD_RELOC_LARCH_SOP_SR;
    355      1.1  christos 	  break;
    356      1.1  christos 	case '&':
    357      1.1  christos 	  top->type = BFD_RELOC_LARCH_SOP_AND;
    358      1.1  christos 	  break;
    359      1.1  christos 	default:
    360      1.1  christos 	  abort ();
    361      1.1  christos 	}
    362      1.1  christos       top->value = const_0;
    363      1.1  christos       top++;
    364      1.1  christos     }
    365      1.1  christos }
    366      1.1  christos 
    367      1.1  christos static void
    368      1.1  christos emit_if_else (void)
    369      1.1  christos {
    370      1.1  christos   struct reloc_info *last_1st = top - 1;
    371      1.1  christos   struct reloc_info *last_2nd = top - 2;
    372      1.1  christos   struct reloc_info *last_3rd = top - 3;
    373      1.1  christos   if (is_const (last_1st) && is_const (last_2nd) && is_const (last_3rd))
    374      1.1  christos     {
    375      1.1  christos       offsetT opr1 = last_3rd->value.X_add_number;
    376      1.1  christos       offsetT opr2 = last_2nd->value.X_add_number;
    377      1.1  christos       offsetT opr3 = last_1st->value.X_add_number;
    378      1.1  christos       opr1 = opr1 ? opr2 : opr3;
    379      1.1  christos       last_3rd->value.X_add_number = opr1;
    380      1.1  christos       last_2nd->type = 0;
    381      1.1  christos       last_1st->type = 0;
    382      1.1  christos       top -= 2;
    383      1.1  christos     }
    384      1.1  christos   else
    385      1.1  christos     {
    386      1.1  christos       if (end <= top)
    387      1.1  christos 	as_fatal (_("expr too huge"));
    388      1.1  christos       top->type = BFD_RELOC_LARCH_SOP_IF_ELSE;
    389      1.1  christos       top->value = const_0;
    390      1.1  christos       top++;
    391      1.1  christos     }
    392      1.1  christos }
    393      1.1  christos 
    394      1.1  christos 
    395  1.1.1.3  christos #line 396 "config/loongarch-parse.c"
    396      1.1  christos 
    397      1.1  christos # ifndef YY_CAST
    398      1.1  christos #  ifdef __cplusplus
    399      1.1  christos #   define YY_CAST(Type, Val) static_cast<Type> (Val)
    400      1.1  christos #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
    401      1.1  christos #  else
    402      1.1  christos #   define YY_CAST(Type, Val) ((Type) (Val))
    403      1.1  christos #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
    404      1.1  christos #  endif
    405      1.1  christos # endif
    406      1.1  christos # ifndef YY_NULLPTR
    407      1.1  christos #  if defined __cplusplus
    408      1.1  christos #   if 201103L <= __cplusplus
    409      1.1  christos #    define YY_NULLPTR nullptr
    410      1.1  christos #   else
    411      1.1  christos #    define YY_NULLPTR 0
    412      1.1  christos #   endif
    413      1.1  christos #  else
    414      1.1  christos #   define YY_NULLPTR ((void*)0)
    415      1.1  christos #  endif
    416      1.1  christos # endif
    417      1.1  christos 
    418      1.1  christos /* Use api.header.include to #include this header
    419      1.1  christos    instead of duplicating it here.  */
    420      1.1  christos #ifndef YY_YY_CONFIG_LOONGARCH_PARSE_H_INCLUDED
    421      1.1  christos # define YY_YY_CONFIG_LOONGARCH_PARSE_H_INCLUDED
    422      1.1  christos /* Debug traces.  */
    423      1.1  christos #ifndef YYDEBUG
    424      1.1  christos # define YYDEBUG 0
    425      1.1  christos #endif
    426      1.1  christos #if YYDEBUG
    427      1.1  christos extern int yydebug;
    428      1.1  christos #endif
    429      1.1  christos 
    430      1.1  christos /* Token kinds.  */
    431      1.1  christos #ifndef YYTOKENTYPE
    432      1.1  christos # define YYTOKENTYPE
    433      1.1  christos   enum yytokentype
    434      1.1  christos   {
    435      1.1  christos     YYEMPTY = -2,
    436      1.1  christos     YYEOF = 0,                     /* "end of file"  */
    437      1.1  christos     YYerror = 256,                 /* error  */
    438      1.1  christos     YYUNDEF = 257,                 /* "invalid token"  */
    439      1.1  christos     INTEGER = 258,                 /* INTEGER  */
    440      1.1  christos     IDENTIFIER = 259,              /* IDENTIFIER  */
    441      1.1  christos     LEFT_OP = 260,                 /* LEFT_OP  */
    442      1.1  christos     RIGHT_OP = 261,                /* RIGHT_OP  */
    443      1.1  christos     LE_OP = 262,                   /* LE_OP  */
    444      1.1  christos     GE_OP = 263,                   /* GE_OP  */
    445      1.1  christos     EQ_OP = 264,                   /* EQ_OP  */
    446      1.1  christos     NE_OP = 265,                   /* NE_OP  */
    447      1.1  christos     AND_OP = 266,                  /* AND_OP  */
    448      1.1  christos     OR_OP = 267                    /* OR_OP  */
    449      1.1  christos   };
    450      1.1  christos   typedef enum yytokentype yytoken_kind_t;
    451      1.1  christos #endif
    452      1.1  christos /* Token kinds.  */
    453      1.1  christos #define YYEMPTY -2
    454      1.1  christos #define YYEOF 0
    455      1.1  christos #define YYerror 256
    456      1.1  christos #define YYUNDEF 257
    457      1.1  christos #define INTEGER 258
    458      1.1  christos #define IDENTIFIER 259
    459      1.1  christos #define LEFT_OP 260
    460      1.1  christos #define RIGHT_OP 261
    461      1.1  christos #define LE_OP 262
    462      1.1  christos #define GE_OP 263
    463      1.1  christos #define EQ_OP 264
    464      1.1  christos #define NE_OP 265
    465      1.1  christos #define AND_OP 266
    466      1.1  christos #define OR_OP 267
    467      1.1  christos 
    468      1.1  christos /* Value type.  */
    469      1.1  christos #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
    470      1.1  christos union YYSTYPE
    471      1.1  christos {
    472  1.1.1.3  christos #line 344 "./config/loongarch-parse.y"
    473      1.1  christos 
    474      1.1  christos char *c_str;
    475      1.1  christos offsetT imm;
    476      1.1  christos 
    477  1.1.1.3  christos #line 478 "config/loongarch-parse.c"
    478      1.1  christos 
    479      1.1  christos };
    480      1.1  christos typedef union YYSTYPE YYSTYPE;
    481      1.1  christos # define YYSTYPE_IS_TRIVIAL 1
    482      1.1  christos # define YYSTYPE_IS_DECLARED 1
    483      1.1  christos #endif
    484      1.1  christos 
    485      1.1  christos 
    486      1.1  christos extern YYSTYPE yylval;
    487      1.1  christos 
    488      1.1  christos 
    489      1.1  christos int yyparse (void);
    490      1.1  christos 
    491      1.1  christos 
    492      1.1  christos #endif /* !YY_YY_CONFIG_LOONGARCH_PARSE_H_INCLUDED  */
    493      1.1  christos /* Symbol kind.  */
    494      1.1  christos enum yysymbol_kind_t
    495      1.1  christos {
    496      1.1  christos   YYSYMBOL_YYEMPTY = -2,
    497      1.1  christos   YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
    498      1.1  christos   YYSYMBOL_YYerror = 1,                    /* error  */
    499      1.1  christos   YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
    500      1.1  christos   YYSYMBOL_INTEGER = 3,                    /* INTEGER  */
    501      1.1  christos   YYSYMBOL_IDENTIFIER = 4,                 /* IDENTIFIER  */
    502      1.1  christos   YYSYMBOL_LEFT_OP = 5,                    /* LEFT_OP  */
    503      1.1  christos   YYSYMBOL_RIGHT_OP = 6,                   /* RIGHT_OP  */
    504      1.1  christos   YYSYMBOL_LE_OP = 7,                      /* LE_OP  */
    505      1.1  christos   YYSYMBOL_GE_OP = 8,                      /* GE_OP  */
    506      1.1  christos   YYSYMBOL_EQ_OP = 9,                      /* EQ_OP  */
    507      1.1  christos   YYSYMBOL_NE_OP = 10,                     /* NE_OP  */
    508      1.1  christos   YYSYMBOL_AND_OP = 11,                    /* AND_OP  */
    509      1.1  christos   YYSYMBOL_OR_OP = 12,                     /* OR_OP  */
    510      1.1  christos   YYSYMBOL_13_ = 13,                       /* '('  */
    511      1.1  christos   YYSYMBOL_14_ = 14,                       /* ')'  */
    512      1.1  christos   YYSYMBOL_15_ = 15,                       /* '%'  */
    513      1.1  christos   YYSYMBOL_16_ = 16,                       /* '-'  */
    514      1.1  christos   YYSYMBOL_17_ = 17,                       /* '+'  */
    515      1.1  christos   YYSYMBOL_18_ = 18,                       /* '~'  */
    516      1.1  christos   YYSYMBOL_19_ = 19,                       /* '!'  */
    517      1.1  christos   YYSYMBOL_20_ = 20,                       /* '*'  */
    518      1.1  christos   YYSYMBOL_21_ = 21,                       /* '/'  */
    519      1.1  christos   YYSYMBOL_22_ = 22,                       /* '<'  */
    520      1.1  christos   YYSYMBOL_23_ = 23,                       /* '>'  */
    521      1.1  christos   YYSYMBOL_24_ = 24,                       /* '&'  */
    522      1.1  christos   YYSYMBOL_25_ = 25,                       /* '^'  */
    523      1.1  christos   YYSYMBOL_26_ = 26,                       /* '|'  */
    524      1.1  christos   YYSYMBOL_27_ = 27,                       /* '?'  */
    525      1.1  christos   YYSYMBOL_28_ = 28,                       /* ':'  */
    526      1.1  christos   YYSYMBOL_YYACCEPT = 29,                  /* $accept  */
    527      1.1  christos   YYSYMBOL_primary_expression = 30,        /* primary_expression  */
    528      1.1  christos   YYSYMBOL_addend = 31,                    /* addend  */
    529      1.1  christos   YYSYMBOL_unary_expression = 32,          /* unary_expression  */
    530      1.1  christos   YYSYMBOL_multiplicative_expression = 33, /* multiplicative_expression  */
    531  1.1.1.3  christos   YYSYMBOL_shift_expression = 34,          /* shift_expression  */
    532  1.1.1.3  christos   YYSYMBOL_additive_expression = 35,       /* additive_expression  */
    533      1.1  christos   YYSYMBOL_relational_expression = 36,     /* relational_expression  */
    534      1.1  christos   YYSYMBOL_equality_expression = 37,       /* equality_expression  */
    535      1.1  christos   YYSYMBOL_and_expression = 38,            /* and_expression  */
    536      1.1  christos   YYSYMBOL_exclusive_or_expression = 39,   /* exclusive_or_expression  */
    537      1.1  christos   YYSYMBOL_inclusive_or_expression = 40,   /* inclusive_or_expression  */
    538      1.1  christos   YYSYMBOL_logical_and_expression = 41,    /* logical_and_expression  */
    539      1.1  christos   YYSYMBOL_logical_or_expression = 42,     /* logical_or_expression  */
    540      1.1  christos   YYSYMBOL_conditional_expression = 43,    /* conditional_expression  */
    541      1.1  christos   YYSYMBOL_expression = 44                 /* expression  */
    542      1.1  christos };
    543      1.1  christos typedef enum yysymbol_kind_t yysymbol_kind_t;
    544      1.1  christos 
    545      1.1  christos 
    546      1.1  christos 
    547      1.1  christos 
    548      1.1  christos #ifdef short
    549      1.1  christos # undef short
    550      1.1  christos #endif
    551      1.1  christos 
    552      1.1  christos /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
    553      1.1  christos    <limits.h> and (if available) <stdint.h> are included
    554      1.1  christos    so that the code can choose integer types of a good width.  */
    555      1.1  christos 
    556      1.1  christos #ifndef __PTRDIFF_MAX__
    557      1.1  christos # include <limits.h> /* INFRINGES ON USER NAME SPACE */
    558      1.1  christos # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
    559      1.1  christos #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
    560      1.1  christos #  define YY_STDINT_H
    561      1.1  christos # endif
    562      1.1  christos #endif
    563      1.1  christos 
    564      1.1  christos /* Narrow types that promote to a signed type and that can represent a
    565      1.1  christos    signed or unsigned integer of at least N bits.  In tables they can
    566      1.1  christos    save space and decrease cache pressure.  Promoting to a signed type
    567      1.1  christos    helps avoid bugs in integer arithmetic.  */
    568      1.1  christos 
    569      1.1  christos #ifdef __INT_LEAST8_MAX__
    570      1.1  christos typedef __INT_LEAST8_TYPE__ yytype_int8;
    571      1.1  christos #elif defined YY_STDINT_H
    572      1.1  christos typedef int_least8_t yytype_int8;
    573      1.1  christos #else
    574      1.1  christos typedef signed char yytype_int8;
    575      1.1  christos #endif
    576      1.1  christos 
    577      1.1  christos #ifdef __INT_LEAST16_MAX__
    578      1.1  christos typedef __INT_LEAST16_TYPE__ yytype_int16;
    579      1.1  christos #elif defined YY_STDINT_H
    580      1.1  christos typedef int_least16_t yytype_int16;
    581      1.1  christos #else
    582      1.1  christos typedef short yytype_int16;
    583      1.1  christos #endif
    584      1.1  christos 
    585      1.1  christos /* Work around bug in HP-UX 11.23, which defines these macros
    586      1.1  christos    incorrectly for preprocessor constants.  This workaround can likely
    587      1.1  christos    be removed in 2023, as HPE has promised support for HP-UX 11.23
    588      1.1  christos    (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
    589      1.1  christos    <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
    590      1.1  christos #ifdef __hpux
    591      1.1  christos # undef UINT_LEAST8_MAX
    592      1.1  christos # undef UINT_LEAST16_MAX
    593      1.1  christos # define UINT_LEAST8_MAX 255
    594      1.1  christos # define UINT_LEAST16_MAX 65535
    595      1.1  christos #endif
    596      1.1  christos 
    597      1.1  christos #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
    598      1.1  christos typedef __UINT_LEAST8_TYPE__ yytype_uint8;
    599      1.1  christos #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
    600      1.1  christos        && UINT_LEAST8_MAX <= INT_MAX)
    601      1.1  christos typedef uint_least8_t yytype_uint8;
    602      1.1  christos #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
    603      1.1  christos typedef unsigned char yytype_uint8;
    604      1.1  christos #else
    605      1.1  christos typedef short yytype_uint8;
    606      1.1  christos #endif
    607      1.1  christos 
    608      1.1  christos #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
    609      1.1  christos typedef __UINT_LEAST16_TYPE__ yytype_uint16;
    610      1.1  christos #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
    611      1.1  christos        && UINT_LEAST16_MAX <= INT_MAX)
    612      1.1  christos typedef uint_least16_t yytype_uint16;
    613      1.1  christos #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
    614      1.1  christos typedef unsigned short yytype_uint16;
    615      1.1  christos #else
    616      1.1  christos typedef int yytype_uint16;
    617      1.1  christos #endif
    618      1.1  christos 
    619      1.1  christos #ifndef YYPTRDIFF_T
    620      1.1  christos # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
    621      1.1  christos #  define YYPTRDIFF_T __PTRDIFF_TYPE__
    622      1.1  christos #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
    623      1.1  christos # elif defined PTRDIFF_MAX
    624      1.1  christos #  ifndef ptrdiff_t
    625      1.1  christos #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
    626      1.1  christos #  endif
    627      1.1  christos #  define YYPTRDIFF_T ptrdiff_t
    628      1.1  christos #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
    629      1.1  christos # else
    630      1.1  christos #  define YYPTRDIFF_T long
    631      1.1  christos #  define YYPTRDIFF_MAXIMUM LONG_MAX
    632      1.1  christos # endif
    633      1.1  christos #endif
    634      1.1  christos 
    635      1.1  christos #ifndef YYSIZE_T
    636      1.1  christos # ifdef __SIZE_TYPE__
    637      1.1  christos #  define YYSIZE_T __SIZE_TYPE__
    638      1.1  christos # elif defined size_t
    639      1.1  christos #  define YYSIZE_T size_t
    640      1.1  christos # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
    641      1.1  christos #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
    642      1.1  christos #  define YYSIZE_T size_t
    643      1.1  christos # else
    644      1.1  christos #  define YYSIZE_T unsigned
    645      1.1  christos # endif
    646      1.1  christos #endif
    647      1.1  christos 
    648      1.1  christos #define YYSIZE_MAXIMUM                                  \
    649      1.1  christos   YY_CAST (YYPTRDIFF_T,                                 \
    650      1.1  christos            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
    651      1.1  christos             ? YYPTRDIFF_MAXIMUM                         \
    652      1.1  christos             : YY_CAST (YYSIZE_T, -1)))
    653      1.1  christos 
    654      1.1  christos #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
    655      1.1  christos 
    656      1.1  christos 
    657      1.1  christos /* Stored state numbers (used for stacks). */
    658      1.1  christos typedef yytype_int8 yy_state_t;
    659      1.1  christos 
    660      1.1  christos /* State numbers in computations.  */
    661      1.1  christos typedef int yy_state_fast_t;
    662      1.1  christos 
    663      1.1  christos #ifndef YY_
    664      1.1  christos # if defined YYENABLE_NLS && YYENABLE_NLS
    665      1.1  christos #  if ENABLE_NLS
    666      1.1  christos #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
    667      1.1  christos #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
    668      1.1  christos #  endif
    669      1.1  christos # endif
    670      1.1  christos # ifndef YY_
    671      1.1  christos #  define YY_(Msgid) Msgid
    672      1.1  christos # endif
    673      1.1  christos #endif
    674      1.1  christos 
    675      1.1  christos 
    676      1.1  christos #ifndef YY_ATTRIBUTE_PURE
    677      1.1  christos # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
    678      1.1  christos #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
    679      1.1  christos # else
    680      1.1  christos #  define YY_ATTRIBUTE_PURE
    681      1.1  christos # endif
    682      1.1  christos #endif
    683      1.1  christos 
    684      1.1  christos #ifndef YY_ATTRIBUTE_UNUSED
    685      1.1  christos # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
    686      1.1  christos #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
    687      1.1  christos # else
    688      1.1  christos #  define YY_ATTRIBUTE_UNUSED
    689      1.1  christos # endif
    690      1.1  christos #endif
    691      1.1  christos 
    692      1.1  christos /* Suppress unused-variable warnings by "using" E.  */
    693      1.1  christos #if ! defined lint || defined __GNUC__
    694      1.1  christos # define YY_USE(E) ((void) (E))
    695      1.1  christos #else
    696      1.1  christos # define YY_USE(E) /* empty */
    697      1.1  christos #endif
    698      1.1  christos 
    699      1.1  christos /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
    700      1.1  christos #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
    701      1.1  christos # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
    702      1.1  christos #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    703      1.1  christos     _Pragma ("GCC diagnostic push")                                     \
    704      1.1  christos     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
    705      1.1  christos # else
    706      1.1  christos #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    707      1.1  christos     _Pragma ("GCC diagnostic push")                                     \
    708      1.1  christos     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    709      1.1  christos     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
    710      1.1  christos # endif
    711      1.1  christos # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
    712      1.1  christos     _Pragma ("GCC diagnostic pop")
    713      1.1  christos #else
    714      1.1  christos # define YY_INITIAL_VALUE(Value) Value
    715      1.1  christos #endif
    716      1.1  christos #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    717      1.1  christos # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    718      1.1  christos # define YY_IGNORE_MAYBE_UNINITIALIZED_END
    719      1.1  christos #endif
    720      1.1  christos #ifndef YY_INITIAL_VALUE
    721      1.1  christos # define YY_INITIAL_VALUE(Value) /* Nothing. */
    722      1.1  christos #endif
    723      1.1  christos 
    724      1.1  christos #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
    725      1.1  christos # define YY_IGNORE_USELESS_CAST_BEGIN                          \
    726      1.1  christos     _Pragma ("GCC diagnostic push")                            \
    727      1.1  christos     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
    728      1.1  christos # define YY_IGNORE_USELESS_CAST_END            \
    729      1.1  christos     _Pragma ("GCC diagnostic pop")
    730      1.1  christos #endif
    731      1.1  christos #ifndef YY_IGNORE_USELESS_CAST_BEGIN
    732      1.1  christos # define YY_IGNORE_USELESS_CAST_BEGIN
    733      1.1  christos # define YY_IGNORE_USELESS_CAST_END
    734      1.1  christos #endif
    735      1.1  christos 
    736      1.1  christos 
    737      1.1  christos #define YY_ASSERT(E) ((void) (0 && (E)))
    738      1.1  christos 
    739      1.1  christos #if !defined yyoverflow
    740      1.1  christos 
    741      1.1  christos /* The parser invokes alloca or malloc; define the necessary symbols.  */
    742      1.1  christos 
    743      1.1  christos # ifdef YYSTACK_USE_ALLOCA
    744      1.1  christos #  if YYSTACK_USE_ALLOCA
    745      1.1  christos #   ifdef __GNUC__
    746      1.1  christos #    define YYSTACK_ALLOC __builtin_alloca
    747      1.1  christos #   elif defined __BUILTIN_VA_ARG_INCR
    748      1.1  christos #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
    749      1.1  christos #   elif defined _AIX
    750      1.1  christos #    define YYSTACK_ALLOC __alloca
    751      1.1  christos #   elif defined _MSC_VER
    752      1.1  christos #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
    753      1.1  christos #    define alloca _alloca
    754      1.1  christos #   else
    755      1.1  christos #    define YYSTACK_ALLOC alloca
    756      1.1  christos #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
    757      1.1  christos #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    758      1.1  christos       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
    759      1.1  christos #     ifndef EXIT_SUCCESS
    760      1.1  christos #      define EXIT_SUCCESS 0
    761      1.1  christos #     endif
    762      1.1  christos #    endif
    763      1.1  christos #   endif
    764      1.1  christos #  endif
    765      1.1  christos # endif
    766      1.1  christos 
    767      1.1  christos # ifdef YYSTACK_ALLOC
    768      1.1  christos    /* Pacify GCC's 'empty if-body' warning.  */
    769      1.1  christos #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
    770      1.1  christos #  ifndef YYSTACK_ALLOC_MAXIMUM
    771      1.1  christos     /* The OS might guarantee only one guard page at the bottom of the stack,
    772      1.1  christos        and a page size can be as small as 4096 bytes.  So we cannot safely
    773      1.1  christos        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
    774      1.1  christos        to allow for a few compiler-allocated temporary stack slots.  */
    775      1.1  christos #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
    776      1.1  christos #  endif
    777      1.1  christos # else
    778      1.1  christos #  define YYSTACK_ALLOC YYMALLOC
    779      1.1  christos #  define YYSTACK_FREE YYFREE
    780      1.1  christos #  ifndef YYSTACK_ALLOC_MAXIMUM
    781      1.1  christos #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
    782      1.1  christos #  endif
    783      1.1  christos #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
    784      1.1  christos        && ! ((defined YYMALLOC || defined malloc) \
    785      1.1  christos              && (defined YYFREE || defined free)))
    786      1.1  christos #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    787      1.1  christos #   ifndef EXIT_SUCCESS
    788      1.1  christos #    define EXIT_SUCCESS 0
    789      1.1  christos #   endif
    790      1.1  christos #  endif
    791      1.1  christos #  ifndef YYMALLOC
    792      1.1  christos #   define YYMALLOC malloc
    793      1.1  christos #   if ! defined malloc && ! defined EXIT_SUCCESS
    794      1.1  christos void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
    795      1.1  christos #   endif
    796      1.1  christos #  endif
    797      1.1  christos #  ifndef YYFREE
    798      1.1  christos #   define YYFREE free
    799      1.1  christos #   if ! defined free && ! defined EXIT_SUCCESS
    800      1.1  christos void free (void *); /* INFRINGES ON USER NAME SPACE */
    801      1.1  christos #   endif
    802      1.1  christos #  endif
    803      1.1  christos # endif
    804      1.1  christos #endif /* !defined yyoverflow */
    805      1.1  christos 
    806      1.1  christos #if (! defined yyoverflow \
    807      1.1  christos      && (! defined __cplusplus \
    808      1.1  christos          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
    809      1.1  christos 
    810      1.1  christos /* A type that is properly aligned for any stack member.  */
    811      1.1  christos union yyalloc
    812      1.1  christos {
    813      1.1  christos   yy_state_t yyss_alloc;
    814      1.1  christos   YYSTYPE yyvs_alloc;
    815      1.1  christos };
    816      1.1  christos 
    817      1.1  christos /* The size of the maximum gap between one aligned stack and the next.  */
    818      1.1  christos # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
    819      1.1  christos 
    820      1.1  christos /* The size of an array large to enough to hold all stacks, each with
    821      1.1  christos    N elements.  */
    822      1.1  christos # define YYSTACK_BYTES(N) \
    823      1.1  christos      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
    824      1.1  christos       + YYSTACK_GAP_MAXIMUM)
    825      1.1  christos 
    826      1.1  christos # define YYCOPY_NEEDED 1
    827      1.1  christos 
    828      1.1  christos /* Relocate STACK from its old location to the new one.  The
    829      1.1  christos    local variables YYSIZE and YYSTACKSIZE give the old and new number of
    830      1.1  christos    elements in the stack, and YYPTR gives the new location of the
    831      1.1  christos    stack.  Advance YYPTR to a properly aligned location for the next
    832      1.1  christos    stack.  */
    833      1.1  christos # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    834      1.1  christos     do                                                                  \
    835      1.1  christos       {                                                                 \
    836      1.1  christos         YYPTRDIFF_T yynewbytes;                                         \
    837      1.1  christos         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
    838      1.1  christos         Stack = &yyptr->Stack_alloc;                                    \
    839      1.1  christos         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
    840      1.1  christos         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
    841      1.1  christos       }                                                                 \
    842      1.1  christos     while (0)
    843      1.1  christos 
    844      1.1  christos #endif
    845      1.1  christos 
    846      1.1  christos #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
    847      1.1  christos /* Copy COUNT objects from SRC to DST.  The source and destination do
    848      1.1  christos    not overlap.  */
    849      1.1  christos # ifndef YYCOPY
    850      1.1  christos #  if defined __GNUC__ && 1 < __GNUC__
    851      1.1  christos #   define YYCOPY(Dst, Src, Count) \
    852      1.1  christos       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
    853      1.1  christos #  else
    854      1.1  christos #   define YYCOPY(Dst, Src, Count)              \
    855      1.1  christos       do                                        \
    856      1.1  christos         {                                       \
    857      1.1  christos           YYPTRDIFF_T yyi;                      \
    858      1.1  christos           for (yyi = 0; yyi < (Count); yyi++)   \
    859      1.1  christos             (Dst)[yyi] = (Src)[yyi];            \
    860      1.1  christos         }                                       \
    861      1.1  christos       while (0)
    862      1.1  christos #  endif
    863      1.1  christos # endif
    864      1.1  christos #endif /* !YYCOPY_NEEDED */
    865      1.1  christos 
    866      1.1  christos /* YYFINAL -- State number of the termination state.  */
    867  1.1.1.2  christos #define YYFINAL  48
    868      1.1  christos /* YYLAST -- Last index in YYTABLE.  */
    869  1.1.1.2  christos #define YYLAST   74
    870      1.1  christos 
    871      1.1  christos /* YYNTOKENS -- Number of terminals.  */
    872      1.1  christos #define YYNTOKENS  29
    873      1.1  christos /* YYNNTS -- Number of nonterminals.  */
    874      1.1  christos #define YYNNTS  16
    875      1.1  christos /* YYNRULES -- Number of rules.  */
    876  1.1.1.2  christos #define YYNRULES  45
    877      1.1  christos /* YYNSTATES -- Number of states.  */
    878  1.1.1.2  christos #define YYNSTATES  82
    879      1.1  christos 
    880      1.1  christos /* YYMAXUTOK -- Last valid token kind.  */
    881      1.1  christos #define YYMAXUTOK   267
    882      1.1  christos 
    883      1.1  christos 
    884      1.1  christos /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
    885      1.1  christos    as returned by yylex, with out-of-bounds checking.  */
    886      1.1  christos #define YYTRANSLATE(YYX)                                \
    887      1.1  christos   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
    888      1.1  christos    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
    889      1.1  christos    : YYSYMBOL_YYUNDEF)
    890      1.1  christos 
    891      1.1  christos /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
    892      1.1  christos    as returned by yylex.  */
    893      1.1  christos static const yytype_int8 yytranslate[] =
    894      1.1  christos {
    895      1.1  christos        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    896      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    897      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    898      1.1  christos        2,     2,     2,    19,     2,     2,     2,    15,    24,     2,
    899      1.1  christos       13,    14,    20,    17,     2,    16,     2,    21,     2,     2,
    900      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,    28,     2,
    901      1.1  christos       22,     2,    23,    27,     2,     2,     2,     2,     2,     2,
    902      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    903      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    904      1.1  christos        2,     2,     2,     2,    25,     2,     2,     2,     2,     2,
    905      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    906      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    907      1.1  christos        2,     2,     2,     2,    26,     2,    18,     2,     2,     2,
    908      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    909      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    910      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    911      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    912      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    913      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    914      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    915      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    916      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    917      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    918      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    919      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    920      1.1  christos        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
    921      1.1  christos        5,     6,     7,     8,     9,    10,    11,    12
    922      1.1  christos };
    923      1.1  christos 
    924      1.1  christos #if YYDEBUG
    925      1.1  christos /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
    926      1.1  christos static const yytype_int16 yyrline[] =
    927      1.1  christos {
    928  1.1.1.3  christos        0,   358,   358,   359,   360,   361,   362,   366,   367,   368,
    929  1.1.1.3  christos      372,   373,   374,   375,   376,   380,   381,   382,   383,   387,
    930  1.1.1.3  christos      388,   389,   393,   394,   395,   399,   400,   401,   402,   403,
    931  1.1.1.3  christos      407,   408,   409,   413,   414,   418,   419,   423,   424,   428,
    932  1.1.1.3  christos      429,   433,   434,   438,   439,   443
    933      1.1  christos };
    934      1.1  christos #endif
    935      1.1  christos 
    936      1.1  christos /** Accessing symbol of state STATE.  */
    937      1.1  christos #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
    938      1.1  christos 
    939      1.1  christos #if YYDEBUG || 0
    940      1.1  christos /* The user-facing name of the symbol whose (internal) number is
    941      1.1  christos    YYSYMBOL.  No bounds checking.  */
    942      1.1  christos static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
    943      1.1  christos 
    944      1.1  christos /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    945      1.1  christos    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
    946      1.1  christos static const char *const yytname[] =
    947      1.1  christos {
    948      1.1  christos   "\"end of file\"", "error", "\"invalid token\"", "INTEGER",
    949      1.1  christos   "IDENTIFIER", "LEFT_OP", "RIGHT_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP",
    950      1.1  christos   "AND_OP", "OR_OP", "'('", "')'", "'%'", "'-'", "'+'", "'~'", "'!'",
    951      1.1  christos   "'*'", "'/'", "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "':'", "$accept",
    952      1.1  christos   "primary_expression", "addend", "unary_expression",
    953  1.1.1.3  christos   "multiplicative_expression", "shift_expression", "additive_expression",
    954      1.1  christos   "relational_expression", "equality_expression", "and_expression",
    955      1.1  christos   "exclusive_or_expression", "inclusive_or_expression",
    956      1.1  christos   "logical_and_expression", "logical_or_expression",
    957      1.1  christos   "conditional_expression", "expression", YY_NULLPTR
    958      1.1  christos };
    959      1.1  christos 
    960      1.1  christos static const char *
    961      1.1  christos yysymbol_name (yysymbol_kind_t yysymbol)
    962      1.1  christos {
    963      1.1  christos   return yytname[yysymbol];
    964      1.1  christos }
    965      1.1  christos #endif
    966      1.1  christos 
    967  1.1.1.2  christos #define YYPACT_NINF (-28)
    968      1.1  christos 
    969      1.1  christos #define yypact_value_is_default(Yyn) \
    970      1.1  christos   ((Yyn) == YYPACT_NINF)
    971      1.1  christos 
    972      1.1  christos #define YYTABLE_NINF (-1)
    973      1.1  christos 
    974      1.1  christos #define yytable_value_is_error(Yyn) \
    975      1.1  christos   0
    976      1.1  christos 
    977      1.1  christos /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    978      1.1  christos    STATE-NUM.  */
    979      1.1  christos static const yytype_int8 yypact[] =
    980      1.1  christos {
    981  1.1.1.2  christos        2,   -28,   -28,     2,    10,     2,     2,     2,     2,   -28,
    982  1.1.1.3  christos      -28,     9,    34,    25,     0,    36,    -8,     7,    23,    32,
    983  1.1.1.3  christos        1,   -28,    52,    22,    45,   -28,   -28,   -28,   -28,     2,
    984      1.1  christos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    985  1.1.1.2  christos        2,     2,     2,     2,     2,     2,     2,     2,   -28,   -28,
    986  1.1.1.3  christos       44,   -28,   -28,   -28,     9,     9,    34,    34,    25,    25,
    987  1.1.1.3  christos       25,    25,     0,     0,    36,    -8,     7,    23,    32,    29,
    988  1.1.1.2  christos      -28,   -28,     2,    17,    21,   -28,   -28,    56,    57,   -28,
    989  1.1.1.2  christos      -28,   -28
    990      1.1  christos };
    991      1.1  christos 
    992      1.1  christos /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
    993      1.1  christos    Performed when YYTABLE does not specify something else to do.  Zero
    994      1.1  christos    means the default is an error.  */
    995      1.1  christos static const yytype_int8 yydefact[] =
    996      1.1  christos {
    997  1.1.1.2  christos        0,     2,     3,     0,     0,     0,     0,     0,     0,    10,
    998  1.1.1.2  christos       15,    19,    22,    25,    30,    33,    35,    37,    39,    41,
    999  1.1.1.2  christos       43,    45,     0,     0,     0,    12,    11,    13,    14,     0,
   1000      1.1  christos        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1001  1.1.1.2  christos        0,     0,     0,     0,     0,     0,     0,     0,     1,     4,
   1002  1.1.1.3  christos        0,    18,    16,    17,    20,    21,    24,    23,    28,    29,
   1003  1.1.1.2  christos       26,    27,    31,    32,    34,    36,    38,    40,    42,     0,
   1004  1.1.1.2  christos        9,     9,     0,     0,     0,    44,     6,     0,     0,     5,
   1005  1.1.1.2  christos        7,     8
   1006      1.1  christos };
   1007      1.1  christos 
   1008      1.1  christos /* YYPGOTO[NTERM-NUM].  */
   1009      1.1  christos static const yytype_int8 yypgoto[] =
   1010      1.1  christos {
   1011  1.1.1.3  christos      -28,   -28,   -10,    -4,    18,    19,   -27,    15,    20,    24,
   1012  1.1.1.3  christos       26,    27,    28,   -28,    -9,    -3
   1013      1.1  christos };
   1014      1.1  christos 
   1015      1.1  christos /* YYDEFGOTO[NTERM-NUM].  */
   1016      1.1  christos static const yytype_int8 yydefgoto[] =
   1017      1.1  christos {
   1018  1.1.1.2  christos        0,     9,    73,    10,    11,    12,    13,    14,    15,    16,
   1019  1.1.1.2  christos       17,    18,    19,    20,    21,    22
   1020      1.1  christos };
   1021      1.1  christos 
   1022      1.1  christos /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
   1023      1.1  christos    positive, shift that token.  If negative, reduce the rule whose
   1024      1.1  christos    number is the opposite.  If YYTABLE_NINF, syntax error.  */
   1025      1.1  christos static const yytype_int8 yytable[] =
   1026      1.1  christos {
   1027  1.1.1.2  christos       23,    25,    26,    27,    28,     1,     2,    36,    37,    58,
   1028  1.1.1.2  christos       59,    60,    61,    46,    24,     3,    42,     4,     5,     6,
   1029  1.1.1.2  christos        7,     8,    38,    39,    29,    51,    52,    53,    47,    30,
   1030  1.1.1.3  christos       31,    76,    43,    77,    78,    79,    49,    77,    78,    32,
   1031  1.1.1.3  christos       33,    34,    35,    45,    69,    40,    41,    70,    71,    44,
   1032  1.1.1.3  christos       54,    55,    48,    56,    57,    62,    63,    72,    50,    80,
   1033  1.1.1.3  christos       81,    74,    64,    75,     0,     0,     0,    65,     0,     0,
   1034  1.1.1.3  christos       66,     0,    67,     0,    68
   1035      1.1  christos };
   1036      1.1  christos 
   1037      1.1  christos static const yytype_int8 yycheck[] =
   1038      1.1  christos {
   1039  1.1.1.2  christos        3,     5,     6,     7,     8,     3,     4,     7,     8,    36,
   1040  1.1.1.2  christos       37,    38,    39,    12,     4,    13,    24,    15,    16,    17,
   1041  1.1.1.2  christos       18,    19,    22,    23,    15,    29,    30,    31,    27,    20,
   1042  1.1.1.3  christos       21,    14,    25,    16,    17,    14,    14,    16,    17,     5,
   1043  1.1.1.3  christos        6,    16,    17,    11,    47,     9,    10,     3,     4,    26,
   1044  1.1.1.3  christos       32,    33,     0,    34,    35,    40,    41,    28,    13,     3,
   1045  1.1.1.3  christos        3,    71,    42,    72,    -1,    -1,    -1,    43,    -1,    -1,
   1046  1.1.1.3  christos       44,    -1,    45,    -1,    46
   1047      1.1  christos };
   1048      1.1  christos 
   1049      1.1  christos /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   1050      1.1  christos    state STATE-NUM.  */
   1051      1.1  christos static const yytype_int8 yystos[] =
   1052      1.1  christos {
   1053  1.1.1.2  christos        0,     3,     4,    13,    15,    16,    17,    18,    19,    30,
   1054  1.1.1.2  christos       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
   1055  1.1.1.2  christos       42,    43,    44,    44,     4,    32,    32,    32,    32,    15,
   1056  1.1.1.3  christos       20,    21,     5,     6,    16,    17,     7,     8,    22,    23,
   1057  1.1.1.2  christos        9,    10,    24,    25,    26,    11,    12,    27,     0,    14,
   1058  1.1.1.2  christos       13,    32,    32,    32,    33,    33,    34,    34,    35,    35,
   1059  1.1.1.2  christos       35,    35,    36,    36,    37,    38,    39,    40,    41,    44,
   1060  1.1.1.2  christos        3,     4,    28,    31,    31,    43,    14,    16,    17,    14,
   1061  1.1.1.2  christos        3,     3
   1062      1.1  christos };
   1063      1.1  christos 
   1064      1.1  christos /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
   1065      1.1  christos static const yytype_int8 yyr1[] =
   1066      1.1  christos {
   1067  1.1.1.2  christos        0,    29,    30,    30,    30,    30,    30,    31,    31,    31,
   1068  1.1.1.2  christos       32,    32,    32,    32,    32,    33,    33,    33,    33,    34,
   1069  1.1.1.2  christos       34,    34,    35,    35,    35,    36,    36,    36,    36,    36,
   1070  1.1.1.2  christos       37,    37,    37,    38,    38,    39,    39,    40,    40,    41,
   1071  1.1.1.2  christos       41,    42,    42,    43,    43,    44
   1072      1.1  christos };
   1073      1.1  christos 
   1074      1.1  christos /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
   1075      1.1  christos static const yytype_int8 yyr2[] =
   1076      1.1  christos {
   1077  1.1.1.2  christos        0,     2,     1,     1,     3,     6,     6,     3,     3,     0,
   1078  1.1.1.2  christos        1,     2,     2,     2,     2,     1,     3,     3,     3,     1,
   1079  1.1.1.2  christos        3,     3,     1,     3,     3,     1,     3,     3,     3,     3,
   1080  1.1.1.2  christos        1,     3,     3,     1,     3,     1,     3,     1,     3,     1,
   1081  1.1.1.2  christos        3,     1,     3,     1,     5,     1
   1082      1.1  christos };
   1083      1.1  christos 
   1084      1.1  christos 
   1085      1.1  christos enum { YYENOMEM = -2 };
   1086      1.1  christos 
   1087      1.1  christos #define yyerrok         (yyerrstatus = 0)
   1088      1.1  christos #define yyclearin       (yychar = YYEMPTY)
   1089      1.1  christos 
   1090      1.1  christos #define YYACCEPT        goto yyacceptlab
   1091      1.1  christos #define YYABORT         goto yyabortlab
   1092      1.1  christos #define YYERROR         goto yyerrorlab
   1093      1.1  christos #define YYNOMEM         goto yyexhaustedlab
   1094      1.1  christos 
   1095      1.1  christos 
   1096      1.1  christos #define YYRECOVERING()  (!!yyerrstatus)
   1097      1.1  christos 
   1098      1.1  christos #define YYBACKUP(Token, Value)                                    \
   1099      1.1  christos   do                                                              \
   1100      1.1  christos     if (yychar == YYEMPTY)                                        \
   1101      1.1  christos       {                                                           \
   1102      1.1  christos         yychar = (Token);                                         \
   1103      1.1  christos         yylval = (Value);                                         \
   1104      1.1  christos         YYPOPSTACK (yylen);                                       \
   1105      1.1  christos         yystate = *yyssp;                                         \
   1106      1.1  christos         goto yybackup;                                            \
   1107      1.1  christos       }                                                           \
   1108      1.1  christos     else                                                          \
   1109      1.1  christos       {                                                           \
   1110      1.1  christos         yyerror (YY_("syntax error: cannot back up")); \
   1111      1.1  christos         YYERROR;                                                  \
   1112      1.1  christos       }                                                           \
   1113      1.1  christos   while (0)
   1114      1.1  christos 
   1115      1.1  christos /* Backward compatibility with an undocumented macro.
   1116      1.1  christos    Use YYerror or YYUNDEF. */
   1117      1.1  christos #define YYERRCODE YYUNDEF
   1118      1.1  christos 
   1119      1.1  christos 
   1120      1.1  christos /* Enable debugging if requested.  */
   1121      1.1  christos #if YYDEBUG
   1122      1.1  christos 
   1123      1.1  christos # ifndef YYFPRINTF
   1124      1.1  christos #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
   1125      1.1  christos #  define YYFPRINTF fprintf
   1126      1.1  christos # endif
   1127      1.1  christos 
   1128      1.1  christos # define YYDPRINTF(Args)                        \
   1129      1.1  christos do {                                            \
   1130      1.1  christos   if (yydebug)                                  \
   1131      1.1  christos     YYFPRINTF Args;                             \
   1132      1.1  christos } while (0)
   1133      1.1  christos 
   1134      1.1  christos 
   1135      1.1  christos 
   1136      1.1  christos 
   1137      1.1  christos # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
   1138      1.1  christos do {                                                                      \
   1139      1.1  christos   if (yydebug)                                                            \
   1140      1.1  christos     {                                                                     \
   1141      1.1  christos       YYFPRINTF (stderr, "%s ", Title);                                   \
   1142      1.1  christos       yy_symbol_print (stderr,                                            \
   1143      1.1  christos                   Kind, Value); \
   1144      1.1  christos       YYFPRINTF (stderr, "\n");                                           \
   1145      1.1  christos     }                                                                     \
   1146      1.1  christos } while (0)
   1147      1.1  christos 
   1148      1.1  christos 
   1149      1.1  christos /*-----------------------------------.
   1150      1.1  christos | Print this symbol's value on YYO.  |
   1151      1.1  christos `-----------------------------------*/
   1152      1.1  christos 
   1153      1.1  christos static void
   1154      1.1  christos yy_symbol_value_print (FILE *yyo,
   1155      1.1  christos                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
   1156      1.1  christos {
   1157      1.1  christos   FILE *yyoutput = yyo;
   1158      1.1  christos   YY_USE (yyoutput);
   1159      1.1  christos   if (!yyvaluep)
   1160      1.1  christos     return;
   1161      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1162      1.1  christos   YY_USE (yykind);
   1163      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1164      1.1  christos }
   1165      1.1  christos 
   1166      1.1  christos 
   1167      1.1  christos /*---------------------------.
   1168      1.1  christos | Print this symbol on YYO.  |
   1169      1.1  christos `---------------------------*/
   1170      1.1  christos 
   1171      1.1  christos static void
   1172      1.1  christos yy_symbol_print (FILE *yyo,
   1173      1.1  christos                  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
   1174      1.1  christos {
   1175      1.1  christos   YYFPRINTF (yyo, "%s %s (",
   1176      1.1  christos              yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
   1177      1.1  christos 
   1178      1.1  christos   yy_symbol_value_print (yyo, yykind, yyvaluep);
   1179      1.1  christos   YYFPRINTF (yyo, ")");
   1180      1.1  christos }
   1181      1.1  christos 
   1182      1.1  christos /*------------------------------------------------------------------.
   1183      1.1  christos | yy_stack_print -- Print the state stack from its BOTTOM up to its |
   1184      1.1  christos | TOP (included).                                                   |
   1185      1.1  christos `------------------------------------------------------------------*/
   1186      1.1  christos 
   1187      1.1  christos static void
   1188      1.1  christos yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
   1189      1.1  christos {
   1190      1.1  christos   YYFPRINTF (stderr, "Stack now");
   1191      1.1  christos   for (; yybottom <= yytop; yybottom++)
   1192      1.1  christos     {
   1193      1.1  christos       int yybot = *yybottom;
   1194      1.1  christos       YYFPRINTF (stderr, " %d", yybot);
   1195      1.1  christos     }
   1196      1.1  christos   YYFPRINTF (stderr, "\n");
   1197      1.1  christos }
   1198      1.1  christos 
   1199      1.1  christos # define YY_STACK_PRINT(Bottom, Top)                            \
   1200      1.1  christos do {                                                            \
   1201      1.1  christos   if (yydebug)                                                  \
   1202      1.1  christos     yy_stack_print ((Bottom), (Top));                           \
   1203      1.1  christos } while (0)
   1204      1.1  christos 
   1205      1.1  christos 
   1206      1.1  christos /*------------------------------------------------.
   1207      1.1  christos | Report that the YYRULE is going to be reduced.  |
   1208      1.1  christos `------------------------------------------------*/
   1209      1.1  christos 
   1210      1.1  christos static void
   1211      1.1  christos yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
   1212      1.1  christos                  int yyrule)
   1213      1.1  christos {
   1214      1.1  christos   int yylno = yyrline[yyrule];
   1215      1.1  christos   int yynrhs = yyr2[yyrule];
   1216      1.1  christos   int yyi;
   1217      1.1  christos   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
   1218      1.1  christos              yyrule - 1, yylno);
   1219      1.1  christos   /* The symbols being reduced.  */
   1220      1.1  christos   for (yyi = 0; yyi < yynrhs; yyi++)
   1221      1.1  christos     {
   1222      1.1  christos       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
   1223      1.1  christos       yy_symbol_print (stderr,
   1224      1.1  christos                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
   1225      1.1  christos                        &yyvsp[(yyi + 1) - (yynrhs)]);
   1226      1.1  christos       YYFPRINTF (stderr, "\n");
   1227      1.1  christos     }
   1228      1.1  christos }
   1229      1.1  christos 
   1230      1.1  christos # define YY_REDUCE_PRINT(Rule)          \
   1231      1.1  christos do {                                    \
   1232      1.1  christos   if (yydebug)                          \
   1233      1.1  christos     yy_reduce_print (yyssp, yyvsp, Rule); \
   1234      1.1  christos } while (0)
   1235      1.1  christos 
   1236      1.1  christos /* Nonzero means print parse trace.  It is left uninitialized so that
   1237      1.1  christos    multiple parsers can coexist.  */
   1238      1.1  christos int yydebug;
   1239      1.1  christos #else /* !YYDEBUG */
   1240      1.1  christos # define YYDPRINTF(Args) ((void) 0)
   1241      1.1  christos # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
   1242      1.1  christos # define YY_STACK_PRINT(Bottom, Top)
   1243      1.1  christos # define YY_REDUCE_PRINT(Rule)
   1244      1.1  christos #endif /* !YYDEBUG */
   1245      1.1  christos 
   1246      1.1  christos 
   1247      1.1  christos /* YYINITDEPTH -- initial size of the parser's stacks.  */
   1248      1.1  christos #ifndef YYINITDEPTH
   1249      1.1  christos # define YYINITDEPTH 200
   1250      1.1  christos #endif
   1251      1.1  christos 
   1252      1.1  christos /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   1253      1.1  christos    if the built-in stack extension method is used).
   1254      1.1  christos 
   1255      1.1  christos    Do not make this value too large; the results are undefined if
   1256      1.1  christos    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   1257      1.1  christos    evaluated with infinite-precision integer arithmetic.  */
   1258      1.1  christos 
   1259      1.1  christos #ifndef YYMAXDEPTH
   1260      1.1  christos # define YYMAXDEPTH 10000
   1261      1.1  christos #endif
   1262      1.1  christos 
   1263      1.1  christos 
   1264      1.1  christos 
   1265      1.1  christos 
   1266      1.1  christos 
   1267      1.1  christos 
   1268      1.1  christos /*-----------------------------------------------.
   1269      1.1  christos | Release the memory associated to this symbol.  |
   1270      1.1  christos `-----------------------------------------------*/
   1271      1.1  christos 
   1272      1.1  christos static void
   1273      1.1  christos yydestruct (const char *yymsg,
   1274      1.1  christos             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
   1275      1.1  christos {
   1276      1.1  christos   YY_USE (yyvaluep);
   1277      1.1  christos   if (!yymsg)
   1278      1.1  christos     yymsg = "Deleting";
   1279      1.1  christos   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
   1280      1.1  christos 
   1281      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1282      1.1  christos   YY_USE (yykind);
   1283      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1284      1.1  christos }
   1285      1.1  christos 
   1286      1.1  christos 
   1287      1.1  christos /* Lookahead token kind.  */
   1288      1.1  christos int yychar;
   1289      1.1  christos 
   1290      1.1  christos /* The semantic value of the lookahead symbol.  */
   1291      1.1  christos YYSTYPE yylval;
   1292      1.1  christos /* Number of syntax errors so far.  */
   1293      1.1  christos int yynerrs;
   1294      1.1  christos 
   1295      1.1  christos 
   1296      1.1  christos 
   1297      1.1  christos 
   1298      1.1  christos /*----------.
   1299      1.1  christos | yyparse.  |
   1300      1.1  christos `----------*/
   1301      1.1  christos 
   1302      1.1  christos int
   1303      1.1  christos yyparse (void)
   1304      1.1  christos {
   1305      1.1  christos     yy_state_fast_t yystate = 0;
   1306      1.1  christos     /* Number of tokens to shift before error messages enabled.  */
   1307      1.1  christos     int yyerrstatus = 0;
   1308      1.1  christos 
   1309      1.1  christos     /* Refer to the stacks through separate pointers, to allow yyoverflow
   1310      1.1  christos        to reallocate them elsewhere.  */
   1311      1.1  christos 
   1312      1.1  christos     /* Their size.  */
   1313      1.1  christos     YYPTRDIFF_T yystacksize = YYINITDEPTH;
   1314      1.1  christos 
   1315      1.1  christos     /* The state stack: array, bottom, top.  */
   1316      1.1  christos     yy_state_t yyssa[YYINITDEPTH];
   1317      1.1  christos     yy_state_t *yyss = yyssa;
   1318      1.1  christos     yy_state_t *yyssp = yyss;
   1319      1.1  christos 
   1320      1.1  christos     /* The semantic value stack: array, bottom, top.  */
   1321      1.1  christos     YYSTYPE yyvsa[YYINITDEPTH];
   1322      1.1  christos     YYSTYPE *yyvs = yyvsa;
   1323      1.1  christos     YYSTYPE *yyvsp = yyvs;
   1324      1.1  christos 
   1325      1.1  christos   int yyn;
   1326      1.1  christos   /* The return value of yyparse.  */
   1327      1.1  christos   int yyresult;
   1328      1.1  christos   /* Lookahead symbol kind.  */
   1329      1.1  christos   yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
   1330      1.1  christos   /* The variables used to return semantic value and location from the
   1331      1.1  christos      action routines.  */
   1332      1.1  christos   YYSTYPE yyval;
   1333      1.1  christos 
   1334      1.1  christos 
   1335      1.1  christos 
   1336      1.1  christos #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
   1337      1.1  christos 
   1338      1.1  christos   /* The number of symbols on the RHS of the reduced rule.
   1339      1.1  christos      Keep to zero when no symbol should be popped.  */
   1340      1.1  christos   int yylen = 0;
   1341      1.1  christos 
   1342      1.1  christos   YYDPRINTF ((stderr, "Starting parse\n"));
   1343      1.1  christos 
   1344      1.1  christos   yychar = YYEMPTY; /* Cause a token to be read.  */
   1345      1.1  christos 
   1346      1.1  christos   goto yysetstate;
   1347      1.1  christos 
   1348      1.1  christos 
   1349      1.1  christos /*------------------------------------------------------------.
   1350      1.1  christos | yynewstate -- push a new state, which is found in yystate.  |
   1351      1.1  christos `------------------------------------------------------------*/
   1352      1.1  christos yynewstate:
   1353      1.1  christos   /* In all cases, when you get here, the value and location stacks
   1354      1.1  christos      have just been pushed.  So pushing a state here evens the stacks.  */
   1355      1.1  christos   yyssp++;
   1356      1.1  christos 
   1357      1.1  christos 
   1358      1.1  christos /*--------------------------------------------------------------------.
   1359      1.1  christos | yysetstate -- set current state (the top of the stack) to yystate.  |
   1360      1.1  christos `--------------------------------------------------------------------*/
   1361      1.1  christos yysetstate:
   1362      1.1  christos   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
   1363      1.1  christos   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
   1364      1.1  christos   YY_IGNORE_USELESS_CAST_BEGIN
   1365      1.1  christos   *yyssp = YY_CAST (yy_state_t, yystate);
   1366      1.1  christos   YY_IGNORE_USELESS_CAST_END
   1367      1.1  christos   YY_STACK_PRINT (yyss, yyssp);
   1368      1.1  christos 
   1369      1.1  christos   if (yyss + yystacksize - 1 <= yyssp)
   1370      1.1  christos #if !defined yyoverflow && !defined YYSTACK_RELOCATE
   1371      1.1  christos     YYNOMEM;
   1372      1.1  christos #else
   1373      1.1  christos     {
   1374      1.1  christos       /* Get the current used size of the three stacks, in elements.  */
   1375      1.1  christos       YYPTRDIFF_T yysize = yyssp - yyss + 1;
   1376      1.1  christos 
   1377      1.1  christos # if defined yyoverflow
   1378      1.1  christos       {
   1379      1.1  christos         /* Give user a chance to reallocate the stack.  Use copies of
   1380      1.1  christos            these so that the &'s don't force the real ones into
   1381      1.1  christos            memory.  */
   1382      1.1  christos         yy_state_t *yyss1 = yyss;
   1383      1.1  christos         YYSTYPE *yyvs1 = yyvs;
   1384      1.1  christos 
   1385      1.1  christos         /* Each stack pointer address is followed by the size of the
   1386      1.1  christos            data in use in that stack, in bytes.  This used to be a
   1387      1.1  christos            conditional around just the two extra args, but that might
   1388      1.1  christos            be undefined if yyoverflow is a macro.  */
   1389      1.1  christos         yyoverflow (YY_("memory exhausted"),
   1390      1.1  christos                     &yyss1, yysize * YYSIZEOF (*yyssp),
   1391      1.1  christos                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
   1392      1.1  christos                     &yystacksize);
   1393      1.1  christos         yyss = yyss1;
   1394      1.1  christos         yyvs = yyvs1;
   1395      1.1  christos       }
   1396      1.1  christos # else /* defined YYSTACK_RELOCATE */
   1397      1.1  christos       /* Extend the stack our own way.  */
   1398      1.1  christos       if (YYMAXDEPTH <= yystacksize)
   1399      1.1  christos         YYNOMEM;
   1400      1.1  christos       yystacksize *= 2;
   1401      1.1  christos       if (YYMAXDEPTH < yystacksize)
   1402      1.1  christos         yystacksize = YYMAXDEPTH;
   1403      1.1  christos 
   1404      1.1  christos       {
   1405      1.1  christos         yy_state_t *yyss1 = yyss;
   1406      1.1  christos         union yyalloc *yyptr =
   1407      1.1  christos           YY_CAST (union yyalloc *,
   1408      1.1  christos                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
   1409      1.1  christos         if (! yyptr)
   1410      1.1  christos           YYNOMEM;
   1411      1.1  christos         YYSTACK_RELOCATE (yyss_alloc, yyss);
   1412      1.1  christos         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
   1413      1.1  christos #  undef YYSTACK_RELOCATE
   1414      1.1  christos         if (yyss1 != yyssa)
   1415      1.1  christos           YYSTACK_FREE (yyss1);
   1416      1.1  christos       }
   1417      1.1  christos # endif
   1418      1.1  christos 
   1419      1.1  christos       yyssp = yyss + yysize - 1;
   1420      1.1  christos       yyvsp = yyvs + yysize - 1;
   1421      1.1  christos 
   1422      1.1  christos       YY_IGNORE_USELESS_CAST_BEGIN
   1423      1.1  christos       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
   1424      1.1  christos                   YY_CAST (long, yystacksize)));
   1425      1.1  christos       YY_IGNORE_USELESS_CAST_END
   1426      1.1  christos 
   1427      1.1  christos       if (yyss + yystacksize - 1 <= yyssp)
   1428      1.1  christos         YYABORT;
   1429      1.1  christos     }
   1430      1.1  christos #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
   1431      1.1  christos 
   1432      1.1  christos 
   1433      1.1  christos   if (yystate == YYFINAL)
   1434      1.1  christos     YYACCEPT;
   1435      1.1  christos 
   1436      1.1  christos   goto yybackup;
   1437      1.1  christos 
   1438      1.1  christos 
   1439      1.1  christos /*-----------.
   1440      1.1  christos | yybackup.  |
   1441      1.1  christos `-----------*/
   1442      1.1  christos yybackup:
   1443      1.1  christos   /* Do appropriate processing given the current state.  Read a
   1444      1.1  christos      lookahead token if we need one and don't already have one.  */
   1445      1.1  christos 
   1446      1.1  christos   /* First try to decide what to do without reference to lookahead token.  */
   1447      1.1  christos   yyn = yypact[yystate];
   1448      1.1  christos   if (yypact_value_is_default (yyn))
   1449      1.1  christos     goto yydefault;
   1450      1.1  christos 
   1451      1.1  christos   /* Not known => get a lookahead token if don't already have one.  */
   1452      1.1  christos 
   1453      1.1  christos   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
   1454      1.1  christos   if (yychar == YYEMPTY)
   1455      1.1  christos     {
   1456      1.1  christos       YYDPRINTF ((stderr, "Reading a token\n"));
   1457      1.1  christos       yychar = yylex ();
   1458      1.1  christos     }
   1459      1.1  christos 
   1460      1.1  christos   if (yychar <= YYEOF)
   1461      1.1  christos     {
   1462      1.1  christos       yychar = YYEOF;
   1463      1.1  christos       yytoken = YYSYMBOL_YYEOF;
   1464      1.1  christos       YYDPRINTF ((stderr, "Now at end of input.\n"));
   1465      1.1  christos     }
   1466      1.1  christos   else if (yychar == YYerror)
   1467      1.1  christos     {
   1468      1.1  christos       /* The scanner already issued an error message, process directly
   1469      1.1  christos          to error recovery.  But do not keep the error token as
   1470      1.1  christos          lookahead, it is too special and may lead us to an endless
   1471      1.1  christos          loop in error recovery. */
   1472      1.1  christos       yychar = YYUNDEF;
   1473      1.1  christos       yytoken = YYSYMBOL_YYerror;
   1474      1.1  christos       goto yyerrlab1;
   1475      1.1  christos     }
   1476      1.1  christos   else
   1477      1.1  christos     {
   1478      1.1  christos       yytoken = YYTRANSLATE (yychar);
   1479      1.1  christos       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
   1480      1.1  christos     }
   1481      1.1  christos 
   1482      1.1  christos   /* If the proper action on seeing token YYTOKEN is to reduce or to
   1483      1.1  christos      detect an error, take that action.  */
   1484      1.1  christos   yyn += yytoken;
   1485      1.1  christos   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
   1486      1.1  christos     goto yydefault;
   1487      1.1  christos   yyn = yytable[yyn];
   1488      1.1  christos   if (yyn <= 0)
   1489      1.1  christos     {
   1490      1.1  christos       if (yytable_value_is_error (yyn))
   1491      1.1  christos         goto yyerrlab;
   1492      1.1  christos       yyn = -yyn;
   1493      1.1  christos       goto yyreduce;
   1494      1.1  christos     }
   1495      1.1  christos 
   1496      1.1  christos   /* Count tokens shifted since error; after three, turn off error
   1497      1.1  christos      status.  */
   1498      1.1  christos   if (yyerrstatus)
   1499      1.1  christos     yyerrstatus--;
   1500      1.1  christos 
   1501      1.1  christos   /* Shift the lookahead token.  */
   1502      1.1  christos   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
   1503      1.1  christos   yystate = yyn;
   1504      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1505      1.1  christos   *++yyvsp = yylval;
   1506      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1507      1.1  christos 
   1508      1.1  christos   /* Discard the shifted token.  */
   1509      1.1  christos   yychar = YYEMPTY;
   1510      1.1  christos   goto yynewstate;
   1511      1.1  christos 
   1512      1.1  christos 
   1513      1.1  christos /*-----------------------------------------------------------.
   1514      1.1  christos | yydefault -- do the default action for the current state.  |
   1515      1.1  christos `-----------------------------------------------------------*/
   1516      1.1  christos yydefault:
   1517      1.1  christos   yyn = yydefact[yystate];
   1518      1.1  christos   if (yyn == 0)
   1519      1.1  christos     goto yyerrlab;
   1520      1.1  christos   goto yyreduce;
   1521      1.1  christos 
   1522      1.1  christos 
   1523      1.1  christos /*-----------------------------.
   1524      1.1  christos | yyreduce -- do a reduction.  |
   1525      1.1  christos `-----------------------------*/
   1526      1.1  christos yyreduce:
   1527      1.1  christos   /* yyn is the number of a rule to reduce with.  */
   1528      1.1  christos   yylen = yyr2[yyn];
   1529      1.1  christos 
   1530      1.1  christos   /* If YYLEN is nonzero, implement the default value of the action:
   1531      1.1  christos      '$$ = $1'.
   1532      1.1  christos 
   1533      1.1  christos      Otherwise, the following line sets YYVAL to garbage.
   1534      1.1  christos      This behavior is undocumented and Bison
   1535      1.1  christos      users should not rely upon it.  Assigning to YYVAL
   1536      1.1  christos      unconditionally makes the parser a bit smaller, and it avoids a
   1537      1.1  christos      GCC warning that YYVAL may be used uninitialized.  */
   1538      1.1  christos   yyval = yyvsp[1-yylen];
   1539      1.1  christos 
   1540      1.1  christos 
   1541      1.1  christos   YY_REDUCE_PRINT (yyn);
   1542      1.1  christos   switch (yyn)
   1543      1.1  christos     {
   1544      1.1  christos   case 2: /* primary_expression: INTEGER  */
   1545  1.1.1.3  christos #line 358 "./config/loongarch-parse.y"
   1546      1.1  christos                   {emit_const ((yyvsp[0].imm));}
   1547  1.1.1.3  christos #line 1548 "config/loongarch-parse.c"
   1548  1.1.1.2  christos     break;
   1549  1.1.1.2  christos 
   1550  1.1.1.2  christos   case 3: /* primary_expression: IDENTIFIER  */
   1551  1.1.1.3  christos #line 359 "./config/loongarch-parse.y"
   1552  1.1.1.2  christos                      {emit_const_var ((yyvsp[0].c_str));}
   1553  1.1.1.3  christos #line 1554 "config/loongarch-parse.c"
   1554      1.1  christos     break;
   1555      1.1  christos 
   1556  1.1.1.2  christos   case 5: /* primary_expression: '%' IDENTIFIER '(' IDENTIFIER addend ')'  */
   1557  1.1.1.3  christos #line 361 "./config/loongarch-parse.y"
   1558      1.1  christos                                                    {reloc ((yyvsp[-4].c_str), (yyvsp[-2].c_str), (yyvsp[-1].imm)); free ((yyvsp[-4].c_str)); free ((yyvsp[-2].c_str));}
   1559  1.1.1.3  christos #line 1560 "config/loongarch-parse.c"
   1560      1.1  christos     break;
   1561      1.1  christos 
   1562  1.1.1.2  christos   case 6: /* primary_expression: '%' IDENTIFIER '(' INTEGER addend ')'  */
   1563  1.1.1.3  christos #line 362 "./config/loongarch-parse.y"
   1564      1.1  christos                                                 {reloc ((yyvsp[-4].c_str), NULL, (yyvsp[-2].imm) + (yyvsp[-1].imm)); free ((yyvsp[-4].c_str));}
   1565  1.1.1.3  christos #line 1566 "config/loongarch-parse.c"
   1566      1.1  christos     break;
   1567      1.1  christos 
   1568  1.1.1.2  christos   case 7: /* addend: addend '-' INTEGER  */
   1569  1.1.1.3  christos #line 366 "./config/loongarch-parse.y"
   1570      1.1  christos                              {(yyval.imm) -= (yyvsp[0].imm);}
   1571  1.1.1.3  christos #line 1572 "config/loongarch-parse.c"
   1572      1.1  christos     break;
   1573      1.1  christos 
   1574  1.1.1.2  christos   case 8: /* addend: addend '+' INTEGER  */
   1575  1.1.1.3  christos #line 367 "./config/loongarch-parse.y"
   1576      1.1  christos                              {(yyval.imm) += (yyvsp[0].imm);}
   1577  1.1.1.3  christos #line 1578 "config/loongarch-parse.c"
   1578      1.1  christos     break;
   1579      1.1  christos 
   1580  1.1.1.2  christos   case 9: /* addend: %empty  */
   1581  1.1.1.3  christos #line 368 "./config/loongarch-parse.y"
   1582      1.1  christos           {(yyval.imm) = 0;}
   1583  1.1.1.3  christos #line 1584 "config/loongarch-parse.c"
   1584      1.1  christos     break;
   1585      1.1  christos 
   1586  1.1.1.2  christos   case 11: /* unary_expression: '+' unary_expression  */
   1587  1.1.1.3  christos #line 373 "./config/loongarch-parse.y"
   1588      1.1  christos                                {emit_unary ('+');}
   1589  1.1.1.3  christos #line 1590 "config/loongarch-parse.c"
   1590      1.1  christos     break;
   1591      1.1  christos 
   1592  1.1.1.2  christos   case 12: /* unary_expression: '-' unary_expression  */
   1593  1.1.1.3  christos #line 374 "./config/loongarch-parse.y"
   1594      1.1  christos                                {emit_unary ('-');}
   1595  1.1.1.3  christos #line 1596 "config/loongarch-parse.c"
   1596      1.1  christos     break;
   1597      1.1  christos 
   1598  1.1.1.2  christos   case 13: /* unary_expression: '~' unary_expression  */
   1599  1.1.1.3  christos #line 375 "./config/loongarch-parse.y"
   1600      1.1  christos                                {emit_unary ('~');}
   1601  1.1.1.3  christos #line 1602 "config/loongarch-parse.c"
   1602      1.1  christos     break;
   1603      1.1  christos 
   1604  1.1.1.2  christos   case 14: /* unary_expression: '!' unary_expression  */
   1605  1.1.1.3  christos #line 376 "./config/loongarch-parse.y"
   1606      1.1  christos                                {emit_unary ('!');}
   1607  1.1.1.3  christos #line 1608 "config/loongarch-parse.c"
   1608      1.1  christos     break;
   1609      1.1  christos 
   1610  1.1.1.2  christos   case 16: /* multiplicative_expression: multiplicative_expression '*' unary_expression  */
   1611  1.1.1.3  christos #line 381 "./config/loongarch-parse.y"
   1612      1.1  christos                                                          {emit_bin ('*');}
   1613  1.1.1.3  christos #line 1614 "config/loongarch-parse.c"
   1614      1.1  christos     break;
   1615      1.1  christos 
   1616  1.1.1.2  christos   case 17: /* multiplicative_expression: multiplicative_expression '/' unary_expression  */
   1617  1.1.1.3  christos #line 382 "./config/loongarch-parse.y"
   1618      1.1  christos                                                          {emit_bin ('/');}
   1619  1.1.1.3  christos #line 1620 "config/loongarch-parse.c"
   1620      1.1  christos     break;
   1621      1.1  christos 
   1622  1.1.1.2  christos   case 18: /* multiplicative_expression: multiplicative_expression '%' unary_expression  */
   1623  1.1.1.3  christos #line 383 "./config/loongarch-parse.y"
   1624      1.1  christos                                                          {emit_bin ('%');}
   1625  1.1.1.3  christos #line 1626 "config/loongarch-parse.c"
   1626      1.1  christos     break;
   1627      1.1  christos 
   1628  1.1.1.3  christos   case 20: /* shift_expression: shift_expression LEFT_OP multiplicative_expression  */
   1629  1.1.1.3  christos #line 388 "./config/loongarch-parse.y"
   1630  1.1.1.3  christos                                                              {emit_bin (LEFT_OP);}
   1631  1.1.1.3  christos #line 1632 "config/loongarch-parse.c"
   1632      1.1  christos     break;
   1633      1.1  christos 
   1634  1.1.1.3  christos   case 21: /* shift_expression: shift_expression RIGHT_OP multiplicative_expression  */
   1635  1.1.1.3  christos #line 389 "./config/loongarch-parse.y"
   1636  1.1.1.3  christos                                                               {emit_bin (RIGHT_OP);}
   1637  1.1.1.3  christos #line 1638 "config/loongarch-parse.c"
   1638      1.1  christos     break;
   1639      1.1  christos 
   1640  1.1.1.3  christos   case 23: /* additive_expression: additive_expression '+' shift_expression  */
   1641  1.1.1.3  christos #line 394 "./config/loongarch-parse.y"
   1642  1.1.1.3  christos                                                    {emit_bin ('+');}
   1643  1.1.1.3  christos #line 1644 "config/loongarch-parse.c"
   1644      1.1  christos     break;
   1645      1.1  christos 
   1646  1.1.1.3  christos   case 24: /* additive_expression: additive_expression '-' shift_expression  */
   1647  1.1.1.3  christos #line 395 "./config/loongarch-parse.y"
   1648  1.1.1.3  christos                                                    {emit_bin ('-');}
   1649  1.1.1.3  christos #line 1650 "config/loongarch-parse.c"
   1650      1.1  christos     break;
   1651      1.1  christos 
   1652  1.1.1.3  christos   case 26: /* relational_expression: relational_expression '<' additive_expression  */
   1653  1.1.1.3  christos #line 400 "./config/loongarch-parse.y"
   1654  1.1.1.3  christos                                                         {emit_bin ('<');}
   1655  1.1.1.3  christos #line 1656 "config/loongarch-parse.c"
   1656      1.1  christos     break;
   1657      1.1  christos 
   1658  1.1.1.3  christos   case 27: /* relational_expression: relational_expression '>' additive_expression  */
   1659  1.1.1.3  christos #line 401 "./config/loongarch-parse.y"
   1660  1.1.1.3  christos                                                         {emit_bin ('>');}
   1661  1.1.1.3  christos #line 1662 "config/loongarch-parse.c"
   1662      1.1  christos     break;
   1663      1.1  christos 
   1664  1.1.1.3  christos   case 28: /* relational_expression: relational_expression LE_OP additive_expression  */
   1665  1.1.1.3  christos #line 402 "./config/loongarch-parse.y"
   1666  1.1.1.3  christos                                                           {emit_bin (LE_OP);}
   1667  1.1.1.3  christos #line 1668 "config/loongarch-parse.c"
   1668      1.1  christos     break;
   1669      1.1  christos 
   1670  1.1.1.3  christos   case 29: /* relational_expression: relational_expression GE_OP additive_expression  */
   1671  1.1.1.3  christos #line 403 "./config/loongarch-parse.y"
   1672  1.1.1.3  christos                                                           {emit_bin (GE_OP);}
   1673  1.1.1.3  christos #line 1674 "config/loongarch-parse.c"
   1674      1.1  christos     break;
   1675      1.1  christos 
   1676  1.1.1.2  christos   case 31: /* equality_expression: equality_expression EQ_OP relational_expression  */
   1677  1.1.1.3  christos #line 408 "./config/loongarch-parse.y"
   1678      1.1  christos                                                           {emit_bin (EQ_OP);}
   1679  1.1.1.3  christos #line 1680 "config/loongarch-parse.c"
   1680      1.1  christos     break;
   1681      1.1  christos 
   1682  1.1.1.2  christos   case 32: /* equality_expression: equality_expression NE_OP relational_expression  */
   1683  1.1.1.3  christos #line 409 "./config/loongarch-parse.y"
   1684      1.1  christos                                                           {emit_bin (NE_OP);}
   1685  1.1.1.3  christos #line 1686 "config/loongarch-parse.c"
   1686      1.1  christos     break;
   1687      1.1  christos 
   1688  1.1.1.2  christos   case 34: /* and_expression: and_expression '&' equality_expression  */
   1689  1.1.1.3  christos #line 414 "./config/loongarch-parse.y"
   1690      1.1  christos                                                  {emit_bin ('&');}
   1691  1.1.1.3  christos #line 1692 "config/loongarch-parse.c"
   1692      1.1  christos     break;
   1693      1.1  christos 
   1694  1.1.1.2  christos   case 36: /* exclusive_or_expression: exclusive_or_expression '^' and_expression  */
   1695  1.1.1.3  christos #line 419 "./config/loongarch-parse.y"
   1696      1.1  christos                                                      {emit_bin ('^');}
   1697  1.1.1.3  christos #line 1698 "config/loongarch-parse.c"
   1698      1.1  christos     break;
   1699      1.1  christos 
   1700  1.1.1.2  christos   case 38: /* inclusive_or_expression: inclusive_or_expression '|' exclusive_or_expression  */
   1701  1.1.1.3  christos #line 424 "./config/loongarch-parse.y"
   1702      1.1  christos                                                               {emit_bin ('|');}
   1703  1.1.1.3  christos #line 1704 "config/loongarch-parse.c"
   1704      1.1  christos     break;
   1705      1.1  christos 
   1706  1.1.1.2  christos   case 40: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression  */
   1707  1.1.1.3  christos #line 429 "./config/loongarch-parse.y"
   1708      1.1  christos                                                                 {emit_bin (AND_OP);}
   1709  1.1.1.3  christos #line 1710 "config/loongarch-parse.c"
   1710      1.1  christos     break;
   1711      1.1  christos 
   1712  1.1.1.2  christos   case 42: /* logical_or_expression: logical_or_expression OR_OP logical_and_expression  */
   1713  1.1.1.3  christos #line 434 "./config/loongarch-parse.y"
   1714      1.1  christos                                                              {emit_bin (OR_OP);}
   1715  1.1.1.3  christos #line 1716 "config/loongarch-parse.c"
   1716      1.1  christos     break;
   1717      1.1  christos 
   1718  1.1.1.2  christos   case 44: /* conditional_expression: logical_or_expression '?' expression ':' conditional_expression  */
   1719  1.1.1.3  christos #line 439 "./config/loongarch-parse.y"
   1720      1.1  christos                                                                           {emit_if_else ();}
   1721  1.1.1.3  christos #line 1722 "config/loongarch-parse.c"
   1722      1.1  christos     break;
   1723      1.1  christos 
   1724      1.1  christos 
   1725  1.1.1.3  christos #line 1726 "config/loongarch-parse.c"
   1726      1.1  christos 
   1727      1.1  christos       default: break;
   1728      1.1  christos     }
   1729      1.1  christos   /* User semantic actions sometimes alter yychar, and that requires
   1730      1.1  christos      that yytoken be updated with the new translation.  We take the
   1731      1.1  christos      approach of translating immediately before every use of yytoken.
   1732      1.1  christos      One alternative is translating here after every semantic action,
   1733      1.1  christos      but that translation would be missed if the semantic action invokes
   1734      1.1  christos      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
   1735      1.1  christos      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
   1736      1.1  christos      incorrect destructor might then be invoked immediately.  In the
   1737      1.1  christos      case of YYERROR or YYBACKUP, subsequent parser actions might lead
   1738      1.1  christos      to an incorrect destructor call or verbose syntax error message
   1739      1.1  christos      before the lookahead is translated.  */
   1740      1.1  christos   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
   1741      1.1  christos 
   1742      1.1  christos   YYPOPSTACK (yylen);
   1743      1.1  christos   yylen = 0;
   1744      1.1  christos 
   1745      1.1  christos   *++yyvsp = yyval;
   1746      1.1  christos 
   1747      1.1  christos   /* Now 'shift' the result of the reduction.  Determine what state
   1748      1.1  christos      that goes to, based on the state we popped back to and the rule
   1749      1.1  christos      number reduced by.  */
   1750      1.1  christos   {
   1751      1.1  christos     const int yylhs = yyr1[yyn] - YYNTOKENS;
   1752      1.1  christos     const int yyi = yypgoto[yylhs] + *yyssp;
   1753      1.1  christos     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
   1754      1.1  christos                ? yytable[yyi]
   1755      1.1  christos                : yydefgoto[yylhs]);
   1756      1.1  christos   }
   1757      1.1  christos 
   1758      1.1  christos   goto yynewstate;
   1759      1.1  christos 
   1760      1.1  christos 
   1761      1.1  christos /*--------------------------------------.
   1762      1.1  christos | yyerrlab -- here on detecting error.  |
   1763      1.1  christos `--------------------------------------*/
   1764      1.1  christos yyerrlab:
   1765      1.1  christos   /* Make sure we have latest lookahead translation.  See comments at
   1766      1.1  christos      user semantic actions for why this is necessary.  */
   1767      1.1  christos   yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
   1768      1.1  christos   /* If not already recovering from an error, report this error.  */
   1769      1.1  christos   if (!yyerrstatus)
   1770      1.1  christos     {
   1771      1.1  christos       ++yynerrs;
   1772      1.1  christos       yyerror (YY_("syntax error"));
   1773      1.1  christos     }
   1774      1.1  christos 
   1775      1.1  christos   if (yyerrstatus == 3)
   1776      1.1  christos     {
   1777      1.1  christos       /* If just tried and failed to reuse lookahead token after an
   1778      1.1  christos          error, discard it.  */
   1779      1.1  christos 
   1780      1.1  christos       if (yychar <= YYEOF)
   1781      1.1  christos         {
   1782      1.1  christos           /* Return failure if at end of input.  */
   1783      1.1  christos           if (yychar == YYEOF)
   1784      1.1  christos             YYABORT;
   1785      1.1  christos         }
   1786      1.1  christos       else
   1787      1.1  christos         {
   1788      1.1  christos           yydestruct ("Error: discarding",
   1789      1.1  christos                       yytoken, &yylval);
   1790      1.1  christos           yychar = YYEMPTY;
   1791      1.1  christos         }
   1792      1.1  christos     }
   1793      1.1  christos 
   1794      1.1  christos   /* Else will try to reuse lookahead token after shifting the error
   1795      1.1  christos      token.  */
   1796      1.1  christos   goto yyerrlab1;
   1797      1.1  christos 
   1798      1.1  christos 
   1799      1.1  christos /*---------------------------------------------------.
   1800      1.1  christos | yyerrorlab -- error raised explicitly by YYERROR.  |
   1801      1.1  christos `---------------------------------------------------*/
   1802      1.1  christos yyerrorlab:
   1803      1.1  christos   /* Pacify compilers when the user code never invokes YYERROR and the
   1804      1.1  christos      label yyerrorlab therefore never appears in user code.  */
   1805      1.1  christos   if (0)
   1806      1.1  christos     YYERROR;
   1807      1.1  christos   ++yynerrs;
   1808      1.1  christos 
   1809      1.1  christos   /* Do not reclaim the symbols of the rule whose action triggered
   1810      1.1  christos      this YYERROR.  */
   1811      1.1  christos   YYPOPSTACK (yylen);
   1812      1.1  christos   yylen = 0;
   1813      1.1  christos   YY_STACK_PRINT (yyss, yyssp);
   1814      1.1  christos   yystate = *yyssp;
   1815      1.1  christos   goto yyerrlab1;
   1816      1.1  christos 
   1817      1.1  christos 
   1818      1.1  christos /*-------------------------------------------------------------.
   1819      1.1  christos | yyerrlab1 -- common code for both syntax error and YYERROR.  |
   1820      1.1  christos `-------------------------------------------------------------*/
   1821      1.1  christos yyerrlab1:
   1822      1.1  christos   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
   1823      1.1  christos 
   1824      1.1  christos   /* Pop stack until we find a state that shifts the error token.  */
   1825      1.1  christos   for (;;)
   1826      1.1  christos     {
   1827      1.1  christos       yyn = yypact[yystate];
   1828      1.1  christos       if (!yypact_value_is_default (yyn))
   1829      1.1  christos         {
   1830      1.1  christos           yyn += YYSYMBOL_YYerror;
   1831      1.1  christos           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
   1832      1.1  christos             {
   1833      1.1  christos               yyn = yytable[yyn];
   1834      1.1  christos               if (0 < yyn)
   1835      1.1  christos                 break;
   1836      1.1  christos             }
   1837      1.1  christos         }
   1838      1.1  christos 
   1839      1.1  christos       /* Pop the current state because it cannot handle the error token.  */
   1840      1.1  christos       if (yyssp == yyss)
   1841      1.1  christos         YYABORT;
   1842      1.1  christos 
   1843      1.1  christos 
   1844      1.1  christos       yydestruct ("Error: popping",
   1845      1.1  christos                   YY_ACCESSING_SYMBOL (yystate), yyvsp);
   1846      1.1  christos       YYPOPSTACK (1);
   1847      1.1  christos       yystate = *yyssp;
   1848      1.1  christos       YY_STACK_PRINT (yyss, yyssp);
   1849      1.1  christos     }
   1850      1.1  christos 
   1851      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1852      1.1  christos   *++yyvsp = yylval;
   1853      1.1  christos   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1854      1.1  christos 
   1855      1.1  christos 
   1856      1.1  christos   /* Shift the error token.  */
   1857      1.1  christos   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
   1858      1.1  christos 
   1859      1.1  christos   yystate = yyn;
   1860      1.1  christos   goto yynewstate;
   1861      1.1  christos 
   1862      1.1  christos 
   1863      1.1  christos /*-------------------------------------.
   1864      1.1  christos | yyacceptlab -- YYACCEPT comes here.  |
   1865      1.1  christos `-------------------------------------*/
   1866      1.1  christos yyacceptlab:
   1867      1.1  christos   yyresult = 0;
   1868      1.1  christos   goto yyreturnlab;
   1869      1.1  christos 
   1870      1.1  christos 
   1871      1.1  christos /*-----------------------------------.
   1872      1.1  christos | yyabortlab -- YYABORT comes here.  |
   1873      1.1  christos `-----------------------------------*/
   1874      1.1  christos yyabortlab:
   1875      1.1  christos   yyresult = 1;
   1876      1.1  christos   goto yyreturnlab;
   1877      1.1  christos 
   1878      1.1  christos 
   1879      1.1  christos /*-----------------------------------------------------------.
   1880      1.1  christos | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
   1881      1.1  christos `-----------------------------------------------------------*/
   1882      1.1  christos yyexhaustedlab:
   1883      1.1  christos   yyerror (YY_("memory exhausted"));
   1884      1.1  christos   yyresult = 2;
   1885      1.1  christos   goto yyreturnlab;
   1886      1.1  christos 
   1887      1.1  christos 
   1888      1.1  christos /*----------------------------------------------------------.
   1889      1.1  christos | yyreturnlab -- parsing is finished, clean up and return.  |
   1890      1.1  christos `----------------------------------------------------------*/
   1891      1.1  christos yyreturnlab:
   1892      1.1  christos   if (yychar != YYEMPTY)
   1893      1.1  christos     {
   1894      1.1  christos       /* Make sure we have latest lookahead translation.  See comments at
   1895      1.1  christos          user semantic actions for why this is necessary.  */
   1896      1.1  christos       yytoken = YYTRANSLATE (yychar);
   1897      1.1  christos       yydestruct ("Cleanup: discarding lookahead",
   1898      1.1  christos                   yytoken, &yylval);
   1899      1.1  christos     }
   1900      1.1  christos   /* Do not reclaim the symbols of the rule whose action triggered
   1901      1.1  christos      this YYABORT or YYACCEPT.  */
   1902      1.1  christos   YYPOPSTACK (yylen);
   1903      1.1  christos   YY_STACK_PRINT (yyss, yyssp);
   1904      1.1  christos   while (yyssp != yyss)
   1905      1.1  christos     {
   1906      1.1  christos       yydestruct ("Cleanup: popping",
   1907      1.1  christos                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
   1908      1.1  christos       YYPOPSTACK (1);
   1909      1.1  christos     }
   1910      1.1  christos #ifndef yyoverflow
   1911      1.1  christos   if (yyss != yyssa)
   1912      1.1  christos     YYSTACK_FREE (yyss);
   1913      1.1  christos #endif
   1914      1.1  christos 
   1915      1.1  christos   return yyresult;
   1916      1.1  christos }
   1917      1.1  christos 
   1918  1.1.1.3  christos #line 445 "./config/loongarch-parse.y"
   1919      1.1  christos 
   1920      1.1  christos 
   1921