Class for tracing and displaying the progress of the parser through the parse tree. More...
Public Member Functions | |
def | __init__ (self, parser, fname=None, mode='dc', line_max=32) |
def | __del__ (self) |
Destructor for ensuring that the output file is closed, if any. More... | |
def | finish (self) |
Guarantee that the output file is flushed. More... | |
def | set_display_length (self, max_len) |
Set the maximum trace line display length in characters. More... | |
def | indent (self, n) |
For internal use only. More... | |
def | traceALT (self, op) |
For internal use only. More... | |
def | traceCAT (self, op) |
For internal use only. More... | |
def | traceREP (self, op) |
For internal use only. More... | |
def | traceRNM (self, op) |
For internal use only. More... | |
def | traceUDT (self, op) |
For internal use only. More... | |
def | traceTLS (self, op) |
For internal use only. More... | |
def | traceTBS (self, op) |
For internal use only. More... | |
def | traceTRG (self, op) |
For internal use only. More... | |
def | traceAND (self, op) |
For internal use only. More... | |
def | traceNOT (self, op) |
For internal use only. More... | |
def | traceBKR (self, op) |
For internal use only. More... | |
def | traceBKA (self, op) |
For internal use only. More... | |
def | traceBKN (self, op) |
For internal use only. More... | |
def | traceABG (self, op) |
For internal use only. More... | |
def | traceAEN (self, op) |
For internal use only. More... | |
def | phrasex (self, phrase) |
For internal use only. More... | |
def | phrasexc (self, phrase) |
For internal use only. More... | |
def | phrased (self, phrase) |
For internal use only. More... | |
def | phrasedc (self, phrase) |
For internal use only. More... | |
def | down (self, op) |
For internal use only. More... | |
def | up (self, op, begin_index) |
For internal use only. More... | |
Public Attributes | |
file | |
mode | |
parser | |
line_max | |
selectOp | |
select_mode | |
Class for tracing and displaying the progress of the parser through the parse tree.
The Trace class has a copy of the Parser class and knows how to use it. Therefore, Trace and Parser need to remain in sync throughout development.
def apg_py.lib.trace.Trace.__init__ | ( | self, | |
parser, | |||
fname = None , |
|||
mode = 'dc' , |
|||
line_max = 32 |
|||
) |
parser | The parser to trace. |
fname | If present, the file name to write the trace to. |
mode | The display mode.
|
line_max | The maximum line length in characters for any trace line. |
def apg_py.lib.trace.Trace.__del__ | ( | self | ) |
def apg_py.lib.trace.Trace.down | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.finish | ( | self | ) |
def apg_py.lib.trace.Trace.indent | ( | self, | |
n | |||
) |
def apg_py.lib.trace.Trace.phrased | ( | self, | |
phrase | |||
) |
def apg_py.lib.trace.Trace.phrasedc | ( | self, | |
phrase | |||
) |
def apg_py.lib.trace.Trace.phrasex | ( | self, | |
phrase | |||
) |
def apg_py.lib.trace.Trace.phrasexc | ( | self, | |
phrase | |||
) |
def apg_py.lib.trace.Trace.set_display_length | ( | self, | |
max_len | |||
) |
def apg_py.lib.trace.Trace.traceABG | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceAEN | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceALT | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceAND | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceBKA | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceBKN | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceBKR | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceCAT | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceNOT | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceREP | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceRNM | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceTBS | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceTLS | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceTRG | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.traceUDT | ( | self, | |
op | |||
) |
def apg_py.lib.trace.Trace.up | ( | self, | |
op, | |||
begin_index | |||
) |