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

Functions

def syntax (api, strict)
 Parse the SABNF grammar. More...
 

Function Documentation

◆ syntax()

def apg_py.api.syntax.syntax (   api,
  strict 
)

Parse the SABNF grammar.

Parameters
apiThe api object (api.py) for the given grammar syntax.
strictIf True, strictly follow the ABNF conventions of RFCs 5234 & 7405
Returns
Returns a list of error, if any. Each error in the list has the dictionary form
  • 'line': the line number where the error occurred
  • 'index': the approximate relative index within the line where the error occurred
  • 'msg': as descriptive error message

Definition at line 10 of file syntax.py.

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