diff options
-rw-r--r-- | THANKS | 3 | ||||
-rw-r--r-- | src/scan-code.l | 2 | ||||
-rw-r--r-- | tests/input.at | 5 |
3 files changed, 7 insertions, 3 deletions
@@ -4,8 +4,9 @@ it is today without the invaluable help of these people: Aaro Koskinen aaro.koskinen@iki.fi Аскар Сафин safinaskar@mail.ru Adam Sampson ats@offog.org +Ahcheong Lee dkcjd2000@gmail.com Airy Andre Airy.Andre@edf.fr -Akim Demaille akim@lrde.epita.fr +Akim Demaille akim@gnu.org Albert Chin-A-Young china@thewrittenword.com Alexander Belopolsky alexb@rentec.com Alexandre Duret-Lutz adl@lrde.epita.fr diff --git a/src/scan-code.l b/src/scan-code.l index 658c25b1..ef667146 100644 --- a/src/scan-code.l +++ b/src/scan-code.l @@ -81,7 +81,7 @@ static bool untyped_var_seen; historically almost any character is allowed in a tag. We disallow NUL and newline, as this simplifies our implementation. We allow "->" as a means to dereference a pointer. */ -tag ([^\0\n>]|->)+ +tag ([^\0\n>]|->)*[^-] /* Zero or more instances of backslash-newline. Following GCC, allow white space between the backslash and the newline. */ diff --git a/tests/input.at b/tests/input.at index c03b282f..b004ea9e 100644 --- a/tests/input.at +++ b/tests/input.at @@ -2548,7 +2548,9 @@ AT_DATA_GRAMMAR([[input.y]], %printer { $%; @%; } <*> exp TOK; %{ $ @ %} // Should not warn. %% -exp: TOK { $%; @%; $$ = $1; }; +exp: TOK { $%; @%; $$ = $1; } + | 'a' { $<->1; $$ = 1; } + | 'b' { $<foo->bar>$; } %% $ @ // Should not warn. ]]) @@ -2562,6 +2564,7 @@ input.y:13.19: warning: stray '$' [-Wother] input.y:13.23: warning: stray '@' [-Wother] input.y:16.19: warning: stray '$' [-Wother] input.y:16.23: warning: stray '@' [-Wother] +input.y:17.19: warning: stray '$' [-Wother] ]]) AT_BISON_OPTION_POPDEFS |