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

Re: gnubol: distinguishing data refs and conditional refs



At 08:48 AM 11/3/99 , RKRayhawk@aol.com wrote:

>You have used the word 'context' in your reply. We can each mean several
>different things by that word. The tools used and discussed in this project
>are generally 'context free' processing mechanisms, (comments here are
>basically oriented to that sense of the word, although near the end I drop
>back to a use that is less technical).

That's unfortunate, because that is a cumbersome way to parse 
Cobol.  That's the way to parse Algol, C, Pascal, Ada, and most others.  It 
works for Fortran, though not as well.  It's useless for old assemblers, 
RPG, and other second generation languages.

For Cobol it can be made to work, but it's not really a good idea.  The 
Cobol standard is very thick, but it's not it's not because the language is 
deep, it's because the language is wide.  There are dozens of miscellaneous 
verbs, and you tell them apart because there is always a verb.  I gave the 
example of unbalanced parenthesis to make a point.  In Cobol a verb ends 
anything but a sentence.  If the expression analyzer digests verbs, 
periods, procedure headers, etc, you're going about this the wrong way, and 
the users will curse misplaced error messages.

As I described before, I believe we should detect period delimited 
sentences, then identify division, section, and paragraph headers.  Then 
these lex tools can be used to parse data descriptions and 
procedures.  Note this means separate grammars for the different 
divisions.  Possibly there could be many different grammars based on the verb.

At 10:36 AM 11/3/99 , RKRayhawk@aol.com wrote:
>Paren counting must competently ignore comments ( also REMARKS paragraphs if
>backward compatibility is provided), and competently handle literals.

By REMARKS I assume you mean all the obsolete documentary paragraphs in the 
identification division.  These are a bugaboo.  It is generally agreed that 
mismatched parenthesis are allowed, yet quoted strings must be terminated 
or continued on the next line.  These interpretations are far from 
universal.  J4 solved this problem by telling everyone to use * in the 
indicator column for comments.

>And
>while we are musing about it all, the parametric information on line one or
>the first few lines can present parentheses as well.

If you're saying what I think you're saying you're wrong.  There are no 
parentheses in the USING phrase.
--
RB |\  Randall Bart
aa |/  Barticus@usa.net 818-985-3259 Barticus@att.net
nr |\  8321 Burnet Av #1, North Hills, CA 91343
dt ||\
a   |/ Y2K website:    http://users.aol.com/PanicYr00
l   |\
l   |/ DOT-HS-808-065     I Love You    MS^7=6/28/107


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