APG
… an ABNF Parser Generator
|
The main functions driving the attributes determination. More...
Go to the source code of this file.
Functions | |
abool | bApiAttrs (void *vpCtx) |
Computes the grammar's attributes. More... | |
void | vAttrsDtor (void *vpCtx) |
The API object destructor. More... | |
void | vApiAttrsToAscii (void *vpCtx, const char *cpMode, const char *cpFileName) |
Display all rule attributes. More... | |
void | vApiAttrsErrorsToAscii (void *vpCtx, const char *cpMode, const char *cpFileName) |
Display all rule attributes with errors. More... | |
void | vAttrsByType (api_attr *spAttrs, aint uiCount, FILE *spStream) |
Display the attributes sorted by attribute type. More... | |
void | vAttrsByName (api_attr *spAttrs, aint uiCount, FILE *spStream) |
Display the attributes sorted by rule name. More... | |
void | vAttrsByIndex (api_attr *spAttrs, aint uiCount, FILE *spStream) |
Display the attributes sorted by rule index. More... | |
const char * | cpType (aint uiId) |
Convert an attribute type ID to an ASCII string. More... | |
The main functions driving the attributes determination.
For each rule in the SABNF grammar the rule attributes are:
Definition in file attributes.c.
abool bApiAttrs | ( | void * | vpCtx | ) |
Computes the grammar's attributes.
For each rule in the SABNF grammar the rule attributes are:
vpCtx | - Pointer to an API context previously returned from vpApiCtor(). |
uipCount | - Pointer to an integer. Set to the number (count) of attributes. This will always be the number of rules in the grammar. May be NULL if no count is wanted. |
Definition at line 79 of file attributes.c.
const char* cpType | ( | aint | uiId | ) |
Convert an attribute type ID to an ASCII string.
uiId | An attribute type ID (ID_ATTR_N, ID_ATTR_R or ID_ATTR_MF) |
Definition at line 484 of file attributes.c.
void vApiAttrsErrorsToAscii | ( | void * | vpCtx, |
const char * | cpMode, | ||
const char * | cpFileName | ||
) |
Display all rule attributes with errors.
vpCtx | - Pointer to an API context previously returned from vpApiCtor(). |
cpMode | (note: the first character (case-insensitive) of the following options is all that is needed)
|
cpFileName | - Name of the file to display on. Any directories in the path name must exist. If NULL, stdout is used. |
Definition at line 268 of file attributes.c.
void vApiAttrsToAscii | ( | void * | vpCtx, |
const char * | cpMode, | ||
const char * | cpFileName | ||
) |
Display all rule attributes.
vpCtx | - Pointer to an API context previously returned from vpApiCtor(). |
cpMode | (note: the first character (case-insensitive) of the following options is all that is needed)
|
cpFileName | - Name of the file to display on. Any directories in the path name must exist. If NULL, stdout is used. |
Definition at line 220 of file attributes.c.
Display the attributes sorted by rule index.
spAtt | Pointer to an attributes context returned from spAttrsCtor(). This function is only called internally, hence the context pointer is already cast correctly. |
spStream | An open stream to display to. |
Definition at line 379 of file attributes.c.
Display the attributes sorted by rule name.
spAtt | Pointer to an attributes context returned from spAttrsCtor(). This function is only called internally, hence the context pointer is already cast correctly. |
spStream | An open stream to display to. |
Definition at line 358 of file attributes.c.
Display the attributes sorted by attribute type.
spAtt | Pointer to an attributes context returned from spAttrsCtor(). This function is only called internally, hence the context pointer is already cast correctly. |
spStream | An open stream to display to. |
Definition at line 337 of file attributes.c.
void vAttrsDtor | ( | void * | vpCtx | ) |
The API object destructor.
Since this is a "sub-object" which shares the memory context with its parent API object this destructor simply frees all memory associated with it and clears the context. The API destructor will also free all memory associated with this object.
vpCtx | Pointer to an attributes context returned from spAttrsCtor(). NULL is silently ignored. However if non-NULL it must be a valid attributes context pointer. |
Definition at line 184 of file attributes.c.