We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d77b904 commit 4f95ea7Copy full SHA for 4f95ea7
java/grammars/org/antlr/codebuff/ANTLRv4Lexer.g4
@@ -75,14 +75,7 @@ tokens {
75
76
@Override
77
public Token emit() {
78
- if (_type == ID) {
79
- String firstChar = _input.getText(Interval.of(_tokenStartCharIndex, _tokenStartCharIndex));
80
- if (Character.isUpperCase(firstChar.charAt(0))) {
81
- _type = TOKEN_REF;
82
- } else {
83
- _type = RULE_REF;
84
- }
85
-
+ if (_type == TOKEN_REF || _type==RULE_REF ) {
86
if (_currentRuleType == Token.INVALID_TYPE) { // if outside of rule def
87
_currentRuleType = _type; // set to inside lexer or parser rule
88
}
0 commit comments