Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
|
Go to the documentation of this file.
192 void vLineError(
api *spCtx,
aint uiCharIndex,
const char *cpSrc,
const char *cpMsg);
193 void vHtmlHeader(FILE *spFile,
const char *cpTitle);
uint8_t * ucpPpptEmptyMap
Common PPPT character map for an operator that is an empty match on the next alphabet character.
abool * bpRefersToUdt
a list of all the UDTs that this rule refers to
aint uiUdtCount
The number of UDTs referenced in the SABNF grammar.
aint uiPpptIndex
Index to the PPPT map for this opcode.
uint8_t * ucpPpptUndecidedMap
Common PPPT character map for an operator that is indeterminate on the next alphabet character.
abool bRight
APG_TRUE if the rule is right recursive.
abool bLeaf
APG_TRUE if this is a leaf rule (appears for a second time on a branch)
aint uiIndex
index of this rule in the rule list
api_rule * spRules
Points to an array of rule structures.
abool * bpIsReferencedBy
a list of all the rules that refer to this rule
luint luiMax
maximum value for REP and TRG opcodes
aint uiLicenseOffset
Offset into the string table for the License string.
aint uiOpcodeCount
Number of opcodes.
aint uiPpptIndex
Index to the PPPT map for this opcode.
api_op * spOpcodes
Pointer to the array of opcodes for the SANF grammar.
aint uiVersionLength
Length of the Version Number string.
void vHtmlFooter(FILE *spFile)
Prints an HTML footer to an open file.
aint uiAcharLength
number of characters in TLS/TBS strings
luint luiAcharEos
The special End-Of-String character. In practice, luiAcharMax + 1.
void * vpLog
A msglog context for error reporting.
void * vpOutputParserInit
Storage for variable integer width output parser init data.
Working attribute information about a each rule.
luint * luipInit
Storage variable for intermediate parser initialization data.
void vHtmlHeader(FILE *spFile, const char *cpTitle)
Prints an HTML header to an open file.
API information about each rule.
abool bInputValid
APG_TRUE if theer is input and it has been validated, APG_FALSE otherwise.
aint uiChildCount
number of children for this ALT or CAT operator
void * vpAttrsCtx
context handle to the attributes object
char * cpStringTable
Pointer to a list of null-terminated ASCII strings representing the rule and UDT names.
Used by syntax.c but needed here for constructor/destructor.
abool bLeft
APG_TRUE if the rule is left recursive.
abool bFinite
APG_TRUE if the rule is finite.
luint * luipAchar
pointer to the first character in the achar table for this TLS/TBS operator
luint luiMin
minimum value for REP and TRG opcodes
api_udt * spUdts
Points to an array of UDT structures, if one or more UDTs are referenced in the SABNF grammar.
aint uiRuleCount
The number of rules in the SABNF grammar and in the array.
uint_fast32_t aint
The APG parser's unsigned integer type.
aint * uipChildIndexTable
Pointer to a list of child indexes. ALT & CAT operators have two or more children operators....
abool bProtected
if true, this rule will be protected from being hidden under a fully-predictive node in the parse tre...
aint uiMode
ID_BKR_MODE_U of ID_BKR_MODE_P for BKR.
aint uiChildIndexTableLength
The number of indexes (integers) in the child index table.
aint uiCopyrightOffset
Offset into the string table for the Copyright string.
char * cpName
pointer to null-terminated string in the string table
void * vpLines
Context pointer to a lines object.
luint luiPpptMapCount
The number of operator maps in the table.
aint uiLicenseLength
Length of the License string.
A structure to describe the type and location of a caught exception.
aint uiCase
ID_BKR_CASE_S or ID_BKR_CASE_I for BKR.
aint uiIndex
index of this referenced rule or UDT
luint * luipAcharTable
Pointer to the Achar Table - a table of all of the alphabet characters referenced by the terminal nod...
uintmax_t luint
luint is used to cast integers suitable for the %"PRIuMAX" printf format.
void * vpVecGrammar
The (achar) input grammar, if sizeof(achar) > sizeof(char).
abool bIsOpen
used for walking the SEST, set to true at the root it will tell when a recursive instance of the rule...
aint uiRecursiveType
ID_ATTR_N, ID_ATTR_R, ID_ATTR_MR, ID_ATTR_NMR, or ID_ATTR_RMR.
char * cpRuleName
the rule name for these attributes
abool bSyntaxValid
APG_TRUE if the input syntax is valid, APG_FALSE otherwise.
API information about each opcode.
void * vpAst
context handle to the AST object
API information about each UDT.
abool bAttributesComputed
APG_TRUE if attributes have been computed (even is there are attribute errors), APG_FALSE otherwise.
aint uiVersionOffset
Offset into the string table for the Version Number string.
const void * vpValidate
the "magic number" to indicate that this is a valid context
void * vpVecInput
The (ASCII) input grammar files and/or strings accumulate here. Always a NULL-terminated string.
aint uiInputLength
The number of input characters.
void * vpOutputAcharTable
Storage for variable character width output parser achar table.
abool * bpRefersTo
a list of all the rules that this rule refers to
aint uiAcharTableLength
Number of alphabet characters in the Achar Table.
luint luiPpptMapSize
The size, in bytes, of a single operator map.
uint8_t * ucpPpptTable
Pointer to the PPPT table of operator maps.
aint uiId
type of opcode, ID_ALT, etc.
aint uiCopyrightLength
Length of the copyright string.
abool bAttributesValid
APG_TRUE if there the rule attributes have been computed and have no fatal errors,...
void * vpVecTempChars
Temporary vector of characters. Here for clean up on unusual exit.
abool bNested
APG_TRUE if the rule is nested recursive.
aint uiEmpty
APG_TRUE if this UDT can be empty, APG_FALSE otherwise
abool bUsePppt
True of PPPT are being used.
uint8_t abool
abool is the APG bool type.
void * vpAltStack
A temporary vector for the AST translator.
char * cpName
pointer to null-terminated string in the string table
abool bCyclic
APG_TRUE if the rule is cyclic.
aint uiStringTableLength
The number of characters in the string table.
aint uiRuleIndex
the index of the rule for these attributes
aint uiIndex
index of this UDT in the UDT list
luint luiAcharMin
The minimum alphabet character referenced by the terminal nodes, TLS, TBL & TRG.
aint uiBkrIndex
if BKR, this is the index to the rule or UDT that is being back referenced
void * vpParser
context handle to the SABNF grammar parser object
void * vpMem
Pointer to the memory context used for all memory allocations and exceptions thrown.
aint uiMRGroup
the group number, if this is a member of a mutually-recursive group (there may be multiple groups)
luint luiAcharMax
The maximum alphabet character referenced by the terminal nodes, TLS, TBL & TRG.
abool bEmpty
APG_TRUE if the rule can be empty.
aint * uipChildIndex
pointer to the first child index of this ALT or CAT operator
char * cpLineBuffer
Storage variable for intermediate parser line data.
abool bSemanticsValid
APG_TRUE if the the input semantics are valid. That is, the opcodes for the parser have been generate...
void vLineError(api *spCtx, aint uiCharIndex, const char *cpSrc, const char *cpMsg)
Finds the grammar line associated with a character index and formats an error message to the error lo...
aint uiOpOffset
offset into the opcode table to the first opcode of this rule
aint uiEmpty
APG_TRUE if this UDT can be empty, APG_FALSE otherwise
abool bIsComplete
used when processing rules recursively. If the rule is already complete it need not be recursed again...
luint luiPpptTableLength
The PPPT length.
aint uiOpCount
the number of opcodes in this rule
APG Version 7.0 is licensed under the
2-Clause BSD License,
an Open Source Initiative Approved License.