Yes, I have.

My problem is the fact I cannot use the start token on the right hand of the rule. Take for example:

IN ::= line ENDLINE.
line(x) ::= command. { printf("%u", x); }
command(x) ::= INT(y) PLUS INT(z).

How can I get this to accept things such as:
5 + 5 + 5
5 + 6
?

Since at this, it will only accept number + number in a single statement, and only that single statement, and I think this is due to lemon's inability to do such as:

IN ::= IN line ENDLINE.

inlike bison.

Any help?  I've tried breaking it down into another nonterminal as:
IN ::= line.
line ::= line ENDLINE.

and all sorts around that, but still can't get it.

a simple example could really help.

thanks,
john

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/




Reply via email to