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

Variables

string title
 
string pattern
 
string input = '---+1234.56789E-10==='
 
string header = 'RESULT'
 
int testno = 0
 
 exp = ApgExp(pattern)
 
 result = exp.exec(input)
 
 end
 

Variable Documentation

◆ end

examples.exp.limits.end

Definition at line 58 of file limits.py.

◆ exp

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

Definition at line 41 of file limits.py.

◆ header

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

Definition at line 37 of file limits.py.

◆ input

string examples.exp.limits.input = '---+1234.56789E-10==='

Definition at line 36 of file limits.py.

◆ pattern

string examples.exp.limits.pattern
Initial value:
1 = '''float = sign decimal exponent
2 sign = ["+" / "-"]
3 decimal = integer [dot fraction]
4  / dot fraction
5 integer = 1*%d48-57
6 dot = "."
7 fraction = *%d48-57
8 exponent = ["e" esign exp]
9 esign = ["+" / "-"]
10 exp = 1*%d48-57
11 '''

Definition at line 22 of file limits.py.

◆ result

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

Definition at line 42 of file limits.py.

◆ testno

int examples.exp.limits.testno = 0

Definition at line 38 of file limits.py.

◆ title

string examples.exp.limits.title
Initial value:
1 = '''This example will demonstrate how to place limits
2 on the number of node hits and parse tree depth.
3 Exists to avoid the problem of "catestrophic backtracking".
4 Although this is not nearly as big a problem for ApgExp
5 as it is for regex, nonetheless, facilities exist for
6 limiting a runaway parser.
7 '''

Definition at line 12 of file limits.py.

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