本文整理汇总了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);
}