[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU-COBOL] COBOL Grammars and Parsers
Michael McKernan wrote :>
>
>Greetings,
Hey,
>referring to the rejection of pccts as "inadequate for the needs of
>the project". As I have been, here-to-fore at least, a
>non-contributor, I certainly have no right to demand an explanation,
>but I do find the decision surprising and I wonder if anyone would
>like to enlighten me about the shortcomings of pccts.
sure. The basic problem is one of scale. PCCTS simply could NOT
generate a parser for the complete COBOL grammar.
The main problem was it failed on out of memory errors running
on 2 separate machines.
machine 1: 4 processor 512MB ram, 4 GB swap
machine 2: 4 processor 4 GB ram, 16 GB swap
I can't remember the lookahead we used, it wasn't that large either.
At that point I felt i could do one of two things.
1) Fix pccts. 2) use something else.
I didn't feel like doing number 1, so we went with 2.
I say I , because, at the time, I was the one who would have had to
fix PCCTS ( right laura =) but if someone wants to try PCCTS again
the grammar is available in the alpha code.
>I have also been an implementor on three or six (depending on how one
>counts retargetting) commercial COBOL compilers, all of which used
>home-grown table driven recursive descent parsers. My experience
We have discussed at length the idea of writing a parser by hand, but
don't like the idea.
I am very curious of one thing. I would like some in-depth hard technical info
about how others have built COBOL compilers. If you have info, please,
send it my way and not to the list.
>with the preprocessor convinced me that pccts would be a good choice
>should I ever have the occasion to parse COBOL again. This is partly
>because of the possibility of infinite lookahead, but primarily
In my experience the infinite lookahead, fails in practice. There are
other true infinite (ie context dependent) parser generators which do
a better job.
I have nothing against PCCTS per se, just don't think its the right
tool for the job. but you are welcome to prove me wrong.
>I hope this hasn't been too irksome for a first post, but I wanted to
no its not that bad. =)
--
Chad Slaughter -- slaught at advancenet.net
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@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.