mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-07-23 11:20:32 +00:00
* src/scan-gram.l: Be robust to BRACED_CODE appearing before any
rule. Reported by Mickael Labau. * tests/input.at (Torturing the Scanner): Test it.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2006-04-03 Akim Demaille <[email protected]>
|
||||||
|
|
||||||
|
* src/scan-gram.l: Be robust to BRACED_CODE appearing before any
|
||||||
|
rule.
|
||||||
|
Reported by Mickael Labau.
|
||||||
|
* tests/input.at (Torturing the Scanner): Test it.
|
||||||
|
|
||||||
2006-03-16 Paul Eggert <[email protected]>
|
2006-03-16 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
* doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
|
* doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ Martin Mokrejs [email protected]
|
|||||||
Matt Kraai [email protected]
|
Matt Kraai [email protected]
|
||||||
Matt Rosing [email protected]
|
Matt Rosing [email protected]
|
||||||
Michael Hayes [email protected]
|
Michael Hayes [email protected]
|
||||||
|
Mickael Labau [email protected]
|
||||||
Mike Castle [email protected]
|
Mike Castle [email protected]
|
||||||
Neil Booth [email protected]
|
Neil Booth [email protected]
|
||||||
Nelson H. F. Beebe [email protected]
|
Nelson H. F. Beebe [email protected]
|
||||||
|
|||||||
+1
-1
@@ -292,7 +292,7 @@ splice (\\[ \f\t\v]*\n)*
|
|||||||
|
|
||||||
/* Code in between braces. */
|
/* Code in between braces. */
|
||||||
"{" {
|
"{" {
|
||||||
if (current_rule->action)
|
if (current_rule && current_rule->action)
|
||||||
grammar_midrule_action ();
|
grammar_midrule_action ();
|
||||||
STRING_GROW;
|
STRING_GROW;
|
||||||
token_type = BRACED_CODE;
|
token_type = BRACED_CODE;
|
||||||
|
|||||||
@@ -204,6 +204,14 @@ AT_CHECK([bison input.y], [1], [],
|
|||||||
]])
|
]])
|
||||||
|
|
||||||
|
|
||||||
|
AT_DATA([input.y],
|
||||||
|
[{}
|
||||||
|
])
|
||||||
|
AT_CHECK([bison input.y], [1], [],
|
||||||
|
[[input.y:1.1-2: syntax error, unexpected {...}
|
||||||
|
]])
|
||||||
|
|
||||||
|
|
||||||
AT_DATA_GRAMMAR([input.y],
|
AT_DATA_GRAMMAR([input.y],
|
||||||
[[%{
|
[[%{
|
||||||
/* This is seen in GCC: a %{ and %} in middle of a comment. */
|
/* This is seen in GCC: a %{ and %} in middle of a comment. */
|
||||||
|
|||||||
Reference in New Issue
Block a user