Presently i am using CUP/LEX parsers for my java application. My cup file code is increased to 5500 lines and now its crashing and not compiling giving "code too large " error because CUP/LEX uses 16-bit unicode character set whaich gives limit only 0-65535 and my parser is exceeding this limit. So i in trouble here all i wanted to know is that if i use ANTLR parser will this problem be there?? or anybody knows the solution to this problem ? Response will be greatly appriciated.
author and iconoclast
Please don't post the same question to more than one forum; it just wastes people's time if they answer a question that's already been answered elsewhere. I deleted the other copy you put in "Advanced Java."
Your problem has nothing to do with Unicode, but rather the .class file format, which simply doesn't support methods larger than that.
I have some very large ANTLR parsers, so I suspect you wouldn't have the same problems with ANTLR. Under ANTLR, you write separate classes to deal with each production, so the resulting parser is much more modularized. Java CUP is much more old-school, with a table-driven structure like YACC.
But i heard somewhere in the ANTLR disscussion forum that they also faced this problem. Do you really think antlr is the solution for this problem? how much big ANTLR file you have? see if i remove some 100 lines of code from my CUP file, i don't face any problem but after i put more code again it will give 65535 byte limit exceeded error in compiling. Please help.