Version 1.0
Copyright © 2022 Lowell D. Thomas
Python APG
 … an ABNF Parser Generator
Public Member Functions | Public Attributes | List of all members
apg_py.lib.parser.ParserResult Class Reference

A convenience class for the parser's results. More...

Public Member Functions

def __init__ (cls, parser)
 Initialize the this result object from the parser object. More...
 
def __str__ (cls)
 Generate a string representation of the parser state. More...
 

Public Attributes

 success
 
 state
 
 STATE
 
 phrase_length
 
 input_length
 
 sub_begin
 
 sub_end
 
 sub_length
 
 node_hits
 
 max_tree_depth
 
 max_phrase_length
 

Detailed Description

A convenience class for the parser's results.

Definition at line 8 of file parser.py.

Constructor & Destructor Documentation

◆ __init__()

def apg_py.lib.parser.ParserResult.__init__ (   cls,
  parser 
)

Initialize the this result object from the parser object.

Definition at line 11 of file parser.py.

Member Function Documentation

◆ __str__()

def apg_py.lib.parser.ParserResult.__str__ (   cls)

Generate a string representation of the parser state.

The string will be displayed by print() function.

Returns
Returns the string representation to display.

Definition at line 40 of file parser.py.

Member Data Documentation

◆ input_length

apg_py.lib.parser.ParserResult.input_length

Definition at line 24 of file parser.py.

◆ max_phrase_length

apg_py.lib.parser.ParserResult.max_phrase_length

Definition at line 38 of file parser.py.

◆ max_tree_depth

apg_py.lib.parser.ParserResult.max_tree_depth

Definition at line 34 of file parser.py.

◆ node_hits

apg_py.lib.parser.ParserResult.node_hits

Definition at line 32 of file parser.py.

◆ phrase_length

apg_py.lib.parser.ParserResult.phrase_length

Definition at line 22 of file parser.py.

◆ state

apg_py.lib.parser.ParserResult.state

Definition at line 18 of file parser.py.

◆ STATE

apg_py.lib.parser.ParserResult.STATE

Definition at line 20 of file parser.py.

◆ sub_begin

apg_py.lib.parser.ParserResult.sub_begin

Definition at line 26 of file parser.py.

◆ sub_end

apg_py.lib.parser.ParserResult.sub_end

Definition at line 28 of file parser.py.

◆ sub_length

apg_py.lib.parser.ParserResult.sub_length

Definition at line 30 of file parser.py.

◆ success

apg_py.lib.parser.ParserResult.success

Definition at line 15 of file parser.py.


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.