mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
[antlr grammar generation] fixed issue in 'compileParserMembers' of content assist grammar generator and 'compileTokens' of AbstractAntlrGrammarGenerator
Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
This commit is contained in:
parent
b3a4d042c1
commit
f6d4cac3df
2 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ abstract class AbstractAntlrGrammarGenerator {
|
|||
protected def compileTokens(Grammar it, AntlrOptions options) '''
|
||||
«IF options.isBacktrackLexer»
|
||||
tokens {
|
||||
«FOR kw : allKeywords.sort.sortBy[length]»
|
||||
«FOR kw : allKeywords.sort.sortBy[-length]»
|
||||
«keywordHelper.getRuleName(kw)»;
|
||||
«ENDFOR»
|
||||
«FOR rule: allTerminalRules»
|
||||
|
|
|
@ -44,7 +44,7 @@ class AntlrContentAssistGrammarGenerator extends AbstractAntlrGrammarWithActions
|
|||
|
||||
{
|
||||
«FOR kw: allKeywords.sort.sortBy[-length]»
|
||||
tokenNameToValue.put("«keywordHelper.getRuleName(kw)»", "'«kw.toJavaIdentifier(false).replaceAll("\\\\\\$", "\\\\u0024")»'");
|
||||
tokenNameToValue.put("«keywordHelper.getRuleName(kw)»", "'«kw.toStringInAntlrAction.replaceAll("\\\\\\$", "\\\\u0024")»'");
|
||||
«ENDFOR»
|
||||
}
|
||||
«ENDIF»
|
||||
|
|
Loading…
Reference in a new issue