[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: Re: which parser tool



Parser generators are labor saving devices. That's all.

You are right, cobol is not very nicely hierarchical, unlike othe languages.
Where it is hierarchical the parser tools are not very helpful.

eg data structures 01, 02, 03 (or if you still use punched cards 01 03 05).

eg nested statements like
add on overflow
   add
   ...
end-add (???).

At present I am working through the procedure division with bison. Looking for
all the non-lalr(1) things.

So far:

0. Nothing before the procedure division. False sense of security builds..

1. section names require 2 token lookahead. Easy fix via prescan.
    a section.
    a section.
    a.
2. Our old friend reference modification. Easy fix based on the preprocessor.
3. Nested statements. Still working on how to kludge out of that.

So far I only got to add. See the other posting for more.

Error handling. We disagree on what is good enough, or maybe what is worth
coding. We need some way to recover without killing the whole sentence. Not sure
how. Some kind of prescan that delimits off the end of condition, end of
statement etc I suspect. Good ideas welcome.

What's the URL for the Uni of Amsterdam code?

Tim Josling




--
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.