/[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.8 by akim, Sat Jun 15 18:21:46 2002 UTC revision 1.9 by akim, Sat Jun 15 18:26:45 2002 UTC
# Line 131  int current_prec = 0; Line 131  int current_prec = 0;
131       PERCENT_NTERM = 262,       PERCENT_NTERM = 262,
132       PERCENT_TYPE = 263,       PERCENT_TYPE = 263,
133       PERCENT_UNION = 264,       PERCENT_UNION = 264,
134       PERCENT_EXPECT = 265,       PERCENT_LEFT = 265,
135       PERCENT_START = 266,       PERCENT_RIGHT = 266,
136       PERCENT_PREC = 267,       PERCENT_NONASSOC = 267,
137       PERCENT_VERBOSE = 268,       PERCENT_EXPECT = 268,
138       PERCENT_ERROR_VERBOSE = 269,       PERCENT_START = 269,
139       PERCENT_OUTPUT = 270,       PERCENT_PREC = 270,
140       PERCENT_FILE_PREFIX = 271,       PERCENT_VERBOSE = 271,
141       PERCENT_NAME_PREFIX = 272,       PERCENT_ERROR_VERBOSE = 272,
142       PERCENT_DEFINE = 273,       PERCENT_OUTPUT = 273,
143       PERCENT_PURE_PARSER = 274,       PERCENT_FILE_PREFIX = 274,
144       PERCENT_DEFINES = 275,       PERCENT_NAME_PREFIX = 275,
145       PERCENT_YACC = 276,       PERCENT_DEFINE = 276,
146       PERCENT_DEBUG = 277,       PERCENT_PURE_PARSER = 277,
147       PERCENT_LOCATIONS = 278,       PERCENT_DEFINES = 278,
148       PERCENT_NO_LINES = 279,       PERCENT_YACC = 279,
149       PERCENT_SKELETON = 280,       PERCENT_DEBUG = 280,
150       PERCENT_TOKEN_TABLE = 281,       PERCENT_LOCATIONS = 281,
151       TYPE = 282,       PERCENT_NO_LINES = 282,
152       EQUAL = 283,       PERCENT_SKELETON = 283,
153       SEMICOLON = 284,       PERCENT_TOKEN_TABLE = 284,
154       COLON = 285,       TYPE = 285,
155       PIPE = 286,       EQUAL = 286,
156       ID = 287,       SEMICOLON = 287,
157       PERCENT_PERCENT = 288,       COLON = 288,
158       PROLOGUE = 289,       PIPE = 289,
159       EPILOGUE = 290,       ID = 290,
160       BRACED_CODE = 291,       PERCENT_PERCENT = 291,
161       PERCENT_LEFT = 292,       PROLOGUE = 292,
162       PERCENT_RIGHT = 293,       EPILOGUE = 293,
163       PERCENT_NONASSOC = 294       BRACED_CODE = 294
164     };     };
165  # endif  # endif
166    /* POSIX requires `int' for tokens in interfaces.  */    /* POSIX requires `int' for tokens in interfaces.  */
# Line 174  int current_prec = 0; Line 174  int current_prec = 0;
174  #define PERCENT_NTERM 262  #define PERCENT_NTERM 262
175  #define PERCENT_TYPE 263  #define PERCENT_TYPE 263
176  #define PERCENT_UNION 264  #define PERCENT_UNION 264
177  #define PERCENT_EXPECT 265  #define PERCENT_LEFT 265
178  #define PERCENT_START 266  #define PERCENT_RIGHT 266
179  #define PERCENT_PREC 267  #define PERCENT_NONASSOC 267
180  #define PERCENT_VERBOSE 268  #define PERCENT_EXPECT 268
181  #define PERCENT_ERROR_VERBOSE 269  #define PERCENT_START 269
182  #define PERCENT_OUTPUT 270  #define PERCENT_PREC 270
183  #define PERCENT_FILE_PREFIX 271  #define PERCENT_VERBOSE 271
184  #define PERCENT_NAME_PREFIX 272  #define PERCENT_ERROR_VERBOSE 272
185  #define PERCENT_DEFINE 273  #define PERCENT_OUTPUT 273
186  #define PERCENT_PURE_PARSER 274  #define PERCENT_FILE_PREFIX 274
187  #define PERCENT_DEFINES 275  #define PERCENT_NAME_PREFIX 275
188  #define PERCENT_YACC 276  #define PERCENT_DEFINE 276
189  #define PERCENT_DEBUG 277  #define PERCENT_PURE_PARSER 277
190  #define PERCENT_LOCATIONS 278  #define PERCENT_DEFINES 278
191  #define PERCENT_NO_LINES 279  #define PERCENT_YACC 279
192  #define PERCENT_SKELETON 280  #define PERCENT_DEBUG 280
193  #define PERCENT_TOKEN_TABLE 281  #define PERCENT_LOCATIONS 281
194  #define TYPE 282  #define PERCENT_NO_LINES 282
195  #define EQUAL 283  #define PERCENT_SKELETON 283
196  #define SEMICOLON 284  #define PERCENT_TOKEN_TABLE 284
197  #define COLON 285  #define TYPE 285
198  #define PIPE 286  #define EQUAL 286
199  #define ID 287  #define SEMICOLON 287
200  #define PERCENT_PERCENT 288  #define COLON 288
201  #define PROLOGUE 289  #define PIPE 289
202  #define EPILOGUE 290  #define ID 290
203  #define BRACED_CODE 291  #define PERCENT_PERCENT 291
204  #define PERCENT_LEFT 292  #define PROLOGUE 292
205  #define PERCENT_RIGHT 293  #define EPILOGUE 293
206  #define PERCENT_NONASSOC 294  #define BRACED_CODE 294
207    
208    
209    
# Line 353  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   90  #define YYLAST   102
357    
358  /* YYNTOKENS -- Number of terminals. */  /* YYNTOKENS -- Number of terminals. */
359  #define YYNTOKENS  40  #define YYNTOKENS  40
# Line 424  static const unsigned char yyprhs[] = Line 424  static const unsigned char yyprhs[] =
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,    33,    57,    67,    -1,    -1,    42,        41,     0,    -1,    42,    36,    57,    67,    -1,    -1,    42,
428        43,    68,    -1,    44,    -1,    34,    -1,    22,    -1,    18,        43,    68,    -1,    44,    -1,    37,    -1,    25,    -1,    21,
429        66,    66,    -1,    20,    -1,    14,    -1,    10,     5,    -1,        66,    66,    -1,    23,    -1,    17,    -1,    13,     5,    -1,
430        16,    28,    66,    -1,    23,    -1,    17,    28,    66,    -1,        19,    31,    66,    -1,    26,    -1,    20,    31,    66,    -1,
431        24,    -1,    15,    28,    66,    -1,    19,    -1,    25,    66,        27,    -1,    18,    31,    66,    -1,    22,    -1,    28,    66,
432        -1,    26,    -1,    13,    -1,    21,    -1,    49,    -1,    45,        -1,    29,    -1,    16,    -1,    24,    -1,    49,    -1,    45,
433        -1,    11,    63,    -1,     9,    36,    -1,    -1,     7,    46,        -1,    14,    63,    -1,     9,    39,    -1,    -1,     7,    46,
434        56,    -1,    -1,     6,    47,    56,    -1,    -1,     8,    27,        56,    -1,    -1,     6,    47,    56,    -1,    -1,     8,    30,
435        48,    53,    -1,    -1,    51,    52,    50,    54,    -1,    37,        48,    53,    -1,    -1,    51,    52,    50,    54,    -1,    10,
436        -1,    38,    -1,    39,    -1,    -1,    27,    -1,    32,    -1,        -1,    11,    -1,    12,    -1,    -1,    30,    -1,    35,    -1,
437        53,    32,    -1,    63,    -1,    54,    63,    -1,    27,    -1,        53,    35,    -1,    63,    -1,    54,    63,    -1,    30,    -1,
438        32,    -1,    32,     5,    -1,    32,    65,    -1,    32,     5,        35,    -1,    35,     5,    -1,    35,    65,    -1,    35,     5,
439        65,    -1,    55,    -1,    56,    55,    -1,    58,    -1,    57,        65,    -1,    55,    -1,    56,    55,    -1,    58,    -1,    57,
440        58,    -1,    59,    -1,    44,    29,    -1,    -1,    32,    30,        58,    -1,    59,    -1,    44,    32,    -1,    -1,    35,    33,
441        60,    61,    29,    -1,    62,    -1,    61,    31,    62,    -1,        60,    61,    32,    -1,    62,    -1,    61,    34,    62,    -1,
442        -1,    62,    63,    -1,    62,    64,    -1,    62,    12,    63,        -1,    62,    63,    -1,    62,    64,    -1,    62,    15,    63,
443        -1,    32,    -1,    65,    -1,     4,    -1,    36,    -1,     3,        -1,    35,    -1,    65,    -1,     4,    -1,    39,    -1,     3,
444        -1,     3,    -1,    -1,    33,    35,    -1,    -1,    29,    -1        -1,     3,    -1,    -1,    36,    38,    -1,    -1,    32,    -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,   146,   146,   159,   161,   164,   166,   167,   168,   169,         0,   150,   150,   163,   165,   168,   170,   171,   172,   173,
451       170,   171,   172,   173,   174,   175,   176,   177,   178,   179,       174,   175,   176,   177,   178,   179,   180,   181,   182,   183,
452       180,   181,   184,   186,   187,   191,   199,   199,   205,   205,       184,   185,   188,   190,   191,   195,   203,   203,   209,   209,
453       210,   210,   216,   216,   226,   228,   229,   232,   234,   238,       214,   214,   220,   220,   227,   229,   230,   233,   235,   239,
454       240,   244,   250,   258,   263,   268,   274,   280,   290,   293,       241,   245,   251,   259,   264,   269,   275,   281,   291,   294,
455       302,   304,   310,   312,   315,   315,   320,   322,   325,   328,       303,   305,   311,   313,   316,   316,   321,   323,   326,   329,
456       330,   332,   336,   338,   339,   342,   348,   357,   365,   370,       331,   333,   337,   339,   340,   343,   349,   358,   366,   371,
457       376,   378       377,   379
458  };  };
459  #endif  #endif
460    
# Line 464  static const unsigned short yyrline[] = Line 464  static const unsigned short yyrline[] =
464  static const char *const yytname[] =  static const char *const yytname[] =
465  {  {
466    "\"end of string\"", "error", "$undefined.", "STRING", "CHARACTER", "INT",    "\"end of string\"", "error", "$undefined.", "STRING", "CHARACTER", "INT",
467    "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%union\"", "\"%expect\"",    "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%union\"", "\"%left\"",
468    "\"%start\"", "\"%prec\"", "\"%verbose\"", "\"%error-verbose\"",    "\"%right\"", "\"%nonassoc\"", "\"%expect\"", "\"%start\"", "\"%prec\"",
469    "\"%output\"", "\"%file-prefix\"", "\"%name-prefix\"", "\"%define\"",    "\"%verbose\"", "\"%error-verbose\"", "\"%output\"", "\"%file-prefix\"",
470    "\"%pure-parser\"", "\"%defines\"", "\"%yacc\"", "\"%debug\"",    "\"%name-prefix\"", "\"%define\"", "\"%pure-parser\"", "\"%defines\"",
471    "\"%locations\"", "\"%no-lines\"", "\"%skeleton\"", "\"%token-table\"",    "\"%yacc\"", "\"%debug\"", "\"%locations\"", "\"%no-lines\"",
472    "TYPE", "\"=\"", "\";\"", "\":\"", "\"|\"", "\"identifier\"", "\"%%\"",    "\"%skeleton\"", "\"%token-table\"", "TYPE", "\"=\"", "\";\"", "\":\"",
473    "PROLOGUE", "EPILOGUE", "BRACED_CODE", "\"%left\"", "\"%right\"",    "\"|\"", "\"identifier\"", "\"%%\"", "PROLOGUE", "EPILOGUE",
474    "\"%nonassoc\"", "$axiom", "input", "declarations", "declaration",    "BRACED_CODE", "$axiom", "input", "declarations", "declaration",
475    "grammar_declaration", "symbol_declaration", "@1", "@2", "@3",    "grammar_declaration", "symbol_declaration", "@1", "@2", "@3",
476    "precedence_declaration", "@4", "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",
# Line 523  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         3,     0,     0,     0,    28,    26,     0,     0,     0,     0,         3,     0,     0,     0,    28,    26,     0,     0,    34,    35,
527        20,    10,     0,     0,     0,     0,    17,     9,    21,     7,        36,     0,     0,    20,    10,     0,     0,     0,     0,    17,
528        13,    15,     0,    19,     0,     6,    34,    35,    36,    70,         9,    21,     7,    13,    15,     0,    19,     0,     6,    70,
529         5,    23,    22,    37,     0,     0,    30,    25,    11,    66,         5,    23,    22,    37,     0,     0,    30,    25,    11,    66,
530        64,    62,    24,    63,     0,     0,     0,    67,     0,    18,        64,    62,    24,    63,     0,     0,     0,    67,     0,    18,
531         0,     0,    68,    50,    52,    71,     4,    38,    32,    43,         0,     0,    68,    50,    52,    71,     4,    38,    32,    43,
# Line 547  static const short yydefgoto[] = Line 547  static const short yydefgoto[] =
547     STATE-NUM.  */     STATE-NUM.  */
548  static const short yypact[] =  static const short yypact[] =
549  {  {
550    -32768,     7,    -5,-32768,-32768,-32768,    -1,    11,    46,    38,    -32768,     9,    32,-32768,-32768,-32768,   -13,    -9,-32768,-32768,
551    -32768,-32768,    36,    43,    44,    66,-32768,-32768,-32768,-32768,    -32768,    27,     0,-32768,-32768,     3,     5,    33,    60,-32768,
552    -32768,-32768,    66,-32768,    29,-32768,-32768,-32768,-32768,    48,    -32768,-32768,-32768,-32768,-32768,    60,-32768,    12,-32768,    34,
553    -32768,-32768,-32768,    52,    18,    18,-32768,-32768,-32768,-32768,    -32768,-32768,-32768,    35,   -24,   -24,-32768,-32768,-32768,-32768,
554    -32768,-32768,-32768,-32768,    66,    66,    66,-32768,    66,-32768,    -32768,-32768,-32768,-32768,    60,    60,    60,-32768,    60,-32768,
555        50,    54,    16,-32768,-32768,-32768,-32768,-32768,-32768,-32768,        38,    49,    66,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
556        41,-32768,    18,    18,    49,-32768,-32768,-32768,-32768,-32768,         2,-32768,   -24,   -24,    47,-32768,-32768,-32768,-32768,-32768,
557    -32768,    51,-32768,-32768,    38,    81,-32768,-32768,-32768,    53,    -32768,    29,-32768,-32768,     0,    80,-32768,-32768,-32768,    50,
558    -32768,-32768,    38,-32768,-32768,-32768,    31,    27,-32768,-32768,    -32768,-32768,     0,-32768,-32768,-32768,   -20,    -2,-32768,-32768,
559    -32768,    38,-32768,-32768,-32768,    27,-32768    -32768,     0,-32768,-32768,-32768,    -2,-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,    85,-32768,-32768,-32768,-32768,-32768,    -32768,-32768,-32768,-32768,    82,-32768,-32768,-32768,-32768,-32768,
566    -32768,-32768,-32768,-32768,-32768,    -6,    55,-32768,    37,-32768,    -32768,-32768,-32768,-32768,-32768,   -47,    51,-32768,    36,-32768,
567    -32768,-32768,    -2,    -9,-32768,   -17,    30,-32768,-32768    -32768,-32768,    -3,   -12,-32768,   -50,   -17,-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 572  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        42,     4,     5,     6,     7,     8,     9,     3,    10,    11,        42,    39,    40,    39,    40,    39,    59,    75,    49,     3,
576        12,    13,    14,    15,    16,    17,    18,    19,    20,    21,        76,    60,    89,    91,    90,    77,    77,    36,     4,     5,
577        22,    23,     4,     5,     6,     7,    36,     9,    24,    25,         6,     7,     8,     9,    10,    84,    12,    65,    66,    67,
578        39,    40,    26,    27,    28,     4,     5,     6,     7,    91,        37,    68,    38,    41,    44,    41,    45,    92,     4,     5,
579         9,    39,    40,    76,    39,    59,    75,    37,    50,    71,         6,     7,     8,     9,    10,    11,    12,    50,    13,    14,
580        60,    38,    49,    26,    27,    28,    77,    77,    84,    41,        15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
581        89,    50,    90,    92,    44,    83,    26,    27,    28,    47,        25,    26,    83,    47,    46,    57,    55,    81,    27,    28,
582        41,    45,    46,    88,    65,    66,    67,    55,    68,    57,        88,    69,     4,     5,     6,     7,     8,     9,    10,    96,
583        69,    78,    96,    70,    39,    85,    81,    30,    95,    72,        12,    70,    78,    39,    30,    85,    63,    95,    72,     0,
584        63         0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
585           0,    50,    71
586  };  };
587    
588  static const short yycheck[] =  static const short yycheck[] =
589  {  {
590         9,     6,     7,     8,     9,    10,    11,     0,    13,    14,        12,     3,     4,     3,     4,     3,    30,     5,    25,     0,
591        15,    16,    17,    18,    19,    20,    21,    22,    23,    24,        60,    35,    32,    15,    34,    62,    63,    30,     6,     7,
592        25,    26,     6,     7,     8,     9,    27,    11,    33,    34,         8,     9,    10,    11,    12,    75,    14,    44,    45,    46,
593         3,     4,    37,    38,    39,     6,     7,     8,     9,    12,        39,    48,     5,    35,    31,    35,    31,    39,     6,     7,
594        11,     3,     4,    60,     3,    27,     5,    36,    32,    33,         8,     9,    10,    11,    12,    13,    14,    35,    16,    17,
595        32,     5,    22,    37,    38,    39,    62,    63,    75,    32,        18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
596        29,    32,    31,    36,    28,    74,    37,    38,    39,     3,        28,    29,    74,     3,    31,    30,    32,    38,    36,    37,
597        32,    28,    28,    82,    44,    45,    46,    29,    48,    27,        82,    33,     6,     7,     8,     9,    10,    11,    12,    91,
598        30,    32,    91,    29,     3,    32,    35,     2,    90,    52,        14,    32,    35,     3,     2,    35,    35,    90,    52,    -1,
599        35        -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
600          -1,    35,    36
601  };  };
602    
603  #if YYDEBUG  #if YYDEBUG
# Line 604  static const short yycheck[] = Line 606  static const short yycheck[] =
606  static const unsigned char yystos[] =  static const unsigned char yystos[] =
607  {  {
608         0,    41,    42,     0,     6,     7,     8,     9,    10,    11,         0,    41,    42,     0,     6,     7,     8,     9,    10,    11,
609        13,    14,    15,    16,    17,    18,    19,    20,    21,    22,        12,    13,    14,    16,    17,    18,    19,    20,    21,    22,
610        23,    24,    25,    26,    33,    34,    37,    38,    39,    43,        23,    24,    25,    26,    27,    28,    29,    36,    37,    43,
611        44,    45,    49,    51,    47,    46,    27,    36,     5,     3,        44,    45,    49,    51,    47,    46,    30,    39,     5,     3,
612         4,    32,    63,    65,    28,    28,    28,     3,    66,    66,         4,    35,    63,    65,    31,    31,    31,     3,    66,    66,
613        32,    44,    57,    58,    59,    29,    68,    27,    52,    27,        35,    44,    57,    58,    59,    32,    68,    30,    52,    30,
614        32,    55,    56,    56,    48,    66,    66,    66,    66,    30,        35,    55,    56,    56,    48,    66,    66,    66,    66,    33,
615        29,    33,    58,    67,    50,     5,    65,    55,    32,    53,        32,    36,    58,    67,    50,     5,    65,    55,    35,    53,
616        60,    35,    54,    63,    65,    32,    61,    62,    63,    29,        60,    38,    54,    63,    65,    35,    61,    62,    63,    32,
617        31,    12,    36,    63,    64,    62,    63        34,    15,    39,    63,    64,    62,    63
618  };  };
619  #endif  #endif
620    
# Line 1182  yyreduce: Line 1184  yyreduce:
1184    switch (yyn)    switch (yyn)
1185      {      {
1186          case 2:          case 2:
1187  #line 148 "parse-gram.y"  #line 152 "parse-gram.y"
1188      {      {
1189        yycontrol->errcode = 0;        yycontrol->errcode = 0;
1190        epilogue_set (yyvsp[0].string, yylsp[0]);        epilogue_set (yyvsp[0].string, yylsp[0]);
# Line 1190  yyreduce: Line 1192  yyreduce:
1192      break;      break;
1193    
1194    case 6:    case 6:
1195  #line 166 "parse-gram.y"  #line 170 "parse-gram.y"
1196      { prologue_augment (yyvsp[0].string, yylsp[0]); }      { prologue_augment (yyvsp[0].string, yylsp[0]); }
1197      break;      break;
1198    
1199    case 7:    case 7:
1200  #line 167 "parse-gram.y"  #line 171 "parse-gram.y"
1201      { debug_flag = 1; }      { debug_flag = 1; }
1202      break;      break;
1203    
1204    case 8:    case 8:
1205  #line 168 "parse-gram.y"  #line 172 "parse-gram.y"
1206      { muscle_insert (yyvsp[-1].string, yyvsp[0].string); }      { muscle_insert (yyvsp[-1].string, yyvsp[0].string); }
1207      break;      break;
1208    
1209    case 9:    case 9:
1210  #line 169 "parse-gram.y"  #line 173 "parse-gram.y"
1211      { defines_flag = 1; }      { defines_flag = 1; }
1212      break;      break;
1213    
1214    case 10:    case 10:
1215  #line 170 "parse-gram.y"  #line 174 "parse-gram.y"
1216      { error_verbose = 1; }      { error_verbose = 1; }
1217      break;      break;
1218    
1219    case 11:    case 11:
1220  #line 171 "parse-gram.y"  #line 175 "parse-gram.y"
1221      { expected_conflicts = yyvsp[0].integer; }      { expected_conflicts = yyvsp[0].integer; }
1222      break;      break;
1223    
1224    case 12:    case 12:
1225  #line 172 "parse-gram.y"  #line 176 "parse-gram.y"
1226      { spec_file_prefix = yyvsp[0].string; }      { spec_file_prefix = yyvsp[0].string; }
1227      break;      break;
1228    
1229    case 13:    case 13:
1230  #line 173 "parse-gram.y"  #line 177 "parse-gram.y"
1231      { locations_flag = 1; }      { locations_flag = 1; }
1232      break;      break;
1233    
1234    case 14:    case 14:
1235  #line 174 "parse-gram.y"  #line 178 "parse-gram.y"
1236      { spec_name_prefix = yyvsp[0].string; }      { spec_name_prefix = yyvsp[0].string; }
1237      break;      break;
1238    
1239    case 15:    case 15:
1240  #line 175 "parse-gram.y"  #line 179 "parse-gram.y"
1241      { no_lines_flag = 1; }      { no_lines_flag = 1; }
1242      break;      break;
1243    
1244    case 16:    case 16:
1245  #line 176 "parse-gram.y"  #line 180 "parse-gram.y"
1246      { spec_outfile = yyvsp[0].string; }      { spec_outfile = yyvsp[0].string; }
1247      break;      break;
1248    
1249    case 17:    case 17:
1250  #line 177 "parse-gram.y"  #line 181 "parse-gram.y"
1251      { pure_parser = 1; }      { pure_parser = 1; }
1252      break;      break;
1253    
1254    case 18:    case 18:
1255  #line 178 "parse-gram.y"  #line 182 "parse-gram.y"
1256      { skeleton = yyvsp[0].string; }      { skeleton = yyvsp[0].string; }
1257      break;      break;
1258    
1259    case 19:    case 19:
1260  #line 179 "parse-gram.y"  #line 183 "parse-gram.y"
1261      { token_table_flag = 1; }      { token_table_flag = 1; }
1262      break;      break;
1263    
1264    case 20:    case 20:
1265  #line 180 "parse-gram.y"  #line 184 "parse-gram.y"
1266      { report_flag = 1; }      { report_flag = 1; }
1267      break;      break;
1268    
1269    case 21:    case 21:
1270  #line 181 "parse-gram.y"  #line 185 "parse-gram.y"
1271      { yacc_flag = 1; }      { yacc_flag = 1; }
1272      break;      break;
1273    
1274    case 24:    case 24:
1275  #line 188 "parse-gram.y"  #line 192 "parse-gram.y"
1276      {      {
1277        grammar_start_symbol_set (yyvsp[0].symbol, yylsp[0]);        grammar_start_symbol_set (yyvsp[0].symbol, yylsp[0]);
1278      }      }
1279      break;      break;
1280    
1281    case 25:    case 25:
1282  #line 192 "parse-gram.y"  #line 196 "parse-gram.y"
1283      {      {
1284        typed = 1;        typed = 1;
1285        MUSCLE_INSERT_INT ("stype_line", yylsp[0].first_line);        MUSCLE_INSERT_INT ("stype_line", yylsp[0].first_line);
# Line 1286  yyreduce: Line 1288  yyreduce:
1288      break;      break;
1289    
1290    case 26:    case 26:
1291  #line 200 "parse-gram.y"  #line 204 "parse-gram.y"
1292      { current_class = nterm_sym; }      { current_class = nterm_sym; }
1293      break;      break;
1294    
1295    case 27:    case 27:
1296  #line 201 "parse-gram.y"  #line 205 "parse-gram.y"
1297      {      {
1298        current_class = unknown_sym;        current_class = unknown_sym;
1299        current_type = NULL;        current_type = NULL;
# Line 1299  yyreduce: Line 1301  yyreduce:
1301      break;      break;
1302    
1303    case 28:    case 28:
1304  #line 205 "parse-gram.y"  #line 209 "parse-gram.y"
1305      { current_class = token_sym; }      { current_class = token_sym; }
1306      break;      break;
1307    
1308    case 29:    case 29:
1309  #line 206 "parse-gram.y"  #line 210 "parse-gram.y"
1310      {      {
1311        current_class = unknown_sym;        current_class = unknown_sym;
1312        current_type = NULL;        current_type = NULL;
# Line 1312  yyreduce: Line 1314  yyreduce:
1314      break;      break;
1315    
1316    case 30:    case 30:
1317  #line 210 "parse-gram.y"  #line 214 "parse-gram.y"
1318      {current_type = yyvsp[0].string; }      {current_type = yyvsp[0].string; }
1319      break;      break;
1320    
1321    case 31:    case 31:
1322  #line 211 "parse-gram.y"  #line 215 "parse-gram.y"
1323      {      {
1324        current_type = NULL;        current_type = NULL;
1325      }      }
1326      break;      break;
1327    
1328    case 32:    case 32:
1329  #line 218 "parse-gram.y"  #line 222 "parse-gram.y"
1330      { current_assoc = yyvsp[-1].assoc; ++current_prec; }      { current_assoc = yyvsp[-1].assoc; ++current_prec; }
1331      break;      break;
1332    
1333    case 33:    case 33:
1334  #line 220 "parse-gram.y"  #line 224 "parse-gram.y"
1335      { current_assoc = non_assoc; current_type = NULL; }      { current_assoc = non_assoc; current_type = NULL; }
1336      break;      break;
1337    
1338    case 34:    case 34:
1339  #line 227 "parse-gram.y"  #line 228 "parse-gram.y"
1340      { yyval.assoc = left_assoc; }      { yyval.assoc = left_assoc; }
1341      break;      break;
1342    
1343    case 35:    case 35:
1344  #line 228 "parse-gram.y"  #line 229 "parse-gram.y"
1345      { yyval.assoc = right_assoc; }      { yyval.assoc = right_assoc; }
1346      break;      break;
1347    
1348    case 36:    case 36:
1349  #line 229 "parse-gram.y"  #line 230 "parse-gram.y"
1350      { yyval.assoc = non_assoc; }      { yyval.assoc = non_assoc; }
1351      break;      break;
1352    
1353    case 37:    case 37:
1354  #line 233 "parse-gram.y"  #line 234 "parse-gram.y"
1355      { current_type = NULL;}      { current_type = NULL;}
1356      break;      break;
1357    
1358    case 38:    case 38:
1359  #line 234 "parse-gram.y"  #line 235 "parse-gram.y"
1360      { current_type = yyvsp[0].string; }      { current_type = yyvsp[0].string; }
1361      break;      break;
1362    
1363    case 39:    case 39:
1364  #line 239 "parse-gram.y"  #line 240 "parse-gram.y"
1365      { symbol_type_set (yyvsp[0].symbol, current_type); }      { symbol_type_set (yyvsp[0].symbol, current_type); }
1366      break;      break;
1367    
1368    case 40:    case 40:
1369  #line 240 "parse-gram.y"  #line 241 "parse-gram.y"
1370      { symbol_type_set (yyvsp[0].symbol, current_type); }      { symbol_type_set (yyvsp[0].symbol, current_type); }
1371      break;      break;
1372    
1373    case 41:    case 41:
1374  #line 246 "parse-gram.y"  #line 247 "parse-gram.y"
1375      {      {
1376        symbol_type_set (yyvsp[0].symbol, current_type);        symbol_type_set (yyvsp[0].symbol, current_type);
1377        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);
# Line 1377  yyreduce: Line 1379  yyreduce:
1379      break;      break;
1380    
1381    case 42:    case 42:
1382  #line 251 "parse-gram.y"  #line 252 "parse-gram.y"
1383      {      {
1384        symbol_type_set (yyvsp[0].symbol, current_type);        symbol_type_set (yyvsp[0].symbol, current_type);
1385        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);
# Line 1385  yyreduce: Line 1387  yyreduce:
1387      break;      break;
1388    
1389    case 43:    case 43:
1390  #line 260 "parse-gram.y"  #line 261 "parse-gram.y"
1391      {      {
1392         current_type = yyvsp[0].string;         current_type = yyvsp[0].string;
1393       }       }
1394      break;      break;
1395    
1396    case 44:    case 44:
1397  #line 264 "parse-gram.y"  #line 265 "parse-gram.y"
1398      {      {
1399         symbol_class_set (yyvsp[0].symbol, current_class);         symbol_class_set (yyvsp[0].symbol, current_class);
1400         symbol_type_set (yyvsp[0].symbol, current_type);         symbol_type_set (yyvsp[0].symbol, current_type);
# Line 1400  yyreduce: Line 1402  yyreduce:
1402      break;      break;
1403    
1404    case 45:    case 45:
1405  #line 269 "parse-gram.y"  #line 270 "parse-gram.y"
1406      {      {
1407        symbol_class_set (yyvsp[-1].symbol, current_class);        symbol_class_set (yyvsp[-1].symbol, current_class);
1408        symbol_type_set (yyvsp[-1].symbol, current_type);        symbol_type_set (yyvsp[-1].symbol, current_type);
# Line 1409  yyreduce: Line 1411  yyreduce:
1411      break;      break;
1412    
1413    case 46:    case 46:
1414  #line 275 "parse-gram.y"  #line 276 "parse-gram.y"
1415      {      {
1416        symbol_class_set (yyvsp[-1].symbol, current_class);        symbol_class_set (yyvsp[-1].symbol, current_class);
1417        symbol_type_set (yyvsp[-1].symbol, current_type);        symbol_type_set (yyvsp[-1].symbol, current_type);
# Line 1418  yyreduce: Line 1420  yyreduce:
1420      break;      break;
1421    
1422    case 47:    case 47:
1423  #line 281 "parse-gram.y"  #line 282 "parse-gram.y"
1424      {      {
1425        symbol_class_set (yyvsp[-2].symbol, current_class);        symbol_class_set (yyvsp[-2].symbol, current_class);
1426        symbol_type_set (yyvsp[-2].symbol, current_type);        symbol_type_set (yyvsp[-2].symbol, current_type);
# Line 1428  yyreduce: Line 1430  yyreduce:
1430      break;      break;
1431    
1432    case 48:    case 48:
1433  #line 292 "parse-gram.y"  #line 293 "parse-gram.y"
1434      {;}      {;}
1435      break;      break;
1436    
1437    case 49:    case 49:
1438  #line 294 "parse-gram.y"  #line 295 "parse-gram.y"
1439      {;}      {;}
1440      break;      break;
1441    
1442    case 54:    case 54:
1443  #line 316 "parse-gram.y"  #line 317 "parse-gram.y"
1444      { current_lhs = yyvsp[-1].symbol; current_lhs_location = yylsp[-1]; }      { current_lhs = yyvsp[-1].symbol; current_lhs_location = yylsp[-1]; }
1445      break;      break;
1446    
1447    case 55:    case 55:
1448  #line 317 "parse-gram.y"  #line 318 "parse-gram.y"
1449      {;}      {;}
1450      break;      break;
1451    
1452    case 56:    case 56:
1453  #line 321 "parse-gram.y"  #line 322 "parse-gram.y"
1454      { grammar_rule_end (yylsp[0]); }      { grammar_rule_end (yylsp[0]); }
1455      break;      break;
1456    
1457    case 57:    case 57:
1458  #line 322 "parse-gram.y"  #line 323 "parse-gram.y"
1459      { grammar_rule_end (yylsp[0]); }      { grammar_rule_end (yylsp[0]); }
1460      break;      break;
1461    
1462    case 58:    case 58:
1463  #line 327 "parse-gram.y"  #line 328 "parse-gram.y"
1464      { grammar_rule_begin (current_lhs, current_lhs_location); }      { grammar_rule_begin (current_lhs, current_lhs_location); }
1465      break;      break;
1466    
1467    case 59:    case 59:
1468  #line 329 "parse-gram.y"  #line 330 "parse-gram.y"
1469      { grammar_current_rule_symbol_append (yyvsp[0].symbol, yylsp[0]); }      { grammar_current_rule_symbol_append (yyvsp[0].symbol, yylsp[0]); }
1470      break;      break;
1471    
1472    case 60:    case 60:
1473  #line 331 "parse-gram.y"  #line 332 "parse-gram.y"
1474      { grammar_current_rule_action_append (yyvsp[0].string, yylsp[0]); }      { grammar_current_rule_action_append (yyvsp[0].string, yylsp[0]); }
1475      break;      break;
1476    
1477    case 61:    case 61:
1478  #line 333 "parse-gram.y"  #line 334 "parse-gram.y"
1479      { grammar_current_rule_prec_set (yyvsp[0].symbol); }      { grammar_current_rule_prec_set (yyvsp[0].symbol); }
1480      break;      break;
1481    
1482    case 62:    case 62:
1483  #line 337 "parse-gram.y"  #line 338 "parse-gram.y"
1484      { yyval.symbol = yyvsp[0].symbol; }      { yyval.symbol = yyvsp[0].symbol; }
1485      break;      break;
1486    
1487    case 63:    case 63:
1488  #line 338 "parse-gram.y"  #line 339 "parse-gram.y"
1489      { yyval.symbol = yyvsp[0].symbol; }      { yyval.symbol = yyvsp[0].symbol; }
1490      break;      break;
1491    
1492    case 64:    case 64:
1493  #line 339 "parse-gram.y"  #line 340 "parse-gram.y"
1494      { yyval.symbol = getsym (yyvsp[0].string, yylsp[0]); }      { yyval.symbol = getsym (yyvsp[0].string, yylsp[0]); }
1495      break;      break;
1496    
1497    case 65:    case 65:
1498  #line 344 "parse-gram.y"  #line 345 "parse-gram.y"
1499      { yyval.string = yyvsp[0].string; }      { yyval.string = yyvsp[0].string; }
1500      break;      break;
1501    
1502    case 66:    case 66:
1503  #line 350 "parse-gram.y"  #line 351 "parse-gram.y"
1504      {      {
1505        yyval.symbol = getsym (yyvsp[0].string, yylsp[0]);        yyval.symbol = getsym (yyvsp[0].string, yylsp[0]);
1506        symbol_class_set (yyval.symbol, token_sym);        symbol_class_set (yyval.symbol, token_sym);
# Line 1506  yyreduce: Line 1508  yyreduce:
1508      break;      break;
1509    
1510    case 67:    case 67:
1511  #line 359 "parse-gram.y"  #line 360 "parse-gram.y"
1512      {      {
1513        yyval.string = yyvsp[0].string + 1;        yyval.string = yyvsp[0].string + 1;
1514        yyval.string[strlen (yyval.string) - 1] = '\0';        yyval.string[strlen (yyval.string) - 1] = '\0';
# Line 1514  yyreduce: Line 1516  yyreduce:
1516      break;      break;
1517    
1518    case 68:    case 68:
1519  #line 367 "parse-gram.y"  #line 368 "parse-gram.y"
1520      {      {
1521        yyval.string = xstrdup ("");        yyval.string = xstrdup ("");
1522      }      }
1523      break;      break;
1524    
1525    case 69:    case 69:
1526  #line 371 "parse-gram.y"  #line 372 "parse-gram.y"
1527      {      {
1528        yyval.string = yyvsp[0].string;        yyval.string = yyvsp[0].string;
1529      }      }
# Line 1531  yyreduce: Line 1533  yyreduce:
1533      }      }
1534    
1535  /* Line 1012 of /usr/local/share/bison/bison.simple.  */  /* Line 1012 of /usr/local/share/bison/bison.simple.  */
1536  #line 1535 "parse-gram.c"  #line 1537 "parse-gram.c"
1537    
1538    yyvsp -= yylen;    yyvsp -= yylen;
1539    yyssp -= yylen;    yyssp -= yylen;
# Line 1752  yyreturn: Line 1754  yyreturn:
1754    return yyresult;    return yyresult;
1755  }  }
1756    
1757  #line 380 "parse-gram.y"  #line 381 "parse-gram.y"
1758    
1759  /*------------------------------------------------------------------.  /*------------------------------------------------------------------.
1760  | When debugging the parser, display tokens' locations and values.  |  | When debugging the parser, display tokens' locations and values.  |

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

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