Bases: object
Parser for the “ply” package, specialized for PrettyPFA (whole document or expression).
Includes both the tokenizer and the parser.
Creates the Parser, but it is only ready to use after calling initialize.
Parameters: | wholeDocument (bool) – if True, this parser expects a whole PFA document and parse returns a titus.pfaast.EngineConfig; otherwise, this parser expects a PFA expression and parse returns a titus.pfaast.Expression |
---|
Initialize the Parser by passing it the appropriate ply modules.
Parameters: |
|
---|---|
Return type: | None |
Returns: | nothing |
Parse the given text, returning a PFA abstract syntax tree.
Parameters: |
|
---|---|
Return type: | titus.pfaast.EngineConfig or titus.pfaast.Expression |
Returns: | parsed text as an abstract syntax tree |