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

Re: PERFORM token (was RE: gnubol: Hacks needed to parse COBOL



In a message dated 12/3/99 8:19:26 AM EST, mck@tivoli.mv.com writes:

....
<< 
 varying_phrase
    : VARYING identifier 
      FROM (identifier | INTEGER)
      BY (identifier | INTEGER) 
      UNTIL condition
    ;
  >>
...
This is a side note not responsive to the main point of your post, the 
VARYING UNTIL clause can be optionally three levels deep

    : VARYING id  FROM  id BY id UNTIL condition
          AFTER id  FROM  id BY id UNTIL condition
          AFTER id  FROM  id BY id UNTIL condition
        
I expect you know that, but just to be as supportive as possible, I've noted 
it..

It is interesting that the FROM token can occur also in arithmetic statements 
and so we may need precedence markers on VARYING FROM clauses and SUBTRACT 
statements just to get them fitted out correctly precedence wise. That 
comment applies to bison. But the precedence issue and shift/reduce behavior 
is just as relevant to PCCTS, is it not? How do you establish token 
precedence, and how to override in these kind of statements.

And just to make sure that we don't run out of monkey wrenches to monkey 
around with, notice that AFTER can occur in WRITE and INSPECT statements, 
where our shift/reduce concerns will surely be distinct from those in the 
varying VARYING clause. And come to think about it AFTER can also appear in a 
completely different role in the PERFORM's TEST clauses. It thus weaves in 
and out of the PERFORM statement's shift / reduce domain. A very cool token 
if there ever was one. %prec can help here in bison, how are such precedence 
governed shift/reduce concerns addressed in PCCTS.

Best Wishes
Bob Rayhawk
RKRayhawk@aol.com

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