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

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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