[antlr-interest] RES: RES: RES: COBOL grammar
Nilo Roberto C Paim
nilopaim at gmail.com
Tue Jul 12 19:16:04 PDT 2011
According with Cobol rules, the '.' will ends the outer 'IF', and this is
not intended.
An 'IF' command is terminated by a '.', no matter which commands are inside
the 'IF' alternatives. A '.' in the alternatives will ends the 'IF', even if
in the alternatives are another 'IF' command.
I'll make a clearer sample, pointing exactly what I'm saying.
IF expr
IF expr2
A
ELSE
B.
ELSE
C.
The '.' following 'B' will ends the outer 'IF', causing a syntax error on
the second 'ELSE'. If this '.' following 'B' doesn't exists, the code is
completely correct in terms of syntax, ad that is what I need...
Thanks a lot for your interest, Parsiad.
Best regards,
Nilo - Brazil
-----Mensagem original-----
De: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] Em nome de Parsiad Azimzadeh
Enviada em: terça-feira, 12 de julho de 2011 18:04
Para: antlr-interest at antlr.org
Assunto: Re: [antlr-interest] RES: RES: COBOL grammar
> I cannot ends the inner 'IF' with a '.', because this will ends the outter
> IF too.
What I have written will only end the inner IF.
--
Parsiad Azimzadeh
http://sfu.ca/~paa4
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list