mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
Fix user actions without a trailing semicolon.
Reported by Sergei Steshenko at <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>. * THANKS (Sergei Steshenko): Add. * src/scan-code.l (SC_RULE_ACTION): Fix it. * tests/regression.at (Fix user actions without a trailing semicolon): New test case.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Bison Action Scanner -*- C -*-
|
||||
|
||||
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -170,7 +170,7 @@ splice (\\[ \f\t\v]*\n)*
|
||||
|
||||
"{" STRING_GROW; ++braces_level;
|
||||
"}" {
|
||||
bool outer_brace = --braces_level < 0;
|
||||
bool outer_brace = --braces_level == 0;
|
||||
|
||||
/* As an undocumented Bison extension, append `;' before the last
|
||||
brace in braced code, so that the user code can omit trailing
|
||||
|
||||
Reference in New Issue
Block a user