Definition at line 5 of file stats.py.
◆ __init__()
def apg_py.lib.stats.Stats.__init__ |
( |
|
self, |
|
|
|
parser |
|
) |
| |
Class constructor.
- Parameters
-
parser | the parser object to attach this Stats object to |
Definition at line 6 of file stats.py.
◆ clear()
def apg_py.lib.stats.Stats.clear |
( |
|
self | ) |
|
For internal use.
Called here and by the parser to initialize the hit counts.
Definition at line 20 of file stats.py.
◆ collect()
def apg_py.lib.stats.Stats.collect |
( |
|
self, |
|
|
|
op |
|
) |
| |
Called by the parser for each node to collect the hit count.
Definition at line 46 of file stats.py.
◆ display()
def apg_py.lib.stats.Stats.display |
( |
|
self | ) |
|
Display the parse tree node hit statistics.
It will first display the node statistics for the various node operators. It then displays the rule name and UDT name statistics. Operators and rule/UDT names for which the hit count is 0 are not displayed.
Definition at line 57 of file stats.py.
◆ total()
def apg_py.lib.stats.Stats.total |
( |
|
self, |
|
|
|
stat |
|
) |
| |
For internal use.
Computes the total number of hits.
Definition at line 42 of file stats.py.
◆ names
apg_py.lib.stats.Stats.names |
◆ parser
apg_py.lib.stats.Stats.parser |
◆ rule_stats
apg_py.lib.stats.Stats.rule_stats |
◆ stats
apg_py.lib.stats.Stats.stats |
The documentation for this class was generated from the following file:
Python APG, Version 1.0, is licensed under the
2-Clause BSD License,
an
Open Source Initiative Approved License.