|
From: | Carl Cerecke |
Subject: | Re: Help this newbie parse some strings... |
Date: | Wed, 12 Feb 2003 16:22:24 +1300 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 |
Michael Morrison wrote:
I get a parse error and I'm having a hard time figuring out why. I'm sure some kind soul will point it out - at which time I can slap my forehead....
Headslapper: Your grammar can only recognise one statement (with two possibilities). You were feeding your parser two statements in a row. A : a | b ; means A can derive a or A can derive b. If you want to be able to parse a sequence of statements try something like: statements : statements statement | statement ; as your first rule. It sounds like you need to do a bit more reading though... Cheers, Carl.
[Prev in Thread] | Current Thread | [Next in Thread] |