Version 1.0
Copyright © 2022 Lowell D. Thomas
Python APG
 … an ABNF Parser Generator
Namespaces | Functions | Variables
stats.py File Reference

Demonstrates how to display the parser's statistics. More...

Go to the source code of this file.

Namespaces

 examples.basics.stats
 

Functions

def examples.basics.stats.udt_sign (cbData)
 
def examples.basics.stats.udt_integer (cbData)
 

Variables

string examples.basics.stats.title
 
string examples.basics.stats.float
 
string examples.basics.stats.anbncn = 'S = &(A !bb) 1*aa B !cc\n'
 
 examples.basics.stats.api = Api()
 
 examples.basics.stats.grammar = api.generate(float)
 
 examples.basics.stats.parser = Parser(grammar)
 
 examples.basics.stats.stats = Stats(parser)
 
string examples.basics.stats.input_string = '-123.456789E-10'
 
 examples.basics.stats.result = parser.parse(utils.string_to_tuple(input_string))
 
 examples.basics.stats.end
 

Detailed Description

Demonstrates how to display the parser's statistics.

Demonstrate the display of the parser's statistics. Displays a count of how many nodes of each kind were hit and how many times. Also displays how many times each rule and UDT name is hit. Note that operators and rule/UDT names that have a 0(zero) hit count are not displayed.

Definition in file stats.py.

Python APG, Version 1.0, is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.