| Summary: | [formatter/matcher] Matcher loses track if ParserRule contains only optional tokens | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Carl Wannheden <carl.wannheden> | ||||||||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | moritz.eysholdt | ||||||||||
| Version: | 0.8.0 | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Carl Wannheden
Created attachment 188232 [details]
MyDsl.xtext grammar
Created attachment 188233 [details]
MyDsl format configuration
Created attachment 188235 [details]
Example file
Created attachment 188236 [details]
Graphviz diagram of format configuration
fixed in "master" and "Helios_maintenance". It turns out that the Matcher "lost track" when there is a parser rule with only optional syntactical elements. In case you have been accessing internals of Xtext's Matcher directly, there is one method that now has an additional parameter for loop protection: protected Pair<List<MatcherTransition>, List<MatcherState>> findTransitionPath(MatcherState from, AbstractElement to, boolean returning, boolean canReturn, Set<Pair<Boolean, MatcherState>> visited); The class I was referring to is org.eclipse.xtext.formatting.impl.ElementMatcherProvider Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |