Skip to content

Commit

Permalink
Fix: Tokens are no longer implicitly defined in antlr parser grammar …
Browse files Browse the repository at this point in the history
…when they originate from a ConstantGroup
  • Loading branch information
Hellwig-SE committed Sep 5, 2023
1 parent 508e8d8 commit debed84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public void handle(ASTConstantGroup ast) {
} else if (grammarInfo.getKeywordRules().contains(x.getName())) {
addToCodeSection(parserHelper.getKeyRuleName(x.getName()));
} else {
addToCodeSection("'" + x.getName() + "'");
addToCodeSection(parserHelper.getLexSymbolName(x.getName()));
}

if (embeddedJavaCode) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* (c) https://github.com/MontiCore/monticore */
package mc.feature.constantgroups;

grammar SpecialLexerTokensInConstantGroup {
Start = ALTQUESTION bar:["?" | "!"];
token ALTQUESTION = '?';
}

0 comments on commit debed84

Please sign in to comment.