* README, REFERENCES, TODO, configure.ac, data/README, data/bison.m4,
* data/c++.m4, data/c.m4, data/java.m4, data/lalr1.cc,
* data/lalr1.java, data/yacc.c, doc/local.mk, etc/bench.pl.in,
* src/conflicts.c, src/files.c, src/getargs.c, src/gram.h, src/lalr.c,
* src/location.c, src/location.h, src/muscle-tab.c, src/muscle-tab.h,
* src/output.c, src/parse-gram.c, src/parse-gram.y, src/print-xml.c,
* src/print.c, src/reader.c, src/reduce.c, src/scan-skel.l,
* src/symtab.h, src/system.h, src/tables.c:
Use single quotes, as currently recommended by the GNU Coding Standards.
34 files changed:
* Bug reports
Please send bug reports to <bug-bison@gnu.org>. Please include the
* Bug reports
Please send bug reports to <bug-bison@gnu.org>. Please include the
-version number from `bison --version', and a complete, self-contained
+version number from 'bison --version', and a complete, self-contained
test case in each bug report.
* Copyright statements
test case in each bug report.
* Copyright statements
the starting and ending line number and character number associated
with any of the symbols in the current rule.
the starting and ending line number and character number associated
with any of the symbols in the current rule.
-Also, Bison supports the command `%expect N' which says not to mention
+Also, Bison supports the command '%expect N' which says not to mention
the conflicts if there are N shift/reduce conflicts and no reduce/reduce
conflicts.
the conflicts if there are N shift/reduce conflicts and no reduce/reduce
conflicts.
keep $default? See the following point.
** Disabled Reductions
keep $default? See the following point.
** Disabled Reductions
-See `tests/conflicts.at (Defaulted Conflicted Reduction)', and decide
+See 'tests/conflicts.at (Defaulted Conflicted Reduction)', and decide
what we want to do.
** Documentation
Extend with error productions. The hard part will probably be finding
the right rule so that a single state does not exhibit too many yet
what we want to do.
** Documentation
Extend with error productions. The hard part will probably be finding
the right rule so that a single state does not exhibit too many yet
-undocumented ``features''. Maybe an empty action ought to be
+undocumented ''features''. Maybe an empty action ought to be
presented too. Shall we try to make a single grammar with all these
features, or should we have several very small grammars?
presented too. Shall we try to make a single grammar with all these
features, or should we have several very small grammars?
exp: exp '+' exp | exp '&' exp;
when there are no actions. This can significantly speed up some
exp: exp '+' exp | exp '&' exp;
when there are no actions. This can significantly speed up some
-grammars. I can't find the papers. In particular the book `LR
+grammars. I can't find the papers. In particular the book 'LR
parsing: Theory and Practice' is impossible to find, but according to
parsing: Theory and Practice' is impossible to find, but according to
-`Parsing Techniques: a Practical Guide', it includes information about
+'Parsing Techniques: a Practical Guide', it includes information about
this issue. Does anybody have it?
this issue. Does anybody have it?
# In order for some versions of Sun Studio to compile our C++ test cases
# correctly, we need Autoconf 2.64 or better to handle the restrict
# keyword in at least string.h from gnulib. We need Autoconf 2.68 or
# In order for some versions of Sun Studio to compile our C++ test cases
# correctly, we need Autoconf 2.64 or better to handle the restrict
# keyword in at least string.h from gnulib. We need Autoconf 2.68 or
-# better to avoid a typo in the `configure --help' entry for the YACC
+# better to avoid a typo in the 'configure --help' entry for the YACC
# environment variable.
AC_PREREQ([2.68])
m4_pattern_forbid([^gl_[A-Z]])
# environment variable.
AC_PREREQ([2.68])
m4_pattern_forbid([^gl_[A-Z]])
These skeletons are the only ones supported by the Bison team.
Because the interface between skeletons and the bison program is not
finished, *we are not bound to it*. In particular, Bison is not
These skeletons are the only ones supported by the Bison team.
Because the interface between skeletons and the bison program is not
finished, *we are not bound to it*. In particular, Bison is not
-mature enough for us to consider that ``foreign skeletons'' are
+mature enough for us to consider that "foreign skeletons" are
# _b4_define_flag_if($1, $2, FLAG)
# --------------------------------
# Work around the impossibility to define macros inside macros,
# _b4_define_flag_if($1, $2, FLAG)
# --------------------------------
# Work around the impossibility to define macros inside macros,
-# because issuing `[$1]' is not possible in M4. GNU M4 should provide
+# because issuing '[$1]' is not possible in M4. GNU M4 should provide
# $$1 a la M5/TeX.
m4_define([_b4_define_flag_if],
[m4_if([$1$2], $[1]$[2], [],
# $$1 a la M5/TeX.
m4_define([_b4_define_flag_if],
[m4_if([$1$2], $[1]$[2], [],
# b4_percent_define_if_define(NAME, [VARIABLE = NAME])
# ----------------------------------------------------
# Define b4_NAME_if that executes its $1 or $2 depending whether
# b4_percent_define_if_define(NAME, [VARIABLE = NAME])
# ----------------------------------------------------
# Define b4_NAME_if that executes its $1 or $2 depending whether
-# VARIABLE was %defined. The characters `.' and `-' in VARIABLE are mapped
-# to `_'.
+# VARIABLE was %defined. The characters '.' and `-' in VARIABLE are mapped
+# to '_'.
m4_define([b4_percent_define_if_define_],
[m4_define(m4_bpatsubst([b4_$1_if], [[-.]], [_]),
[b4_percent_define_flag_if(m4_default([$2], [$1]),
m4_define([b4_percent_define_if_define_],
[m4_define(m4_bpatsubst([b4_$1_if], [[-.]], [_]),
[b4_percent_define_flag_if(m4_default([$2], [$1]),
m4_define([b4_namespace_ref], [b4_percent_define_get([[api.namespace]])])
m4_define([b4_namespace_ref], [b4_percent_define_get([[api.namespace]])])
-# Don't permit an empty b4_namespace_ref. Any `::parser::foo' appended to it
-# would compile as an absolute reference with `parser' in the global namespace.
+# Don't permit an empty b4_namespace_ref. Any '::parser::foo' appended to it
+# would compile as an absolute reference with 'parser' in the global namespace.
# b4_namespace_open would open an anonymous namespace and thus establish
# internal linkage. This would compile. However, it's cryptic, and internal
# linkage for the parser would be specified in all translation units that
# b4_namespace_open would open an anonymous namespace and thus establish
# internal linkage. This would compile. However, it's cryptic, and internal
# linkage for the parser would be specified in all translation units that
# b4_parse_param_use([VAL], [LOC])
# --------------------------------
# b4_parse_param_use([VAL], [LOC])
# --------------------------------
-# `YYUSE' VAL, LOC if locations are enabled, and all the parse-params.
+# 'YYUSE' VAL, LOC if locations are enabled, and all the parse-params.
m4_define([b4_parse_param_use],
[m4_ifvaln([$1], [ YYUSE ([$1]);])dnl
b4_locations_if([m4_ifvaln([$2], [ YYUSE ([$2]);])])dnl
m4_define([b4_parse_param_use],
[m4_ifvaln([$1], [ YYUSE ([$1]);])dnl
b4_locations_if([m4_ifvaln([$2], [ YYUSE ([$2]);])])dnl
# b4_int_type_for(NAME)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
# b4_int_type_for(NAME)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
-# `NAME_min' to `NAME_max' (included).
+# 'NAME_min' to 'NAME_max' (included).
m4_define([b4_int_type_for],
[b4_int_type($1_min, $1_max)])
m4_define([b4_int_type_for],
[b4_int_type($1_min, $1_max)])
# b4_int_type_for(NAME)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
# b4_int_type_for(NAME)
# ---------------------
# Return the smallest int type able to handle numbers ranging from
-# `NAME_min' to `NAME_max' (included).
+# 'NAME_min' to 'NAME_max' (included).
m4_define([b4_int_type_for],
[b4_int_type($1_min, $1_max)])
m4_define([b4_int_type_for],
[b4_int_type($1_min, $1_max)])
variants. */
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [build])],[
/* If YYLEN is nonzero, implement the default value of the action:
variants. */
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [build])],[
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'. Otherwise, use the top of the stack.
+ '$$ = $1'. Otherwise, use the top of the stack.
Otherwise, the following line sets YYLHS.VALUE to garbage.
This behavior is undocumented and Bison
Otherwise, the following line sets YYLHS.VALUE to garbage.
This behavior is undocumented and Bison
]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[
/* If YYLEN is nonzero, implement the default value of the action:
]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'. Otherwise, use the top of the stack.
+ '$$ = $1'. Otherwise, use the top of the stack.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
int yyerrstatus;
/* The stacks and their tools:
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.]b4_locations_if([[
- `yyls': related to locations.]])[
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.]b4_locations_if([[
+ 'yyls': related to locations.]])[
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
# endif]])])[
# ifdef YYSTACK_ALLOC
# endif]])])[
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
+ /* Pacify GCC's 'empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
*++yyvsp = yyval;]b4_locations_if([
*++yylsp = yyloc;])[
*++yyvsp = yyval;]b4_locations_if([
*++yylsp = yyloc;])[
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
that goes to, based on the state we popped back to and the rule
number reduced by. */
CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
CROSS_OPTIONS_TEXI = $(top_srcdir)/doc/cross-options.texi
$(CROSS_OPTIONS_TEXI): doc/bison.help $(CROSS_OPTIONS_PL)
CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
CROSS_OPTIONS_TEXI = $(top_srcdir)/doc/cross-options.texi
$(CROSS_OPTIONS_TEXI): doc/bison.help $(CROSS_OPTIONS_PL)
-# Create $@~ which is the previous contents. Don't use `mv' here so
+# Create $@~ which is the previous contents. Don't use 'mv' here so
# that even if we are interrupted, the file is still available for
# diff in the next run. Note that $@ might not exist yet.
$(AM_V_GEN){ test ! -f $@ || cat $@; } >$@~
# that even if we are interrupted, the file is still available for
# diff in the next run. Note that $@ might not exist yet.
$(AM_V_GEN){ test ! -f $@ || cat $@; } >$@~
sub directives($@)
{
my ($bench, @directive) = @_;
sub directives($@)
{
my ($bench, @directive) = @_;
- my $res = "/* Directives for bench `$bench'. */\n";
+ my $res = "/* Directives for bench '$bench'. */\n";
$res .= join ("\n", @directive) . "\n";
$res .= join ("\n", @directive) . "\n";
- $res .= "/* End of directives for bench `$bench'. */\n";
+ $res .= "/* End of directives for bench '$bench'. */\n";
set_conflicts (states[i], errors);
/* For uniformity of the code, make sure all the states have a valid
set_conflicts (states[i], errors);
/* For uniformity of the code, make sure all the states have a valid
if (!states[i]->errs)
states[i]->errs = errs_new (0, 0);
}
if (!states[i]->errs)
states[i]->errs = errs_new (0, 0);
}
#include "getargs.h"
#include "gram.h"
#include "getargs.h"
#include "gram.h"
-/* Initializing some values below (such SPEC_NAME_PREFIX to `yy') is
+/* Initializing some values below (such SPEC_NAME_PREFIX to 'yy') is
tempting, but don't do that: for the time being our handling of the
%directive vs --option leaves precedence to the options by deciding
that if a %directive sets a variable which is really set (i.e., not
tempting, but don't do that: for the time being our handling of the
%directive vs --option leaves precedence to the options by deciding
that if a %directive sets a variable which is really set (i.e., not
uniqstr current_file = NULL;
/* If --output=dir/foo.c was specified,
uniqstr current_file = NULL;
/* If --output=dir/foo.c was specified,
- DIR_PREFIX is `dir/' and ALL_BUT_EXT and ALL_BUT_TAB_EXT are `dir/foo'.
+ DIR_PREFIX is 'dir/' and ALL_BUT_EXT and ALL_BUT_TAB_EXT are 'dir/foo'.
- If --output=dir/foo.tab.c was specified, DIR_PREFIX is `dir/',
- ALL_BUT_EXT is `dir/foo.tab', and ALL_BUT_TAB_EXT is `dir/foo'.
+ If --output=dir/foo.tab.c was specified, DIR_PREFIX is 'dir/',
+ ALL_BUT_EXT is 'dir/foo.tab', and ALL_BUT_TAB_EXT is 'dir/foo'.
If --output was not specified but --file-prefix=dir/foo was specified,
If --output was not specified but --file-prefix=dir/foo was specified,
- ALL_BUT_EXT = `foo.tab' and ALL_BUT_TAB_EXT = `foo'.
+ ALL_BUT_EXT = 'foo.tab' and ALL_BUT_TAB_EXT = 'foo'.
If neither --output nor --file was specified but the input grammar
If neither --output nor --file was specified but the input grammar
- is name dir/foo.y, ALL_BUT_EXT and ALL_BUT_TAB_EXT are `foo'.
+ is name dir/foo.y, ALL_BUT_EXT and ALL_BUT_TAB_EXT are 'foo'.
If neither --output nor --file was specified, DIR_PREFIX is the
empty string (meaning the current directory); otherwise it is
If neither --output nor --file was specified, DIR_PREFIX is the
empty string (meaning the current directory); otherwise it is
char *all_but_ext;
static char *all_but_tab_ext;
char *all_but_ext;
static char *all_but_tab_ext;
/* C source file extension (the parser source). */
static char *src_extension = NULL;
/* C source file extension (the parser source). */
static char *src_extension = NULL;
-/* Header file extension (if option ``-d'' is specified). */
+/* Header file extension (if option '`-d'' is specified). */
static char *header_extension = NULL;
\f
/*-----------------------------------------------------------------.
static char *header_extension = NULL;
\f
/*-----------------------------------------------------------------.
*EXT points to the last period in the basename, or NULL if none.
If there is no *EXT, *TAB is NULL. Otherwise, *TAB points to
*EXT points to the last period in the basename, or NULL if none.
If there is no *EXT, *TAB is NULL. Otherwise, *TAB points to
- `.tab' or `_tab' if present right before *EXT, or is NULL. *TAB
+ '.tab' or '_tab' if present right before *EXT, or is NULL. *TAB
cannot be equal to *BASE.
None are allocated, they are simply pointers to parts of FILE_NAME.
cannot be equal to *BASE.
None are allocated, they are simply pointers to parts of FILE_NAME.
*ext = strrchr (*base, '.');
*tab = NULL;
*ext = strrchr (*base, '.');
*tab = NULL;
- /* If there is an extension, check if there is a `.tab' part right
+ /* If there is an extension, check if there is a '.tab' part right
- /* If --file-prefix=foo was specified, ALL_BUT_TAB_EXT = `foo'. */
+ /* If --file-prefix=foo was specified, ALL_BUT_TAB_EXT = 'foo'. */
dir_prefix =
xstrndup (spec_file_prefix,
last_component (spec_file_prefix) - spec_file_prefix);
dir_prefix =
xstrndup (spec_file_prefix,
last_component (spec_file_prefix) - spec_file_prefix);
- /* If --yacc, then the output is `y.tab.c'. */
+ /* If --yacc, then the output is 'y.tab.c'. */
dir_prefix = xstrdup ("");
all_but_tab_ext = xstrdup ("y");
}
else
{
/* Otherwise, ALL_BUT_TAB_EXT is computed from the input
dir_prefix = xstrdup ("");
all_but_tab_ext = xstrdup ("y");
}
else
{
/* Otherwise, ALL_BUT_TAB_EXT is computed from the input
- grammar: `foo/bar.yy' => `bar'. */
+ grammar: 'foo/bar.yy' => 'bar'. */
dir_prefix = xstrdup ("");
all_but_tab_ext =
xstrndup (base, (strlen (base) - (ext ? strlen (ext) : 0)));
dir_prefix = xstrdup ("");
all_but_tab_ext =
xstrndup (base, (strlen (base) - (ext ? strlen (ext) : 0)));
};
/* Under DOS, there is no difference on the case. This can be
};
/* Under DOS, there is no difference on the case. This can be
- troublesome when looking for `.tab' etc. */
+ troublesome when looking for '.tab' etc. */
#ifdef MSDOS
# define AS_FILE_NAME(File) (strlwr (File), (File))
#else
#ifdef MSDOS
# define AS_FILE_NAME(File) (strlwr (File), (File))
#else
The rules receive rule numbers 1 to NRULES in the order they are
written. More precisely Bison augments the grammar with the
The rules receive rule numbers 1 to NRULES in the order they are
written. More precisely Bison augments the grammar with the
- initial rule, `$accept: START-SYMBOL $end', which is numbered 1,
+ initial rule, '$accept: START-SYMBOL $end', which is numbered 1,
all the user rules are 2, 3 etc. Each time a rule number is
presented to the user, we subtract 1, so *displayed* rule numbers
are 0, 1, 2...
all the user rules are 2, 3 etc. Each time a rule number is
presented to the user, we subtract 1, so *displayed* rule numbers
are 0, 1, 2...
RULES[R].prec -- the symbol providing the precedence level of R.
RULES[R].precsym -- the symbol attached (via %prec) to give its
RULES[R].prec -- the symbol providing the precedence level of R.
RULES[R].precsym -- the symbol attached (via %prec) to give its
- precedence to R. Of course, if set, it is equal to `prec', but we
+ precedence to R. Of course, if set, it is equal to 'prec', but we
need to distinguish one from the other when reducing: a symbol used
in a %prec is not useless.
need to distinguish one from the other when reducing: a symbol used
in a %prec is not useless.
/* A function that selects a rule. */
typedef bool (*rule_filter) (rule const *);
/* A function that selects a rule. */
typedef bool (*rule_filter) (rule const *);
-/* Return true IFF the rule has a `number' smaller than NRULES. That is, it is
+/* Return true IFF the rule has a 'number' smaller than NRULES. That is, it is
useful in the grammar. */
bool rule_useful_in_grammar_p (rule const *r);
useful in the grammar. */
bool rule_useful_in_grammar_p (rule const *r);
-/* Return true IFF the rule has a `number' higher than NRULES. That is, it is
+/* Return true IFF the rule has a 'number' higher than NRULES. That is, it is
useless in the grammar. */
bool rule_useless_in_grammar_p (rule const *r);
useless in the grammar. */
bool rule_useless_in_grammar_p (rule const *r);
void grammar_dump (FILE *out, const char *title);
/* Report on STDERR the rules that are not flagged USEFUL, using the
void grammar_dump (FILE *out, const char *title);
/* Report on STDERR the rules that are not flagged USEFUL, using the
- MESSAGE (which can be `rule useless in grammar' when invoked after grammar
- reduction, or `rule useless in parser due to conflicts' after conflicts
+ MESSAGE (which can be 'rule useless in grammar' when invoked after grammar
+ reduction, or 'rule useless in parser due to conflicts' after conflicts
were taken into account). */
void grammar_rules_useless_report (const char *message);
were taken into account). */
void grammar_rules_useless_report (const char *message);
/* We need a lookahead either to distinguish different reductions
(i.e., there are two or more), or to distinguish a reduction from a
shift. Otherwise, it is straightforward, and the state is
/* We need a lookahead either to distinguish different reductions
(i.e., there are two or more), or to distinguish a reduction from a
shift. Otherwise, it is straightforward, and the state is
- `consistent'. However, do not treat a state with any reductions as
+ 'consistent'. However, do not treat a state with any reductions as
consistent unless it is the accepting state (because there is never
a lookahead token that makes sense there, and so no lookahead token
should be read) if the user has otherwise disabled default
consistent unless it is the accepting state (because there is never
a lookahead token that makes sense there, and so no lookahead token
should be read) if the user has otherwise disabled default
boundary_set_from_string (boundary *bound, char *loc_str)
{
/* Must search in reverse since the file name field may
boundary_set_from_string (boundary *bound, char *loc_str)
{
/* Must search in reverse since the file name field may
- * contain `.' or `:'. */
+ * contain '.' or ':'. */
char *delim = strrchr (loc_str, '.');
aver (delim);
*delim = '\0';
char *delim = strrchr (loc_str, '.');
aver (delim);
*delim = '\0';
-/* LOC_STR must be formatted as `file:line.column', it will be modified. */
+/* LOC_STR must be formatted as 'file:line.column', it will be modified. */
void boundary_set_from_string (boundary *bound, char *loc_str);
#endif /* ! defined LOCATION_H_ */
void boundary_set_from_string (boundary *bound, char *loc_str);
#endif /* ! defined LOCATION_H_ */
-/* In the format `file_name:line.column', append BOUND to MUSCLE. Use
+/* In the format 'file_name:line.column', append BOUND to MUSCLE. Use
digraphs for special characters in the file name. */
static void
digraphs for special characters in the file name. */
static void
-/* In the format `[[file_name:line.column]], [[file_name:line.column]]',
+/* In the format '[[file_name:line.column]], [[file_name:line.column]]',
append LOC to MUSCLE. Use digraphs for special characters in each
file name. */
append LOC to MUSCLE. Use digraphs for special characters in each
file name. */
char const *val = value ? "" : "false";
char const *name = UNIQSTR_CONCAT ("percent_define(", variable, ")");
char const *val = value ? "" : "false";
char const *name = UNIQSTR_CONCAT ("percent_define(", variable, ")");
- /* %pure-parser is deprecated in favor of `%define api.pure', so use
- `%define api.pure' in a backward-compatible manner here. First,
+ /* %pure-parser is deprecated in favor of '%define api.pure', so use
+ '%define api.pure' in a backward-compatible manner here. First,
don't complain if %pure-parser is specified multiple times. */
if (!muscle_find_const (name))
muscle_percent_define_insert (variable, loc, val,
don't complain if %pure-parser is specified multiple times. */
if (!muscle_find_const (name))
muscle_percent_define_insert (variable, loc, val,
/* Grow KEY for the occurrence of the name USER_NAME at LOC appropriately for
use with b4_check_user_names in ../data/bison.m4. USER_NAME is not escaped
/* Grow KEY for the occurrence of the name USER_NAME at LOC appropriately for
use with b4_check_user_names in ../data/bison.m4. USER_NAME is not escaped
- with digraphs, so it must not contain `[' or `]'. */
+ with digraphs, so it must not contain '[' or ']'. */
void muscle_user_name_list_grow (char const *key, char const *user_name,
location loc);
void muscle_user_name_list_grow (char const *key, char const *user_name,
location loc);
\
lmin = min; \
lmax = max; \
\
lmin = min; \
lmax = max; \
- /* Build `NAME_min' and `NAME_max' in the obstack. */ \
+ /* Build 'NAME_min' and 'NAME_max' in the obstack. */ \
obstack_printf (&format_obstack, "%s_min", name); \
MUSCLE_INSERT_LONG_INT (obstack_finish0 (&format_obstack), lmin); \
obstack_printf (&format_obstack, "%s_max", name); \
obstack_printf (&format_obstack, "%s_min", name); \
MUSCLE_INSERT_LONG_INT (obstack_finish0 (&format_obstack), lmin); \
obstack_printf (&format_obstack, "%s_max", name); \
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_ALLOC
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
+ /* Pacify GCC's 'empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
int yyerrstatus;
/* The stacks and their tools:
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
- `yyls': related to locations.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
*++yyvsp = yyval;
*++yylsp = yyloc;
*++yyvsp = yyval;
*++yylsp = yyloc;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
that goes to, based on the state we popped back to and the rule
number reduced by. */
`---------------------------*/
/* The STRING form of variable is deprecated and is not M4-friendly.
`---------------------------*/
/* The STRING form of variable is deprecated and is not M4-friendly.
- For example, M4 fails for `%define "[" "value"'. */
+ For example, M4 fails for '%define "[" "value"'. */
variable:
ID
| STRING { $$ = uniqstr_new ($1); }
variable:
ID
| STRING { $$ = uniqstr_new ($1); }
/*-------------------------------------------------------------------------.
/*-------------------------------------------------------------------------.
-| Report a reduction of RULE on LOOKAHEAD_TOKEN (which can be `default'). |
+| Report a reduction of RULE on LOOKAHEAD_TOKEN (which can be 'default'). |
| If not ENABLED, the rule is masked by a shift or a reduce (S/R and |
| R/R conflicts). |
`-------------------------------------------------------------------------*/
| If not ENABLED, the rule is masked by a shift or a reduce (S/R and |
| R/R conflicts). |
`-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------.
/*-------------------------------------------------------------------------.
-| Report a reduction of RULE on LOOKAHEAD_TOKEN (which can be `default'). |
+| Report a reduction of RULE on LOOKAHEAD_TOKEN (which can be 'default'). |
| If not ENABLED, the rule is masked by a shift or a reduce (S/R and |
| R/R conflicts). |
`-------------------------------------------------------------------------*/
| If not ENABLED, the rule is masked by a shift or a reduce (S/R and |
| R/R conflicts). |
`-------------------------------------------------------------------------*/
print_grammar (out);
/* If the whole state item sets, not only the kernels, are wanted,
print_grammar (out);
/* If the whole state item sets, not only the kernels, are wanted,
- `closure' will be run, which needs memory allocation/deallocation. */
+ 'closure' will be run, which needs memory allocation/deallocation. */
if (report_flag & report_itemsets)
new_closure (nritems);
/* Storage for print_reductions. */
if (report_flag & report_itemsets)
new_closure (nritems);
/* Storage for print_reductions. */
bool midrule_warning = false;
if (!l->action_props.is_value_used
&& symbol_should_be_used (l, &midrule_warning)
bool midrule_warning = false;
if (!l->action_props.is_value_used
&& symbol_should_be_used (l, &midrule_warning)
- /* The default action, $$ = $1, `uses' both. */
+ /* The default action, $$ = $1, 'uses' both. */
&& (r->action_props.code || (n != 0 && n != 1)))
{
warnings warn_flag = midrule_warning ? Wmidrule_values : Wother;
&& (r->action_props.code || (n != 0 && n != 1)))
{
warnings warn_flag = midrule_warning ? Wmidrule_values : Wother;
rules[ruleno].action_location = p->action_props.location;
rules[ruleno].is_predicate = p->action_props.is_predicate;
rules[ruleno].action_location = p->action_props.location;
rules[ruleno].is_predicate = p->action_props.is_predicate;
- /* If the midrule's $$ is set or its $n is used, remove the `$' from the
+ /* If the midrule's $$ is set or its $n is used, remove the '$' from the
symbol name so that it's a user-defined symbol so that the default
%destructor and %printer apply. */
if (p->midrule_parent_rule
symbol name so that it's a user-defined symbol so that the default
%destructor and %printer apply. */
if (p->midrule_parent_rule
action type checking.
Before invoking grammar_rule_check (in packgram below) on any rule, make
action type checking.
Before invoking grammar_rule_check (in packgram below) on any rule, make
- sure all actions have already been scanned in order to set `used' flags.
+ sure all actions have already been scanned in order to set 'used' flags.
Otherwise, checking that a midrule's $$ should be set will not always work
properly because the check must forward-reference the midrule's parent
Otherwise, checking that a midrule's $$ should be set will not always work
properly because the check must forward-reference the midrule's parent
- rule. For the same reason, all the `used' flags must be set before
- checking whether to remove `$' from any midrule symbol name (also in
+ rule. For the same reason, all the 'used' flags must be set before
+ checking whether to remove '$' from any midrule symbol name (also in
packgram). */
{
symbol_list *sym;
packgram). */
{
symbol_list *sym;
static bitset V;
/* Set of symbols used to define rule precedence (so they are
static bitset V;
/* Set of symbols used to define rule precedence (so they are
- `useless', but no warning should be issued). */
+ 'useless', but no warning should be issued). */
static bitset V1;
static rule_number nuseful_productions;
static bitset V1;
static rule_number nuseful_productions;
"@@" fputc ('@', yyout);
"@{" fputc ('[', yyout);
"@}" fputc (']', yyout);
"@@" fputc ('@', yyout);
"@{" fputc ('[', yyout);
"@}" fputc (']', yyout);
-"@`" continue; /* Used by b4_cat in ../data/bison.m4. */
+"@'" continue; /* Used by b4_cat in ../data/bison.m4. */
@\n continue;
"@oline@" fprintf (yyout, "%d", out_lineno + 1);
@\n continue;
"@oline@" fprintf (yyout, "%d", out_lineno + 1);
"@output(" at_init (&argc, argv, &at_ptr, &at_output);
/* This pattern must not match more than the previous @ patterns. */
"@output(" at_init (&argc, argv, &at_ptr, &at_output);
/* This pattern must not match more than the previous @ patterns. */
-@[^@{}`(\n]* fail_for_invalid_at (yytext);
+@[^@{}'(\n]* fail_for_invalid_at (yytext);
\n out_lineno++; ECHO;
[^@\n]+ ECHO;
\n out_lineno++; ECHO;
[^@\n]+ ECHO;
"@@" obstack_1grow (&obstack_for_string, '@');
"@{" obstack_1grow (&obstack_for_string, '[');
"@}" obstack_1grow (&obstack_for_string, ']');
"@@" obstack_1grow (&obstack_for_string, '@');
"@{" obstack_1grow (&obstack_for_string, '[');
"@}" obstack_1grow (&obstack_for_string, ']');
- "@`" continue; /* For starting an argument that begins with whitespace. */
+ "@'" continue; /* For starting an argument that begins with whitespace. */
/** Undefined user number. */
# define USER_NUMBER_UNDEFINED -1
/** Undefined user number. */
# define USER_NUMBER_UNDEFINED -1
-/* `symbol->user_token_number == USER_NUMBER_HAS_STRING_ALIAS' means
- this symbol has a literal string alias. For instance, `%token foo
- "foo"' has `"foo"' numbered regularly, and `foo' numbered as
+/* 'symbol->user_token_number == USER_NUMBER_HAS_STRING_ALIAS' means
+ this symbol has a literal string alias. For instance, '%token foo
+ "foo"' has '"foo"' numbered regularly, and 'foo' numbered as
USER_NUMBER_HAS_STRING_ALIAS. */
# define USER_NUMBER_HAS_STRING_ALIAS -9991
USER_NUMBER_HAS_STRING_ALIAS. */
# define USER_NUMBER_HAS_STRING_ALIAS -9991
-/* The __-protected variants of `format' and `printf' attributes
+/* The __-protected variants of 'format' and 'printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
#include "tables.h"
/* Several tables are indexed both by state and nonterminal numbers.
#include "tables.h"
/* Several tables are indexed both by state and nonterminal numbers.
- We call such an index a `vector'; i.e., a vector is either a state
+ We call such an index a 'vector'; i.e., a vector is either a state
or a nonterminal number.
Of course vector_number_t ought to be wide enough to contain
or a nonterminal number.
Of course vector_number_t ought to be wide enough to contain
/* For a given state, N = ACTROW[SYMBOL]:
/* For a given state, N = ACTROW[SYMBOL]:
- If N = 0, stands for `run the default action'.
- If N = MIN, stands for `raise a syntax error'.
- If N > 0, stands for `shift SYMBOL and go to n'.
- If N < 0, stands for `reduce -N'. */
+ If N = 0, stands for 'run the default action'.
+ If N = MIN, stands for 'raise a syntax error'.
+ If N > 0, stands for 'shift SYMBOL and go to n'.
+ If N < 0, stands for 'reduce -N'. */
typedef int action_number;
#define ACTION_NUMBER_MINIMUM INT_MIN
static action_number *actrow;
/* FROMS and TOS are reordered to be compressed. ORDER[VECTOR] is the
typedef int action_number;
#define ACTION_NUMBER_MINIMUM INT_MIN
static action_number *actrow;
/* FROMS and TOS are reordered to be compressed. ORDER[VECTOR] is the
- new vector number of VECTOR. We skip `empty' vectors (i.e.,
- TALLY[VECTOR] = 0), and call these `entries'. */
+ new vector number of VECTOR. We skip 'empty' vectors (i.e.,
+ TALLY[VECTOR] = 0), and call these 'entries'. */
static vector_number *order;
static int nentries;
static vector_number *order;
static int nentries;