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-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] Em nome de Parsiad Azimzadeh
Enviada em: terça-feira, 12 de julho de 2011 18:04
Para: antlr-interest@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


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-inter...@googlegroups.com.
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to