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

Variables

string title
 
string pattern = 'start = "abc"\n'
 
string input_global = '---abc===ABC---'
 
string input_sticky = '---abcABC---'
 
string header = 'RESULT'
 
int testno = 0
 
 exp = ApgExp(pattern, 'g')
 
string input = input_global
 
 result = exp.exec(input)
 
 last_index
 

Variable Documentation

◆ exp

examples.exp.flags.exp = ApgExp(pattern, 'g')

Definition at line 30 of file flags.py.

◆ header

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

Definition at line 26 of file flags.py.

◆ input

string examples.exp.flags.input = input_global

Definition at line 31 of file flags.py.

◆ input_global

string examples.exp.flags.input_global = '---abc===ABC---'

Definition at line 24 of file flags.py.

◆ input_sticky

string examples.exp.flags.input_sticky = '---abcABC---'

Definition at line 25 of file flags.py.

◆ last_index

examples.exp.flags.last_index

Definition at line 43 of file flags.py.

◆ pattern

string examples.exp.flags.pattern = 'start = "abc"\n'

Definition at line 23 of file flags.py.

◆ result

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

Definition at line 32 of file flags.py.

◆ testno

int examples.exp.flags.testno = 0

Definition at line 27 of file flags.py.

◆ title

string examples.exp.flags.title
Initial value:
1 = '''This example will demonstrate the pattern matching flags
2 and how they work, and specifly setting "last_index", the starting character.
3 - with the global flag, "g", set, repeated calls to exec() will find all matches
4 - with the sticky flag, "y", set, repeated calls to exec() will find all consecutive matches
5 - with the character code flag, "c", set, input and results are in tuples of integers rather than strings
6 - with the trace flag, "t", set, a parsing trace facilitates debugging patterns in input strings
7 '''

Definition at line 13 of file flags.py.

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