| Summary: | static initializer is exceeding the 65535 bytes limit in InternalXXXParser.java with xtext 2.0.1 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Mahmoud Moneeb <mahmoud.moneeb> | ||||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||||
| Status: | CLOSED WORKSFORME | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | sebastian.zarnekow, sven.efftinge | ||||||
| Version: | unspecified | Flags: | sebastian.zarnekow:
indigo+
|
||||||
| Target Milestone: | SR2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 205765 [details]
Grammar that generated this problem
My configurations
//The antlr parser generator fragment.
fragment = parser.antlr.XtextAntlrGeneratorFragment {
options = {
backtrack = true
classSplitting = true
fieldsPerClass = "500"
}
}
fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
options = {
backtrack = true
classSplitting = true
fieldsPerClass = "500"
}
}
Please try the latest nightly build. (In reply to comment #3) > Please try the latest nightly build. I did Sven and still facing the same problem. I got a lot of errors when I try to generate the grammar. Which encoding did you use for the uploaded file? After removing the bogus characters (which only affect the lexer and not the parser), I could generate the code without any problems using the latest nightly. Please reopen if you can provide more information. (In reply to comment #5) > I got a lot of errors when I try to generate the grammar. Which encoding did > you use for the uploaded file? > > After removing the bogus characters (which only affect the lexer and not the > parser), I could generate the code without any problems using the latest > nightly. > > Please reopen if you can provide more information. Hi, I removed the symbols and still giving me the same error in the InternalMyDslParser.java in the package org.text.example.mydsl.ui.contentasssist.antlr.internal Best regards, Mahmoud (In reply to comment #5) > Which encoding did you use for the uploaded file? (In reply to comment #7) > (In reply to comment #5) > > Which encoding did you use for the uploaded file? The file encoding is Cp1252 and I have selected auto-detect. Do you want special encoding for the grammar file ?! Created attachment 205905 [details]
Uploaded projects with successfully generated parsers
I used your grammar in a fresh Xtext project, set the encoding to Cp1252 and generated the language. Everything works as expected. Xtext build qualifier is 2.1.0.v201110242028 (build id N201110242028)
Tried this on another machine, too. Works like a charm. Please attach a complete project that allows to reproduce the problem reliably. (In reply to comment #10) > Tried this on another machine, too. Works like a charm. Please attach a > complete project that allows to reproduce the problem reliably. Thanks Sebastian, I found my problem was in the configuration mwe2 file some options was overwritten . Best regards, Mahmoud |
Build Identifier: M20110909-1335 I have implemented a DSL grammar rules ,that is relatively big, and everything went fine during building the project except that the generated parser in the UI project ("InternalMyDslParser.java") suffers from the huge number of static initialization of the rules and give me this error "The code for the static initializer is exceeding the 65535 bytes limit" I tried the Head revision 2.1 and options = { classSplitting=true fieldsPerClass = "500" } once in the " fragment = parser.antlr.XtextAntlrGeneratorFragment " and again in the "fragment = parser.antlr.XtextAntlrUiGeneratorFragment"' But it still gives me the same error and the same generated parser code Best regards, Mahmoud Reproducible: Always