|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.yaml.snakeyaml.scanner.ScannerImpl
public final class ScannerImpl
Scanner produces tokens of the following types: STREAM-START STREAM-END DIRECTIVE(name, value) DOCUMENT-START DOCUMENT-END BLOCK-SEQUENCE-START BLOCK-MAPPING-START BLOCK-END FLOW-SEQUENCE-START FLOW-MAPPING-START FLOW-SEQUENCE-END FLOW-MAPPING-END BLOCK-ENTRY FLOW-ENTRY KEY VALUE ALIAS(value) ANCHOR(value) TAG(value) SCALAR(value, plain, style) Read comments in the Scanner code for more details.Reader does the dirty work of checking for BOM and converting the input data to Unicode. It also adds NUL to the end. Reader supports the following methods
reader.peek(i=0) # peek the next i-th character self.prefix(l=1) reader.peek the next l characters reader.forward(l=1) read the next l characters and move the pointer.
| Field Summary | |
|---|---|
static Map<Character,Integer> |
ESCAPE_CODES
|
static Map<Character,String> |
ESCAPE_REPLACEMENTS
|
static String |
NULL_OR_LINEBR
|
| Constructor Summary | |
|---|---|
ScannerImpl(Reader reader)
|
|
| Method Summary | |
|---|---|
boolean |
checkToken(Class<? extends Token> choice)
Check if the next token is one of the given types. |
boolean |
checkToken(List<Class<? extends Token>> choices)
Check if the next token is one of the given types. |
Token |
getToken()
Return the next token. |
Token |
peekToken()
Return the next token, but do not delete if from the queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NULL_OR_LINEBR
public static final Map<Character,String> ESCAPE_REPLACEMENTS
public static final Map<Character,Integer> ESCAPE_CODES
| Constructor Detail |
|---|
public ScannerImpl(Reader reader)
| Method Detail |
|---|
public boolean checkToken(List<Class<? extends Token>> choices)
checkToken in interface Scannerpublic boolean checkToken(Class<? extends Token> choice)
checkToken in interface Scannerpublic Token peekToken()
peekToken in interface Scannerpublic Token getToken()
getToken in interface Scanner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||