[][src]Module vampirc_uci::parser

The parser module contains the parse method that performs the parsing of UCI messages into their respective UciMessage variants.

Behind the scenes, it uses the PEST parser. The corresponding PEG grammar is available here.

Enums

Rule

Functions

parse

Parses the specified &str s into a list of UciMessages. Please note that this method will ignore any unrecognized messages, which is in-line with the recommendations of the UCI protocol specification.

parse_one

Parses and returns a single message, with or without a terminating newline. Usually used in a loop that reads a single line from an input stream, such as the stdin. Note that if the message is unrecognizable to the parser, a UciMessage::UnknownMessage variant is returned.

parse_strict

Parses the specified &str s into a list of UciMessages. Please note that this method will return an Error if any of the input violates the grammar rules.

parse_with_unknown

This is like parse, except that it returns a UciMessage::UnknownMessage variant if it does not recognize the message.