Module parser

Module parser 

Source

Structs§

Parser
Simple parser type that can be used to convert an input stream of tokens into a tree (of a particular tree node type)
ParserDidNotConverge
Error indicating that finish() was called when the stack does not have exactly one treenode item in it
ParserLookaheadEmpty
Error indicating that a token cannot be accepted by the parser because there is no token in the lookahead
ParserStackTooSmall
Error indicating there are not enough tokens in the parser stack to perform a ‘reduce’ operation
TokenMatch
A match from the tokenizer
Tokenizer
A basic async tokenizer

Enums§

CommandToken
Tokens from the command stream
ExpectedTokenError
JsonInputType
What type of ‘more’ input was expected
JsonParseError
Errors that can occur while parsing JSON
JsonToken
The tokens that make up the JSON language
ParsedJson
The parsed form of a JSON statement. This can incorporate variables, as well as the parts of a standard JSON value
ParserStackEntry
An entry for the parser stack used by the ParserClass
TokenMatchResult
Results of matching some lookahead aganst a token

Traits§

TokenMatcher
Trait implemented by matchers that can recognise a token

Functions§

command_parse
Parses a command from an input stream
command_read_token
Reads a command token from the tokenizer
json_parse_array
Attempts to parse a JSON array starting at the current location in the tokenizer, leaving the result on top of the stack in the parser (or returning an error state if the value is not recognised)
json_parse_command_substitution
Parses a commmand substitution, contained within <> operators
json_parse_number
Attempts to parse a JSON object starting at the current location in the tokenizer, leaving the result on top of the stack in the parser (or returning an error state if the value is not recognised)
json_parse_object
Attempts to parse a JSON object starting at the current location in the tokenizer, leaving the result on top of the stack in the parser (or returning an error state if the value is not recognised)
json_parse_string
Attempts to parse a JSON string starting at the current location in the tokenizer, leaving the result on top of the stack in the parser (or returning an error state if the value is not recognised)
json_parse_value
Attempts to parse a JSON value starting at the current location in the tokenizer, leaving the result on top of the stack in the parser (or returning an error state if the value is not recognised)
json_parse_value_with_extensions
Attempts to parse a JSON value starting at the current location in the tokenizer, leaving the result on top of the stack in the parser (or returning an error state if the value is not recognised)
json_read_token
Reads a JSON token from the tokenizer
json_read_token_or_newline
Reads a JSON token from the tokenizer, including any newlines that are encountered