Version 1.0
Copyright © 2022 Lowell D. Thomas
Python APG
 … an ABNF Parser Generator
Variables
examples.exp.rules Namespace Reference

Variables

string title
 
string pattern
 
string header = 'RESULT'
 
int testno = 0
 
 exp = ApgExp(pattern)
 
string input = '(999)555-1234'
 
 result = exp.exec(input)
 

Variable Documentation

◆ exp

examples.exp.rules.exp = ApgExp(pattern)

Definition at line 37 of file rules.py.

◆ header

string examples.exp.rules.header = 'RESULT'

Definition at line 33 of file rules.py.

◆ input

string examples.exp.rules.input = '(999)555-1234'

Definition at line 39 of file rules.py.

◆ pattern

string examples.exp.rules.pattern
Initial value:
1 = '''phone-number = form1 / form2 / form3
2 form1 = open-paren area-code close-paren office-code hyphen subscriber
3 form2 = area-code hyphen office-code hyphen subscriber
4 form3 = area-code office-code subscriber
5 area-code = 3digit
6 office-code = 3digit
7 subscriber = 4digit
8 open-paren = %d40
9 close-paren = %d41
10 hyphen = %d45
11 digit = %d48-57
12 '''

Definition at line 18 of file rules.py.

◆ result

examples.exp.rules.result = exp.exec(input)

Definition at line 40 of file rules.py.

◆ testno

int examples.exp.rules.testno = 0

Definition at line 34 of file rules.py.

◆ title

string examples.exp.rules.title
Initial value:
1 = '''This example will demonstrate how to include
2 or exclude specific rule names in the result.
3 '''

Definition at line 12 of file rules.py.

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