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.api.rule_attributes.Attr Class Reference

Simple class for attribute data for each rule. More...

Public Member Functions

def __init__ (self, name='dummy', type=id.ATTR_N, group=-1)
 Attr constructor. More...
 
def reset (self)
 Reset all attributes to false. More...
 
def dup (self)
 Create a duplicate attribute object from the present one. More...
 
def copy (self, cpy)
 Copy a given attribute into the present attribute. More...
 

Public Attributes

 left
 
 nested
 
 right
 
 empty
 
 finite
 
 cyclic
 
 leaf
 
 is_open
 
 is_complete
 
 name
 
 lower
 
 type
 
 group
 

Detailed Description

Simple class for attribute data for each rule.

Definition at line 10 of file rule_attributes.py.

Constructor & Destructor Documentation

◆ __init__()

def apg_py.api.rule_attributes.Attr.__init__ (   self,
  name = 'dummy',
  type = id.ATTR_N,
  group = -1 
)

Attr constructor.

Parameters
nameThe name of the rule this attribute applies to.
typeThe identifier of the rule's recursive type.
groupThe group number if the type is mutually-recursive (ATTR_MR), otherwise, -1.

Definition at line 13 of file rule_attributes.py.

Member Function Documentation

◆ copy()

def apg_py.api.rule_attributes.Attr.copy (   self,
  cpy 
)

Copy a given attribute into the present attribute.

Parameters
cpyThe attribute to copy.

Definition at line 67 of file rule_attributes.py.

◆ dup()

def apg_py.api.rule_attributes.Attr.dup (   self)

Create a duplicate attribute object from the present one.

Returns
Returns new attribute object identical to the present one.

Definition at line 47 of file rule_attributes.py.

◆ reset()

def apg_py.api.rule_attributes.Attr.reset (   self)

Reset all attributes to false.

Definition at line 35 of file rule_attributes.py.

Member Data Documentation

◆ cyclic

apg_py.api.rule_attributes.Attr.cyclic

Definition at line 26 of file rule_attributes.py.

◆ empty

apg_py.api.rule_attributes.Attr.empty

Definition at line 24 of file rule_attributes.py.

◆ finite

apg_py.api.rule_attributes.Attr.finite

Definition at line 25 of file rule_attributes.py.

◆ group

apg_py.api.rule_attributes.Attr.group

Definition at line 33 of file rule_attributes.py.

◆ is_complete

apg_py.api.rule_attributes.Attr.is_complete

Definition at line 29 of file rule_attributes.py.

◆ is_open

apg_py.api.rule_attributes.Attr.is_open

Definition at line 28 of file rule_attributes.py.

◆ leaf

apg_py.api.rule_attributes.Attr.leaf

Definition at line 27 of file rule_attributes.py.

◆ left

apg_py.api.rule_attributes.Attr.left

Definition at line 21 of file rule_attributes.py.

◆ lower

apg_py.api.rule_attributes.Attr.lower

Definition at line 31 of file rule_attributes.py.

◆ name

apg_py.api.rule_attributes.Attr.name

Definition at line 30 of file rule_attributes.py.

◆ nested

apg_py.api.rule_attributes.Attr.nested

Definition at line 22 of file rule_attributes.py.

◆ right

apg_py.api.rule_attributes.Attr.right

Definition at line 23 of file rule_attributes.py.

◆ type

apg_py.api.rule_attributes.Attr.type

Definition at line 32 of file rule_attributes.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.