Package org.yaml.snakeyaml.parser
Interface Parser
- All Known Implementing Classes:
ParserImpl
public interface Parser
This interface represents an input stream of
Events.
The parser and the scanner form together the 'Parse' step in the loading process (see chapter 3.1 of the YAML Specification).
- See Also:
Event
-
Method Details
-
checkEvent
Check if the next event is one of the given type.- Parameters:
choice- Event ID.- Returns:
trueif the next event can be assigned to a variable of the given type. Returnsfalseif no more events are available.- Throws:
ParserException- Thrown in case of malformed input.
-
peekEvent
Event peekEvent()Return the next event, but do not delete it from the stream.- Returns:
- The event that will be returned on the next call to
getEvent() - Throws:
ParserException- Thrown in case of malformed input.
-
getEvent
Event getEvent()Returns the next event.The event will be removed from the stream.
- Returns:
- the next parsed event
- Throws:
ParserException- Thrown in case of malformed input.
-