public class TokenTool extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
LEXER_RULE_PREFIX |
| Constructor and Description |
|---|
TokenTool() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getLength(org.antlr.runtime.Token t) |
static String |
getLexerRuleName(String antlrTokenDef) |
static int |
getLine(org.antlr.runtime.Token t) |
static int |
getOffset(org.antlr.runtime.Token t) |
static String |
getText(org.antlr.runtime.Token t) |
static boolean |
isLexerRule(String antlrTokenDef) |
public static final String LEXER_RULE_PREFIX
public static String getText(org.antlr.runtime.Token t)
t - the tokennull if the Token t was null or the token's text was null.public static int getLine(org.antlr.runtime.Token t)
t - the token-1 if the Token t was null or the token did not provide line information.public static int getOffset(org.antlr.runtime.Token t)
t - the token-1 if the Token t was null or the token did not provide offset information.public static int getLength(org.antlr.runtime.Token t)
t - the token0 if the Token t was null or the token did not provide line information.public static boolean isLexerRule(String antlrTokenDef)
Copyright © 2015. All Rights Reserved.