public final class RawASTokenizer extends BaseRawASTokenizer implements ASTokenTypes
Modifier and Type | Field and Description |
---|---|
static int |
ASDOC_COMMENT |
static int |
CDATA |
static int |
CHARLITERAL_IGNORE |
static int |
COMMENT |
static int |
DIRECTIVE |
static int |
E4X |
static int |
E4XCHARLITERAL |
static int |
E4XCOMMENT |
static int |
E4XSTRINGLITERAL
lexical states
|
static int |
E4XTEXTVALUE |
static int |
ENTITY_RETURN |
static int |
ESCAPE_SEQUENCE |
static int |
MARKUP |
static int |
MARKUP_IGNORE |
static int |
STATE |
static int |
STRINGLITERAL |
static int |
STRINGLITERAL_IGNORE |
static int |
TYPED_COLLECTION |
static int |
TYPED_COLLECTION_LITERAL |
static int |
YYEOF
This character denotes the end of file
|
static int |
YYINITIAL |
bufferToken, collectComments, docTypeLevel, e4xBraceBalance, e4xReturnState, e4xTagDepth, isInCloseTag, typedDepth
aggregateContents, aggregateStart, aggregateStartColumn, aggregateStartLine
EOF, HIDDEN_TOKEN_BUILTIN_NS, HIDDEN_TOKEN_COMMENT, HIDDEN_TOKEN_E4X, HIDDEN_TOKEN_MULTI_LINE_COMMENT, HIDDEN_TOKEN_SINGLE_LINE_COMMENT, HIDDEN_TOKEN_STAR_ASSIGNMENT, NULL_TREE_LOOKAHEAD, TOKEN_ASDOC_COMMENT, TOKEN_ASDOC_TAG, TOKEN_ASDOC_TEXT, TOKEN_ATTRIBUTE, TOKEN_BLOCK_CLOSE, TOKEN_BLOCK_OPEN, TOKEN_COLON, TOKEN_COMMA, TOKEN_DIRECTIVE_DEFAULT_XML, TOKEN_E4X_BINDING_CLOSE, TOKEN_E4X_BINDING_OPEN, TOKEN_E4X_CDATA, TOKEN_E4X_CLOSE_TAG_START, TOKEN_E4X_COMMENT, TOKEN_E4X_DECIMAL_ENTITY, TOKEN_E4X_DOTTED_NAME_PART, TOKEN_E4X_EMPTY_TAG_END, TOKEN_E4X_ENTITY, TOKEN_E4X_EQUALS, TOKEN_E4X_HEX_ENTITY, TOKEN_E4X_NAME, TOKEN_E4X_NAME_DOT, TOKEN_E4X_OPEN_TAG_START, TOKEN_E4X_PROCESSING_INSTRUCTION, TOKEN_E4X_STRING, TOKEN_E4X_TAG_END, TOKEN_E4X_TEXT, TOKEN_E4X_WHITESPACE, TOKEN_E4X_XMLLIST_CLOSE, TOKEN_E4X_XMLNS, TOKEN_ELLIPSIS, TOKEN_IDENTIFIER, TOKEN_KEYWORD_AS, TOKEN_KEYWORD_BREAK, TOKEN_KEYWORD_CASE, TOKEN_KEYWORD_CATCH, TOKEN_KEYWORD_CLASS, TOKEN_KEYWORD_CONST, TOKEN_KEYWORD_CONTINUE, TOKEN_KEYWORD_DEFAULT, TOKEN_KEYWORD_DELETE, TOKEN_KEYWORD_DO, TOKEN_KEYWORD_ELSE, TOKEN_KEYWORD_FALSE, TOKEN_KEYWORD_FINALLY, TOKEN_KEYWORD_FOR, TOKEN_KEYWORD_FUNCTION, TOKEN_KEYWORD_IF, TOKEN_KEYWORD_IMPORT, TOKEN_KEYWORD_IN, TOKEN_KEYWORD_INCLUDE, TOKEN_KEYWORD_INSTANCEOF, TOKEN_KEYWORD_INTERFACE, TOKEN_KEYWORD_IS, TOKEN_KEYWORD_NEW, TOKEN_KEYWORD_NULL, TOKEN_KEYWORD_PACKAGE, TOKEN_KEYWORD_RETURN, TOKEN_KEYWORD_SUPER, TOKEN_KEYWORD_SWITCH, TOKEN_KEYWORD_THIS, TOKEN_KEYWORD_THROW, TOKEN_KEYWORD_TRUE, TOKEN_KEYWORD_TRY, TOKEN_KEYWORD_TYPEOF, TOKEN_KEYWORD_USE, TOKEN_KEYWORD_VAR, TOKEN_KEYWORD_VOID, TOKEN_KEYWORD_WHILE, TOKEN_KEYWORD_WITH, TOKEN_LITERAL_HEX_NUMBER, TOKEN_LITERAL_NUMBER, TOKEN_LITERAL_REGEXP, TOKEN_LITERAL_STRING, TOKEN_LITERAL_XMLLIST, TOKEN_MODIFIER_DYNAMIC, TOKEN_MODIFIER_FINAL, TOKEN_MODIFIER_NATIVE, TOKEN_MODIFIER_OVERRIDE, TOKEN_MODIFIER_STATIC, TOKEN_MODIFIER_VIRTUAL, TOKEN_NAMESPACE_ANNOTATION, TOKEN_NAMESPACE_NAME, TOKEN_OPERATOR_ASSIGNMENT, TOKEN_OPERATOR_ATSIGN, TOKEN_OPERATOR_BITWISE_AND, TOKEN_OPERATOR_BITWISE_AND_ASSIGNMENT, TOKEN_OPERATOR_BITWISE_LEFT_SHIFT, TOKEN_OPERATOR_BITWISE_LEFT_SHIFT_ASSIGNMENT, TOKEN_OPERATOR_BITWISE_NOT, TOKEN_OPERATOR_BITWISE_OR, TOKEN_OPERATOR_BITWISE_OR_ASSIGNMENT, TOKEN_OPERATOR_BITWISE_RIGHT_SHIFT, TOKEN_OPERATOR_BITWISE_RIGHT_SHIFT_ASSIGNMENT, TOKEN_OPERATOR_BITWISE_UNSIGNED_RIGHT_SHIFT, TOKEN_OPERATOR_BITWISE_UNSIGNED_RIGHT_SHIFT_ASSIGNMENT, TOKEN_OPERATOR_BITWISE_XOR, TOKEN_OPERATOR_BITWISE_XOR_ASSIGNMENT, TOKEN_OPERATOR_DECREMENT, TOKEN_OPERATOR_DESCENDANT_ACCESS, TOKEN_OPERATOR_DIVISION, TOKEN_OPERATOR_DIVISION_ASSIGNMENT, TOKEN_OPERATOR_EQUAL, TOKEN_OPERATOR_GREATER_THAN, TOKEN_OPERATOR_GREATER_THAN_EQUALS, TOKEN_OPERATOR_INCREMENT, TOKEN_OPERATOR_LESS_THAN, TOKEN_OPERATOR_LESS_THAN_EQUALS, TOKEN_OPERATOR_LOGICAL_AND, TOKEN_OPERATOR_LOGICAL_AND_ASSIGNMENT, TOKEN_OPERATOR_LOGICAL_NOT, TOKEN_OPERATOR_LOGICAL_OR, TOKEN_OPERATOR_LOGICAL_OR_ASSIGNMENT, TOKEN_OPERATOR_MEMBER_ACCESS, TOKEN_OPERATOR_MINUS, TOKEN_OPERATOR_MINUS_ASSIGNMENT, TOKEN_OPERATOR_MODULO, TOKEN_OPERATOR_MODULO_ASSIGNMENT, TOKEN_OPERATOR_MULTIPLICATION_ASSIGNMENT, TOKEN_OPERATOR_NOT_EQUAL, TOKEN_OPERATOR_NS_QUALIFIER, TOKEN_OPERATOR_PLUS, TOKEN_OPERATOR_PLUS_ASSIGNMENT, TOKEN_OPERATOR_STAR, TOKEN_OPERATOR_STRICT_EQUAL, TOKEN_OPERATOR_STRICT_NOT_EQUAL, TOKEN_OPERATOR_TERNARY, TOKEN_PAREN_CLOSE, TOKEN_PAREN_OPEN, TOKEN_RESERVED_WORD_CONFIG, TOKEN_RESERVED_WORD_EACH, TOKEN_RESERVED_WORD_EXTENDS, TOKEN_RESERVED_WORD_GET, TOKEN_RESERVED_WORD_GOTO, TOKEN_RESERVED_WORD_IMPLEMENTS, TOKEN_RESERVED_WORD_NAMESPACE, TOKEN_RESERVED_WORD_SET, TOKEN_SEMICOLON, TOKEN_SQUARE_CLOSE, TOKEN_SQUARE_OPEN, TOKEN_TYPED_COLLECTION_CLOSE, TOKEN_TYPED_COLLECTION_OPEN, TOKEN_TYPED_LITERAL_CLOSE, TOKEN_TYPED_LITERAL_OPEN, TOKEN_VOID_0
Constructor and Description |
---|
RawASTokenizer() |
RawASTokenizer(InputStream in)
Creates a new scanner.
|
RawASTokenizer(Reader in)
Creates a new scanner
There is also a java.io.InputStream version of this constructor.
|
Modifier and Type | Method and Description |
---|---|
protected char[] |
buffer()
returns the current active buffer.
|
protected int |
currentPos()
returns the current position into the buffer
|
protected int |
getColumn()
Gets the current column number of the tokenizer.
|
protected int |
getLine()
Gets the current line number of the tokenizer.
|
protected int |
getOffset()
Gets the current offset of the tokenizer into the file buffer.
|
protected int |
markedPosition()
returns the marked position in the current read
|
ASToken |
nextToken()
Resumes scanning until the next regular expression is matched,
the end of input is encountered or an I/O-Error occurs.
|
protected int |
readEnd()
returns the end of the current read
|
protected int |
readStart()
returns the start of the current read
|
protected void |
setAllowLTInE4XStringLiterals(boolean allow)
in E4X,
< is allowed in char and string literals. |
protected void |
yybegin(int newState)
Enters a new lexical state
|
protected char |
yycharat(int pos)
Returns the character at position pos from the
matched text.
|
void |
yyclose()
Closes the input stream.
|
protected int |
yylength()
Returns the length of the matched text region.
|
void |
yypushback(int number)
Pushes the specified amount of characters back into the input stream.
|
void |
yyreset(Reader reader)
Resets the scanner to read from a new input stream.
|
protected int |
yystate()
Returns the current lexical state.
|
protected String |
yytext()
Returns the text matched by the current regular expression.
|
aggregateEscapedUnicodeChar, buildAggregateToken, buildE4XTextToken, continueAggregate, decodeEscapedUnicode, escapedUnicodeToHtmlEntity, fillBuffer, getBufferToken, hasBufferToken, initTokenPool, isCollectingComments, isInE4XDatabinding, isInXML, newToken, reportInvalidLineTerminatorInStringLiteral, reportUnclosedASDoc, reportUnclosedStringLiteral, reset, setCollectComments
addBadCharacterProblem, buildToken, buildToken, buildToken, continueAggregate, continueAggregate, continueAggregate, continueAggregate, fetchToken, getContext, getCurrentSourceLocation, getLastTokenText, getLastTokenType, getProblems, getSourcePath, hasAggregateContents, hasProblems, setLastToken, setReuseLastToken, setSourcePath, startAggregate, startAggregate
public static final int YYEOF
public static final int E4XSTRINGLITERAL
public static final int CHARLITERAL_IGNORE
public static final int E4XTEXTVALUE
public static final int DIRECTIVE
public static final int MARKUP
public static final int E4XCHARLITERAL
public static final int STRINGLITERAL
public static final int ESCAPE_SEQUENCE
public static final int ENTITY_RETURN
public static final int TYPED_COLLECTION
public static final int CDATA
public static final int COMMENT
public static final int STRINGLITERAL_IGNORE
public static final int MARKUP_IGNORE
public static final int STATE
public static final int E4XCOMMENT
public static final int TYPED_COLLECTION_LITERAL
public static final int YYINITIAL
public static final int ASDOC_COMMENT
public static final int E4X
public RawASTokenizer()
public RawASTokenizer(Reader in)
in
- the java.io.Reader to read input from.public RawASTokenizer(InputStream in)
in
- the java.io.Inputstream to read input from.protected final int getOffset()
BaseRawTokenizer
getOffset
in class BaseRawTokenizer<ASToken>
protected final int getLine()
getLine
in class BaseRawTokenizer<ASToken>
protected final int getColumn()
getColumn
in class BaseRawTokenizer<ASToken>
protected void setAllowLTInE4XStringLiterals(boolean allow)
BaseRawASTokenizer
<
is allowed in char and string literals.setAllowLTInE4XStringLiterals
in class BaseRawASTokenizer
allow
- true if <
is allowedpublic final void yyclose() throws IOException
IOException
public final void yyreset(Reader reader)
reader
- the new input streamprotected final int yystate()
protected final void yybegin(int newState)
yybegin
in class BaseRawASTokenizer
newState
- the new lexical stateprotected final String yytext()
yytext
in class BaseRawTokenizer<ASToken>
protected final char yycharat(int pos)
yycharat
in class BaseRawASTokenizer
pos
- the position of the character to fetch.
A value from 0 to yylength()-1.protected final int yylength()
yylength
in class BaseRawASTokenizer
protected final int readStart()
readStart
in class BaseRawASTokenizer
protected final int readEnd()
readEnd
in class BaseRawASTokenizer
protected final int markedPosition()
markedPosition
in class BaseRawASTokenizer
protected final int currentPos()
protected final char[] buffer()
buffer
in class BaseRawASTokenizer
public void yypushback(int number)
number
- the number of characters to be read again.
This number must not be greater than yylength()!public ASToken nextToken() throws IOException
IOException
- if any I/O-Error occursCopyright © 2016 The Apache Software Foundation. All rights reserved.