/[bison]/bison/src/parse-gram.c
ViewVC logotype

Diff of /bison/src/parse-gram.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by akim, Sat Jun 15 18:26:45 2002 UTC revision 1.10 by akim, Mon Jun 17 07:04:24 2002 UTC
# Line 225  int current_prec = 0; Line 225  int current_prec = 0;
225  #line 89 "parse-gram.y"  #line 89 "parse-gram.y"
226  typedef union {  typedef union {
227    symbol_t *symbol;    symbol_t *symbol;
228      symbol_list *list;
229    int integer;    int integer;
230    char *string;    char *string;
231    associativity assoc;    associativity assoc;
232  } yystype;  } yystype;
233  /* Line 199 of /usr/local/share/bison/bison.simple.  */  /* Line 199 of /usr/local/share/bison/bison.simple.  */
234  #line 234 "parse-gram.c"  #line 235 "parse-gram.c"
235  # define YYSTYPE yystype  # define YYSTYPE yystype
236  # define YYSTYPE_IS_TRIVIAL 1  # define YYSTYPE_IS_TRIVIAL 1
237  #endif  #endif
# Line 251  typedef struct yyltype Line 252  typedef struct yyltype
252    
253    
254  /* Line 219 of /usr/local/share/bison/bison.simple.  */  /* Line 219 of /usr/local/share/bison/bison.simple.  */
255  #line 255 "parse-gram.c"  #line 256 "parse-gram.c"
256    
257  #if ! defined (yyoverflow) || YYERROR_VERBOSE  #if ! defined (yyoverflow) || YYERROR_VERBOSE
258    
# Line 353  union yyalloc Line 354  union yyalloc
354  /* YYFINAL -- State number of the termination state. */  /* YYFINAL -- State number of the termination state. */
355  #define YYFINAL  3  #define YYFINAL  3
356  #define YYFLAG   -32768  #define YYFLAG   -32768
357  #define YYLAST   102  #define YYLAST   111
358    
359  /* YYNTOKENS -- Number of terminals. */  /* YYNTOKENS -- Number of terminals. */
360  #define YYNTOKENS  40  #define YYNTOKENS  40
361  /* YYNNTS -- Number of nonterminals. */  /* YYNNTS -- Number of nonterminals. */
362  #define YYNNTS  29  #define YYNNTS  26
363  /* YYNRULES -- Number of rules. */  /* YYNRULES -- Number of rules. */
364  #define YYNRULES  71  #define YYNRULES  67
365  /* YYNRULES -- Number of states. */  /* YYNRULES -- Number of states. */
366  #define YYNSTATES  97  #define YYNSTATES  93
367    
368  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
369  #define YYUNDEFTOK  2  #define YYUNDEFTOK  2
# Line 414  static const unsigned char yyprhs[] = Line 415  static const unsigned char yyprhs[] =
415         0,     0,     3,     8,     9,    13,    15,    17,    19,    23,         0,     0,     3,     8,     9,    13,    15,    17,    19,    23,
416        25,    27,    30,    34,    36,    40,    42,    46,    48,    51,        25,    27,    30,    34,    36,    40,    42,    46,    48,    51,
417        53,    55,    57,    59,    61,    64,    67,    68,    72,    73,        53,    55,    57,    59,    61,    64,    67,    68,    72,    73,
418        77,    78,    83,    84,    89,    91,    93,    95,    96,    98,        77,    81,    85,    87,    89,    91,    92,    94,    96,    99,
419       100,   103,   105,   108,   110,   112,   115,   118,   122,   124,       101,   103,   106,   109,   113,   115,   118,   120,   123,   125,
420       127,   129,   132,   134,   137,   138,   144,   146,   150,   151,       128,   129,   135,   137,   141,   142,   145,   148,   152,   154,
421       154,   157,   161,   163,   165,   167,   169,   171,   173,   174,       156,   158,   160,   162,   164,   165,   168,   169
      177,   178  
422  };  };
423    
424  /* YYRHS -- A `-1'-separated list of the rules' RHS. */  /* YYRHS -- A `-1'-separated list of the rules' RHS. */
425  static const signed char yyrhs[] =  static const signed char yyrhs[] =
426  {  {
427        41,     0,    -1,    42,    36,    57,    67,    -1,    -1,    42,        41,     0,    -1,    42,    36,    54,    64,    -1,    -1,    42,
428        43,    68,    -1,    44,    -1,    37,    -1,    25,    -1,    21,        43,    65,    -1,    44,    -1,    37,    -1,    25,    -1,    21,
429        66,    66,    -1,    23,    -1,    17,    -1,    13,     5,    -1,        63,    63,    -1,    23,    -1,    17,    -1,    13,     5,    -1,
430        19,    31,    66,    -1,    26,    -1,    20,    31,    66,    -1,        19,    31,    63,    -1,    26,    -1,    20,    31,    63,    -1,
431        27,    -1,    18,    31,    66,    -1,    22,    -1,    28,    66,        27,    -1,    18,    31,    63,    -1,    22,    -1,    28,    63,
432        -1,    29,    -1,    16,    -1,    24,    -1,    49,    -1,    45,        -1,    29,    -1,    16,    -1,    24,    -1,    48,    -1,    45,
433        -1,    14,    63,    -1,     9,    39,    -1,    -1,     7,    46,        -1,    14,    60,    -1,     9,    39,    -1,    -1,     7,    46,
434        56,    -1,    -1,     6,    47,    56,    -1,    -1,     8,    30,        53,    -1,    -1,     6,    47,    53,    -1,     8,    30,    51,
435        48,    53,    -1,    -1,    51,    52,    50,    54,    -1,    10,        -1,    49,    50,    51,    -1,    10,    -1,    11,    -1,    12,
436        -1,    11,    -1,    12,    -1,    -1,    30,    -1,    35,    -1,        -1,    -1,    30,    -1,    60,    -1,    51,    60,    -1,    30,
437        53,    35,    -1,    63,    -1,    54,    63,    -1,    30,    -1,        -1,    35,    -1,    35,     5,    -1,    35,    62,    -1,    35,
438        35,    -1,    35,     5,    -1,    35,    65,    -1,    35,     5,         5,    62,    -1,    52,    -1,    53,    52,    -1,    55,    -1,
439        65,    -1,    55,    -1,    56,    55,    -1,    58,    -1,    57,        54,    55,    -1,    56,    -1,    44,    32,    -1,    -1,    35,
440        58,    -1,    59,    -1,    44,    32,    -1,    -1,    35,    33,        33,    57,    58,    32,    -1,    59,    -1,    58,    34,    59,
441        60,    61,    32,    -1,    62,    -1,    61,    34,    62,    -1,        -1,    -1,    59,    60,    -1,    59,    61,    -1,    59,    15,
442        -1,    62,    63,    -1,    62,    64,    -1,    62,    15,    63,        60,    -1,    35,    -1,    62,    -1,     4,    -1,    39,    -1,
443        -1,    35,    -1,    65,    -1,     4,    -1,    39,    -1,     3,         3,    -1,     3,    -1,    -1,    36,    38,    -1,    -1,    32,
444        -1,     3,    -1,    -1,    36,    38,    -1,    -1,    32,    -1        -1
445  };  };
446    
447  /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */  /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
448  static const unsigned short yyrline[] =  static const unsigned short yyrline[] =
449  {  {
450         0,   150,   150,   163,   165,   168,   170,   171,   172,   173,         0,   151,   151,   164,   166,   169,   171,   172,   173,   174,
451       174,   175,   176,   177,   178,   179,   180,   181,   182,   183,       175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
452       184,   185,   188,   190,   191,   195,   203,   203,   209,   209,       185,   186,   189,   191,   192,   196,   204,   204,   210,   210,
453       214,   214,   220,   220,   227,   229,   230,   233,   235,   239,       215,   224,   239,   241,   242,   245,   247,   252,   254,   258,
454       241,   245,   251,   259,   264,   269,   275,   281,   291,   294,       263,   268,   274,   280,   290,   293,   302,   304,   310,   312,
455       303,   305,   311,   313,   316,   316,   321,   323,   326,   329,       315,   315,   320,   322,   325,   328,   330,   332,   336,   338,
456       331,   333,   337,   339,   340,   343,   349,   358,   366,   371,       339,   342,   348,   357,   365,   370,   376,   378
      377,   379  
457  };  };
458  #endif  #endif
459    
# Line 472  static const char *const yytname[] = Line 471  static const char *const yytname[] =
471    "\"%skeleton\"", "\"%token-table\"", "TYPE", "\"=\"", "\";\"", "\":\"",    "\"%skeleton\"", "\"%token-table\"", "TYPE", "\"=\"", "\";\"", "\":\"",
472    "\"|\"", "\"identifier\"", "\"%%\"", "PROLOGUE", "EPILOGUE",    "\"|\"", "\"identifier\"", "\"%%\"", "PROLOGUE", "EPILOGUE",
473    "BRACED_CODE", "$axiom", "input", "declarations", "declaration",    "BRACED_CODE", "$axiom", "input", "declarations", "declaration",
474    "grammar_declaration", "symbol_declaration", "@1", "@2", "@3",    "grammar_declaration", "symbol_declaration", "@1", "@2",
475    "precedence_declaration", "@4", "precedence_declarator", "type.opt",    "precedence_declaration", "precedence_declarator", "type.opt",
476    "nterms_to_type.1", "terms_to_prec.1", "symbol_def", "symbol_defs.1",    "symbols.1", "symbol_def", "symbol_defs.1", "grammar",
477    "grammar", "rules_or_grammar_declaration", "rules", "@5", "rhses.1",    "rules_or_grammar_declaration", "rules", "@3", "rhses.1", "rhs",
478    "rhs", "symbol", "action", "string_as_id", "string_content",    "symbol", "action", "string_as_id", "string_content", "epilogue.opt",
479    "epilogue.opt", "semi_colon.opt", 0    "semi_colon.opt", 0
480  };  };
481  #endif  #endif
482    
# Line 498  static const unsigned char yyr1[] = Line 497  static const unsigned char yyr1[] =
497         0,    40,    41,    42,    42,    43,    43,    43,    43,    43,         0,    40,    41,    42,    42,    43,    43,    43,    43,    43,
498        43,    43,    43,    43,    43,    43,    43,    43,    43,    43,        43,    43,    43,    43,    43,    43,    43,    43,    43,    43,
499        43,    43,    44,    44,    44,    44,    46,    45,    47,    45,        43,    43,    44,    44,    44,    44,    46,    45,    47,    45,
500        48,    45,    50,    49,    51,    51,    51,    52,    52,    53,        45,    48,    49,    49,    49,    50,    50,    51,    51,    52,
501        53,    54,    54,    55,    55,    55,    55,    55,    56,    56,        52,    52,    52,    52,    53,    53,    54,    54,    55,    55,
502        57,    57,    58,    58,    60,    59,    61,    61,    62,    62,        57,    56,    58,    58,    59,    59,    59,    59,    60,    60,
503        62,    62,    63,    63,    63,    64,    65,    66,    67,    67,        60,    61,    62,    63,    64,    64,    65,    65
       68,    68  
504  };  };
505    
506  /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */  /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
# Line 511  static const unsigned char yyr2[] = Line 509  static const unsigned char yyr2[] =
509         0,     2,     4,     0,     3,     1,     1,     1,     3,     1,         0,     2,     4,     0,     3,     1,     1,     1,     3,     1,
510         1,     2,     3,     1,     3,     1,     3,     1,     2,     1,         1,     2,     3,     1,     3,     1,     3,     1,     2,     1,
511         1,     1,     1,     1,     2,     2,     0,     3,     0,     3,         1,     1,     1,     1,     2,     2,     0,     3,     0,     3,
512         0,     4,     0,     4,     1,     1,     1,     0,     1,     1,         3,     3,     1,     1,     1,     0,     1,     1,     2,     1,
513         2,     1,     2,     1,     1,     2,     2,     3,     1,     2,         1,     2,     2,     3,     1,     2,     1,     2,     1,     2,
514         1,     2,     1,     2,     0,     5,     1,     3,     0,     2,         0,     5,     1,     3,     0,     2,     2,     3,     1,     1,
515         2,     3,     1,     1,     1,     1,     1,     1,     0,     2,         1,     1,     1,     1,     0,     2,     0,     1
        0,     1  
516  };  };
517    
518  /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state  /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
# Line 523  static const unsigned char yyr2[] = Line 520  static const unsigned char yyr2[] =
520     means the default is an error.  */     means the default is an error.  */
521  static const short yydefact[] =  static const short yydefact[] =
522  {  {
523         3,     0,     0,     0,    28,    26,     0,     0,    34,    35,         3,     0,     0,     0,    28,    26,     0,     0,    32,    33,
524        36,     0,     0,    20,    10,     0,     0,     0,     0,    17,        34,     0,     0,    20,    10,     0,     0,     0,     0,    17,
525         9,    21,     7,    13,    15,     0,    19,     0,     6,    70,         9,    21,     7,    13,    15,     0,    19,     0,     6,    66,
526         5,    23,    22,    37,     0,     0,    30,    25,    11,    66,         5,    23,    22,    35,     0,     0,     0,    25,    11,    62,
527        64,    62,    24,    63,     0,     0,     0,    67,     0,    18,        60,    58,    24,    59,     0,     0,     0,    63,     0,    18,
528         0,     0,    68,    50,    52,    71,     4,    38,    32,    43,         0,     0,    64,    46,    48,    67,     4,    36,     0,    39,
529        44,    48,    29,    27,     0,    16,    12,    14,     8,    54,        40,    44,    29,    27,    30,    37,    16,    12,    14,     8,
530        53,     0,    51,     2,     0,    45,    46,    49,    39,    31,        50,    49,     0,    47,     2,    31,    41,    42,    45,    38,
531        58,    69,    33,    41,    47,    40,     0,    56,    42,    55,        54,    65,    43,     0,    52,    51,    54,     0,    61,    55,
532        58,     0,    65,    59,    60,    57,    61        56,    53,    57
533  };  };
534    
535  /* YYPGOTO[NTERM-NUM]. */  /* YYPGOTO[NTERM-NUM]. */
536  static const short yydefgoto[] =  static const short yydefgoto[] =
537  {  {
538        -1,     1,     2,    29,    51,    31,    35,    34,    64,    32,        -1,     1,     2,    29,    51,    31,    35,    34,    32,    33,
539        74,    33,    58,    79,    82,    61,    62,    52,    53,    54,        58,    64,    61,    62,    52,    53,    54,    80,    83,    84,
540        80,    86,    87,    93,    94,    43,    48,    73,    56        65,    90,    43,    48,    74,    56
541  };  };
542    
543  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
544     STATE-NUM.  */     STATE-NUM.  */
545  static const short yypact[] =  static const short yypact[] =
546  {  {
547    -32768,     9,    32,-32768,-32768,-32768,   -13,    -9,-32768,-32768,    -32768,    23,    74,-32768,-32768,-32768,     1,   -31,-32768,-32768,
548    -32768,    27,     0,-32768,-32768,     3,     5,    33,    60,-32768,    -32768,    29,     0,-32768,-32768,     7,    10,    14,    39,-32768,
549    -32768,-32768,-32768,-32768,-32768,    60,-32768,    12,-32768,    34,    -32768,-32768,-32768,-32768,-32768,    39,-32768,    18,-32768,    15,
550    -32768,-32768,-32768,    35,   -24,   -24,-32768,-32768,-32768,-32768,    -32768,-32768,-32768,    16,   -24,   -24,     0,-32768,-32768,-32768,
551    -32768,-32768,-32768,-32768,    60,    60,    60,-32768,    60,-32768,    -32768,-32768,-32768,-32768,    39,    39,    39,-32768,    39,-32768,
552        38,    49,    66,-32768,-32768,-32768,-32768,-32768,-32768,-32768,        17,    19,     8,-32768,-32768,-32768,-32768,-32768,     0,-32768,
553         2,-32768,   -24,   -24,    47,-32768,-32768,-32768,-32768,-32768,         4,-32768,   -24,   -24,     0,-32768,-32768,-32768,-32768,-32768,
554    -32768,    29,-32768,-32768,     0,    80,-32768,-32768,-32768,    50,    -32768,-32768,    20,-32768,-32768,     0,    45,-32768,-32768,-32768,
555    -32768,-32768,     0,-32768,-32768,-32768,   -20,    -2,-32768,-32768,    -32768,-32768,-32768,   -22,    -2,-32768,-32768,     0,-32768,-32768,
556    -32768,     0,-32768,-32768,-32768,    -2,-32768    -32768,    -2,-32768
557  };  };
558    
559  /* YYPGOTO[NTERM-NUM].  */  /* YYPGOTO[NTERM-NUM].  */
560  static const short yypgoto[] =  static const short yypgoto[] =
561  {  {
562    -32768,-32768,-32768,-32768,    82,-32768,-32768,-32768,-32768,-32768,    -32768,-32768,-32768,-32768,    47,-32768,-32768,-32768,-32768,-32768,
563    -32768,-32768,-32768,-32768,-32768,   -47,    51,-32768,    36,-32768,    -32768,    -4,   -23,    25,-32768,     9,-32768,-32768,-32768,   -21,
564    -32768,-32768,    -3,   -12,-32768,   -50,   -17,-32768,-32768       -12,-32768,   -55,    11,-32768,-32768
565  };  };
566    
567  /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If  /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
# Line 572  static const short yypgoto[] = Line 569  static const short yypgoto[] =
569     number is the opposite.  If zero, do what YYDEFACT says.  */     number is the opposite.  If zero, do what YYDEFACT says.  */
570  static const short yytable[] =  static const short yytable[] =
571  {  {
572        42,    39,    40,    39,    40,    39,    59,    75,    49,     3,        42,    39,    40,    39,    40,    77,    59,    39,    37,    76,
573        76,    60,    89,    91,    90,    77,    77,    36,     4,     5,        85,    60,    86,    87,     4,     5,     6,     7,     8,     9,
574         6,     7,     8,     9,    10,    84,    12,    65,    66,    67,        10,    82,    12,     3,     4,     5,     6,     7,     8,     9,
575        37,    68,    38,    41,    44,    41,    45,    92,     4,     5,        10,    36,    12,    41,    38,    41,    49,    88,    44,    78,
576         6,     7,     8,     9,    10,    11,    12,    50,    13,    14,        78,    45,    47,    50,    72,    46,    57,    55,    39,    30,
577        15,    16,    17,    18,    19,    20,    21,    22,    23,    24,        70,    71,    79,    50,    75,    66,    67,    68,    81,    69,
578        25,    26,    83,    47,    46,    57,    55,    81,    27,    28,        63,    73,     0,    79,     0,    91,     0,     0,     0,     0,
579        88,    69,     4,     5,     6,     7,     8,     9,    10,    96,         0,     0,    89,     0,     0,    92,     0,     0,     0,    89,
580        12,    70,    78,    39,    30,    85,    63,    95,    72,     0,         4,     5,     6,     7,     8,     9,    10,    11,    12,     0,
581         0,     0,     0,     0,     0,     0,     0,     0,     0,     0,        13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
582         0,    50,    71        23,    24,    25,    26,     0,     0,     0,     0,     0,     0,
583          27,    28
584  };  };
585    
586  static const short yycheck[] =  static const short yycheck[] =
587  {  {
588        12,     3,     4,     3,     4,     3,    30,     5,    25,     0,        12,     3,     4,     3,     4,    60,    30,     3,    39,     5,
589        60,    35,    32,    15,    34,    62,    63,    30,     6,     7,        32,    35,    34,    15,     6,     7,     8,     9,    10,    11,
590         8,     9,    10,    11,    12,    75,    14,    44,    45,    46,        12,    76,    14,     0,     6,     7,     8,     9,    10,    11,
591        39,    48,     5,    35,    31,    35,    31,    39,     6,     7,        12,    30,    14,    35,     5,    35,    25,    39,    31,    62,
592         8,     9,    10,    11,    12,    13,    14,    35,    16,    17,        63,    31,     3,    35,    36,    31,    30,    32,     3,     2,
593        18,    19,    20,    21,    22,    23,    24,    25,    26,    27,        33,    32,    64,    35,    58,    44,    45,    46,    38,    48,
594        28,    29,    74,     3,    31,    30,    32,    38,    36,    37,        35,    52,    -1,    75,    -1,    86,    -1,    -1,    -1,    -1,
595        82,    33,     6,     7,     8,     9,    10,    11,    12,    91,        -1,    -1,    84,    -1,    -1,    87,    -1,    -1,    -1,    91,
596        14,    32,    35,     3,     2,    35,    35,    90,    52,    -1,         6,     7,     8,     9,    10,    11,    12,    13,    14,    -1,
597        -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,        16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
598        -1,    35,    36        26,    27,    28,    29,    -1,    -1,    -1,    -1,    -1,    -1,
599          36,    37
600  };  };
601    
602  #if YYDEBUG  #if YYDEBUG
# Line 608  static const unsigned char yystos[] = Line 607  static const unsigned char yystos[] =
607         0,    41,    42,     0,     6,     7,     8,     9,    10,    11,         0,    41,    42,     0,     6,     7,     8,     9,    10,    11,
608        12,    13,    14,    16,    17,    18,    19,    20,    21,    22,        12,    13,    14,    16,    17,    18,    19,    20,    21,    22,
609        23,    24,    25,    26,    27,    28,    29,    36,    37,    43,        23,    24,    25,    26,    27,    28,    29,    36,    37,    43,
610        44,    45,    49,    51,    47,    46,    30,    39,     5,     3,        44,    45,    48,    49,    47,    46,    30,    39,     5,     3,
611         4,    35,    63,    65,    31,    31,    31,     3,    66,    66,         4,    35,    60,    62,    31,    31,    31,     3,    63,    63,
612        35,    44,    57,    58,    59,    32,    68,    30,    52,    30,        35,    44,    54,    55,    56,    32,    65,    30,    50,    30,
613        35,    55,    56,    56,    48,    66,    66,    66,    66,    33,        35,    52,    53,    53,    51,    60,    63,    63,    63,    63,
614        32,    36,    58,    67,    50,     5,    65,    55,    35,    53,        33,    32,    36,    55,    64,    51,     5,    62,    52,    60,
615        60,    38,    54,    63,    65,    35,    61,    62,    63,    32,        57,    38,    62,    58,    59,    32,    34,    15,    39,    60,
616        34,    15,    39,    63,    64,    62,    63        61,    59,    60
617  };  };
618  #endif  #endif
619    
# Line 1184  yyreduce: Line 1183  yyreduce:
1183    switch (yyn)    switch (yyn)
1184      {      {
1185          case 2:          case 2:
1186  #line 152 "parse-gram.y"  #line 153 "parse-gram.y"
1187      {      {
1188        yycontrol->errcode = 0;        yycontrol->errcode = 0;
1189        epilogue_set (yyvsp[0].string, yylsp[0]);        epilogue_set (yyvsp[0].string, yylsp[0]);
# Line 1192  yyreduce: Line 1191  yyreduce:
1191      break;      break;
1192    
1193    case 6:    case 6:
1194  #line 170 "parse-gram.y"  #line 171 "parse-gram.y"
1195      { prologue_augment (yyvsp[0].string, yylsp[0]); }      { prologue_augment (yyvsp[0].string, yylsp[0]); }
1196      break;      break;
1197    
1198    case 7:    case 7:
1199  #line 171 "parse-gram.y"  #line 172 "parse-gram.y"
1200      { debug_flag = 1; }      { debug_flag = 1; }
1201      break;      break;
1202    
1203    case 8:    case 8:
1204  #line 172 "parse-gram.y"  #line 173 "parse-gram.y"
1205      { muscle_insert (yyvsp[-1].string, yyvsp[0].string); }      { muscle_insert (yyvsp[-1].string, yyvsp[0].string); }
1206      break;      break;
1207    
1208    case 9:    case 9:
1209  #line 173 "parse-gram.y"  #line 174 "parse-gram.y"
1210      { defines_flag = 1; }      { defines_flag = 1; }
1211      break;      break;
1212    
1213    case 10:    case 10:
1214  #line 174 "parse-gram.y"  #line 175 "parse-gram.y"
1215      { error_verbose = 1; }      { error_verbose = 1; }
1216      break;      break;
1217    
1218    case 11:    case 11:
1219  #line 175 "parse-gram.y"  #line 176 "parse-gram.y"
1220      { expected_conflicts = yyvsp[0].integer; }      { expected_conflicts = yyvsp[0].integer; }
1221      break;      break;
1222    
1223    case 12:    case 12:
1224  #line 176 "parse-gram.y"  #line 177 "parse-gram.y"
1225      { spec_file_prefix = yyvsp[0].string; }      { spec_file_prefix = yyvsp[0].string; }
1226      break;      break;
1227    
1228    case 13:    case 13:
1229  #line 177 "parse-gram.y"  #line 178 "parse-gram.y"
1230      { locations_flag = 1; }      { locations_flag = 1; }
1231      break;      break;
1232    
1233    case 14:    case 14:
1234  #line 178 "parse-gram.y"  #line 179 "parse-gram.y"
1235      { spec_name_prefix = yyvsp[0].string; }      { spec_name_prefix = yyvsp[0].string; }
1236      break;      break;
1237    
1238    case 15:    case 15:
1239  #line 179 "parse-gram.y"  #line 180 "parse-gram.y"
1240      { no_lines_flag = 1; }      { no_lines_flag = 1; }
1241      break;      break;
1242    
1243    case 16:    case 16:
1244  #line 180 "parse-gram.y"  #line 181 "parse-gram.y"
1245      { spec_outfile = yyvsp[0].string; }      { spec_outfile = yyvsp[0].string; }
1246      break;      break;
1247    
1248    case 17:    case 17:
1249  #line 181 "parse-gram.y"  #line 182 "parse-gram.y"
1250      { pure_parser = 1; }      { pure_parser = 1; }
1251      break;      break;
1252    
1253    case 18:    case 18:
1254  #line 182 "parse-gram.y"  #line 183 "parse-gram.y"
1255      { skeleton = yyvsp[0].string; }      { skeleton = yyvsp[0].string; }
1256      break;      break;
1257    
1258    case 19:    case 19:
1259  #line 183 "parse-gram.y"  #line 184 "parse-gram.y"
1260      { token_table_flag = 1; }      { token_table_flag = 1; }
1261      break;      break;
1262    
1263    case 20:    case 20:
1264  #line 184 "parse-gram.y"  #line 185 "parse-gram.y"
1265      { report_flag = 1; }      { report_flag = 1; }
1266      break;      break;
1267    
1268    case 21:    case 21:
1269  #line 185 "parse-gram.y"  #line 186 "parse-gram.y"
1270      { yacc_flag = 1; }      { yacc_flag = 1; }
1271      break;      break;
1272    
1273    case 24:    case 24:
1274  #line 192 "parse-gram.y"  #line 193 "parse-gram.y"
1275      {      {
1276        grammar_start_symbol_set (yyvsp[0].symbol, yylsp[0]);        grammar_start_symbol_set (yyvsp[0].symbol, yylsp[0]);
1277      }      }
1278      break;      break;
1279    
1280    case 25:    case 25:
1281  #line 196 "parse-gram.y"  #line 197 "parse-gram.y"
1282      {      {
1283        typed = 1;        typed = 1;
1284        MUSCLE_INSERT_INT ("stype_line", yylsp[0].first_line);        MUSCLE_INSERT_INT ("stype_line", yylsp[0].first_line);
# Line 1288  yyreduce: Line 1287  yyreduce:
1287      break;      break;
1288    
1289    case 26:    case 26:
1290  #line 204 "parse-gram.y"  #line 205 "parse-gram.y"
1291      { current_class = nterm_sym; }      { current_class = nterm_sym; }
1292      break;      break;
1293    
1294    case 27:    case 27:
1295  #line 205 "parse-gram.y"  #line 206 "parse-gram.y"
1296      {      {
1297        current_class = unknown_sym;        current_class = unknown_sym;
1298        current_type = NULL;        current_type = NULL;
# Line 1301  yyreduce: Line 1300  yyreduce:
1300      break;      break;
1301    
1302    case 28:    case 28:
1303  #line 209 "parse-gram.y"  #line 210 "parse-gram.y"
1304      { current_class = token_sym; }      { current_class = token_sym; }
1305      break;      break;
1306    
1307    case 29:    case 29:
1308  #line 210 "parse-gram.y"  #line 211 "parse-gram.y"
1309      {      {
1310        current_class = unknown_sym;        current_class = unknown_sym;
1311        current_type = NULL;        current_type = NULL;
# Line 1314  yyreduce: Line 1313  yyreduce:
1313      break;      break;
1314    
1315    case 30:    case 30:
1316  #line 214 "parse-gram.y"  #line 216 "parse-gram.y"
1317      {current_type = yyvsp[0].string; }      {
1318          symbol_list *list;
1319          for (list = yyvsp[0].list; list; list = list->next)
1320            symbol_type_set (list->sym, list->location, yyvsp[-1].string);
1321          LIST_FREE (symbol_list, yyvsp[0].list);
1322        }
1323      break;      break;
1324    
1325    case 31:    case 31:
1326  #line 215 "parse-gram.y"  #line 226 "parse-gram.y"
1327      {      {
1328          symbol_list *list;
1329          ++current_prec;
1330          for (list = yyvsp[0].list; list; list = list->next)
1331            {
1332              symbol_type_set (list->sym, list->location, current_type);
1333              symbol_precedence_set (list->sym, list->location, current_prec, yyvsp[-2].assoc);
1334            }
1335          LIST_FREE (symbol_list, yyvsp[0].list);
1336        current_type = NULL;        current_type = NULL;
1337      }      }
1338      break;      break;
1339    
1340    case 32:    case 32:
1341  #line 222 "parse-gram.y"  #line 240 "parse-gram.y"
1342      { current_assoc = yyvsp[-1].assoc; ++current_prec; }      { yyval.assoc = left_assoc; }
1343      break;      break;
1344    
1345    case 33:    case 33:
1346  #line 224 "parse-gram.y"  #line 241 "parse-gram.y"
1347      { current_assoc = non_assoc; current_type = NULL; }      { yyval.assoc = right_assoc; }
1348      break;      break;
1349    
1350    case 34:    case 34:
1351  #line 228 "parse-gram.y"  #line 242 "parse-gram.y"
1352      { yyval.assoc = left_assoc; }      { yyval.assoc = non_assoc; }
1353      break;      break;
1354    
1355    case 35:    case 35:
1356  #line 229 "parse-gram.y"  #line 246 "parse-gram.y"
1357      { yyval.assoc = right_assoc; }      { current_type = NULL;}
1358      break;      break;
1359    
1360    case 36:    case 36:
1361  #line 230 "parse-gram.y"  #line 247 "parse-gram.y"
1362      { yyval.assoc = non_assoc; }      { current_type = yyvsp[0].string; }
1363      break;      break;
1364    
1365    case 37:    case 37:
1366  #line 234 "parse-gram.y"  #line 253 "parse-gram.y"
1367      { current_type = NULL;}      { yyval.list = symbol_list_new (yyvsp[0].symbol, yylsp[0]); }
1368      break;      break;
1369    
1370    case 38:    case 38:
1371  #line 235 "parse-gram.y"  #line 254 "parse-gram.y"
1372      { current_type = yyvsp[0].string; }      { yyval.list = symbol_list_prepend (yyvsp[-1].list, yyvsp[0].symbol, yylsp[0]); }
1373      break;      break;
1374    
1375    case 39:    case 39:
1376  #line 240 "parse-gram.y"  #line 260 "parse-gram.y"
     { symbol_type_set (yyvsp[0].symbol, current_type); }  
     break;  
   
   case 40:  
 #line 241 "parse-gram.y"  
     { symbol_type_set (yyvsp[0].symbol, current_type); }  
     break;  
   
   case 41:  
 #line 247 "parse-gram.y"  
     {  
       symbol_type_set (yyvsp[0].symbol, current_type);  
       symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);  
     }  
     break;  
   
   case 42:  
 #line 252 "parse-gram.y"  
     {  
       symbol_type_set (yyvsp[0].symbol, current_type);  
       symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);  
     }  
     break;  
   
   case 43:  
 #line 261 "parse-gram.y"  
1377      {      {
1378         current_type = yyvsp[0].string;         current_type = yyvsp[0].string;
1379       }       }
1380      break;      break;
1381    
1382    case 44:    case 40:
1383  #line 265 "parse-gram.y"  #line 264 "parse-gram.y"
1384      {      {
1385         symbol_class_set (yyvsp[0].symbol, current_class);         symbol_class_set (yyvsp[0].symbol, current_class);
1386         symbol_type_set (yyvsp[0].symbol, current_type);         symbol_type_set (yyvsp[0].symbol, yylsp[0], current_type);
1387       }       }
1388      break;      break;
1389    
1390    case 45:    case 41:
1391  #line 270 "parse-gram.y"  #line 269 "parse-gram.y"
1392      {      {
1393        symbol_class_set (yyvsp[-1].symbol, current_class);        symbol_class_set (yyvsp[-1].symbol, current_class);
1394        symbol_type_set (yyvsp[-1].symbol, current_type);        symbol_type_set (yyvsp[-1].symbol, yylsp[-1], current_type);
1395        symbol_user_token_number_set (yyvsp[-1].symbol, yyvsp[0].integer);        symbol_user_token_number_set (yyvsp[-1].symbol, yyvsp[0].integer);
1396      }      }
1397      break;      break;
1398    
1399    case 46:    case 42:
1400  #line 276 "parse-gram.y"  #line 275 "parse-gram.y"
1401      {      {
1402        symbol_class_set (yyvsp[-1].symbol, current_class);        symbol_class_set (yyvsp[-1].symbol, current_class);
1403        symbol_type_set (yyvsp[-1].symbol, current_type);        symbol_type_set (yyvsp[-1].symbol, yylsp[-1], current_type);
1404        symbol_make_alias (yyvsp[-1].symbol, yyvsp[0].symbol);        symbol_make_alias (yyvsp[-1].symbol, yyvsp[0].symbol);
1405      }      }
1406      break;      break;
1407    
1408    case 47:    case 43:
1409  #line 282 "parse-gram.y"  #line 281 "parse-gram.y"
1410      {      {
1411        symbol_class_set (yyvsp[-2].symbol, current_class);        symbol_class_set (yyvsp[-2].symbol, current_class);
1412        symbol_type_set (yyvsp[-2].symbol, current_type);        symbol_type_set (yyvsp[-2].symbol, yylsp[-2], current_type);
1413        symbol_user_token_number_set (yyvsp[-2].symbol, yyvsp[-1].integer);        symbol_user_token_number_set (yyvsp[-2].symbol, yyvsp[-1].integer);
1414        symbol_make_alias (yyvsp[-2].symbol, yyvsp[0].symbol);        symbol_make_alias (yyvsp[-2].symbol, yyvsp[0].symbol);
1415      }      }
1416      break;      break;
1417    
1418    case 48:    case 44:
1419  #line 293 "parse-gram.y"  #line 292 "parse-gram.y"
1420      {;}      {;}
1421      break;      break;
1422    
1423    case 49:    case 45:
1424  #line 295 "parse-gram.y"  #line 294 "parse-gram.y"
1425      {;}      {;}
1426      break;      break;
1427    
1428    case 54:    case 50:
1429  #line 317 "parse-gram.y"  #line 316 "parse-gram.y"
1430      { current_lhs = yyvsp[-1].symbol; current_lhs_location = yylsp[-1]; }      { current_lhs = yyvsp[-1].symbol; current_lhs_location = yylsp[-1]; }
1431      break;      break;
1432    
1433    case 55:    case 51:
1434  #line 318 "parse-gram.y"  #line 317 "parse-gram.y"
1435      {;}      {;}
1436      break;      break;
1437    
1438    case 56:    case 52:
1439  #line 322 "parse-gram.y"  #line 321 "parse-gram.y"
1440      { grammar_rule_end (yylsp[0]); }      { grammar_rule_end (yylsp[0]); }
1441      break;      break;
1442    
1443    case 57:    case 53:
1444  #line 323 "parse-gram.y"  #line 322 "parse-gram.y"
1445      { grammar_rule_end (yylsp[0]); }      { grammar_rule_end (yylsp[0]); }
1446      break;      break;
1447    
1448    case 58:    case 54:
1449  #line 328 "parse-gram.y"  #line 327 "parse-gram.y"
1450      { grammar_rule_begin (current_lhs, current_lhs_location); }      { grammar_rule_begin (current_lhs, current_lhs_location); }
1451      break;      break;
1452    
1453    case 59:    case 55:
1454  #line 330 "parse-gram.y"  #line 329 "parse-gram.y"
1455      { grammar_current_rule_symbol_append (yyvsp[0].symbol, yylsp[0]); }      { grammar_current_rule_symbol_append (yyvsp[0].symbol, yylsp[0]); }
1456      break;      break;
1457    
1458    case 60:    case 56:
1459  #line 332 "parse-gram.y"  #line 331 "parse-gram.y"
1460      { grammar_current_rule_action_append (yyvsp[0].string, yylsp[0]); }      { grammar_current_rule_action_append (yyvsp[0].string, yylsp[0]); }
1461      break;      break;
1462    
1463    case 61:    case 57:
1464  #line 334 "parse-gram.y"  #line 333 "parse-gram.y"
1465      { grammar_current_rule_prec_set (yyvsp[0].symbol); }      { grammar_current_rule_prec_set (yyvsp[0].symbol); }
1466      break;      break;
1467    
1468    case 62:    case 58:
1469  #line 338 "parse-gram.y"  #line 337 "parse-gram.y"
1470      { yyval.symbol = yyvsp[0].symbol; }      { yyval.symbol = yyvsp[0].symbol; }
1471      break;      break;
1472    
1473    case 63:    case 59:
1474  #line 339 "parse-gram.y"  #line 338 "parse-gram.y"
1475      { yyval.symbol = yyvsp[0].symbol; }      { yyval.symbol = yyvsp[0].symbol; }
1476      break;      break;
1477    
1478    case 64:    case 60:
1479  #line 340 "parse-gram.y"  #line 339 "parse-gram.y"
1480      { yyval.symbol = getsym (yyvsp[0].string, yylsp[0]); }      { yyval.symbol = getsym (yyvsp[0].string, yylsp[0]); }
1481      break;      break;
1482    
1483    case 65:    case 61:
1484  #line 345 "parse-gram.y"  #line 344 "parse-gram.y"
1485      { yyval.string = yyvsp[0].string; }      { yyval.string = yyvsp[0].string; }
1486      break;      break;
1487    
1488    case 66:    case 62:
1489  #line 351 "parse-gram.y"  #line 350 "parse-gram.y"
1490      {      {
1491        yyval.symbol = getsym (yyvsp[0].string, yylsp[0]);        yyval.symbol = getsym (yyvsp[0].string, yylsp[0]);
1492        symbol_class_set (yyval.symbol, token_sym);        symbol_class_set (yyval.symbol, token_sym);
1493      }      }
1494      break;      break;
1495    
1496    case 67:    case 63:
1497  #line 360 "parse-gram.y"  #line 359 "parse-gram.y"
1498      {      {
1499        yyval.string = yyvsp[0].string + 1;        yyval.string = yyvsp[0].string + 1;
1500        yyval.string[strlen (yyval.string) - 1] = '\0';        yyval.string[strlen (yyval.string) - 1] = '\0';
1501      }      }
1502      break;      break;
1503    
1504    case 68:    case 64:
1505  #line 368 "parse-gram.y"  #line 367 "parse-gram.y"
1506      {      {
1507        yyval.string = xstrdup ("");        yyval.string = xstrdup ("");
1508      }      }
1509      break;      break;
1510    
1511    case 69:    case 65:
1512  #line 372 "parse-gram.y"  #line 371 "parse-gram.y"
1513      {      {
1514        yyval.string = yyvsp[0].string;        yyval.string = yyvsp[0].string;
1515      }      }
# Line 1533  yyreduce: Line 1519  yyreduce:
1519      }      }
1520    
1521  /* Line 1012 of /usr/local/share/bison/bison.simple.  */  /* Line 1012 of /usr/local/share/bison/bison.simple.  */
1522  #line 1537 "parse-gram.c"  #line 1523 "parse-gram.c"
1523    
1524    yyvsp -= yylen;    yyvsp -= yylen;
1525    yyssp -= yylen;    yyssp -= yylen;
# Line 1754  yyreturn: Line 1740  yyreturn:
1740    return yyresult;    return yyresult;
1741  }  }
1742    
1743  #line 381 "parse-gram.y"  #line 380 "parse-gram.y"
1744    
1745  /*------------------------------------------------------------------.  /*------------------------------------------------------------------.
1746  | When debugging the parser, display tokens' locations and values.  |  | When debugging the parser, display tokens' locations and values.  |

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26