Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Out Of Memory Error
Out Of Memory Error [message #1739481] Tue, 02 August 2016 10:02 Go to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
I keep on getting an out of memory error whenever I run Generate Xtext Artifacts. But I have no idea how to debug it.

This is the stack trace.
0    [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering platform uri 'D:\03_Work\03_ProSeCo\ProSeCo\99_dev'
1159 [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding generated EPackage 'org.eclipse.xtext.xbase.XbasePackage'
1335 [main] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
1338 [main] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
1346 [main] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
1346 [main] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
5640 [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding generated EPackage 'org.eclipse.xtext.common.types.TypesPackage'
9261 [main] INFO  ipse.emf.mwe.utils.DirectoryCleaner  - Cleaning D:\03_Work\03_ProSeCo\ProSeCo\99_dev\xtext\..\xtext\src-gen
266271 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow org.GenerateArch: 
[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:190)
	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:600)
	at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:178)
	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:180)
	... 15 more
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.HashMap.createEntry(Unknown Source)
	at java.util.HashMap.addEntry(Unknown Source)
	at java.util.HashMap.put(Unknown Source)
	at java.util.HashSet.add(Unknown Source)
	at org.antlr.misc.OrderedHashSet.add(OrderedHashSet.java:63)
	at org.antlr.analysis.DFAState.addNFAConfiguration(DFAState.java:226)
	at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:633)
	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: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: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: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: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:709)
	at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:692)

java.lang.RuntimeException: Problems running workflow org.GenerateArch: 
[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:190)
	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:600)
	at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:178)
	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:180)
	... 15 more
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.HashMap.createEntry(Unknown Source)
	at java.util.HashMap.addEntry(Unknown Source)
	at java.util.HashMap.put(Unknown Source)
	at java.util.HashSet.add(Unknown Source)
	at org.antlr.misc.OrderedHashSet.add(OrderedHashSet.java:63)
	at org.antlr.analysis.DFAState.addNFAConfiguration(DFAState.java:226)
	at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:633)
	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: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: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: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: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:709)
	at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:692)

	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:190)
	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:600)
	at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:178)
	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:180)
	... 15 more
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.HashMap.createEntry(Unknown Source)
	at java.util.HashMap.addEntry(Unknown Source)
	at java.util.HashMap.put(Unknown Source)
	at java.util.HashSet.add(Unknown Source)
	at org.antlr.misc.OrderedHashSet.add(OrderedHashSet.java:63)
	at org.antlr.analysis.DFAState.addNFAConfiguration(DFAState.java:226)
	at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:633)
	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: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: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: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: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:709)
	at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:692)

	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.handleIssues(Mwe2Bridge.java:56)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:48)
	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)
	... 4 more



I am using an imported xcore model, my xtext version is 2.9.1.v201512180746.
I have tried running the Generate Xtext Artifacts with jvm argument -Xmx1024m but the problem still persists. Can someone point me in the right direction?
Re: Out Of Memory Error [message #1739482 is a reply to message #1739481] Tue, 02 August 2016 10:17 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

This happens during the generation of the ANTLR parser. Depending on your grammar it can be that the process takes more memory than 1G.
Do you have backtracking on?
Does it still happen for 2G heap?

You could try
parserGenerator = {
    antlrParam = "-Xconversiontimeout"
    antlrParam = "5000"
    options = {
        memoize = true
    }

(https://www.eclipse.org/forums/index.php/t/1075565/)
Re: Out Of Memory Error [message #1739486 is a reply to message #1739482] Tue, 02 August 2016 10:44 Go to previous messageGo to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
Hi,

Yes, I have backtrack set to true.
This is my current ANTLR settings:
                fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject {
                  options = {
                      	backtrack = true
                      	memoize = true
                        classSplitting=true
                        fieldsPerClass = "1200" 
                        methodsPerClass = "1200"
                  }
                  antlrParam = "-Xconversiontimeout"
                  antlrParam = "5000"
                }


Setting backtrack to false, gives me the same error.

Unfortunately, I don't have 2g memory. I get the error "Error occurred during initialization of VM
Could not reserve enough space for object heap"

What grammar configurations should I avoid to prevent the ANTLR from consuming too much memory?

[Updated on: Tue, 02 August 2016 10:52]

Report message to a moderator

Re: Out Of Memory Error [message #1739509 is a reply to message #1739486] Tue, 02 August 2016 14:32 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Please disable backtracking. Backtracking is evil =:-)

This will require some refactorings (you will have your reason why you finally enabled backtracking), but the result is unpredictable. On first sight it might solve your problems with ambiguity, but at the end it just hides even worse problems.

Use syntactic predicates to resolve ambiguities in your grammar.

(which computer in 2016 has not 2G of RAM available if necessary)?
Re: Out Of Memory Error [message #1739568 is a reply to message #1739509] Wed, 03 August 2016 03:17 Go to previous messageGo to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
The reason I enable backtracking because I added a terminal for all the reserved keywords.
Model:
  residents += Data *
;

Data:
  'first' 'name' fName=CONSTANTS 'address' add=CONSTANTS 'status' stat=CONSTANTS
;

terminal CONSTANTS:
ID | 'name' | 'address' | 'status';


If I don't define the CONSTANTS, users cannot input the string 'name', 'address' or 'status'. But adding this, gives me this warning:
"Decision can match input such as "'name'" using multiple alternatives: 3, 5
As a result, alternative(s) 5 were disabled for that input"

How to know which multiple alternatives that ANTLR is referring to? It says 3 and 5. Where can I find this information?
Re: Out Of Memory Error [message #1739574 is a reply to message #1739568] Wed, 03 August 2016 05:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14656
Registered: July 2009
Senior Member
simply use a datattype rule, not a terminal

Model:
  residents += Data *
;

Data:
  'first' 'name' fName=CONSTANTS 'address' add=CONSTANTS 'status' stat=CONSTANTS
;

CONSTANTS:
ID | 'name' | 'address' | 'status';


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Out Of Memory Error [message #1739578 is a reply to message #1739574] Wed, 03 August 2016 06:36 Go to previous messageGo to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
Hi Christian,
Using a datatype rule still create the ambiguity warning. How does backtracking work in this case? Does it still use the ID or the alternatives (e.g. 'name', 'status', 'address')?
Re: Out Of Memory Error [message #1739580 is a reply to message #1739578] Wed, 03 August 2016 06:44 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14656
Registered: July 2009
Senior Member
please share a complete grammar that reproduces this. yours does not.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Out Of Memory Error [message #1739862 is a reply to message #1739580] Fri, 05 August 2016 06:54 Go to previous message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
Hi, It turns out that the ambiguity is caused by a grammar. And I was able to fix it. Many thanks!
Previous Topic:How to use text generators and JvmInferrer in one project ?
Next Topic:Error Exceeding 65535 bytes limit
Goto Forum:
  


Current Time: Tue Mar 05 02:15:18 GMT 2024

Powered by FUDForum. Page generated in 0.02328 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top