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

Re: Parsing nested statements: was Re: gnubol: subsets



Results from test using sample program provided with following changes:

1) all "size" phrases changed to "ON SIZE ERROR"
2) inserted numbers by adding 6 columns at beginning of text.  Numbers start at 1000 and increment by 1000.

Test run on HP 3000 running MPE/iX O/S.  Compiler is 1985 standard with HP extensions.

Results are:
==================
(43) 1999.11.29.9.57 WORK,/MIS/BORIS %COB85XL TEST,TESTO,TESTL
-----Compiling TEST.BORIS.MIS
PAGE 0001  COBOL II/iX HP31500A.04.19  [85] Copyright Hewlett-Packard CO. 1987


LINE #   SEQ # COL ERROR SEV            TEXT
------------------------------------------------------------------------------
 00045  032000  11  410  S  SYNTAX ERROR.  FOUND: ON; EXPECTING ONE OF THE
                            FOLLOWING: <NON-NUMERIC-LIT> <NUMERIC-LIT>
                            <SYMBOLIC-NAME> <WORD> ALL CURRENT-DATE
                            DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME
                            DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 HIGH-VALUE
                            LINAGE-COUNTER LOW-VALUE QUOTE SPACE TALLY
                            TIME-OF-DAY UPON WHEN-COMPILED ZERO a_verb 
 00046  033000  11  980  I  ATTEMPTING TO RECOVER FROM SYNTAX ERROR.
 00048  035000  21  410  S  SYNTAX ERROR.  FOUND: <NOT-SIZE>; EXPECTING ONE OF
                            THE FOLLOWING: <NON-NUMERIC-LIT> <NUMERIC-LIT>
                            <SYMBOLIC-NAME> <WORD> ALL CURRENT-DATE
                            DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME
                            DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 HIGH-VALUE
                            LINAGE-COUNTER LOW-VALUE QUOTE SPACE TALLY
                            TIME-OF-DAY UPON WHEN-COMPILED ZERO END-ADD 
 00049  036000  14  980  I  ATTEMPTING TO RECOVER FROM SYNTAX ERROR.
 00051  038000  11  410  S  SYNTAX ERROR.  FOUND: ON; EXPECTING ONE OF THE
                            FOLLOWING: <NON-NUMERIC-LIT> <NUMERIC-LIT>
                            <SYMBOLIC-NAME> <WORD> ALL CURRENT-DATE
                            DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME
                            DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 HIGH-VALUE
                            LINAGE-COUNTER LOW-VALUE QUOTE SPACE TALLY
                            TIME-OF-DAY UPON WHEN-COMPILED ZERO a_verb 
 00052  039000  11  980  I  ATTEMPTING TO RECOVER FROM SYNTAX ERROR.
 00059  046000  12  410  S  SYNTAX ERROR.  FOUND: .; EXPECTING ONE OF THE
                            FOLLOWING: . <NOT-AEOP> <NOT-ATEND> <NOT-EXCP>
                            <NOT-INPUT> <NOT-INVALID> <NOT-OVF> <NOT-SIZE>
                            ELSE END-ACCEPT END-ADD END-CALL END-COMPUTE
                            END-DELETE END-DIVIDE END-EVALUATE END-IF
                            END-MULTIPLY END-PERFORM END-READ END-RETURN
                            END-REWRITE END-SEARCH END-START END-STRING
                            END-SUBTRACT END-UNSTRING END-WRITE WHEN END-ADD 
 00059  046000  12  980  I  ATTEMPTING TO RECOVER FROM SYNTAX ERROR.

4 ERROR(s), 0 QUESTIONABLE, 0 WARNING(s)  

    CHECKED SYNTAX ONLY.        
    CPU TIME = 0:00:00.  WALL TIME = 0:00:00.
Program terminated in an error state. (CIERR 976)
ERRORS IN COMPILE
===================

>>> Michael McKernan <mck@tivoli.mv.com> 11/26/99 08:11PM >>>
>>>>> "Bob" == RKRayhawk  <RKRayhawk@aol.com>
>>>>> wrote the following on Fri, 26 Nov 1999 14:26:35 EST
<snip>

 identification division.
 program-id. cobol-test.
 data division.
 working-storage section.
 01  w   pic 9.
 01  x   pic 9.
 01  y   pic 9.
 01  z   pic 9.

 procedure division.
 001.
            move 8 to x z
            move 9 to w y

     add 1 to w
        size
        display "overflow on w"
        
        add 1 to x
    not size
                  display "no overflow on x"

    add 1 to y
       size
       display "overflow on y"

       add 1 to z
    not size
                         display "no overflow on z"
    display "right association is sufficient"

    size
    display "oops - unexpected result"

       not size
       display "oops - unexpected result"

    size
    display "oops - unexpected result"
     
        not size
               display "oops - unexpected result"
    
     end-add
     
     . 


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