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

Re: gnubol: reference characterizers



>>>>> "Bob" == RKRayhawk  <RKRayhawk@aol.com>
>>>>> wrote the following on Tue, 2 Nov 1999 11:29:21 EST

      ...

  Bob> I would like to again encourage a technique that intercepts
  Bob> the tokens between the lexer and the parser for the purpose of
  Bob> characterizing _references_ before they reach the grammar
  Bob> rules.

This seems like a good idea.  Where has it been used?  It would
require that the partially built symbol table be able to support
properly scoped lookups, but that doesn't seem like a problem.

I will probably still come down on the side of using the semantic
predicates in pccts for the same purpose (among others) because they
offer more generality.  If that option were not available, though,
I'd be very interested in what you suggest.

       ...

  Bob> Elsewhere, I have recommended that we become really precise on
  Bob> data references; distinguished qualifiable from
  Bob> non-qualifiable, reference-modifiable from
  Bob> non-reference-modifiable, and subscriptable from
  Bob> non-subscriptable.  If we can manifest these distinctions down
  Bob> in the production rules for references rather than up in the
  Bob> rules for statements and conditional expressions, we will not
  Bob> only make the grammar easier to understand, but we will
  Bob> probably be able to make the compiler more robust.

I'm in complete agreement.  Whatever we can get the parser to do can
usually be done with far less effort there than would be required
elsewhere in the compiler, and with more clarity as well.

  Bob> We should be able to capture most data_reference_syntax_errors
  Bob> with artful error productions without sending the parser into
  Bob> an error recovery mode.

  Bob> Best Wishes, Bob Rayhawk RKRayhawk@aol.com


  Bob> -- This message was sent through the gnu-cobol mailing list.
  Bob> To remove yourself from this mailing list, send a message to
  Bob> majordomo@lusars.net with the words "unsubscribe gnu-cobol" in
  Bob> the message body.  For more information on the GNU COBOL
  Bob> project, send mail to gnu-cobol-owner@lusars.net.




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