[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnubol: problem 2.
Yes you are right. The problem is bison can only look one token
ahead, so it can't see the colon; therefore it needs some help.
There is usually not a true ambiguity in the language.
Note that "something else" can be of any length. Such as a of b
of c of d of e of f. Now there *should* nly be a maximum of 50
levels, but there is nothing to stop the programmer putting 1000
qualifications. It will be invalid but you still have to cope
with the input file.
Tim Josling
lWilliam M. Klein wrote:
>
> Isn't the problem that when you see
>
> Something ( somethingelse
>
> that you don't know at this stage if it will then go on to:
>
> Something ( somethingelse :
> or
> Something (Somethingelse stillsomethingmore
> or
> Something (Somethingelse )
>
> Each of these does VERY different "things". Once you DO get that next
> token, then you (should?) be able to resolve things, but it does require
> "reading fairly far" until you can really figure out what is going on with
> that first "something".
>
> Bill Klein
> wmklein <at> ix.netcom.com
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.