mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
style: no longer use backquotes
* tests/actions.at, tests/atlocal.in, tests/c++.at, tests/calc.at, * tests/conflicts.at, tests/existing.at, tests/glr-regression.at, * tests/input.at, tests/java.at, tests/local.at, tests/sets.at, * tests/synclines.at, doc/bison.texi, lib/libiberty.h, lib/timevar.h: Use single quotes.
This commit is contained in:
@@ -2403,7 +2403,7 @@ Here are the C and Bison declarations for the multi-function calculator.
|
|||||||
%@{
|
%@{
|
||||||
#include <stdio.h> /* For printf, etc. */
|
#include <stdio.h> /* For printf, etc. */
|
||||||
#include <math.h> /* For pow, used in the grammar. */
|
#include <math.h> /* For pow, used in the grammar. */
|
||||||
#include "calc.h" /* Contains definition of `symrec'. */
|
#include "calc.h" /* Contains definition of 'symrec'. */
|
||||||
int yylex (void);
|
int yylex (void);
|
||||||
void yyerror (char const *);
|
void yyerror (char const *);
|
||||||
%@}
|
%@}
|
||||||
@@ -2532,7 +2532,7 @@ struct symrec
|
|||||||
@group
|
@group
|
||||||
typedef struct symrec symrec;
|
typedef struct symrec symrec;
|
||||||
|
|
||||||
/* The symbol table: a chain of `struct symrec'. */
|
/* The symbol table: a chain of 'struct symrec'. */
|
||||||
extern symrec *sym_table;
|
extern symrec *sym_table;
|
||||||
|
|
||||||
symrec *putsym (char const *, int);
|
symrec *putsym (char const *, int);
|
||||||
@@ -2567,7 +2567,7 @@ struct init const arith_fncts[] =
|
|||||||
@end group
|
@end group
|
||||||
|
|
||||||
@group
|
@group
|
||||||
/* The symbol table: a chain of `struct symrec'. */
|
/* The symbol table: a chain of 'struct symrec'. */
|
||||||
symrec *sym_table;
|
symrec *sym_table;
|
||||||
@end group
|
@end group
|
||||||
|
|
||||||
@@ -2975,7 +2975,7 @@ Let's go ahead and add the new @code{YYLTYPE} definition and the
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/* WARNING: The following code really belongs
|
/* WARNING: The following code really belongs
|
||||||
* in a `%code requires'; see below. */
|
* in a '%code requires'; see below. */
|
||||||
|
|
||||||
#include "ptypes.h"
|
#include "ptypes.h"
|
||||||
#define YYLTYPE YYLTYPE
|
#define YYLTYPE YYLTYPE
|
||||||
@@ -6435,7 +6435,7 @@ yylex (void)
|
|||||||
return 0;
|
return 0;
|
||||||
@dots{}
|
@dots{}
|
||||||
if (c == '+' || c == '-')
|
if (c == '+' || c == '-')
|
||||||
return c; /* Assume token type for `+' is '+'. */
|
return c; /* Assume token type for '+' is '+'. */
|
||||||
@dots{}
|
@dots{}
|
||||||
return INT; /* Return the type of the token. */
|
return INT; /* Return the type of the token. */
|
||||||
@dots{}
|
@dots{}
|
||||||
@@ -9698,7 +9698,7 @@ Here is a list of options that can be used with Bison, alphabetized by
|
|||||||
short option. It is followed by a cross key alphabetized by long
|
short option. It is followed by a cross key alphabetized by long
|
||||||
option.
|
option.
|
||||||
|
|
||||||
@c Please, keep this ordered as in `bison --help'.
|
@c Please, keep this ordered as in 'bison --help'.
|
||||||
@noindent
|
@noindent
|
||||||
Operations modes:
|
Operations modes:
|
||||||
@table @option
|
@table @option
|
||||||
@@ -12263,7 +12263,7 @@ operating system's name and version and your compiler's name and
|
|||||||
version. If you have trouble compiling, you should also include a
|
version. If you have trouble compiling, you should also include a
|
||||||
transcript of the build session, starting with the invocation of
|
transcript of the build session, starting with the invocation of
|
||||||
`configure'. Depending on the nature of the bug, you may be asked to
|
`configure'. Depending on the nature of the bug, you may be asked to
|
||||||
send additional files as well (such as `config.h' or `config.cache').
|
send additional files as well (such as @file{config.h} or @file{config.cache}).
|
||||||
|
|
||||||
Patches are most welcome, but not required. That is, do not hesitate to
|
Patches are most welcome, but not required. That is, do not hesitate to
|
||||||
send a bug report just because you cannot provide a fix.
|
send a bug report just because you cannot provide a fix.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Bison depends on libiberty's implementation of bitsets, which
|
/* Bison depends on libiberty's implementation of bitsets, which
|
||||||
requires a `libiberty.h' file. This file provides the minimum
|
requires a 'libiberty.h' file. This file provides the minimum
|
||||||
services. */
|
services. */
|
||||||
|
|
||||||
#ifndef BISON_LIBIBERTY_H_
|
#ifndef BISON_LIBIBERTY_H_
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
Timing variables may be pushed onto the stack; elapsed time is
|
Timing variables may be pushed onto the stack; elapsed time is
|
||||||
attributed to the topmost timing variable on the stack. When
|
attributed to the topmost timing variable on the stack. When
|
||||||
another variable is pushed on, the previous topmost variable is
|
another variable is pushed on, the previous topmost variable is
|
||||||
`paused' until the pushed variable is popped back off.
|
'paused' until the pushed variable is popped back off.
|
||||||
|
|
||||||
- As a standalone timer, using timevar_start and timevar_stop.
|
- As a standalone timer, using timevar_start and timevar_stop.
|
||||||
All time elapsed between the two calls is attributed to the
|
All time elapsed between the two calls is attributed to the
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ AT_LALR1_CC_IF([typedef yy::location YYLTYPE;])[
|
|||||||
%%
|
%%
|
||||||
/*
|
/*
|
||||||
This grammar is made to exercise error recovery.
|
This grammar is made to exercise error recovery.
|
||||||
"Lines" starting with `(' support error recovery, with
|
"Lines" starting with '(' support error recovery, with
|
||||||
')' as synchronizing token. Lines starting with 'x' can never
|
')' as synchronizing token. Lines starting with 'x' can never
|
||||||
be recovered from if in error.
|
be recovered from if in error.
|
||||||
*/
|
*/
|
||||||
@@ -688,7 +688,7 @@ Successful parse.
|
|||||||
|
|
||||||
# Syntax errors caught by the parser
|
# Syntax errors caught by the parser
|
||||||
# ----------------------------------
|
# ----------------------------------
|
||||||
# Exercise the discarding of stack top and input until `error'
|
# Exercise the discarding of stack top and input until 'error'
|
||||||
# can be reduced.
|
# can be reduced.
|
||||||
#
|
#
|
||||||
# '(', 'x', 'x', 'x', 'x', 'x', ')',
|
# '(', 'x', 'x', 'x', 'x', 'x', ')',
|
||||||
@@ -1284,7 +1284,7 @@ AT_SETUP([Default %printer and %destructor are not for $accept])
|
|||||||
# - The %printer and %destructor code generated for $accept would always be
|
# - The %printer and %destructor code generated for $accept would always be
|
||||||
# dead code because $accept is currently never shifted onto the stack.
|
# dead code because $accept is currently never shifted onto the stack.
|
||||||
# - $$ for $accept would always be of type YYSTYPE because it's not possible
|
# - $$ for $accept would always be of type YYSTYPE because it's not possible
|
||||||
# to declare `%type <field> $accept'. (Also true for $undefined.)
|
# to declare '%type <field> $accept'. (Also true for $undefined.)
|
||||||
# - Thus, the compiler might complain that the user code assumes the wrong
|
# - Thus, the compiler might complain that the user code assumes the wrong
|
||||||
# type for $$ since the code might assume the type associated with a
|
# type for $$ since the code might assume the type associated with a
|
||||||
# specific union field, which is especially reasonable in C++ since that
|
# specific union field, which is especially reasonable in C++ since that
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# We need `config.h'.
|
# We need 'config.h'.
|
||||||
CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
|
CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
|
||||||
|
|
||||||
# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
|
# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
|
||||||
|
|||||||
@@ -420,8 +420,8 @@ AT_CLEANUP
|
|||||||
AT_SETUP([[Syntactically invalid namespace references]])
|
AT_SETUP([[Syntactically invalid namespace references]])
|
||||||
AT_TEST([[:foo:bar]], [[-]])
|
AT_TEST([[:foo:bar]], [[-]])
|
||||||
AT_TEST([[foo: :bar]], [[-]])
|
AT_TEST([[foo: :bar]], [[-]])
|
||||||
# This one is interesting because `[3]' is encoded as `@<:@3@:>@', which
|
# This one is interesting because '[3]' is encoded as '@<:@3@:>@', which
|
||||||
# contains single occurrences of `:'.
|
# contains single occurrences of ':'.
|
||||||
AT_TEST([[foo[3]::bar::baz]], [[-]])
|
AT_TEST([[foo[3]::bar::baz]], [[-]])
|
||||||
AT_TEST([[foo::bar,baz]], [[-]])
|
AT_TEST([[foo::bar,baz]], [[-]])
|
||||||
AT_TEST([[foo::bar::(baz /* Pacify Emacs ) */]], [[-]])
|
AT_TEST([[foo::bar::(baz /* Pacify Emacs ) */]], [[-]])
|
||||||
|
|||||||
@@ -27,11 +27,11 @@
|
|||||||
|
|
||||||
# _AT_DATA_CALC_Y($1, $2, $3, [BISON-DIRECTIVES])
|
# _AT_DATA_CALC_Y($1, $2, $3, [BISON-DIRECTIVES])
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
# Produce `calc.y' and, if %defines was specified, `calc-lex.c' or
|
# Produce 'calc.y' and, if %defines was specified, 'calc-lex.c' or
|
||||||
# `calc-lex.cc'.
|
# 'calc-lex.cc'.
|
||||||
#
|
#
|
||||||
# Don't call this macro directly, because it contains some occurrences
|
# Don't call this macro directly, because it contains some occurrences
|
||||||
# of `$1' etc. which will be interpreted by m4. So you should call it
|
# of '$1' etc. which will be interpreted by m4. So you should call it
|
||||||
# with $1, $2, and $3 as arguments, which is what AT_DATA_CALC_Y does.
|
# with $1, $2, and $3 as arguments, which is what AT_DATA_CALC_Y does.
|
||||||
#
|
#
|
||||||
# When %defines is not passed, generate a single self-contained file.
|
# When %defines is not passed, generate a single self-contained file.
|
||||||
@@ -134,7 +134,7 @@ unget_char (]AT_YYLEX_PRE_FORMALS[ int c)
|
|||||||
{
|
{
|
||||||
]AT_USE_LEX_ARGS[;
|
]AT_USE_LEX_ARGS[;
|
||||||
]AT_LOCATION_IF([
|
]AT_LOCATION_IF([
|
||||||
/* Wrong when C == `\n'. */
|
/* Wrong when C == '\n'. */
|
||||||
AT_LOC = last_yylloc;
|
AT_LOC = last_yylloc;
|
||||||
])[
|
])[
|
||||||
ungetc (c, input);
|
ungetc (c, input);
|
||||||
@@ -366,8 +366,8 @@ m4_popdef([AT_CALC_LEX])
|
|||||||
|
|
||||||
# AT_DATA_CALC_Y([BISON-OPTIONS])
|
# AT_DATA_CALC_Y([BISON-OPTIONS])
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Produce `calc.y' and, if %defines was specified, `calc-lex.c' or
|
# Produce 'calc.y' and, if %defines was specified, 'calc-lex.c' or
|
||||||
# `calc-lex.cc'.
|
# 'calc-lex.cc'.
|
||||||
m4_define([AT_DATA_CALC_Y],
|
m4_define([AT_DATA_CALC_Y],
|
||||||
[_AT_DATA_CALC_Y($[1], $[2], $[3], [$1])
|
[_AT_DATA_CALC_Y($[1], $[2], $[3], [$1])
|
||||||
])
|
])
|
||||||
@@ -376,9 +376,9 @@ m4_define([AT_DATA_CALC_Y],
|
|||||||
|
|
||||||
# _AT_CHECK_CALC(BISON-OPTIONS, INPUT, [NUM-STDERR-LINES])
|
# _AT_CHECK_CALC(BISON-OPTIONS, INPUT, [NUM-STDERR-LINES])
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Run `calc' on INPUT and expect no STDOUT nor STDERR.
|
# Run 'calc' on INPUT and expect no STDOUT nor STDERR.
|
||||||
#
|
#
|
||||||
# If BISON-OPTIONS contains `%debug' but not `%glr-parser', then
|
# If BISON-OPTIONS contains '%debug' but not '%glr-parser', then
|
||||||
#
|
#
|
||||||
# NUM-STDERR-LINES is the number of expected lines on stderr.
|
# NUM-STDERR-LINES is the number of expected lines on stderr.
|
||||||
# Currently this is ignored, though, since the output format is fluctuating.
|
# Currently this is ignored, though, since the output format is fluctuating.
|
||||||
@@ -397,7 +397,7 @@ AT_PARSER_CHECK([./calc input], 0, [], [stderr])
|
|||||||
# [NUM-STDERR-LINES],
|
# [NUM-STDERR-LINES],
|
||||||
# [VERBOSE-AND-LOCATED-ERROR-MESSAGE])
|
# [VERBOSE-AND-LOCATED-ERROR-MESSAGE])
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Run `calc' on INPUT, and expect a `syntax error' message.
|
# Run 'calc' on INPUT, and expect a 'syntax error' message.
|
||||||
#
|
#
|
||||||
# If INPUT starts with a slash, it is used as absolute input file name,
|
# If INPUT starts with a slash, it is used as absolute input file name,
|
||||||
# otherwise as contents.
|
# otherwise as contents.
|
||||||
@@ -405,14 +405,14 @@ AT_PARSER_CHECK([./calc input], 0, [], [stderr])
|
|||||||
# NUM-STDERR-LINES is the number of expected lines on stderr.
|
# NUM-STDERR-LINES is the number of expected lines on stderr.
|
||||||
# Currently this is ignored, though, since the output format is fluctuating.
|
# Currently this is ignored, though, since the output format is fluctuating.
|
||||||
#
|
#
|
||||||
# If BISON-OPTIONS contains `%location', then make sure the ERROR-LOCATION
|
# If BISON-OPTIONS contains '%location', then make sure the ERROR-LOCATION
|
||||||
# is correctly output on stderr.
|
# is correctly output on stderr.
|
||||||
#
|
#
|
||||||
# If BISON-OPTIONS contains `%define parse.error verbose', then make sure the
|
# If BISON-OPTIONS contains '%define parse.error verbose', then make sure the
|
||||||
# IF-YYERROR-VERBOSE message is properly output after `syntax error, '
|
# IF-YYERROR-VERBOSE message is properly output after 'syntax error, '
|
||||||
# on STDERR.
|
# on STDERR.
|
||||||
#
|
#
|
||||||
# If BISON-OPTIONS contains `%debug' but not `%glr', then NUM-STDERR-LINES
|
# If BISON-OPTIONS contains '%debug' but not '%glr', then NUM-STDERR-LINES
|
||||||
# is the number of expected lines on stderr.
|
# is the number of expected lines on stderr.
|
||||||
m4_define([_AT_CHECK_CALC_ERROR],
|
m4_define([_AT_CHECK_CALC_ERROR],
|
||||||
[m4_bmatch([$3], [^/],
|
[m4_bmatch([$3], [^/],
|
||||||
@@ -449,7 +449,7 @@ AT_DATA([[expout]],
|
|||||||
AT_YYERROR_SEES_LOC_IF([],
|
AT_YYERROR_SEES_LOC_IF([],
|
||||||
[[sed 's/^[-0-9.]*: //' expout >at-expout
|
[[sed 's/^[-0-9.]*: //' expout >at-expout
|
||||||
mv at-expout expout]])
|
mv at-expout expout]])
|
||||||
# 4. If error-verbose is not used, strip the`, unexpected....' part.
|
# 4. If error-verbose is not used, strip the', unexpected....' part.
|
||||||
m4_bmatch([$1], [%define parse.error verbose], [],
|
m4_bmatch([$1], [%define parse.error verbose], [],
|
||||||
[[sed 's/syntax error, .*$/syntax error/' expout >at-expout
|
[[sed 's/syntax error, .*$/syntax error/' expout >at-expout
|
||||||
mv at-expout expout]])
|
mv at-expout expout]])
|
||||||
@@ -479,7 +479,7 @@ m4_define([AT_CHECK_SPACES],
|
|||||||
|
|
||||||
# AT_CHECK_CALC([BISON-OPTIONS])
|
# AT_CHECK_CALC([BISON-OPTIONS])
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
# Start a testing chunk which compiles `calc' grammar with
|
# Start a testing chunk which compiles 'calc' grammar with
|
||||||
# BISON-OPTIONS, and performs several tests over the parser.
|
# BISON-OPTIONS, and performs several tests over the parser.
|
||||||
m4_define([AT_CHECK_CALC],
|
m4_define([AT_CHECK_CALC],
|
||||||
[m4_ifval([$2], [m4_fatal([$0: expected a single argument])])
|
[m4_ifval([$2], [m4_fatal([$0: expected a single argument])])
|
||||||
@@ -539,7 +539,7 @@ _AT_CHECK_CALC_ERROR([$1], [1], [/dev/null], [4],
|
|||||||
# - (* * *): nothing to pop, a lot to discard
|
# - (* * *): nothing to pop, a lot to discard
|
||||||
# - (1 + 2 * *): some to pop and discard
|
# - (1 + 2 * *): some to pop and discard
|
||||||
#
|
#
|
||||||
# - test the action associated to `error'
|
# - test the action associated to 'error'
|
||||||
#
|
#
|
||||||
# - check the lookahead that triggers an error is not discarded
|
# - check the lookahead that triggers an error is not discarded
|
||||||
# when we enter error recovery. Below, the lookahead causing the
|
# when we enter error recovery. Below, the lookahead causing the
|
||||||
@@ -588,7 +588,7 @@ AT_BANNER([[Simple LALR(1) Calculator.]])
|
|||||||
|
|
||||||
# AT_CHECK_CALC_LALR([BISON-OPTIONS])
|
# AT_CHECK_CALC_LALR([BISON-OPTIONS])
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# Start a testing chunk which compiles `calc' grammar with
|
# Start a testing chunk which compiles 'calc' grammar with
|
||||||
# BISON-OPTIONS, and performs several tests over the parser.
|
# BISON-OPTIONS, and performs several tests over the parser.
|
||||||
m4_define([AT_CHECK_CALC_LALR],
|
m4_define([AT_CHECK_CALC_LALR],
|
||||||
[AT_CHECK_CALC($@)])
|
[AT_CHECK_CALC($@)])
|
||||||
@@ -628,7 +628,7 @@ AT_BANNER([[Simple GLR Calculator.]])
|
|||||||
|
|
||||||
# AT_CHECK_CALC_GLR([BISON-OPTIONS])
|
# AT_CHECK_CALC_GLR([BISON-OPTIONS])
|
||||||
# ----------------------------------
|
# ----------------------------------
|
||||||
# Start a testing chunk which compiles `calc' grammar with
|
# Start a testing chunk which compiles 'calc' grammar with
|
||||||
# BISON-OPTIONS and %glr-parser, and performs several tests over the parser.
|
# BISON-OPTIONS and %glr-parser, and performs several tests over the parser.
|
||||||
m4_define([AT_CHECK_CALC_GLR],
|
m4_define([AT_CHECK_CALC_GLR],
|
||||||
[AT_CHECK_CALC([%glr-parser] $@)])
|
[AT_CHECK_CALC([%glr-parser] $@)])
|
||||||
@@ -670,7 +670,7 @@ AT_CHECK_CALC([%skeleton "lalr1.cc" %defines])
|
|||||||
|
|
||||||
# AT_CHECK_CALC_LALR1_CC([BISON-OPTIONS])
|
# AT_CHECK_CALC_LALR1_CC([BISON-OPTIONS])
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Start a testing chunk which compiles `calc' grammar with
|
# Start a testing chunk which compiles 'calc' grammar with
|
||||||
# the C++ skeleton, and performs several tests over the parser.
|
# the C++ skeleton, and performs several tests over the parser.
|
||||||
m4_define([AT_CHECK_CALC_LALR1_CC],
|
m4_define([AT_CHECK_CALC_LALR1_CC],
|
||||||
[AT_CHECK_CALC([%language "C++"] $@)])
|
[AT_CHECK_CALC([%language "C++"] $@)])
|
||||||
@@ -704,7 +704,7 @@ AT_CHECK_CALC([%skeleton "glr.cc"])
|
|||||||
|
|
||||||
# AT_CHECK_CALC_GLR_CC([BISON-OPTIONS])
|
# AT_CHECK_CALC_GLR_CC([BISON-OPTIONS])
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# Start a testing chunk which compiles `calc' grammar with
|
# Start a testing chunk which compiles 'calc' grammar with
|
||||||
# the GLR C++ skeleton, and performs several tests over the parser.
|
# the GLR C++ skeleton, and performs several tests over the parser.
|
||||||
m4_define([AT_CHECK_CALC_GLR_CC],
|
m4_define([AT_CHECK_CALC_GLR_CC],
|
||||||
[AT_CHECK_CALC([%language "C++" %glr-parser] $@)])
|
[AT_CHECK_CALC([%language "C++" %glr-parser] $@)])
|
||||||
|
|||||||
@@ -936,13 +936,13 @@ AT_CLEANUP
|
|||||||
# $end reduce using rule 3 (num)
|
# $end reduce using rule 3 (num)
|
||||||
# $end [reduce using rule 4 (id)]
|
# $end [reduce using rule 4 (id)]
|
||||||
#
|
#
|
||||||
# But when `reduce 3' is the default action, we'd produce:
|
# But when 'reduce 3' is the default action, we'd produce:
|
||||||
#
|
#
|
||||||
# $end [reduce using rule 4 (id)]
|
# $end [reduce using rule 4 (id)]
|
||||||
# $default reduce using rule 3 (num)
|
# $default reduce using rule 3 (num)
|
||||||
#
|
#
|
||||||
# In this precise case (a reduction is masked by the default
|
# In this precise case (a reduction is masked by the default
|
||||||
# reduction), we make the `reduce 3' explicit:
|
# reduction), we make the 'reduce 3' explicit:
|
||||||
#
|
#
|
||||||
# $end reduce using rule 3 (num)
|
# $end reduce using rule 3 (num)
|
||||||
# $end [reduce using rule 4 (id)]
|
# $end [reduce using rule 4 (id)]
|
||||||
|
|||||||
@@ -403,26 +403,26 @@ dnl parses it as:
|
|||||||
dnl
|
dnl
|
||||||
dnl getline $!(4*0);
|
dnl getline $!(4*0);
|
||||||
dnl
|
dnl
|
||||||
dnl That is, they shift `*' immediately and make it part of the getline
|
dnl That is, they shift '*' immediately and make it part of the getline
|
||||||
dnl argument.
|
dnl argument.
|
||||||
dnl
|
dnl
|
||||||
dnl The grammar below using LALR(1) parses it as a syntax error. So does
|
dnl The grammar below using LALR(1) parses it as a syntax error. So does
|
||||||
dnl GNU AWK 3.0.6, 3.1.0, and 3.1.1. They reduce the full getline expression
|
dnl GNU AWK 3.0.6, 3.1.0, and 3.1.1. They reduce the full getline expression
|
||||||
dnl before shifting `*' even though `*' is not a valid lookahead.
|
dnl before shifting '*' even though '*' is not a valid lookahead.
|
||||||
dnl
|
dnl
|
||||||
dnl GNU AWK 3.1.2, 3.1.3, 3.1.4, and 3.1.5 parse it as:
|
dnl GNU AWK 3.1.2, 3.1.3, 3.1.4, and 3.1.5 parse it as:
|
||||||
dnl
|
dnl
|
||||||
dnl (getline $!4)*0;
|
dnl (getline $!4)*0;
|
||||||
dnl
|
dnl
|
||||||
dnl That is, like the other versions of GNU AWK, they reduce the full getline
|
dnl That is, like the other versions of GNU AWK, they reduce the full getline
|
||||||
dnl expression before shifting `*'. However, because of a different LHS on the
|
dnl expression before shifting '*'. However, because of a different LHS on the
|
||||||
dnl getline rule, `*' actually is a valid lookahead. Solaris /usr/xpg4/bin/awk
|
dnl getline rule, '*' actually is a valid lookahead. Solaris /usr/xpg4/bin/awk
|
||||||
dnl and the Open Group awk specification seem to agree:
|
dnl and the Open Group awk specification seem to agree:
|
||||||
dnl
|
dnl
|
||||||
dnl http://www.opengroup.org/pubs/online/7908799/xcu/awk.html
|
dnl http://www.opengroup.org/pubs/online/7908799/xcu/awk.html
|
||||||
dnl
|
dnl
|
||||||
dnl /bin/nawk and /bin/awk on Solaris 10 report it as a syntax error, but they
|
dnl /bin/nawk and /bin/awk on Solaris 10 report it as a syntax error, but they
|
||||||
dnl don't like even `print $!4;'.
|
dnl don't like even 'print $!4;'.
|
||||||
[[LEX_GETLINE, '$', '!', YNUMBER, '*', YNUMBER, ';']],
|
[[LEX_GETLINE, '$', '!', YNUMBER, '*', YNUMBER, ';']],
|
||||||
|
|
||||||
dnl BISON-STDERR
|
dnl BISON-STDERR
|
||||||
@@ -1649,7 +1649,7 @@ box "foo" above ljust == box ("foo" above ljust)
|
|||||||
|
|
||||||
%left LEFT RIGHT
|
%left LEFT RIGHT
|
||||||
/* Give attributes that take an optional expression a higher
|
/* Give attributes that take an optional expression a higher
|
||||||
precedence than left and right, so that eg `line chop left'
|
precedence than left and right, so that eg 'line chop left'
|
||||||
parses properly. */
|
parses properly. */
|
||||||
%left CHOP SOLID DASHED DOTTED UP DOWN FILL COLORED OUTLINED
|
%left CHOP SOLID DASHED DOTTED UP DOWN FILL COLORED OUTLINED
|
||||||
%left LABEL
|
%left LABEL
|
||||||
@@ -1662,7 +1662,7 @@ parses properly. */
|
|||||||
/* these need to be lower than '-' */
|
/* these need to be lower than '-' */
|
||||||
%left HEIGHT RADIUS WIDTH DIAMETER FROM TO AT THICKNESS
|
%left HEIGHT RADIUS WIDTH DIAMETER FROM TO AT THICKNESS
|
||||||
|
|
||||||
/* these must have higher precedence than CHOP so that `label %prec CHOP'
|
/* these must have higher precedence than CHOP so that 'label %prec CHOP'
|
||||||
works */
|
works */
|
||||||
%left DOT_N DOT_E DOT_W DOT_S DOT_NE DOT_SE DOT_NW DOT_SW DOT_C
|
%left DOT_N DOT_E DOT_W DOT_S DOT_NE DOT_SE DOT_NW DOT_SW DOT_C
|
||||||
%left DOT_START DOT_END TOP BOTTOM LEFT_CORNER RIGHT_CORNER
|
%left DOT_START DOT_END TOP BOTTOM LEFT_CORNER RIGHT_CORNER
|
||||||
|
|||||||
@@ -1015,17 +1015,17 @@ main (void)
|
|||||||
int exit_status = yyparse ();
|
int exit_status = yyparse ();
|
||||||
if (parent_rhs_before_value)
|
if (parent_rhs_before_value)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "`parent_rhs_before' destructor not called.\n");
|
fprintf (stderr, "'parent_rhs_before' destructor not called.\n");
|
||||||
exit_status = 1;
|
exit_status = 1;
|
||||||
}
|
}
|
||||||
if (merged_value)
|
if (merged_value)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "`merged' destructor not called.\n");
|
fprintf (stderr, "'merged' destructor not called.\n");
|
||||||
exit_status = 1;
|
exit_status = 1;
|
||||||
}
|
}
|
||||||
if (parent_rhs_after_value)
|
if (parent_rhs_after_value)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "`PARENT_RHS_AFTER' destructor not called.\n");
|
fprintf (stderr, "'PARENT_RHS_AFTER' destructor not called.\n");
|
||||||
exit_status = 1;
|
exit_status = 1;
|
||||||
}
|
}
|
||||||
return exit_status;
|
return exit_status;
|
||||||
@@ -1449,7 +1449,7 @@ main (void)
|
|||||||
int exit_status = yyparse () != 1;
|
int exit_status = yyparse () != 1;
|
||||||
if (parent_rhs_before_value)
|
if (parent_rhs_before_value)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "`parent_rhs_before' destructor not called.\n");
|
fprintf (stderr, "'parent_rhs_before' destructor not called.\n");
|
||||||
exit_status = 1;
|
exit_status = 1;
|
||||||
}
|
}
|
||||||
return exit_status;
|
return exit_status;
|
||||||
|
|||||||
@@ -1484,7 +1484,7 @@ AT_SETUP([[Unused %define api.pure]])
|
|||||||
|
|
||||||
# AT_CHECK_API_PURE(DECLS, VALUE)
|
# AT_CHECK_API_PURE(DECLS, VALUE)
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Make sure Bison reports that `%define api.pure VALUE' is unused when DECLS
|
# Make sure Bison reports that '%define api.pure VALUE' is unused when DECLS
|
||||||
# are specified.
|
# are specified.
|
||||||
m4_define([AT_CHECK_API_PURE],
|
m4_define([AT_CHECK_API_PURE],
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ AT_BANNER([[Java Calculator.]])
|
|||||||
|
|
||||||
# _AT_DATA_JAVA_CALC_Y($1, $2, $3, [BISON-DIRECTIVES])
|
# _AT_DATA_JAVA_CALC_Y($1, $2, $3, [BISON-DIRECTIVES])
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
# Produce `calc.y'. Don't call this macro directly, because it contains
|
# Produce 'calc.y'. Don't call this macro directly, because it contains
|
||||||
# some occurrences of `$1' etc. which will be interpreted by m4. So
|
# some occurrences of '$1' etc. which will be interpreted by m4. So
|
||||||
# you should call it with $1, $2, and $3 as arguments, which is what
|
# you should call it with $1, $2, and $3 as arguments, which is what
|
||||||
# AT_DATA_JAVA_CALC_Y does.
|
# AT_DATA_JAVA_CALC_Y does.
|
||||||
m4_define([_AT_DATA_JAVA_CALC_Y],
|
m4_define([_AT_DATA_JAVA_CALC_Y],
|
||||||
@@ -206,7 +206,7 @@ AT_BISON_OPTION_POPDEFS
|
|||||||
|
|
||||||
# AT_DATA_CALC_Y([BISON-OPTIONS])
|
# AT_DATA_CALC_Y([BISON-OPTIONS])
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Produce `calc.y'.
|
# Produce 'calc.y'.
|
||||||
m4_define([AT_DATA_JAVA_CALC_Y],
|
m4_define([AT_DATA_JAVA_CALC_Y],
|
||||||
[_AT_DATA_JAVA_CALC_Y($[1], $[2], $[3], [$1])
|
[_AT_DATA_JAVA_CALC_Y($[1], $[2], $[3], [$1])
|
||||||
])
|
])
|
||||||
@@ -215,7 +215,7 @@ m4_define([AT_DATA_JAVA_CALC_Y],
|
|||||||
# _AT_CHECK_JAVA_CALC_ERROR(BISON-OPTIONS, INPUT,
|
# _AT_CHECK_JAVA_CALC_ERROR(BISON-OPTIONS, INPUT,
|
||||||
# [VERBOSE-AND-LOCATED-ERROR-MESSAGE])
|
# [VERBOSE-AND-LOCATED-ERROR-MESSAGE])
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# Run `calc' on INPUT, and expect a `syntax error' message.
|
# Run 'calc' on INPUT, and expect a 'syntax error' message.
|
||||||
#
|
#
|
||||||
# If INPUT starts with a slash, it is used as absolute input file name,
|
# If INPUT starts with a slash, it is used as absolute input file name,
|
||||||
# otherwise as contents.
|
# otherwise as contents.
|
||||||
@@ -240,7 +240,7 @@ AT_DATA([[expout]],
|
|||||||
AT_YYERROR_SEES_LOC_IF([],
|
AT_YYERROR_SEES_LOC_IF([],
|
||||||
[[sed 's/^[-0-9.]*: //' expout >at-expout
|
[[sed 's/^[-0-9.]*: //' expout >at-expout
|
||||||
mv at-expout expout]])
|
mv at-expout expout]])
|
||||||
# 3. If error-verbose is not used, strip the`, unexpected....' part.
|
# 3. If error-verbose is not used, strip the', unexpected....' part.
|
||||||
m4_bmatch([$1], [%error-verbose], [],
|
m4_bmatch([$1], [%error-verbose], [],
|
||||||
[[sed 's/syntax error, .*$/syntax error/' expout >at-expout
|
[[sed 's/syntax error, .*$/syntax error/' expout >at-expout
|
||||||
mv at-expout expout]])
|
mv at-expout expout]])
|
||||||
@@ -250,7 +250,7 @@ AT_CHECK([cat stderr], 0, [expout])
|
|||||||
|
|
||||||
# _AT_CHECK_JAVA_CALC([BISON-DIRECTIVES], [BISON-CODE])
|
# _AT_CHECK_JAVA_CALC([BISON-DIRECTIVES], [BISON-CODE])
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Start a testing chunk which compiles `calc' grammar with
|
# Start a testing chunk which compiles 'calc' grammar with
|
||||||
# BISON-DIRECTIVES, and performs several tests over the parser.
|
# BISON-DIRECTIVES, and performs several tests over the parser.
|
||||||
m4_define([_AT_CHECK_JAVA_CALC],
|
m4_define([_AT_CHECK_JAVA_CALC],
|
||||||
[# We use integers to avoid dependencies upon the precision of doubles.
|
[# We use integers to avoid dependencies upon the precision of doubles.
|
||||||
@@ -310,7 +310,7 @@ _AT_CHECK_JAVA_CALC_ERROR([$1], [/dev/null],
|
|||||||
# - (* * *): nothing to pop, a lot to discard
|
# - (* * *): nothing to pop, a lot to discard
|
||||||
# - (1 + 2 * *): some to pop and discard
|
# - (1 + 2 * *): some to pop and discard
|
||||||
#
|
#
|
||||||
# - test the action associated to `error'
|
# - test the action associated to 'error'
|
||||||
#
|
#
|
||||||
# - check the lookahead that triggers an error is not discarded
|
# - check the lookahead that triggers an error is not discarded
|
||||||
# when we enter error recovery. Below, the lookahead causing the
|
# when we enter error recovery. Below, the lookahead causing the
|
||||||
@@ -342,7 +342,7 @@ AT_CLEANUP
|
|||||||
|
|
||||||
# AT_CHECK_JAVA_CALC([BISON-DIRECTIVES])
|
# AT_CHECK_JAVA_CALC([BISON-DIRECTIVES])
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
# Start a testing chunk which compiles `calc' grammar with
|
# Start a testing chunk which compiles 'calc' grammar with
|
||||||
# BISON-DIRECTIVES, and performs several tests over the parser.
|
# BISON-DIRECTIVES, and performs several tests over the parser.
|
||||||
# Run the test with and without %error-verbose.
|
# Run the test with and without %error-verbose.
|
||||||
m4_define([AT_CHECK_JAVA_CALC],
|
m4_define([AT_CHECK_JAVA_CALC],
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ m4_define([AT_BISON_OPTION_PUSHDEFS],
|
|||||||
# _AT_BISON_OPTION_PUSHDEFS($1, $2, [BISON-OPTIONS])
|
# _AT_BISON_OPTION_PUSHDEFS($1, $2, [BISON-OPTIONS])
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# This macro works around the impossibility to define macros
|
# This macro works around the impossibility to define macros
|
||||||
# inside macros, because issuing `[$1]' is not possible in M4 :(.
|
# inside macros, because issuing '[$1]' is not possible in M4 :(.
|
||||||
# This sucks hard, GNU M4 should really provide M5-like $$1.
|
# This sucks hard, GNU M4 should really provide M5-like $$1.
|
||||||
m4_define([_AT_BISON_OPTION_PUSHDEFS],
|
m4_define([_AT_BISON_OPTION_PUSHDEFS],
|
||||||
[m4_if([$1$2], $[1]$[2], [],
|
[m4_if([$1$2], $[1]$[2], [],
|
||||||
@@ -599,7 +599,7 @@ m4_define([AT_MAIN_DEFINE(java)],
|
|||||||
# High-level routine that may call bison several times, under different
|
# High-level routine that may call bison several times, under different
|
||||||
# conditions.
|
# conditions.
|
||||||
#
|
#
|
||||||
# Check Bison by invoking `bison BISON_ARGS'. BISON_ARGS should not contain
|
# Check Bison by invoking 'bison BISON_ARGS'. BISON_ARGS should not contain
|
||||||
# shell constructs (such as redirection or pipes) that would prevent
|
# shell constructs (such as redirection or pipes) that would prevent
|
||||||
# appending additional command-line arguments for bison. OTHER_AT_CHECK_ARGS
|
# appending additional command-line arguments for bison. OTHER_AT_CHECK_ARGS
|
||||||
# are the usual remaining arguments to AT_CHECK: STATUS, STDOUT, etc.
|
# are the usual remaining arguments to AT_CHECK: STATUS, STDOUT, etc.
|
||||||
@@ -876,7 +876,7 @@ AT_PARSER_CHECK([./c-and-cxx])
|
|||||||
|
|
||||||
# AT_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE])
|
# AT_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE])
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# So that we can run `./testsuite PREPARSER='valgrind -q' for instance.
|
# So that we can run './testsuite PREPARSER='valgrind -q' for instance.
|
||||||
#
|
#
|
||||||
# Get rid of spurious messages when compiled with --coverage:
|
# Get rid of spurious messages when compiled with --coverage:
|
||||||
# +profiling:/[...]/lib/fprintf.gcda:Merge mismatch for summaries
|
# +profiling:/[...]/lib/fprintf.gcda:Merge mismatch for summaries
|
||||||
@@ -918,16 +918,16 @@ m4_define([AT_JAVA_PARSER_CHECK],
|
|||||||
# that Bison exits with value 0, has no stdout, and has stderr
|
# that Bison exits with value 0, has no stdout, and has stderr
|
||||||
# BISON-STDERR.
|
# BISON-STDERR.
|
||||||
#
|
#
|
||||||
# If TEST-SPEC contains the attribute `last-state', check that the value
|
# If TEST-SPEC contains the attribute 'last-state', check that the value
|
||||||
# of TABLES-OR-LAST-STATE is the index of the last state generated for
|
# of TABLES-OR-LAST-STATE is the index of the last state generated for
|
||||||
# the grammar; in other words, check the number of states (minus one).
|
# the grammar; in other words, check the number of states (minus one).
|
||||||
# Otherwise, check that everything in the `.output' file starting with
|
# Otherwise, check that everything in the '.output' file starting with
|
||||||
# the definition of state 0 is the same as the entire value of
|
# the definition of state 0 is the same as the entire value of
|
||||||
# TABLES-OR-LAST-STATE.
|
# TABLES-OR-LAST-STATE.
|
||||||
#
|
#
|
||||||
# Expand the M4 in OTHER-CHECKS to perform additional checks of the
|
# Expand the M4 in OTHER-CHECKS to perform additional checks of the
|
||||||
# `.output' file, which is named `input.output', and/or grammar file,
|
# '.output' file, which is named 'input.output', and/or grammar file,
|
||||||
# which is named `input.y'.
|
# which is named 'input.y'.
|
||||||
#
|
#
|
||||||
# Finally, compile the generated parser and then run it using
|
# Finally, compile the generated parser and then run it using
|
||||||
# AT_PARSER_CHECK with PARSER-EXIT-VALUE, PARSER-STDOUT, and
|
# AT_PARSER_CHECK with PARSER-EXIT-VALUE, PARSER-STDOUT, and
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ AT_CLEANUP
|
|||||||
## Broken Closure. ##
|
## Broken Closure. ##
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
|
|
||||||
# TC was once broken during a massive `simplification' of the code.
|
# TC was once broken during a massive 'simplification' of the code.
|
||||||
# It resulted in bison dumping core on the following grammar (the
|
# It resulted in bison dumping core on the following grammar (the
|
||||||
# computation of FIRSTS uses TC). It managed to produce a pretty
|
# computation of FIRSTS uses TC). It managed to produce a pretty
|
||||||
# exotic closure:
|
# exotic closure:
|
||||||
@@ -263,7 +263,7 @@ AT_CLEANUP
|
|||||||
# In some weird cases Bison could compute an incorrect final state
|
# In some weird cases Bison could compute an incorrect final state
|
||||||
# number. This happens only if the $end token is used in the user
|
# number. This happens only if the $end token is used in the user
|
||||||
# grammar, which is a very suspicious accidental feature introduced as
|
# grammar, which is a very suspicious accidental feature introduced as
|
||||||
# a side effect of allowing the user to name $end using `%token END 0
|
# a side effect of allowing the user to name $end using '%token END 0
|
||||||
# "end of file"'.
|
# "end of file"'.
|
||||||
|
|
||||||
AT_SETUP([Accept])
|
AT_SETUP([Accept])
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ AT_BANNER([[User Actions.]])
|
|||||||
# --------------------------
|
# --------------------------
|
||||||
# Compile FILE expecting an error, and save in the file stdout the
|
# Compile FILE expecting an error, and save in the file stdout the
|
||||||
# normalized output. Ignore the exit status, since some compilers
|
# normalized output. Ignore the exit status, since some compilers
|
||||||
# (e.g. c89 on IRIX 6.5) trigger warnings on `#error', instead of
|
# (e.g. c89 on IRIX 6.5) trigger warnings on '#error', instead of
|
||||||
# errors.
|
# errors.
|
||||||
m4_define([AT_SYNCLINES_COMPILE],
|
m4_define([AT_SYNCLINES_COMPILE],
|
||||||
[AT_CHECK([$CC $CFLAGS $CPPFLAGS -c $1], [ignore], [], [stderr])
|
[AT_CHECK([$CC $CFLAGS $CPPFLAGS -c $1], [ignore], [], [stderr])
|
||||||
|
|||||||
Reference in New Issue
Block a user