Hello, I have implemented the grammar for a fairly complex language, using it's BNF definition as base. (Basically just reformatting the syntax to match Antlr).
Now this worked fine although the generated java code got pretty large, ~60´000 lines in the parser and ~7´500 in the lexer. Now there has arrived a new revision of the language and i started to implement the additions and changes and thats where i hit the wall. Using just plain Antlr and generate a non-debug version works as before, but in AntlrWorks when generating a debug version i get: [12:56:12] C:\antlr\output\ExtendedParser.java:15: code too large [12:56:12] public static final String[] tokenNames = new String[] { [12:56:12] ^ [12:56:12] 1 error The debug versions are ~85´500 lines in the parser and ~7´800 lines in the lexer. If i comment out the "tokenNames" and "ruleNames" string and the "getTokenNames" function it compiles and runs, but id rather not do this manually each time i compile. So i wounder if there is some way to break these strings into smaller pieces in Antlr or some way to get around this limitation in Java? I really like to retain as much 1:1 syntax with the language's BNF since i need to trust that the parser is correct. The parser grammar is ~900 lines with comments. BR Gustaf --~--~---------~--~----~------------~-------~--~----~ 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-interest@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 -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address