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

Variables

string title
 
 api = Api()
 
string syntax
 
string input_string = 'first line\nsecond line'
 
 grammar = api.generate(syntax)
 
 parser = Parser(grammar)
 
 result
 
 end
 

Variable Documentation

◆ api

examples.basics.look_behind.api = Api()

Definition at line 32 of file look_behind.py.

◆ end

examples.basics.look_behind.end

Definition at line 51 of file look_behind.py.

◆ grammar

examples.basics.look_behind.grammar = api.generate(syntax)

Definition at line 39 of file look_behind.py.

◆ input_string

string examples.basics.look_behind.input_string = 'first line\nsecond line'

Definition at line 38 of file look_behind.py.

◆ parser

examples.basics.look_behind.parser = Parser(grammar)

Definition at line 46 of file look_behind.py.

◆ result

examples.basics.look_behind.result
Initial value:
1 = parser.parse(
2  utils.string_to_tuple(input_string),
3  sub_begin=0,
4  sub_length=11)

Definition at line 47 of file look_behind.py.

◆ syntax

string examples.basics.look_behind.syntax
Initial value:
1 = '''line = &&line-begin text line-end
2 line-begin = (%^ / %d10)
3 line-end = (%$ / %d10)
4 text = 1*(%d32 / %d97-122 / %d65-90 / %d48-57)
5 '''

Definition at line 33 of file look_behind.py.

◆ title

string examples.basics.look_behind.title
Initial value:
1 = '''A demonstration of the positive (&&) and negative(!!)
2 look behind operators. Included is a demonstration of using anchors,
3 operators that match only the beginning and ending positions
4 of the input string.
5 '''

Definition at line 23 of file look_behind.py.

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