Antlr未能创造前瞻性

时间:2015-11-05 13:58:07

标签: antlr xtext

考虑到符号,我的语法并不是非常干净,因此我必须打开后退跟踪  (我知道这不是最好的解决方案,但由于我的语法是由我编写的程序生成的,因此修复这些部分将花费我很多时间进行调试,但这不是主题。)

然而,当我尝试通过Mwe2工作流生成语法时,它会给我这个错误消息:

error(10):  internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279): could not even do k=1 for decision 92; reason: timed out (>100000ms)

正如我读过here,这可能是因为Antlr只需要更多时间进行编译...... 我的问题是,仅仅增加Antlr可以生成的时间就足够了(如果是,如果这样做)或者如果这可能有其他原因,例如在创建期间无限循环或类似的事情......

注意:我的语法差不多有3000行

提前致谢
乌鸦

修改
当将转换时间增加到500万毫秒时,上述错误消失了,但不过我最终得到了一堆例外:

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:48)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:613)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:110)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.HashMap.newNode(Unknown Source)
    at java.util.HashMap.putVal(Unknown Source)
    at java.util.HashMap.put(Unknown Source)
    at java.util.HashSet.add(Unknown Source)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:630)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

java.lang.RuntimeException: Problems running workflow raven.GenerateSQF: 
[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:48)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:613)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:110)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.HashMap.newNode(Unknown Source)
    at java.util.HashMap.putVal(Unknown Source)
    at java.util.HashMap.put(Unknown Source)
    at java.util.HashSet.add(Unknown Source)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:630)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:104)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.RuntimeException: 
[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:48)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:173)
    ... 15 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:613)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:683)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)
    at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:765)

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
     org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
    at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
    at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:110)
    at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:167)
    at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:163)
    at org.eclipse.xtext.generator.Generator.generate(Generator.java:555)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:172)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)

1 个答案:

答案 0 :(得分:0)

如果您想增加转换超时,则需要使用此选项:

fragment = parser.antlr.XtextAntlrUiGeneratorFragment auto-inject {
      antlrParam = "-Xconversiontimeout" antlrParam = "30000"
}

fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject {
       antlrParam = "-Xconversiontimeout" antlrParam = "30000"
}