mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/c.m4 (b4_dirname): New.
(b4_syncline): Also output the location of its invocation (from the skeleton). (b4_user_action, b4_define_user_action, b4_user_actions) (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header) (b4_user_stype): New. * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2006-07-08 Akim Demaille <akim@lrde.epita.fr>
|
||||||
|
|
||||||
|
* data/c.m4 (b4_dirname): New.
|
||||||
|
(b4_syncline): Also output the location of its invocation (from
|
||||||
|
the skeleton).
|
||||||
|
(b4_user_action, b4_define_user_action, b4_user_actions)
|
||||||
|
(b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
|
||||||
|
(b4_user_stype): New.
|
||||||
|
* data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
|
||||||
|
|
||||||
2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
|
2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
In the grammar file, the first column is 1 not 0 on the first line as
|
In the grammar file, the first column is 1 not 0 on the first line as
|
||||||
|
|||||||
42
data/c.m4
42
data/c.m4
@@ -403,12 +403,52 @@ m4_define([b4_c_arg],
|
|||||||
## Synclines. ##
|
## Synclines. ##
|
||||||
## ----------- ##
|
## ----------- ##
|
||||||
|
|
||||||
|
# b4_basename(NAME)
|
||||||
|
# -----------------
|
||||||
|
# Beware that NAME is not evaluated.
|
||||||
|
m4_define([b4_basename],
|
||||||
|
[m4_case([$1],
|
||||||
|
[/], [/],
|
||||||
|
[m4_bpatsubst([$1], [^.*/\([^/]+\)/?$], [\1])])])
|
||||||
|
|
||||||
|
|
||||||
# b4_syncline(LINE, FILE)
|
# b4_syncline(LINE, FILE)
|
||||||
# -----------------------
|
# -----------------------
|
||||||
m4_define([b4_syncline],
|
m4_define([b4_syncline],
|
||||||
[b4_flag_if([synclines], [[#]line $1 $2])])
|
[b4_flag_if([synclines],
|
||||||
|
[/* Line __line__ of b4_basename(m4_quote(__file__)). */
|
||||||
|
[#]line $1 $2])])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_user_code(USER-CODE)
|
||||||
|
# -----------------------
|
||||||
|
# Emit code from the user, ending it with synclines.
|
||||||
|
m4_define([b4_user_code],
|
||||||
|
[$1
|
||||||
|
b4_syncline([@oline@], [@ofile@])])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_define_user_code(MACRO)
|
||||||
|
# --------------------------
|
||||||
|
# From b4_MACRO, build b4_user_MACRO that includes the synclines.
|
||||||
|
m4_define([b4_define_user_code],
|
||||||
|
[m4_define([b4_user_$1],
|
||||||
|
[b4_user_code([b4_$1])])])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_user_actions
|
||||||
|
# b4_user_initial_action
|
||||||
|
# b4_user_post_prologue
|
||||||
|
# b4_user_start_header
|
||||||
|
# b4_user_stype
|
||||||
|
# ----------------------
|
||||||
|
# Macros that issue user code, ending with synclines.
|
||||||
|
b4_define_user_code([actions])
|
||||||
|
b4_define_user_code([initial_action])
|
||||||
|
b4_define_user_code([post_prologue])
|
||||||
|
b4_define_user_code([start_header])
|
||||||
|
b4_define_user_code([stype])
|
||||||
|
|
||||||
|
|
||||||
## -------------- ##
|
## -------------- ##
|
||||||
## User actions. ##
|
## User actions. ##
|
||||||
|
|||||||
19
data/glr.c
19
data/glr.c
@@ -178,9 +178,7 @@ b4_token_enums(b4_tokens)
|
|||||||
[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[typedef union b4_union_name
|
[typedef union b4_union_name
|
||||||
b4_stype
|
b4_user_stype
|
||||||
/* Line __line__ of glr.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
YYSTYPE;],
|
YYSTYPE;],
|
||||||
[typedef int YYSTYPE;])[
|
[typedef int YYSTYPE;])[
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
@@ -237,11 +235,8 @@ b4_defines_if([#include @output_header_name@],
|
|||||||
static YYSTYPE yyval_default;
|
static YYSTYPE yyval_default;
|
||||||
|
|
||||||
/* Copy the second part of user declarations. */
|
/* Copy the second part of user declarations. */
|
||||||
]b4_post_prologue[
|
]b4_user_post_prologue[
|
||||||
|
|
||||||
]/* Line __line__ of glr.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
[
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -934,9 +929,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
|||||||
]])[
|
]])[
|
||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
]b4_actions
|
]b4_user_actions[
|
||||||
/* Line __line__ of glr.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])[
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2318,11 +2311,9 @@ m4_ifdef([b4_initial_action], [
|
|||||||
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
||||||
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
||||||
/* User initialization code. */
|
/* User initialization code. */
|
||||||
b4_initial_action
|
b4_user_initial_action
|
||||||
m4_popdef([b4_dollar_dollar])dnl
|
m4_popdef([b4_dollar_dollar])dnl
|
||||||
m4_popdef([b4_at_dollar])dnl
|
m4_popdef([b4_at_dollar])])dnl
|
||||||
/* Line __line__ of glr.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])])dnl
|
|
||||||
[
|
[
|
||||||
if (! yyinitGLRStack (yystackp, YYINITDEPTH))
|
if (! yyinitGLRStack (yystackp, YYINITDEPTH))
|
||||||
goto yyexhaustedlab;
|
goto yyexhaustedlab;
|
||||||
|
|||||||
15
data/glr.cc
15
data/glr.cc
@@ -90,8 +90,7 @@ m4_define([b4_yy_symbol_print_generate],
|
|||||||
|
|
||||||
# Declare yyerror.
|
# Declare yyerror.
|
||||||
m4_append([b4_post_prologue],
|
m4_append([b4_post_prologue],
|
||||||
[/* Line __line__ of glr.cc. */
|
[b4_syncline([@oline@], [@ofile@])
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
|
|
||||||
b4_c_ansi_function_decl([yyerror],
|
b4_c_ansi_function_decl([yyerror],
|
||||||
[static void],
|
[static void],
|
||||||
@@ -102,8 +101,7 @@ b4_c_ansi_function_decl([yyerror],
|
|||||||
|
|
||||||
# Define yyerror.
|
# Define yyerror.
|
||||||
m4_append([b4_epilogue],
|
m4_append([b4_epilogue],
|
||||||
[/* Line __line__ of glr.cc. */
|
[b4_syncline([@oline@], [@ofile@])[
|
||||||
b4_syncline([@oline@], [@ofile@])[
|
|
||||||
/*------------------.
|
/*------------------.
|
||||||
| Report an error. |
|
| Report an error. |
|
||||||
`------------------*/
|
`------------------*/
|
||||||
@@ -237,10 +235,7 @@ namespace ]b4_namespace[
|
|||||||
|
|
||||||
]m4_ifdef([b4_start_header],
|
]m4_ifdef([b4_start_header],
|
||||||
[[/* Copy the %start-header blocks. */
|
[[/* Copy the %start-header blocks. */
|
||||||
]b4_start_header])[]dnl
|
]b4_user_start_header])[
|
||||||
|
|
||||||
[/* Line __line__ of glr.cc. */
|
|
||||||
]b4_syncline([@oline@], [@ofile@])[
|
|
||||||
|
|
||||||
#include "location.hh"
|
#include "location.hh"
|
||||||
|
|
||||||
@@ -291,9 +286,7 @@ namespace ]b4_namespace[
|
|||||||
#ifndef YYSTYPE
|
#ifndef YYSTYPE
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[ union semantic_type
|
[ union semantic_type
|
||||||
b4_stype
|
b4_user_stype
|
||||||
/* Line __line__ of lalr1.cc. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
;],
|
;],
|
||||||
[ typedef int semantic_type;])[
|
[ typedef int semantic_type;])[
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -55,10 +55,7 @@ namespace ]b4_namespace[
|
|||||||
|
|
||||||
]m4_ifdef([b4_start_header],
|
]m4_ifdef([b4_start_header],
|
||||||
[[/* Copy the %start-header blocks. */
|
[[/* Copy the %start-header blocks. */
|
||||||
]b4_start_header])[]dnl
|
]b4_user_start_header])[
|
||||||
|
|
||||||
[/* Line __line__ of lalr1.cc. */
|
|
||||||
]b4_syncline([@oline@], [@ofile@])[
|
|
||||||
|
|
||||||
]dnl Include location.hh here: it might depend on headers included above.
|
]dnl Include location.hh here: it might depend on headers included above.
|
||||||
[#include "location.hh"
|
[#include "location.hh"
|
||||||
@@ -111,9 +108,7 @@ namespace ]b4_namespace[
|
|||||||
#ifndef YYSTYPE
|
#ifndef YYSTYPE
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[ union semantic_type
|
[ union semantic_type
|
||||||
b4_stype
|
b4_user_stype
|
||||||
/* Line __line__ of lalr1.cc. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
;],
|
;],
|
||||||
[ typedef int semantic_type;])[
|
[ typedef int semantic_type;])[
|
||||||
#else
|
#else
|
||||||
@@ -321,10 +316,7 @@ b4_defines_if([
|
|||||||
#include @output_header_name@])[
|
#include @output_header_name@])[
|
||||||
|
|
||||||
/* User implementation prologue. */
|
/* User implementation prologue. */
|
||||||
]b4_post_prologue[
|
]b4_user_post_prologue[
|
||||||
|
|
||||||
]/* Line __line__ of lalr1.cc. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])[
|
|
||||||
|
|
||||||
#ifndef YY_
|
#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if YYENABLE_NLS
|
||||||
@@ -557,11 +549,9 @@ namespace ]b4_namespace[
|
|||||||
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
||||||
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
||||||
/* User initialization code. */
|
/* User initialization code. */
|
||||||
b4_initial_action
|
b4_user_initial_action
|
||||||
m4_popdef([b4_dollar_dollar])dnl
|
m4_popdef([b4_dollar_dollar])dnl
|
||||||
m4_popdef([b4_at_dollar])dnl
|
m4_popdef([b4_at_dollar])])dnl
|
||||||
/* Line __line__ of yacc.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])])dnl
|
|
||||||
|
|
||||||
[ /* Initialize the stacks. The initial state will be pushed in
|
[ /* Initialize the stacks. The initial state will be pushed in
|
||||||
yynewstate, since the latter expects the semantical and the
|
yynewstate, since the latter expects the semantical and the
|
||||||
@@ -680,9 +670,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
|||||||
YY_REDUCE_PRINT (yyn);
|
YY_REDUCE_PRINT (yyn);
|
||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
]b4_actions
|
]b4_user_actions[
|
||||||
/* Line __line__ of lalr1.cc. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])[
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
|
||||||
|
|||||||
24
data/yacc.c
24
data/yacc.c
@@ -190,9 +190,7 @@ b4_token_enums_defines(b4_tokens)[
|
|||||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[[typedef union ]b4_union_name
|
[[typedef union ]b4_union_name
|
||||||
b4_stype
|
b4_user_stype
|
||||||
/* Line __line__ of yacc.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
YYSTYPE;],
|
YYSTYPE;],
|
||||||
[typedef int YYSTYPE;])[
|
[typedef int YYSTYPE;])[
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
@@ -218,10 +216,7 @@ m4_ifdef([b4_end_header],
|
|||||||
]b4_end_header])[]dnl
|
]b4_end_header])[]dnl
|
||||||
|
|
||||||
[/* Copy the second part of user declarations. */
|
[/* Copy the second part of user declarations. */
|
||||||
]b4_post_prologue
|
]b4_user_post_prologue[
|
||||||
|
|
||||||
[/* Line __line__ of yacc.c. */
|
|
||||||
]b4_syncline([@oline@], [@ofile@])[
|
|
||||||
|
|
||||||
#ifdef short
|
#ifdef short
|
||||||
# undef short
|
# undef short
|
||||||
@@ -1077,12 +1072,9 @@ m4_ifdef([b4_initial_action], [
|
|||||||
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
|
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
|
||||||
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
|
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
|
||||||
/* User initialization code. */
|
/* User initialization code. */
|
||||||
b4_initial_action
|
b4_user_initial_action
|
||||||
m4_popdef([b4_dollar_dollar])dnl
|
m4_popdef([b4_dollar_dollar])dnl
|
||||||
m4_popdef([b4_at_dollar])dnl
|
m4_popdef([b4_at_dollar])])dnl
|
||||||
/* Line __line__ of yacc.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
])dnl
|
|
||||||
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
|
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
|
||||||
]])dnl
|
]])dnl
|
||||||
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
||||||
@@ -1270,9 +1262,7 @@ yyreduce:
|
|||||||
YY_REDUCE_PRINT (yyn);
|
YY_REDUCE_PRINT (yyn);
|
||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
]b4_actions
|
]b4_user_actions[
|
||||||
/* Line __line__ of yacc.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])[
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||||
@@ -1507,9 +1497,7 @@ b4_token_enums_defines(b4_tokens)
|
|||||||
[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[[typedef union ]b4_union_name
|
[[typedef union ]b4_union_name
|
||||||
b4_stype
|
b4_user_stype
|
||||||
/* Line __line__ of yacc.c. */
|
|
||||||
b4_syncline([@oline@], [@ofile@])
|
|
||||||
YYSTYPE;],
|
YYSTYPE;],
|
||||||
[typedef int YYSTYPE;])[
|
[typedef int YYSTYPE;])[
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
|
|||||||
323
src/parse-gram.c
323
src/parse-gram.c
@@ -69,7 +69,8 @@
|
|||||||
#define yylloc gram_lloc
|
#define yylloc gram_lloc
|
||||||
|
|
||||||
/* Copy the first part of user declarations. */
|
/* Copy the first part of user declarations. */
|
||||||
#line 1 "parse-gram.y"
|
/* Line 164 of yacc.c. */
|
||||||
|
#line 1 "../../src/parse-gram.y"
|
||||||
/* Bison Grammar Parser -*- C -*-
|
/* Bison Grammar Parser -*- C -*-
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
@@ -291,7 +292,8 @@ static int current_prec = 0;
|
|||||||
|
|
||||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
typedef union YYSTYPE
|
typedef union YYSTYPE
|
||||||
#line 97 "parse-gram.y"
|
/* Line 195 of yacc.c. */
|
||||||
|
#line 97 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol *symbol;
|
symbol *symbol;
|
||||||
symbol_list *list;
|
symbol_list *list;
|
||||||
@@ -301,8 +303,8 @@ typedef union YYSTYPE
|
|||||||
uniqstr uniqstr;
|
uniqstr uniqstr;
|
||||||
unsigned char character;
|
unsigned char character;
|
||||||
}
|
}
|
||||||
/* Line 197 of yacc.c. */
|
/* Line 195 of yacc.c. */
|
||||||
#line 306 "parse-gram.c"
|
#line 308 "../../src/parse-gram.c"
|
||||||
YYSTYPE;
|
YYSTYPE;
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
@@ -325,9 +327,8 @@ typedef struct YYLTYPE
|
|||||||
|
|
||||||
/* Copy the second part of user declarations. */
|
/* Copy the second part of user declarations. */
|
||||||
|
|
||||||
|
/* Line 219 of yacc.c. */
|
||||||
/* Line __line__ of yacc.c. */
|
#line 332 "../../src/parse-gram.c"
|
||||||
#line 331 "parse-gram.c"
|
|
||||||
|
|
||||||
#ifdef short
|
#ifdef short
|
||||||
# undef short
|
# undef short
|
||||||
@@ -1003,74 +1004,102 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
|
|||||||
switch (yytype)
|
switch (yytype)
|
||||||
{
|
{
|
||||||
case 3: /* "\"string\"" */
|
case 3: /* "\"string\"" */
|
||||||
#line 181 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 181 "../../src/parse-gram.y"
|
||||||
{ fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); };
|
{ fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); };
|
||||||
#line 1009 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1012 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 4: /* "\"integer\"" */
|
case 4: /* "\"integer\"" */
|
||||||
#line 191 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 191 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "%d", (yyvaluep->integer)); };
|
{ fprintf (stderr, "%d", (yyvaluep->integer)); };
|
||||||
#line 1014 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1019 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 45: /* "\"{...}\"" */
|
case 45: /* "\"{...}\"" */
|
||||||
#line 183 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 183 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
|
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
|
||||||
#line 1019 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1026 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 46: /* "\"char\"" */
|
case 46: /* "\"char\"" */
|
||||||
#line 178 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 178 "../../src/parse-gram.y"
|
||||||
{ fputs (char_name ((yyvaluep->character)), stderr); };
|
{ fputs (char_name ((yyvaluep->character)), stderr); };
|
||||||
#line 1024 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1033 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 47: /* "\"epilogue\"" */
|
case 47: /* "\"epilogue\"" */
|
||||||
#line 183 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 183 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
|
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
|
||||||
#line 1029 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1040 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 49: /* "\"identifier\"" */
|
case 49: /* "\"identifier\"" */
|
||||||
#line 187 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 187 "../../src/parse-gram.y"
|
||||||
{ fputs ((yyvaluep->uniqstr), stderr); };
|
{ fputs ((yyvaluep->uniqstr), stderr); };
|
||||||
#line 1034 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1047 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 50: /* "\"identifier:\"" */
|
case 50: /* "\"identifier:\"" */
|
||||||
#line 188 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 188 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "%s:", (yyvaluep->uniqstr)); };
|
{ fprintf (stderr, "%s:", (yyvaluep->uniqstr)); };
|
||||||
#line 1039 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1054 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 53: /* "\"%{...%}\"" */
|
case 53: /* "\"%{...%}\"" */
|
||||||
#line 183 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 183 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
|
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
|
||||||
#line 1044 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1061 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 55: /* "\"type\"" */
|
case 55: /* "\"type\"" */
|
||||||
#line 186 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 186 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "<%s>", (yyvaluep->uniqstr)); };
|
{ fprintf (stderr, "<%s>", (yyvaluep->uniqstr)); };
|
||||||
#line 1049 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1068 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 78: /* "id" */
|
case 78: /* "id" */
|
||||||
#line 194 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 194 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
|
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
|
||||||
#line 1054 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1075 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 79: /* "id_colon" */
|
case 79: /* "id_colon" */
|
||||||
#line 195 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 195 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "%s:", (yyvaluep->symbol)->tag); };
|
{ fprintf (stderr, "%s:", (yyvaluep->symbol)->tag); };
|
||||||
#line 1059 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1082 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 80: /* "symbol" */
|
case 80: /* "symbol" */
|
||||||
#line 194 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 194 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
|
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
|
||||||
#line 1064 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1089 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 81: /* "string_as_id" */
|
case 81: /* "string_as_id" */
|
||||||
#line 194 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 194 "../../src/parse-gram.y"
|
||||||
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
|
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
|
||||||
#line 1069 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1096 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
case 82: /* "string_content" */
|
case 82: /* "string_content" */
|
||||||
#line 181 "parse-gram.y"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 181 "../../src/parse-gram.y"
|
||||||
{ fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); };
|
{ fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); };
|
||||||
#line 1074 "parse-gram.c"
|
/* Line 668 of yacc.c. */
|
||||||
|
#line 1103 "../../src/parse-gram.c"
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -1580,15 +1609,16 @@ YYLTYPE yylloc;
|
|||||||
|
|
||||||
|
|
||||||
/* User initialization code. */
|
/* User initialization code. */
|
||||||
#line 88 "parse-gram.y"
|
/* Line 1077 of yacc.c. */
|
||||||
|
#line 88 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
/* Bison's grammar can initial empty locations, hence a default
|
/* Bison's grammar can initial empty locations, hence a default
|
||||||
location is needed. */
|
location is needed. */
|
||||||
boundary_set (&yylloc.start, current_file, 1, 1);
|
boundary_set (&yylloc.start, current_file, 1, 1);
|
||||||
boundary_set (&yylloc.end, current_file, 1, 1);
|
boundary_set (&yylloc.end, current_file, 1, 1);
|
||||||
}
|
}
|
||||||
/* Line 1085 of yacc.c. */
|
/* Line 1077 of yacc.c. */
|
||||||
#line 1592 "parse-gram.c"
|
#line 1622 "../../src/parse-gram.c"
|
||||||
yylsp[0] = yylloc;
|
yylsp[0] = yylloc;
|
||||||
goto yysetstate;
|
goto yysetstate;
|
||||||
|
|
||||||
@@ -1773,14 +1803,16 @@ yyreduce:
|
|||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
case 6:
|
case 6:
|
||||||
#line 218 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 218 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
prologue_augment (translate_code ((yyvsp[(1) - (1)].chars), (yylsp[(1) - (1)])), (yylsp[(1) - (1)]), typed);
|
prologue_augment (translate_code ((yyvsp[(1) - (1)].chars), (yylsp[(1) - (1)])), (yylsp[(1) - (1)]), typed);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
#line 222 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 222 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
/* Remove the '{', and replace the '}' with '\n'. */
|
/* Remove the '{', and replace the '}' with '\n'. */
|
||||||
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
||||||
@@ -1789,7 +1821,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
#line 228 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 228 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
/* Remove the '{', and replace the '}' with '\n'. */
|
/* Remove the '{', and replace the '}' with '\n'. */
|
||||||
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
||||||
@@ -1798,12 +1831,14 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
#line 233 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 233 "../../src/parse-gram.y"
|
||||||
{ debug_flag = true; }
|
{ debug_flag = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
#line 235 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 235 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
static char one[] = "1";
|
static char one[] = "1";
|
||||||
muscle_insert ((yyvsp[(2) - (2)].chars), one);
|
muscle_insert ((yyvsp[(2) - (2)].chars), one);
|
||||||
@@ -1811,17 +1846,20 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
#line 239 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 239 "../../src/parse-gram.y"
|
||||||
{ muscle_insert ((yyvsp[(2) - (3)].chars), (yyvsp[(3) - (3)].chars)); }
|
{ muscle_insert ((yyvsp[(2) - (3)].chars), (yyvsp[(3) - (3)].chars)); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
#line 240 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 240 "../../src/parse-gram.y"
|
||||||
{ defines_flag = true; }
|
{ defines_flag = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
#line 242 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 242 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
/* Remove the '{', and replace the '}' with '\n'. */
|
/* Remove the '{', and replace the '}' with '\n'. */
|
||||||
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
||||||
@@ -1830,27 +1868,32 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 14:
|
case 14:
|
||||||
#line 247 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 247 "../../src/parse-gram.y"
|
||||||
{ error_verbose = true; }
|
{ error_verbose = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 15:
|
case 15:
|
||||||
#line 248 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 248 "../../src/parse-gram.y"
|
||||||
{ expected_sr_conflicts = (yyvsp[(2) - (2)].integer); }
|
{ expected_sr_conflicts = (yyvsp[(2) - (2)].integer); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
#line 249 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 249 "../../src/parse-gram.y"
|
||||||
{ expected_rr_conflicts = (yyvsp[(2) - (2)].integer); }
|
{ expected_rr_conflicts = (yyvsp[(2) - (2)].integer); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 17:
|
case 17:
|
||||||
#line 250 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 250 "../../src/parse-gram.y"
|
||||||
{ spec_file_prefix = (yyvsp[(3) - (3)].chars); }
|
{ spec_file_prefix = (yyvsp[(3) - (3)].chars); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18:
|
case 18:
|
||||||
#line 252 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 252 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
nondeterministic_parser = true;
|
nondeterministic_parser = true;
|
||||||
glr_parser = true;
|
glr_parser = true;
|
||||||
@@ -1858,64 +1901,76 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 19:
|
case 19:
|
||||||
#line 257 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 257 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
muscle_code_grow ("initial_action", translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
|
muscle_code_grow ("initial_action", translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
#line 260 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 260 "../../src/parse-gram.y"
|
||||||
{ add_param ("lex_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
|
{ add_param ("lex_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 21:
|
case 21:
|
||||||
#line 261 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 261 "../../src/parse-gram.y"
|
||||||
{ locations_flag = true; }
|
{ locations_flag = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 22:
|
case 22:
|
||||||
#line 262 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 262 "../../src/parse-gram.y"
|
||||||
{ spec_name_prefix = (yyvsp[(3) - (3)].chars); }
|
{ spec_name_prefix = (yyvsp[(3) - (3)].chars); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 23:
|
case 23:
|
||||||
#line 263 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 263 "../../src/parse-gram.y"
|
||||||
{ no_lines_flag = true; }
|
{ no_lines_flag = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24:
|
case 24:
|
||||||
#line 264 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 264 "../../src/parse-gram.y"
|
||||||
{ nondeterministic_parser = true; }
|
{ nondeterministic_parser = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 25:
|
case 25:
|
||||||
#line 265 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 265 "../../src/parse-gram.y"
|
||||||
{ spec_outfile = (yyvsp[(3) - (3)].chars); }
|
{ spec_outfile = (yyvsp[(3) - (3)].chars); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 26:
|
case 26:
|
||||||
#line 266 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 266 "../../src/parse-gram.y"
|
||||||
{ add_param ("parse_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
|
{ add_param ("parse_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 27:
|
case 27:
|
||||||
#line 267 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 267 "../../src/parse-gram.y"
|
||||||
{ pure_parser = true; }
|
{ pure_parser = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 28:
|
case 28:
|
||||||
#line 268 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 268 "../../src/parse-gram.y"
|
||||||
{ version_check (&(yylsp[(2) - (2)]), (yyvsp[(2) - (2)].chars)); }
|
{ version_check (&(yylsp[(2) - (2)]), (yyvsp[(2) - (2)].chars)); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 29:
|
case 29:
|
||||||
#line 269 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 269 "../../src/parse-gram.y"
|
||||||
{ skeleton = (yyvsp[(2) - (2)].chars); }
|
{ skeleton = (yyvsp[(2) - (2)].chars); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
#line 271 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 271 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
/* Remove the '{', and replace the '}' with '\n'. */
|
/* Remove the '{', and replace the '}' with '\n'. */
|
||||||
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
(yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n';
|
||||||
@@ -1924,29 +1979,34 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case 31:
|
||||||
#line 276 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 276 "../../src/parse-gram.y"
|
||||||
{ token_table_flag = true; }
|
{ token_table_flag = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
#line 277 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 277 "../../src/parse-gram.y"
|
||||||
{ report_flag = report_states; }
|
{ report_flag = report_states; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 33:
|
case 33:
|
||||||
#line 278 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 278 "../../src/parse-gram.y"
|
||||||
{ yacc_flag = true; }
|
{ yacc_flag = true; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 37:
|
case 37:
|
||||||
#line 286 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 286 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
grammar_start_symbol_set ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)]));
|
grammar_start_symbol_set ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)]));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 38:
|
case 38:
|
||||||
#line 290 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 290 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_list *list;
|
symbol_list *list;
|
||||||
const char *action = translate_symbol_action ((yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)]));
|
const char *action = translate_symbol_action ((yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)]));
|
||||||
@@ -1957,7 +2017,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
#line 298 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 298 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_list *list;
|
symbol_list *list;
|
||||||
const char *action = translate_symbol_action ((yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)]));
|
const char *action = translate_symbol_action ((yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)]));
|
||||||
@@ -1968,31 +2029,36 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
#line 306 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 306 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
default_prec = true;
|
default_prec = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
#line 310 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 310 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
default_prec = false;
|
default_prec = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
#line 323 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 323 "../../src/parse-gram.y"
|
||||||
{}
|
{}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 43:
|
case 43:
|
||||||
#line 324 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 324 "../../src/parse-gram.y"
|
||||||
{ muscle_code_grow ("union_name", (yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
|
{ muscle_code_grow ("union_name", (yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 44:
|
case 44:
|
||||||
#line 329 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 329 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
char const *body = (yyvsp[(3) - (3)].chars);
|
char const *body = (yyvsp[(3) - (3)].chars);
|
||||||
|
|
||||||
@@ -2011,12 +2077,14 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 45:
|
case 45:
|
||||||
#line 350 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 350 "../../src/parse-gram.y"
|
||||||
{ current_class = nterm_sym; }
|
{ current_class = nterm_sym; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 46:
|
case 46:
|
||||||
#line 351 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 351 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
current_class = unknown_sym;
|
current_class = unknown_sym;
|
||||||
current_type = NULL;
|
current_type = NULL;
|
||||||
@@ -2024,12 +2092,14 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 47:
|
case 47:
|
||||||
#line 355 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 355 "../../src/parse-gram.y"
|
||||||
{ current_class = token_sym; }
|
{ current_class = token_sym; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 48:
|
case 48:
|
||||||
#line 356 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 356 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
current_class = unknown_sym;
|
current_class = unknown_sym;
|
||||||
current_type = NULL;
|
current_type = NULL;
|
||||||
@@ -2037,7 +2107,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 49:
|
case 49:
|
||||||
#line 361 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 361 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_list *list;
|
symbol_list *list;
|
||||||
for (list = (yyvsp[(3) - (3)].list); list; list = list->next)
|
for (list = (yyvsp[(3) - (3)].list); list; list = list->next)
|
||||||
@@ -2047,7 +2118,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 50:
|
case 50:
|
||||||
#line 371 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 371 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_list *list;
|
symbol_list *list;
|
||||||
++current_prec;
|
++current_prec;
|
||||||
@@ -2062,49 +2134,58 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 51:
|
case 51:
|
||||||
#line 385 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 385 "../../src/parse-gram.y"
|
||||||
{ (yyval.assoc) = left_assoc; }
|
{ (yyval.assoc) = left_assoc; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 52:
|
case 52:
|
||||||
#line 386 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 386 "../../src/parse-gram.y"
|
||||||
{ (yyval.assoc) = right_assoc; }
|
{ (yyval.assoc) = right_assoc; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 53:
|
case 53:
|
||||||
#line 387 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 387 "../../src/parse-gram.y"
|
||||||
{ (yyval.assoc) = non_assoc; }
|
{ (yyval.assoc) = non_assoc; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 54:
|
case 54:
|
||||||
#line 391 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 391 "../../src/parse-gram.y"
|
||||||
{ current_type = NULL; }
|
{ current_type = NULL; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 55:
|
case 55:
|
||||||
#line 392 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 392 "../../src/parse-gram.y"
|
||||||
{ current_type = (yyvsp[(1) - (1)].uniqstr); }
|
{ current_type = (yyvsp[(1) - (1)].uniqstr); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 56:
|
case 56:
|
||||||
#line 397 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 397 "../../src/parse-gram.y"
|
||||||
{ (yyval.list) = symbol_list_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); }
|
{ (yyval.list) = symbol_list_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 57:
|
case 57:
|
||||||
#line 398 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 398 "../../src/parse-gram.y"
|
||||||
{ (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
|
{ (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 58:
|
case 58:
|
||||||
#line 404 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 404 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
current_type = (yyvsp[(1) - (1)].uniqstr);
|
current_type = (yyvsp[(1) - (1)].uniqstr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 59:
|
case 59:
|
||||||
#line 408 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 408 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_class_set ((yyvsp[(1) - (1)].symbol), current_class, (yylsp[(1) - (1)]), true);
|
symbol_class_set ((yyvsp[(1) - (1)].symbol), current_class, (yylsp[(1) - (1)]), true);
|
||||||
symbol_type_set ((yyvsp[(1) - (1)].symbol), current_type, (yylsp[(1) - (1)]));
|
symbol_type_set ((yyvsp[(1) - (1)].symbol), current_type, (yylsp[(1) - (1)]));
|
||||||
@@ -2112,7 +2193,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 60:
|
case 60:
|
||||||
#line 413 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 413 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
|
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
|
||||||
symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)]));
|
symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)]));
|
||||||
@@ -2121,7 +2203,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 61:
|
case 61:
|
||||||
#line 419 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 419 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
|
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
|
||||||
symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)]));
|
symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)]));
|
||||||
@@ -2130,7 +2213,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 62:
|
case 62:
|
||||||
#line 425 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 425 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol_class_set ((yyvsp[(1) - (3)].symbol), current_class, (yylsp[(1) - (3)]), true);
|
symbol_class_set ((yyvsp[(1) - (3)].symbol), current_class, (yylsp[(1) - (3)]), true);
|
||||||
symbol_type_set ((yyvsp[(1) - (3)].symbol), current_type, (yylsp[(1) - (3)]));
|
symbol_type_set ((yyvsp[(1) - (3)].symbol), current_type, (yylsp[(1) - (3)]));
|
||||||
@@ -2140,64 +2224,76 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 69:
|
case 69:
|
||||||
#line 455 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 455 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
yyerrok;
|
yyerrok;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 70:
|
case 70:
|
||||||
#line 461 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 461 "../../src/parse-gram.y"
|
||||||
{ current_lhs = (yyvsp[(1) - (1)].symbol); current_lhs_location = (yylsp[(1) - (1)]); }
|
{ current_lhs = (yyvsp[(1) - (1)].symbol); current_lhs_location = (yylsp[(1) - (1)]); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 72:
|
case 72:
|
||||||
#line 465 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 465 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_end ((yylsp[(1) - (1)])); }
|
{ grammar_current_rule_end ((yylsp[(1) - (1)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 73:
|
case 73:
|
||||||
#line 466 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 466 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_end ((yylsp[(3) - (3)])); }
|
{ grammar_current_rule_end ((yylsp[(3) - (3)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 75:
|
case 75:
|
||||||
#line 472 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 472 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_begin (current_lhs, current_lhs_location); }
|
{ grammar_current_rule_begin (current_lhs, current_lhs_location); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 76:
|
case 76:
|
||||||
#line 474 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 474 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_symbol_append ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
|
{ grammar_current_rule_symbol_append ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 77:
|
case 77:
|
||||||
#line 476 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 476 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_action_append ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
|
{ grammar_current_rule_action_append ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 78:
|
case 78:
|
||||||
#line 478 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 478 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_prec_set ((yyvsp[(3) - (3)].symbol), (yylsp[(3) - (3)])); }
|
{ grammar_current_rule_prec_set ((yyvsp[(3) - (3)].symbol), (yylsp[(3) - (3)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 79:
|
case 79:
|
||||||
#line 480 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 480 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_dprec_set ((yyvsp[(3) - (3)].integer), (yylsp[(3) - (3)])); }
|
{ grammar_current_rule_dprec_set ((yyvsp[(3) - (3)].integer), (yylsp[(3) - (3)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 80:
|
case 80:
|
||||||
#line 482 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 482 "../../src/parse-gram.y"
|
||||||
{ grammar_current_rule_merge_set ((yyvsp[(3) - (3)].uniqstr), (yylsp[(3) - (3)])); }
|
{ grammar_current_rule_merge_set ((yyvsp[(3) - (3)].uniqstr), (yylsp[(3) - (3)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 81:
|
case 81:
|
||||||
#line 495 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 495 "../../src/parse-gram.y"
|
||||||
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
|
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 82:
|
case 82:
|
||||||
#line 497 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 497 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
(yyval.symbol) = symbol_get (char_name ((yyvsp[(1) - (1)].character)), (yylsp[(1) - (1)]));
|
(yyval.symbol) = symbol_get (char_name ((yyvsp[(1) - (1)].character)), (yylsp[(1) - (1)]));
|
||||||
symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false);
|
symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false);
|
||||||
@@ -2206,12 +2302,14 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 83:
|
case 83:
|
||||||
#line 505 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 505 "../../src/parse-gram.y"
|
||||||
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
|
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 86:
|
case 86:
|
||||||
#line 517 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 517 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
(yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[(1) - (1)].chars)), (yylsp[(1) - (1)]));
|
(yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[(1) - (1)].chars)), (yylsp[(1) - (1)]));
|
||||||
symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false);
|
symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false);
|
||||||
@@ -2219,12 +2317,14 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 87:
|
case 87:
|
||||||
#line 526 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 526 "../../src/parse-gram.y"
|
||||||
{ (yyval.chars) = (yyvsp[(1) - (1)].chars); }
|
{ (yyval.chars) = (yyvsp[(1) - (1)].chars); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 89:
|
case 89:
|
||||||
#line 533 "parse-gram.y"
|
/* Line 1265 of yacc.c. */
|
||||||
|
#line 533 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
muscle_code_grow ("epilogue", translate_code ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
|
muscle_code_grow ("epilogue", translate_code ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
|
||||||
gram_scanner_last_string_free ();
|
gram_scanner_last_string_free ();
|
||||||
@@ -2232,8 +2332,8 @@ yyreduce:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
/* Line 1274 of yacc.c. */
|
/* Line 1265 of yacc.c. */
|
||||||
#line 2237 "parse-gram.c"
|
#line 2337 "../../src/parse-gram.c"
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||||
@@ -2453,7 +2553,8 @@ yyreturn:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line 539 "parse-gram.y"
|
/* Line 1485 of yacc.c. */
|
||||||
|
#line 539 "../../src/parse-gram.y"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,8 @@
|
|||||||
|
|
||||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
typedef union YYSTYPE
|
typedef union YYSTYPE
|
||||||
#line 97 "parse-gram.y"
|
/* Line 1532 of yacc.c. */
|
||||||
|
#line 97 "../../src/parse-gram.y"
|
||||||
{
|
{
|
||||||
symbol *symbol;
|
symbol *symbol;
|
||||||
symbol_list *list;
|
symbol_list *list;
|
||||||
@@ -169,8 +170,8 @@ typedef union YYSTYPE
|
|||||||
uniqstr uniqstr;
|
uniqstr uniqstr;
|
||||||
unsigned char character;
|
unsigned char character;
|
||||||
}
|
}
|
||||||
/* Line 1544 of yacc.c. */
|
/* Line 1532 of yacc.c. */
|
||||||
#line 174 "parse-gram.h"
|
#line 175 "../../src/parse-gram.h"
|
||||||
YYSTYPE;
|
YYSTYPE;
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
|
|||||||
Reference in New Issue
Block a user