Package org.yecht
Class TokenScanner
java.lang.Object
org.yecht.TokenScanner
- All Implemented Interfaces:
DefaultYAMLParser.yyInput
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadvance()move on to next token.private voidstatic DefaultYAMLParser.yyInputcreateScanner(Parser parser) private intprivate intdocument(int doc_level) private intprivate voidprivate booleanendspc()static voidprivate byteescapeSeq(byte ch) private intprivate intprivate intheader()private intisNewline(byte[] buff, int ptr) private intisNewline(int ptr) private voidNEWLINE(int ptr) private intnewlineLen(byte[] buff, int ptr) private intnewlineLen(int ptr) private intplain()private intvoidprivate voidRETURN_YAML_BLOCK(TokenScanner.QuotedString q, int blockType, int nlDoWhat) private intprivate intprivate voidinttoken()classifies current token.private intvalue()associated with current token.private booleanyblock()private booleanywordc()private voidYYPOS(int n)
-
Field Details
-
QUOTELEN
public static final int QUOTELEN- See Also:
-
parser
-
lval
-
currentToken
private int currentToken -
tnames
-
YWORDC
private static final boolean[] YWORDC -
DIGIT_OR_SIGN
private static final boolean[] DIGIT_OR_SIGN
-
-
Constructor Details
-
TokenScanner
-
-
Method Details
-
error
-
createScanner
-
value
Description copied from interface:DefaultYAMLParser.yyInputassociated with current token. Should not be called ifDefaultYAMLParser.yyInput.advance()returned false.- Specified by:
valuein interfaceDefaultYAMLParser.yyInput- Returns:
- value for
DefaultYAMLParser.yyInput.token().
-
token
public int token()Description copied from interface:DefaultYAMLParser.yyInputclassifies current token. Should not be called ifDefaultYAMLParser.yyInput.advance()returned false.- Specified by:
tokenin interfaceDefaultYAMLParser.yyInput- Returns:
- current %token or single character.
-
advance
Description copied from interface:DefaultYAMLParser.yyInputmove on to next token.- Specified by:
advancein interfaceDefaultYAMLParser.yyInput- Returns:
- false if positioned beyond tokens.
- Throws:
IOException
-
isNewline
private int isNewline(int ptr) -
newlineLen
private int newlineLen(int ptr) -
isNewline
private int isNewline(byte[] buff, int ptr) -
newlineLen
private int newlineLen(byte[] buff, int ptr) -
NEWLINE
private void NEWLINE(int ptr) -
RETURN_YAML_BLOCK
-
GET_TRUE_YAML_INDENT
private int GET_TRUE_YAML_INDENT() -
YYPOS
private void YYPOS(int n) -
RETURN_IMPLICIT
-
real_yylex
- Throws:
IOException
-
header
- Throws:
IOException
-
spcOrLfStar
- Throws:
IOException
-
ywordc
- Throws:
IOException
-
endspc
- Throws:
IOException
-
yblock
- Throws:
IOException
-
document
- Throws:
IOException
-
directive
- Throws:
IOException
-
getAndCheckIndentLength
private int getAndCheckIndentLength() -
countAndAddNewlines
-
plain
- Throws:
IOException
-
doubleQuote
- Throws:
IOException
-
singleQuote
- Throws:
IOException
-
transferMethod
- Throws:
IOException
-
scalarBlock
- Throws:
IOException
-
escapeSeq
private byte escapeSeq(byte ch) -
eatComments
- Throws:
IOException
-