Version 1.0
Copyright © 2022 Lowell D. Thomas
Python APG
 … an ABNF Parser Generator
Functions
apg_py.api.scanner Namespace Reference

Functions

def scanner (input, strict)
 Scan the input for invalid characters and construct a line catalog for looking up line numbers from character indexes. More...
 

Function Documentation

◆ scanner()

def apg_py.api.scanner.scanner (   input,
  strict 
)

Scan the input for invalid characters and construct a line catalog for looking up line numbers from character indexes.

Parameters
inputA tuple of positive integers. Often, but not necessarily, character codes.
strictIf True, only RFC 5234 line endings allowed (CRLF).
Returns
Returns a dictionary of errors, if any, and the line catalog. {'errors': data['errors'], 'lines': data['lines']}

Definition at line 16 of file scanner.py.

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