Hi,

I have a problem with following grammar:

imperative_statement
  : imperative_compute_statement
  ;
 
imperative_statement_list
  : imperative_statement+
  ;

imperative_compute_statement
  : COMPUTE^ Identifier+ EQUAL Identifier END_COMPUTE?
  ;
 
conditional_compute_statement
  : COMPUTE^ Identifier+ EQUAL Identifier
      (ON? SIZE ERROR imperative_statement_list)?
      END_COMPUTE?
  ;

COMPUTE: 'COMPUTE';
NOT : 'NOT';
ON : 'ON';
SIZE : 'SIZE';
EQUAL : 'EQUAL';
ERROR : 'ERROR';
END_COMPUTE : 'END-COMPUTE';

Identifier :
  Letter (Letter | Digit)*;
 
fragment
Letter :
  'a'..'z' |
  'A'..'Z';
 
fragment
Digit :
  '0'..'9';

ANTLR tells me that the rule 'imperative_compute_statement' has more 
than one alternative to match the optional 'END_COMPUTE'. Can anybody 
give me a hint on how to rewrite this grammar so that the warning no 
longer appears?

Any help appreciated.

Regards,
Thomas

-- 
Interactive Objects Software GmbH
Basler Strasse 61
79100 Freiburg, Germany

Phone:  +49 761 400 73 0
mailto:[email protected]


------------------------------------------------------------------------

Interactive Objects' Legacy Modernization Solutions 

Get Your Applications SOA-Ready!

See http://www.interactive-objects.com/ for more information.

------------------------------------------------------------------------


Interactive Objects Software GmbH | Freiburg | Geschäftsführer: Alberto 
Perandones, Andrea Hemprich
| AG Frbg. HRB 5810 | USt-ID: DE 197983057


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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to