Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315335 - IllegalStateException in Unordered group w mix optional/required
Summary: IllegalStateException in Unordered group w mix optional/required
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 320751 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-01 22:35 EDT by Henrik Lindberg CLA
Modified: 2017-09-19 16:14 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: helios+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Lindberg CLA 2010-06-01 22:35:09 EDT
With this construct:
('{'
     ( ('when' ':' condExpr = Expression ';')?
    & ("name" ':' name = CapabilityName ';')		  
    & ("version" ':' version = VersionLiteral ';')?
    )
'}')?

I get errors while editing (see stack trace below). Seems to happen when adding/modifying the "name :" part. 

This happens in nightly build 2010 05 29, and 05 31 for the Antlr features.

Caused by: java.lang.IllegalStateException
	at org.eclipse.xtext.parser.antlr.UnorderedGroupHelper$State.canLeave(UnorderedGroupHelper.java:145)
	at org.eclipse.xtext.parser.antlr.UnorderedGroupHelper.canLeave(UnorderedGroupHelper.java:104)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.ruleRequiredCapability_Unfiltered(InternalBeeLangParser.java:6005)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.ruleCapabilityBuildResultReference(InternalBeeLangParser.java:12955)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.synpred110_fragment(InternalBeeLangParser.java:57187)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.synpred110(InternalBeeLangParser.java:59881)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.ruleBuildResultReference(InternalBeeLangParser.java:12461)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.rulePrerequisite(InternalBeeLangParser.java:11878)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.ruleBuilderInput(InternalBeeLangParser.java:16918)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.ruleBuilder(InternalBeeLangParser.java:15070)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.ruleBuildUnit(InternalBeeLangParser.java:2694)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.ruleBeeModel(InternalBeeLangParser.java:487)
	at org.eclipse.b3.parser.antlr.internal.InternalBeeLangParser.entryRuleBeeModel(InternalBeeLangParser.java:108)
	at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser.parse(AbstractInternalAntlrParser.java:492)
Comment 1 Sebastian Zarnekow CLA 2010-07-24 05:29:54 EDT
*** Bug 320751 has been marked as a duplicate of this bug. ***
Comment 2 Sebastian Zarnekow CLA 2010-07-26 11:14:16 EDT
This is caused by backtracking. Antlr does not execute actions when the parser is in the backtracking mode. However, UnorderedGroups are implemented with a combination of actions and predicates. Predicates will be evaluated but the correct result relies on actions to be invoked.
Comment 3 Sebastian Zarnekow CLA 2010-07-27 08:55:44 EDT
Fixed in HEAD.
Comment 4 Karsten Thoms CLA 2017-09-19 16:14:15 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.