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

Re: gnubol: How do we parse this language, anyway?



>>>>> "Tim" == Tim Josling <TIMJOSLING@prodigy.net>
>>>>> wrote the following on Wed, 01 Dec 1999 06:15:19 +1000

  Tim> Randall, You and Michael are dead right and I was quite
  Tim> wrong. I will have to carefully reread the standard.

  Tim> I downloaded Fujitsu cobol V3 and tried a few scenarios.

  Tim> In summary, it allows no latitude. It binds size error or not
  Tim> size error to nearest feasible verb. A nested verb loses
  Tim> feasibility when it has been terminated by end-verb; by
  Tim> another verb; by a period.

As I pointed out in a recent post, we can't really talk about right
and wrong when we're talking about what an incorrect program ought to
do.  I advocated what I thought was the better thing to do, and what
I suspect other implementations have done, but once we decided to
generate the program despite the error, we entered a territory
without laws.

I asked a friend to run my test on Wang's COBOL ReSource compiler
which runs on pa risc/HPUX and rs6000/AIX.  A disclaimer is in order,
because this is my compiler, and my opinion about unterminated
conditionals was not different at the time we built it.  I did suffer
a slight embarassment, because, like MicroFocus, the ReSource
compiler would not accept SIZE/NOT SIZE in either order.

   00056  *** Record 33
   00057  000032                      SIZE ERROR
   00058  *** Error Col 29
   00059  Error:          CBL329 severity 8 beginning on listing line 35
   00060                  Unexpected token at 'SIZE', skipped to next
   00061                  recognizable token.
   00062  
   00063  *** Record 39
   00064  000038              SIZE ERROR
   00065  *** Error Col 21
   00066  Error:          CBL329 severity 8 beginning on listing line 41
   00067                  Unexpected token at 'SIZE', skipped to next
   00068                  recognizable token.
   00069  

The same modified program I presented to MF, compiled without
warnings and produced the expected output on execution.

	    OVERFLOW ON W
	    NO OVERFLOW ON X
	    OVERFLOW ON Y
	    NO OVERFLOW ON Z
	    RIGHT ASSOCIATION IS SUFFICIENT



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