mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[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:
parent
db160aa5a6
commit
960dc02bf8
1 changed files with 9 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue