My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 4: bug in precedence support
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by lahike...@gmail.com, Jun 2, 2009
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.
Jun 4, 2009
#1 lahike...@gmail.com
(No comment was entered for this change.)
lemon-bug.tar.gz
851 bytes   Download
Oct 10, 2010
#2 no.smile...@gmail.com
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'.

Powered by Google Project Hosting