[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PERFORM token (was RE: gnubol: Hacks needed to parse COBOL
> -----Original Message-----
> From: owner-gnu-cobol@wallace.lusars.net
> [mailto:owner-gnu-cobol@wallace.lusars.net]On Behalf Of J & C
> Migrations, Pty.
<much snippage>
>
> >/* problem 11.
> > - you need infinite lookahead to determine whether you are expecting a
> >procedure name or an expression after 'perform'.
> > You could look up the type in the symbol table but what about forward
> >references etc.
>
> I think that with a single look-ahead you can determine whether the word
> that follows the PERFORM is a reserved word such as UNTIL or VARYING, a
> verb, or a user defined word, that must be a procedure name. Then you can
> either verify a previously tabulated name and issue errors, or tabulate the
> first-used name as a referenced procedure, and leave further error
> reporting to the semantic phase.
>
>
The statement about a user-defined word following PERFORM being a
procedure-name is not correct.
Either
Perform paragraph-name *> out-of-line PERFORM
or
Perform data-name TIMES *> in-line perform
is valid
Bill Klein
wmklein <at> ix.netcom.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.