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 TypeMethodDescriptionboolean
advance()
move on to next token.private void
static DefaultYAMLParser.yyInput
createScanner
(Parser parser) private int
private int
document
(int doc_level) private int
private void
private boolean
endspc()
static void
private byte
escapeSeq
(byte ch) private int
private int
private int
header()
private int
isNewline
(byte[] buff, int ptr) private int
isNewline
(int ptr) private void
NEWLINE
(int ptr) private int
newlineLen
(byte[] buff, int ptr) private int
newlineLen
(int ptr) private int
plain()
private int
void
private void
RETURN_YAML_BLOCK
(TokenScanner.QuotedString q, int blockType, int nlDoWhat) private int
private int
private void
int
token()
classifies current token.private int
value()
associated with current token.private boolean
yblock()
private boolean
ywordc()
private void
YYPOS
(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.yyInput
associated with current token. Should not be called ifDefaultYAMLParser.yyInput.advance()
returned false.- Specified by:
value
in interfaceDefaultYAMLParser.yyInput
- Returns:
- value for
DefaultYAMLParser.yyInput.token()
.
-
token
public int token()Description copied from interface:DefaultYAMLParser.yyInput
classifies current token. Should not be called ifDefaultYAMLParser.yyInput.advance()
returned false.- Specified by:
token
in interfaceDefaultYAMLParser.yyInput
- Returns:
- current %token or single character.
-
advance
Description copied from interface:DefaultYAMLParser.yyInput
move on to next token.- Specified by:
advance
in 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
-