[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU-COBOL] Lines of code
>Chad Slaughter <slaught@umr.edu> wrote:
>>Tim Josling <tej@melbpc.org.au> wrote:
>>Have you come to a conclusion about what capabilities the parser
>>needs to parse COBOL? From my example of identifier, any LR(k)
>>parser will not do, it would seem you need a back-tracking parser
>
>??? LR(k) will handle the Cobol grammar. There are no conclusions of
>yet about the parser. They will be forth coming when laura finishes
>here research.
>
>>(ie slow). I have no knowledge of what's out there beyond LALR(1)
>>parsers. I have found a couple of bugs in bison, so I would be
>>very cautious of picking something even more off the beaten
>>track,
There is a free alternative to Bison, called BtYacc (Berkeley BackTracking
Yacc) available at (1). It is currently used in a commercial product to
parse COBOL.
According to the info found on the web page, Yacc(Bison) was not adequate
to handle a COBOL parser. The two main problems being, buffer overflow due
to the size of the grammar(max. size being 32K, short int), and certain
grammar complexities.
BtYacc can handle huge grammars (such as COBOL), and was originally
designed to handle the C++ grammar (thus should handle more than LALR(1)
grammars).
IMHO BtYacc is probably the best candidate for the GNU COBOL parser. Laura
has been made aware of BtYacc and is taking it under consideration. However
if there are others willing to evaluate BtYacc and comment on suitability,
your input will be appreciated.
Cheers,
David
1) BtYacc (Berkley BackTracking Yacc)
http://www.siber.com/btyacc/
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to gnu-cobol@acm.cs.umr.edu with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@acm.cs.umr.edu.