finesse.script.parser.KatParser

Overview

class finesse.script.parser.KatParser[source]

Bases: object

Kat script parser.

This uses so-called packrat parsing to reduce, via productions, tokens yielded from a token stream generated from an input file or string to KatScriptItem objects containing the associated tokens.

Properties

KatParser.script

Methods

KatParser.__init__()

KatParser.array(*args)

KatParser.array_value(*args)

KatParser.array_values(*args)

KatParser.element(*args)

KatParser.element_key_value_list(*args)

KatParser.element_params(*args)

KatParser.element_value_list(*args)

KatParser.empty(*args)

KatParser.expect_production(production, ...)

KatParser.expect_token(*args)

KatParser.expr(*args)

KatParser.expr1(*args)

KatParser.expr2(*args)

KatParser.expr3(*args)

KatParser.expr4(*args)

KatParser.function(*args)

KatParser.function_key_value_list(*args)

KatParser.function_params(*args)

KatParser.function_value_list(*args)

KatParser.get_token()

KatParser.invalid_array(*args)

KatParser.invalid_expr4(*args)

KatParser.invalid_script_line(*args)

KatParser.key_value(*args)

KatParser.loop(production, nonempty, *args, ...)

KatParser.mark()

KatParser.maybe_trailing_comma(multiline)

KatParser.maybe_whitespace(multiline, whitespace)

Expect zero or more whitespace if enabled, else return [].

KatParser.negative_lookahead(token_type)

KatParser.parse(string)

Parse the contents of string.

KatParser.parse_file(fobj)

Parse the contents of the specified file.

KatParser.peek_token()

KatParser.positional_value(*args)

KatParser.positive_lookahead(token_type)

KatParser.reset(pos)

KatParser.script_line(*args)

KatParser.script_line_empty(*args)

KatParser.start()

KatParser.statement(*args)

KatParser.value(*args)