[antlr-interest] how to solve 'code too large' problem?

Chaudhari, Pranita, OPEE14 Pranita.Chaudhari at eads.com
Fri Jul 13 07:36:48 PDT 2007


Hello,
 
I am using Antlr V3 for writing grammar to parse UML Model (exported to XMI).For that I created individual token for each UML element, now the number of tokens are more than 150 and it creates large lexer java file. And   java compiler throws  following error:
 
                   xmiLexerLexer.java:7488: code too large
                        public void mTokens( )  throws RecognitionException{
 
Is it possible to split the Lexer grammar file in to two  and import tokens from both files into Parser grammar file?
 
I also want to apply 'UML model design rules' on the parsed data and check whether the model is according to design rules or not. How can I write Antlr grammar for this in separate grammar file  and apply it to parsed XMI data.
 
Design rules can be like:
-  Class names should start with a capital letter.
 
 
-Thanks 
Pranita
 
 
 
 
 
 
Pranita Chaudhari
EADS Deutschland GmbH 
Defence & Security 
Defence Electronics 
OPEE14 IFF Processing 
85716 Unterschleißheim - Deutschland 
Tel: +49 (89) 3179 2294
e-mail: pranita.chaudhari at eads.com <mailto:pranita.chaudhari at eads.com> 
 
www.eads.com
 
EADS Deutschland GmbH 
Registered Office: Ottobrunn 
District Court of Munich HRB 107648 
Chairman of the Supervisory Board:Dr. Thomas Enders 
Managing Directors:Dr. Stefan Zoller (Chairman), Michael Hecht 
------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
This E-mail and any attachment(s) to it are for the addressee's use only.
It is strictly confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission.
If you are not the intended addressee, then please delete it from your system and notify the sender immediateley. You are hereby notified that any use,
disclosure, copying or any action taken in reliance on it is strictly prohibited and may be unlawful. - Thank you. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070713/9d6d2e4f/attachment.html 


More information about the antlr-interest mailing list