[xtext tests] changed name computation of lexer grammars to be in line with the formerly taken names, synchronized name computation in grammar comparison fragment

Signed-off-by: Christian Schneider <christian.schneider@itemis.de>
This commit is contained in:
Christian Schneider 2015-11-16 16:16:23 +01:00
parent db160aa5a6
commit 960dc02bf8

View file

@ -33,12 +33,20 @@ class GrammarNaming {
parserPackage + ".internal"
}
protected def String getInternalLexerPackage(Grammar it) {
parserPackage + ".lexer"
}
def AntlrGrammar getParserGrammar(Grammar it) {
new AntlrGrammar(internalParserPackage, '''«grammarNamePrefix»Internal«simpleName»«IF !combinedGrammar»Parser«ENDIF»''')
}
def AntlrGrammar getLexerGrammar(Grammar it) {
new AntlrGrammar(internalParserPackage, '''«grammarNamePrefix»Internal«simpleName»«IF !combinedGrammar»Lexer«ENDIF»''')
if (combinedGrammar) {
getParserGrammar
} else {
new AntlrGrammar(internalLexerPackage, '''«grammarNamePrefix»Internal«simpleName»Lexer''')
}
}
protected def String getGrammarNamePrefix(Grammar it) {