ValhallaTeam / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Compiler syntax error reporting always uses an empty token #442

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Commit b40ad5a41825 (Refactor location tracking) breaks syntax error reporting. 
See yyerror() in glslang.y, which always passes an empty string as the token to 
TParseContext::error().

What steps will reproduce the problem?
1. Use a shader with a syntax error, like this:
$ cat broken.frag
#version 100

not_an_identifier;

2. Translate it, with the essl_to_glsl example

$ essl_to_glsl -o broken.frag

What is the expected output? What do you see instead?
Expected output (before commit b40ad5a41825):
ERROR: 0:3: 'not_an_identifier' : syntax error

But the output is now:
ERROR: 0:3: '' : syntax error

What version of the product are you using? On what operating system?
1.2.0.2423 on Ubuntu 12.04.

Original issue reported on code.google.com by matias.j...@gmail.com on 27 Jun 2013 at 12:24

GoogleCodeExporter commented 9 years ago
Alok, could you please take this? If there are regressions in error reporting 
we should fix them.

Original comment by kbr@chromium.org on 27 Jun 2013 at 1:10

GoogleCodeExporter commented 9 years ago

Original comment by alokp@chromium.org on 13 Aug 2013 at 5:50

GoogleCodeExporter commented 9 years ago
Fixed in r686eb7d.
https://codereview.appspot.com/12876043/

Original comment by alokp@chromium.org on 13 Aug 2013 at 6:13