titus.prettypfa.ast

titus.prettypfa.ast(text, check=True, version=None, subs={}, **subs2)[source]

Parse PrettyPFA and return the result as a PFA abstract syntax tree.

Parameters:
  • text (string) – PrettyPFA to parse
  • check (bool) – if True, check the result for PFA semantic errors (default True); Note: if the PrettyPFA contains any unresolved substitutions (in <<French quotes>>), it will not be checked
  • version (string or None) – version of the PFA language to use while interpreting (None defaults to titus.version.defaultPFAVersion)
  • subs (dict from substitution names to substitutions) – replacement values as PFA titus.pfaast.Ast, PrettyPFA strings, or PFA Pythonized JSON
  • subs2 (dict from substitution names to substitutions) – added to subs (a more convenient way to pass them)
Return type:

titus.pfaast.EngineConfig

Returns:

PFA abstract syntax tree