mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-11 03:35:15 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f921d18dd | ||
|
|
cc3760ef51 | ||
|
|
2f23ca6f65 | ||
|
|
468b68c5cd | ||
|
|
9ed802a026 | ||
|
|
fb554c2804 | ||
|
|
47850d4f58 | ||
|
|
57b035a242 | ||
|
|
1587a5ea9b | ||
|
|
4ab2cf7450 | ||
|
|
7e3a513d88 |
+1
-1
@@ -1 +1 @@
|
||||
3.5
|
||||
3.5.1
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
GNU Bison NEWS
|
||||
|
||||
* Noteworthy changes in release 3.5.2 (2020-02-13) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
Portability issues and minor cosmetic issues.
|
||||
|
||||
The lalr1.cc skeleton properly rejects unsupported values for parse.lac
|
||||
(as yacc.c does).
|
||||
|
||||
* Noteworthy changes in release 3.5.1 (2020-01-19) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
@@ -130,6 +130,7 @@ Nick Bowler [email protected]
|
||||
Nicolas Bedon [email protected]
|
||||
Nicolas Burrus [email protected]
|
||||
Nicolas Tisserand [email protected]
|
||||
Nikki Valen [email protected]
|
||||
Noah Friedman [email protected]
|
||||
Odd Arild Olsen [email protected]
|
||||
Oleg Smolsky [email protected]
|
||||
|
||||
@@ -532,9 +532,9 @@ m4_define([b4_any_token_visible_if],
|
||||
# ----------------------------
|
||||
m4_define([b4_token_format],
|
||||
[b4_token_visible_if([$2],
|
||||
[m4_quote(m4_format([$1],
|
||||
[b4_symbol([$2], [id])],
|
||||
[b4_symbol([$2], b4_api_token_raw_if([[number]], [[user_number]]))]))])])
|
||||
[m4_format([[$1]],
|
||||
m4_quote(b4_symbol([$2], [id])),
|
||||
m4_quote(b4_symbol([$2], b4_api_token_raw_if([[number]], [[user_number]]))))])])
|
||||
|
||||
|
||||
## ------- ##
|
||||
|
||||
@@ -147,18 +147,20 @@ b4_symbol_foreach([b4_token_enum])])])
|
||||
# b4-case(ID, CODE)
|
||||
# -----------------
|
||||
# We need to fool Java's stupid unreachable code detection.
|
||||
m4_define([b4_case], [ case $1:
|
||||
m4_define([b4_case],
|
||||
[ case $1:
|
||||
if (yyn == $1)
|
||||
$2;
|
||||
break;
|
||||
])
|
||||
])
|
||||
|
||||
# b4_predicate_case(LABEL, CONDITIONS)
|
||||
# ------------------------------------
|
||||
m4_define([b4_predicate_case], [ case $1:
|
||||
m4_define([b4_predicate_case],
|
||||
[ case $1:
|
||||
if (! ($2)) YYERROR;
|
||||
break;
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
## -------- ##
|
||||
@@ -361,4 +363,4 @@ m4_define([b4_var_decl],
|
||||
# -----------------------
|
||||
# Expand to either an empty string or "throws THROWS".
|
||||
m4_define([b4_maybe_throws],
|
||||
[m4_ifval($1, [throws $1])])
|
||||
[m4_ifval($1, [ throws $1])])
|
||||
|
||||
@@ -23,6 +23,7 @@ m4_define([b4_value_type_setup_variant])
|
||||
# Check the value of %define parse.lac, where LAC stands for lookahead
|
||||
# correction.
|
||||
b4_percent_define_default([[parse.lac]], [[none]])
|
||||
b4_percent_define_check_values([[[[parse.lac]], [[full]], [[none]]]])
|
||||
b4_define_flag_if([lac])
|
||||
m4_define([b4_lac_flag],
|
||||
[m4_if(b4_percent_define_get([[parse.lac]]),
|
||||
|
||||
+50
-49
@@ -65,8 +65,8 @@ m4_define([b4_define_state],[[
|
||||
int label = YYNEWSTATE;
|
||||
|
||||
/* Error handling. */
|
||||
int yynerrs_ = 0;
|
||||
]b4_locations_if([[/* The location where the error started. */
|
||||
int yynerrs_ = 0;]b4_locations_if([[
|
||||
/* The location where the error started. */
|
||||
]b4_location_type[ yyerrloc = null;
|
||||
|
||||
/* Location. */
|
||||
@@ -182,7 +182,7 @@ b4_locations_if([[
|
||||
|
||||
]b4_token_enums[
|
||||
|
||||
]b4_locations_if([[/**
|
||||
]b4_locations_if([[/**
|
||||
* Method to retrieve the beginning position of the last scanned token.
|
||||
* @@return the position at which the last scanned token starts.
|
||||
*/
|
||||
@@ -206,13 +206,13 @@ b4_locations_if([[
|
||||
* ]b4_locations_if([and beginning/ending positions ])[of the token.
|
||||
* @@return the token identifier corresponding to the next token.
|
||||
*/
|
||||
int yylex () ]b4_maybe_throws([b4_lex_throws])[;
|
||||
int yylex ()]b4_maybe_throws([b4_lex_throws])[;
|
||||
|
||||
/**
|
||||
* Entry point for error reporting. Emits an error
|
||||
* ]b4_locations_if([referring to the given location ])[in a user-defined way.
|
||||
*
|
||||
* ]b4_locations_if([[@@param loc The location of the element to which the
|
||||
*]b4_locations_if([[ @@param loc The location of the element to which the
|
||||
* error message is related]])[
|
||||
* @@param msg The string for the error message.
|
||||
*/
|
||||
@@ -224,22 +224,23 @@ b4_locations_if([[
|
||||
]b4_percent_code_get([[lexer]])[
|
||||
}
|
||||
|
||||
]])[/**
|
||||
]])[
|
||||
/**
|
||||
* The object doing lexical analysis for us.
|
||||
*/
|
||||
private Lexer yylexer;
|
||||
|
||||
]b4_parse_param_vars[
|
||||
]b4_parse_param_vars[
|
||||
|
||||
]b4_lexer_if([[
|
||||
/**
|
||||
* Instantiates the Bison-generated parser.
|
||||
*/
|
||||
public ]b4_parser_class (b4_parse_param_decl([b4_lex_param_decl])[) ]b4_maybe_throws([b4_init_throws])[
|
||||
public ]b4_parser_class (b4_parse_param_decl([b4_lex_param_decl])[)]b4_maybe_throws([b4_init_throws])[
|
||||
{
|
||||
]b4_percent_code_get([[init]])[
|
||||
]b4_percent_code_get([[init]])[
|
||||
this.yylexer = new YYLexer(]b4_lex_param_call[);
|
||||
]b4_parse_param_cons[
|
||||
]b4_parse_param_cons[
|
||||
}
|
||||
]])[
|
||||
|
||||
@@ -247,11 +248,11 @@ b4_locations_if([[
|
||||
* Instantiates the Bison-generated parser.
|
||||
* @@param yylexer The scanner that will supply tokens to the parser.
|
||||
*/
|
||||
]b4_lexer_if([[protected]], [[public]]) b4_parser_class[ (]b4_parse_param_decl([[Lexer yylexer]])[) ]b4_maybe_throws([b4_init_throws])[
|
||||
]b4_lexer_if([[protected]], [[public]]) b4_parser_class[ (]b4_parse_param_decl([[Lexer yylexer]])[)]b4_maybe_throws([b4_init_throws])[
|
||||
{
|
||||
]b4_percent_code_get([[init]])[
|
||||
]b4_percent_code_get([[init]])[
|
||||
this.yylexer = yylexer;
|
||||
]b4_parse_param_cons[
|
||||
]b4_parse_param_cons[
|
||||
}
|
||||
|
||||
]b4_parse_trace_if([[
|
||||
@@ -320,8 +321,8 @@ b4_locations_if([[
|
||||
}]])[
|
||||
|
||||
private final class YYStack {
|
||||
private int[] stateStack = new int[16];
|
||||
]b4_locations_if([[private ]b4_location_type[[] locStack = new ]b4_location_type[[16];]])[
|
||||
private int[] stateStack = new int[16];]b4_locations_if([[
|
||||
private ]b4_location_type[[] locStack = new ]b4_location_type[[16];]])[
|
||||
private ]b4_yystype[[] valueStack = new ]b4_yystype[[16];
|
||||
|
||||
public int size = 16;
|
||||
@@ -334,8 +335,7 @@ b4_locations_if([[
|
||||
{
|
||||
int[] newStateStack = new int[size * 2];
|
||||
System.arraycopy (stateStack, 0, newStateStack, 0, height);
|
||||
stateStack = newStateStack;
|
||||
]b4_locations_if([[
|
||||
stateStack = newStateStack;]b4_locations_if([[
|
||||
]b4_location_type[[] newLocStack = new ]b4_location_type[[size * 2];
|
||||
System.arraycopy (locStack, 0, newLocStack, 0, height);
|
||||
locStack = newLocStack;]])
|
||||
@@ -347,8 +347,8 @@ b4_locations_if([[
|
||||
size *= 2;
|
||||
}
|
||||
|
||||
stateStack[height] = state;
|
||||
]b4_locations_if([[locStack[height] = loc;]])[
|
||||
stateStack[height] = state;]b4_locations_if([[
|
||||
locStack[height] = loc;]])[
|
||||
valueStack[height] = value;
|
||||
}
|
||||
|
||||
@@ -359,8 +359,8 @@ b4_locations_if([[
|
||||
public final void pop (int num) {
|
||||
// Avoid memory leaks... garbage collection is a white lie!
|
||||
if (0 < num) {
|
||||
java.util.Arrays.fill (valueStack, height - num + 1, height + 1, null);
|
||||
]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height + 1, null);]])[
|
||||
java.util.Arrays.fill (valueStack, height - num + 1, height + 1, null);]b4_locations_if([[
|
||||
java.util.Arrays.fill (locStack, height - num + 1, height + 1, null);]])[
|
||||
}
|
||||
height -= num;
|
||||
}
|
||||
@@ -368,8 +368,9 @@ b4_locations_if([[
|
||||
public final int stateAt (int i) {
|
||||
return stateStack[height - i];
|
||||
}
|
||||
]b4_locations_if([[
|
||||
|
||||
]b4_locations_if([[public final ]b4_location_type[ locationAt (int i) {
|
||||
public final ]b4_location_type[ locationAt (int i) {
|
||||
return locStack[height - i];
|
||||
}
|
||||
|
||||
@@ -452,7 +453,7 @@ b4_locations_if([[
|
||||
return yydefgoto_[yysym - yyntokens_];
|
||||
}
|
||||
|
||||
private int yyaction (int yyn, YYStack yystack, int yylen) ]b4_maybe_throws([b4_throws])[
|
||||
private int yyaction (int yyn, YYStack yystack, int yylen)]b4_maybe_throws([b4_throws])[
|
||||
{
|
||||
/* If YYLEN is nonzero, implement the default value of the action:
|
||||
'$$ = $1'. Otherwise, use the top of the stack.
|
||||
@@ -460,8 +461,8 @@ b4_locations_if([[
|
||||
Otherwise, the following line sets YYVAL to garbage.
|
||||
This behavior is undocumented and Bison
|
||||
users should not rely upon it. */
|
||||
]b4_yystype[ yyval = (0 < yylen) ? yystack.valueAt (yylen - 1) : yystack.valueAt (0);
|
||||
]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[]b4_parse_trace_if([[
|
||||
]b4_yystype[ yyval = (0 < yylen) ? yystack.valueAt (yylen - 1) : yystack.valueAt (0);]b4_locations_if([[
|
||||
]b4_location_type[ yyloc = yylloc (yystack, yylen);]])[]b4_parse_trace_if([[
|
||||
|
||||
yyReducePrint (yyn, yystack);]])[
|
||||
|
||||
@@ -541,29 +542,28 @@ b4_locations_if([[
|
||||
* @@return <tt>true</tt> if the parsing succeeds. Note that this does not
|
||||
* imply that there were no syntax errors.
|
||||
*/
|
||||
public boolean parse () ]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[]])[
|
||||
public boolean parse ()]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[]])[
|
||||
]b4_push_if([
|
||||
/**
|
||||
* Push Parse input from external lexer
|
||||
*
|
||||
* @@param yylextoken current token
|
||||
* @@param yylexval current lval
|
||||
]b4_locations_if([ * @@param yylexloc current position])[
|
||||
* @@param yylexval current lval]b4_locations_if([[
|
||||
* @@param yylexloc current position]])[
|
||||
*
|
||||
* @@return <tt>YYACCEPT, YYABORT, YYPUSH_MORE</tt>
|
||||
*/
|
||||
public int push_parse (int yylextoken, b4_yystype yylexval[]b4_locations_if([, b4_location_type yylexloc]))
|
||||
b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])])[
|
||||
{
|
||||
]b4_locations_if([/* @@$. */
|
||||
b4_location_type yyloc;])[
|
||||
public int push_parse (int yylextoken, b4_yystype yylexval[]b4_locations_if([, b4_location_type yylexloc]))b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])])[
|
||||
{]b4_locations_if([[
|
||||
/* @@$. */
|
||||
]b4_location_type[ yyloc;]])[
|
||||
]b4_push_if([],[[
|
||||
]b4_define_state[]b4_parse_trace_if([[
|
||||
yycdebug ("Starting parse\n");]])[
|
||||
yyerrstatus_ = 0;
|
||||
|
||||
/* Initialize the stack. */
|
||||
yystack.push (yystate, yylval ]b4_locations_if([, yylloc])[);
|
||||
yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
|
||||
]m4_ifdef([b4_initial_action], [
|
||||
b4_dollar_pushdef([yylval], [], [], [yylloc])dnl
|
||||
b4_user_initial_action
|
||||
@@ -706,7 +706,8 @@ b4_dollar_popdef[]dnl
|
||||
yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken));
|
||||
}
|
||||
|
||||
]b4_locations_if([yyerrloc = yylloc;])[
|
||||
]b4_locations_if([[
|
||||
yyerrloc = yylloc;]])[
|
||||
if (yyerrstatus_ == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
@@ -730,8 +731,8 @@ b4_dollar_popdef[]dnl
|
||||
/*-------------------------------------------------.
|
||||
| errorlab -- error raised explicitly by YYERROR. |
|
||||
`-------------------------------------------------*/
|
||||
case YYERROR:
|
||||
]b4_locations_if([yyerrloc = yystack.locationAt (yylen - 1);])[
|
||||
case YYERROR:]b4_locations_if([[
|
||||
yyerrloc = yystack.locationAt (yylen - 1);]])[
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYERROR. */
|
||||
yystack.pop (yylen);
|
||||
@@ -765,7 +766,8 @@ b4_dollar_popdef[]dnl
|
||||
if (yystack.height == 0)
|
||||
]b4_push_if([{label = YYABORT; break;}],[return false;])[
|
||||
|
||||
]b4_locations_if([yyerrloc = yystack.locationAt (0);])[
|
||||
]b4_locations_if([[
|
||||
yyerrloc = yystack.locationAt (0);]])[
|
||||
yystack.pop ();
|
||||
yystate = yystack.stateAt (0);]b4_parse_trace_if([[
|
||||
if (0 < yydebug)
|
||||
@@ -776,12 +778,12 @@ b4_dollar_popdef[]dnl
|
||||
/* Leave the switch. */
|
||||
break;
|
||||
|
||||
]b4_locations_if([
|
||||
]b4_locations_if([[
|
||||
/* Muck with the stack to setup for yylloc. */
|
||||
yystack.push (0, null, yylloc);
|
||||
yystack.push (0, null, yyerrloc);
|
||||
yyloc = yylloc (yystack, 2);
|
||||
yystack.pop (2);])[
|
||||
yystack.pop (2);]])[
|
||||
|
||||
/* Shift the error token. */]b4_parse_trace_if([[
|
||||
yySymbolPrint ("Shifting", yystos_[yyn],
|
||||
@@ -823,10 +825,10 @@ b4_dollar_popdef[]dnl
|
||||
this.label = YYNEWSTATE;
|
||||
|
||||
/* Error handling. */
|
||||
this.yynerrs_ = 0;
|
||||
]b4_locations_if([/* The location where the error started. */
|
||||
this.yynerrs_ = 0;]b4_locations_if([[
|
||||
/* The location where the error started. */
|
||||
this.yyerrloc = null;
|
||||
this.yylloc = new b4_location_type (null, null);])[
|
||||
this.yylloc = new ]b4_location_type[ (null, null);]])[
|
||||
|
||||
/* Semantic value of the lookahead. */
|
||||
this.yylval = null;
|
||||
@@ -846,8 +848,7 @@ b4_dollar_popdef[]dnl
|
||||
*
|
||||
* @@return <tt>YYACCEPT, YYABORT, YYPUSH_MORE</tt>
|
||||
*/
|
||||
public int push_parse (int yylextoken, b4_yystype yylexval, b4_position_type yylexpos)
|
||||
b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])
|
||||
public int push_parse (int yylextoken, b4_yystype yylexval, b4_position_type yylexpos)b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])
|
||||
{
|
||||
return push_parse (yylextoken, yylexval, new b4_location_type (yylexpos));
|
||||
}
|
||||
@@ -862,7 +863,7 @@ b4_dollar_popdef[]dnl
|
||||
* @@return <tt>true</tt> if the parsing succeeds. Note that this does not
|
||||
* imply that there were no syntax errors.
|
||||
*/
|
||||
public boolean parse () ]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[
|
||||
public boolean parse ()]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[
|
||||
{
|
||||
if (yylexer == null)
|
||||
throw new NullPointerException("Null Lexer");
|
||||
@@ -872,9 +873,9 @@ b4_dollar_popdef[]dnl
|
||||
]b4_yystype[ lval = yylexer.getLVal();
|
||||
]b4_locations_if([dnl
|
||||
b4_location_type yyloc = new b4_location_type (yylexer.getStartPos (),
|
||||
yylexer.getEndPos ());])[
|
||||
]b4_locations_if([status = push_parse(token,lval,yyloc);],[
|
||||
status = push_parse(token,lval);])[
|
||||
yylexer.getEndPos ());])[]b4_locations_if([[
|
||||
status = push_parse(token,lval,yyloc);]], [[
|
||||
status = push_parse(token,lval);]])[
|
||||
} while (status == YYPUSH_MORE);
|
||||
return (status == YYACCEPT);
|
||||
}
|
||||
|
||||
+368
-186
File diff suppressed because it is too large
Load Diff
+18
-14
@@ -5841,7 +5841,10 @@ states and what is done for each type of lookahead token in that state.
|
||||
|
||||
@deffn {Directive} %yacc
|
||||
Pretend the option @option{--yacc} was given, i.e., imitate Yacc, including
|
||||
its naming conventions. @xref{Tuning the Parser}, for more.
|
||||
its naming conventions. Only makes sense with the @file{yacc.c}
|
||||
skeleton. @xref{Tuning the Parser}, for more.
|
||||
|
||||
Of course @code{%yacc} is a Bison extension@dots{}
|
||||
@end deffn
|
||||
|
||||
|
||||
@@ -9972,7 +9975,7 @@ When a Bison grammar compiles properly but parses ``incorrectly'', the
|
||||
@node Enabling Traces
|
||||
@subsection Enabling Traces
|
||||
There are several means to enable compilation of trace facilities, in
|
||||
decresing order of preference:
|
||||
decreasing order of preference:
|
||||
|
||||
@table @asis
|
||||
@item the variable @samp{parse.trace}
|
||||
@@ -10228,7 +10231,7 @@ Cleanup: popping nterm input ()
|
||||
@subsection The @code{YYPRINT} Macro
|
||||
@findex YYPRINT
|
||||
|
||||
The @code{%printer} directive was introduced in Bison 1.50 (Novembre 2002).
|
||||
The @code{%printer} directive was introduced in Bison 1.50 (November 2002).
|
||||
Before then, @code{YYPRINT} provided a similar feature, but only for
|
||||
terminal symbols and only with the @file{yacc.c} skeleton.
|
||||
|
||||
@@ -10857,11 +10860,10 @@ different diagnostics to be generated (it implies @option{-Wyacc}), and may
|
||||
change behavior in other minor ways. Most importantly, imitate Yacc's
|
||||
output file name conventions, so that the parser implementation file is
|
||||
called @file{y.tab.c}, and the other outputs are called @file{y.output} and
|
||||
@file{y.tab.h}. Also, if generating a deterministic parser in C, generate
|
||||
@code{#define} statements in addition to an @code{enum} to associate token
|
||||
numbers with token names. Thus, the following shell script can substitute
|
||||
for Yacc, and the Bison distribution contains such a script for
|
||||
compatibility with POSIX:
|
||||
@file{y.tab.h}. Also, generate @code{#define} statements in addition to an
|
||||
@code{enum} to associate token numbers with token names. Thus, the
|
||||
following shell script can substitute for Yacc, and the Bison distribution
|
||||
contains such a script for compatibility with POSIX:
|
||||
|
||||
@example
|
||||
#! /bin/sh
|
||||
@@ -10869,9 +10871,9 @@ bison -y "$@@"
|
||||
@end example
|
||||
|
||||
The @option{-y}/@option{--yacc} option is intended for use with traditional
|
||||
Yacc grammars. If your grammar uses Bison extensions like
|
||||
@samp{%glr-parser}, Bison might not be Yacc-compatible even if this option
|
||||
is specified.
|
||||
Yacc grammars. This option only makes sense for the default C skeleton,
|
||||
@file{yacc.c}. If your grammar uses Bison extensions Bison cannot be
|
||||
Yacc-compatible, even if this option is specified.
|
||||
@end table
|
||||
|
||||
@node Output Files
|
||||
@@ -14604,7 +14606,7 @@ London, Department of Computer Science, TR-00-12 (December 2000).
|
||||
@c LocalWords: strncmp intval tindex lvalp locp llocp typealt YYBACKUP subrange
|
||||
@c LocalWords: YYEMPTY YYEOF YYRECOVERING yyclearin GE def UMINUS maybeword loc
|
||||
@c LocalWords: Johnstone Shamsa Sadaf Hussain Tomita TR uref YYMAXDEPTH inline
|
||||
@c LocalWords: YYINITDEPTH stmts ref initdcl maybeasm notype Lookahead
|
||||
@c LocalWords: YYINITDEPTH stmts ref initdcl maybeasm notype Lookahead ctx
|
||||
@c LocalWords: hexflag STR exdent itemset asis DYYDEBUG YYFPRINTF args Autoconf
|
||||
@c LocalWords: ypp yxx itemx tex leaderfill Troubleshouting sqrt Graphviz
|
||||
@c LocalWords: hbox hss hfill tt ly yyin fopen fclose ofirst gcc ll lookahead
|
||||
@@ -14648,10 +14650,12 @@ London, Department of Computer Science, TR-00-12 (December 2000).
|
||||
@c LocalWords: Relocatability exprs fixit Wyacc parseable fixits ffixit svg
|
||||
@c LocalWords: DNDEBUG cstring Wzero workalike POPL workalikes byacc UCB
|
||||
@c LocalWords: Penello's Penello Byson Byson's Corbett's CSD TOPLAS PDP
|
||||
@c LocalWords: Beazley's goyacc ocamlyacc SIGACT SIGPLAN colorWarning
|
||||
@c LocalWords: Beazley's goyacc ocamlyacc SIGACT SIGPLAN colorWarning exVal
|
||||
@c LocalWords: setcolor rgbError colorError rgbNotice colorNotice derror
|
||||
@c LocalWords: colorOff maincolor inlineraw darkviolet darkcyan dwarning
|
||||
@c LocalWords: dnotice copyable stdint ptrdiff bufsize
|
||||
@c LocalWords: dnotice copyable stdint ptrdiff bufsize yyreport invariants
|
||||
@c LocalWords: xrefautomaticsectiontitle yysyntax yysymbol ARGMAX cond
|
||||
@c LocalWords: Wdangling
|
||||
|
||||
@c Local Variables:
|
||||
@c ispell-dictionary: "american"
|
||||
|
||||
+14
-14
@@ -31,18 +31,18 @@ exit=true
|
||||
cwd=$(pwd)
|
||||
|
||||
# The exercised program.
|
||||
for p in "$cwd/examples/$medir/$me"
|
||||
do
|
||||
if test -x "$p"; then
|
||||
prog=$p
|
||||
break
|
||||
elif test -f "$p.class"; then
|
||||
pwd
|
||||
prog="$SHELL $cwd/javaexec.sh -cp $(dirname $p) $(basename $p)"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x"$prog" = x; then
|
||||
abs_medir=$cwd/examples/$medir
|
||||
if test -x "$abs_medir/$me"; then
|
||||
prog ()
|
||||
{
|
||||
"$abs_medir/$me" "$@"
|
||||
}
|
||||
elif test -f "$abs_medir/$me.class"; then
|
||||
prog ()
|
||||
{
|
||||
"$SHELL" "$cwd/javaexec.sh" -cp "$abs_medir" "$me" "$@"
|
||||
}
|
||||
else
|
||||
echo "$me: ERROR: cannot find program to exercise in:"
|
||||
echo "$me: ERROR: $cwd/examples/$medir/$me"
|
||||
exit 1
|
||||
@@ -55,7 +55,7 @@ cleanup ()
|
||||
{
|
||||
status=$?
|
||||
if test -z "$DEBUG"; then
|
||||
cd $cwd
|
||||
cd "$cwd"
|
||||
rm -rf $$.dir
|
||||
fi
|
||||
exit $status
|
||||
@@ -82,7 +82,7 @@ run ()
|
||||
shift
|
||||
# Effective exit status.
|
||||
sta_eff=0
|
||||
$prog "$@" - <input >out_eff 2>err_eff || sta_eff=$?
|
||||
prog "$@" - <input >out_eff 2>err_eff || sta_eff=$?
|
||||
# Combine effective output and error streams.
|
||||
out_eff=$(cat out_eff && $noerr || sed -e 's/^/err: /g' err_eff)
|
||||
if test $sta_eff -eq $sta_exp; then
|
||||
|
||||
+1
-1
Submodule gnulib updated: f5eb8cea72...4fcedca004
@@ -138,6 +138,8 @@
|
||||
/isnanl-nolibm.h
|
||||
/isnanl.c
|
||||
/iswblank.c
|
||||
/iswdigit.c
|
||||
/iswxdigit.c
|
||||
/itold.c
|
||||
/lc-charset-dispatch.c
|
||||
/lc-charset-dispatch.h
|
||||
@@ -147,6 +149,7 @@
|
||||
/limits.in.h
|
||||
/localcharset.c
|
||||
/localcharset.h
|
||||
/locale.h
|
||||
/locale.in.h
|
||||
/localtime-buffer.c
|
||||
/localtime-buffer.h
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
/isnanf.m4
|
||||
/isnanl.m4
|
||||
/iswblank.m4
|
||||
/iswdigit.m4
|
||||
/iswxdigit.m4
|
||||
/javacomp.m4
|
||||
/javaexec.m4
|
||||
/jm-winsz1.m4
|
||||
@@ -210,3 +212,4 @@
|
||||
/xalloc.m4
|
||||
/xsize.m4
|
||||
/xstrndup.m4
|
||||
/zzgnulib.m4
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 3.5.22-948cd-dirty. */
|
||||
/* A Bison parser, made by GNU Bison 3.5.2. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "3.5.22-948cd-dirty"
|
||||
#define YYBISON_VERSION "3.5.2"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 3.5.22-948cd-dirty. */
|
||||
/* A Bison parser, made by GNU Bison 3.5.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
|
||||
+21
-2
@@ -2367,6 +2367,25 @@ AT_DATA([[input.y]],
|
||||
start: %empty;
|
||||
]])
|
||||
|
||||
# Only "full" and "none" are accepted for parse.lac
|
||||
# Unknown values (such as "unsupported") are rejected
|
||||
AT_BISON_CHECK([[-Dparse.lac=none input.y]])
|
||||
AT_BISON_CHECK([[-Dparse.lac=none -L c++ input.y]])
|
||||
AT_BISON_CHECK([[-Dparse.lac=full input.y]])
|
||||
AT_BISON_CHECK([[-Dparse.lac=full -L c++ input.y]])
|
||||
AT_BISON_CHECK([[-Dparse.lac=unsupported input.y]],
|
||||
[[1]], [],
|
||||
[[<command line>:3: error: invalid value for %define variable 'parse.lac': 'unsupported'
|
||||
<command line>:3: accepted value: 'full'
|
||||
<command line>:3: accepted value: 'none'
|
||||
]])
|
||||
AT_BISON_CHECK([[-Dparse.lac=unsupported -L c++ input.y]],
|
||||
[[1]], [],
|
||||
[[<command line>:3: error: invalid value for %define variable 'parse.lac': 'unsupported'
|
||||
<command line>:3: accepted value: 'full'
|
||||
<command line>:3: accepted value: 'none'
|
||||
]])
|
||||
|
||||
# parse.lac.* options are useless if LAC isn't actually activated.
|
||||
AT_BISON_CHECK([[-Dparse.lac.es-capacity-initial=1 input.y]],
|
||||
[[1]], [],
|
||||
@@ -2378,11 +2397,11 @@ AT_BISON_CHECK([[-Dparse.lac.memory-trace=full input.y]],
|
||||
]])
|
||||
|
||||
# parse.lac.* options are useless in C++ even if LAC isn't actually activated.
|
||||
AT_BISON_CHECK([[-Dparse.lac.es-capacity-initial=1 -L C++ -Dparse.lac input.y]],
|
||||
AT_BISON_CHECK([[-Dparse.lac.es-capacity-initial=1 -L C++ -Dparse.lac=full input.y]],
|
||||
[[1]], [],
|
||||
[[<command line>:3: error: %define variable 'parse.lac.es-capacity-initial' is not used
|
||||
]])
|
||||
AT_BISON_CHECK([[-Dparse.lac.memory-trace=full -L C++ -Dparse.lac input.y]],
|
||||
AT_BISON_CHECK([[-Dparse.lac.memory-trace=full -L C++ -Dparse.lac=full input.y]],
|
||||
[[1]], [],
|
||||
[[<command line>:3: error: %define variable 'parse.lac.memory-trace' is not used
|
||||
]])
|
||||
|
||||
Reference in New Issue
Block a user