本文整理匯總了Java中org.antlr.v4.runtime.Lexer.DEFAULT_MODE屬性的典型用法代碼示例。如果您正苦於以下問題:Java Lexer.DEFAULT_MODE屬性的具體用法?Java Lexer.DEFAULT_MODE怎麽用?Java Lexer.DEFAULT_MODE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.antlr.v4.runtime.Lexer
的用法示例。
在下文中一共展示了Lexer.DEFAULT_MODE屬性的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: create
private static SimpleLexerState create(int mode, @NullAllowed IntegerStack modeStack) {
if (mode == Lexer.DEFAULT_MODE && (modeStack == null || modeStack.isEmpty())) {
return INITIAL;
}
return new SimpleLexerState(mode, modeStack);
}
示例2: reset
@Override
public void reset() {
prevAccept.reset();
startIndex = -1;
line = 1;
charPositionInLine = 0;
mode = Lexer.DEFAULT_MODE;
}
示例3: GrammarHighlighterLexerState
private GrammarHighlighterLexerState() {
this(false, false, Token.INVALID_TYPE, Lexer.DEFAULT_MODE, null);
}
示例4: TemplateHighlighterLexerState
private TemplateHighlighterLexerState() {
this(GroupHighlighterLexer.DEFAULT_OPEN_DELIMITER, GroupHighlighterLexer.DEFAULT_CLOSE_DELIMITER, Lexer.DEFAULT_MODE, null);
}
示例5: GoHighlighterLexerState
private GoHighlighterLexerState() {
this(Lexer.DEFAULT_MODE, null);
}
示例6: SimpleLexerState
public SimpleLexerState() {
this.mode = Lexer.DEFAULT_MODE;
this.modeStack = EMPTY_MODE_STACK;
}
示例7: getInitialState
@Override
protected ANTLRLexerState getInitialState() {
return new ANTLRLexerState(Lexer.DEFAULT_MODE, null);
}
示例8: getInitialState
/**
* Get the initial {@code ANTLRLexerState} of the lexer.
*
* @return a {@code ANTLRLexerState} instance representing the state of
* the lexer at the beginning of an input.
*/
protected ANTLRLexerState getInitialState() {
return new ANTLRLexerState(Lexer.DEFAULT_MODE, null);
}