Version 1.0
Copyright © 2022 Lowell D. Thomas
Python APG
 … an ABNF Parser Generator
Namespaces | Variables
substrings.py File Reference

Demonstrate parsing substrings. More...

Go to the source code of this file.

Namespaces

 examples.basics.substrings
 

Variables

string examples.basics.substrings.title
 
string examples.basics.substrings.abnf_syntax = 'S = "a" S / "y"\n'
 
string examples.basics.substrings.input_string = '***aaay***'
 
int examples.basics.substrings.beg = 3
 
int examples.basics.substrings.len = 4
 
 examples.basics.substrings.end
 
 examples.basics.substrings.api = Api()
 
 examples.basics.substrings.grammar = api.generate(abnf_syntax)
 
 examples.basics.substrings.parser = Parser(grammar)
 
 examples.basics.substrings.result
 

Detailed Description

Demonstrate parsing substrings.

Often, expecially as used by the pattern-matching engine exp.py, one needs to parse only a sub-string of the entire input string. Here this is explicitly demonstrated.

Definition in file substrings.py.

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