glcpp: Remove empty mid-rule action which changes test behavior.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 5 Mar 2016 02:52:47 +0000 (18:52 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 8 Mar 2016 07:02:05 +0000 (23:02 -0800)
Apparently this causes a slight difference in the parser's token
expectations, leading to a different error message.

It seems harmless, but I wanted to be cautious and separate it out.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/glcpp/glcpp-parse.y
src/compiler/glsl/glcpp/tests/129-define-non-identifier.c.expected

index 1f416a16305267779b192234a18cc2b6bd1d732e..e677811d6a77e9138bfaca53da25fb12be12f212 100644 (file)
@@ -279,7 +279,7 @@ control_line:
 ;
 
 control_line_success:
-       HASH_TOKEN DEFINE_TOKEN { } define
+       HASH_TOKEN DEFINE_TOKEN define
 |      HASH_TOKEN UNDEF IDENTIFIER NEWLINE {
                macro_t *macro;
                if (strcmp("__LINE__", $3) == 0
index fd0b41347fa48d62fa054161915312a16528eed6..5206a5c553cfc7e8dcf0fe4dd6590dbccc1dcebc 100644 (file)
@@ -1,2 +1,2 @@
 0:1(9): preprocessor error: #define followed by a non-identifier: 123
-0:1(9): preprocessor error: syntax error, unexpected INTEGER_STRING, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER
+0:1(9): preprocessor error: syntax error, unexpected INTEGER_STRING, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER or NEWLINE