Community
Participate
Working Groups
The ElementMatcher traverses the grammar while consuming the tokens from a document one by one. To stay on the correct path, the ElementMatcher maintains a stack of RuleCalls. However, the start-parserrule is unknown to ElementMatcher. Consequently, if RuleCalls occur *before* the first token, then they are not put on the stack. Solution: ParseTreeConstructor and DefaultNodeModelFormatter should propagate the Root-ParserRule to the formatter/ElementMatcher via the TokenStream. That way, the ElementMatcher can be initialized properly.
fixed in HEAD. See http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=f38c0300f66ec3bd7b6f322e5224f6d1b893d069 http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=f9bde7f3f18f25528881979cbfbe513c48518d98