APG
… an ABNF Parser Generator
|
Header file for the attributes functions. More...
Go to the source code of this file.
Data Structures | |
struct | attrs_ctx |
The API will construct an attributes object. This is the attribute object's context. More... | |
Macros | |
#define | BOOL_UNDEFINED ((abool)-1) |
Functions | |
void | vAttrsDtor (void *vpCtx) |
The API object destructor. More... | |
void | vRuleDependencies (attrs_ctx *spAtt) |
Compute each rule's dependencies on the other rules, and possibly on itself if the rule is recursive. More... | |
void | vRuleAttributes (attrs_ctx *spAtt) |
Computes the attributes of each rule in the grammar. 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... | |
void | vAttrsByType (api_attr *spAttrs, aint uiCount, FILE *spStream) |
Display the attributes sorted by attribute type. More... | |
const char * | cpType (aint uiId) |
Convert an attribute type ID to an ASCII string. More... | |
Header file for the attributes functions.
Definition in file attributes.h.
#define BOOL_UNDEFINED ((abool)-1) |
Definition at line 36 of file attributes.h.
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.
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.
void vRuleAttributes | ( | attrs_ctx * | spAtt | ) |
Computes the attributes of each rule in the grammar.
Attributes:
spAtt | Context pointer to the attributes object. |
Definition at line 112 of file rule-attributes.c.
void vRuleDependencies | ( | attrs_ctx * | spAtt | ) |
Compute each rule's dependencies on the other rules, and possibly on itself if the rule is recursive.
spAtt | Pointer to the attribute context. |
Definition at line 58 of file rule-dependencies.c.