| Issue 4: | bug in precedence support |
‹ Prev
4 of 4
|
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. untar the attached .tar.gz 2. run ./compile-and-run What is the expected output? What do you see instead? 'compile-and-run' should just print "4" and exit. What version of the product are you using? On what operating system? Lemon version 1.0. Debian testing. Please provide any additional information below. The crux of the problem is that the precedence overrides are ignored, e.g. in value(v) ::= VALUE(a) COLON VALUE(b) QUESTION VALUE(c). [TERNARY] the [TERNARY] annotation does nothing, and the rule has the precedence of COLON.
Oct 10, 2010
If anyone cares, the bug is in these lines (find_shift_action function):
if (stateno > YY_SHIFT_MAX ||
(i = yy_shift_ofst [stateno]) == YY_SHIFT_USE_DFLT) {
return yy_default [stateno];
}
It should be 'stateno > YY_SHIFT_COUNT' instead of a 'stateno > YY_SHIFT_MAX'.
|
851 bytes Download