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

Re: gnubol: subsets



>>>>> "Tim" == Tim E Josling <TIMJOSLING@prodigy.net>
>>>>> wrote the following on Wed, 17 Nov 1999 11:07:22 +1000

  Tim> Someone else is working on the PCCTS grammar. Could they
  Tim> resend their patches to me because I lost them on the trip
  Tim> over to the USA. I printed some of it out.  Here is one
  Tim> question - "if x next sentence end-if" is not allowed but the
  Tim> grammar allows this - how was this to be dealt with.

The patch file is on the way, Tim.  I didn't even notice that grammar
problem; I just tried to get the original grammar to go through an
LL/1 parser.  This is obviously one of the many case in which the
committee wanted to provide an improved control structure but were
reluctant to remove the crudity that it replaced.  Detecting it
syntactically does not seem feasible.  If we were to use lookahead or
backtracking to that extent, I would have to agree that Bob Rayhawk's
alarm is well founded.  Treating it in semantics is not much
better. It would mean putting the otherwise useless END-x delimiters
into the intermediate, and would still be difficult to diagnose while
you're in the right neighborhood.  Right now, I think the best thing
to do is accept it.  Correct programs will compile correctly and a
few incorrect programs will compile as the writer probably intended.


  Tim> If someone else can come up with a viable complete parser
  Tim> first, good.

Same here, Tim.  I won't hesitate to plagiarize and I invite you to
do the same.

  Tim> I am personally happy that my prepeocessor does the
  Tim> copy/replace/comment-entry things OK.

Me too.



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