|
librdesc
|
Context-Free Grammar (CFG) data structures. More...
#include <stdint.h>Go to the source code of this file.
Classes | |
| struct | rdesc_cfg |
| Context-free grammar definition. More... | |
| struct | rdesc_cfg_symbol |
| A terminal/non-terminal to describe body (right side) of a production rule. More... | |
Enumerations | |
| enum | rdesc_cfg_symbol_type { CFG_TOKEN , CFG_NONTERMINAL , CFG_SENTINEL } |
The type of rdesc_cfg_symbol (the union's tag) More... | |
Functions | |
| void | rdesc_cfg_init (struct rdesc_cfg *cfg, uint32_t nonterminal_count, uint16_t nonterminal_variant_count, uint16_t nonterminal_body_length, const struct rdesc_cfg_symbol *production_rules) |
| Initializes a context-free grammar object. | |
| void | rdesc_cfg_destroy (struct rdesc_cfg *cfg) |
| Frees the context-free grammar struct. | |
Context-Free Grammar (CFG) data structures.
This header defines the core data structures used to represent a CFG in librdesc.
The type of rdesc_cfg_symbol (the union's tag)
| Enumerator | |
|---|---|
| CFG_SENTINEL | sentinel for terminating production body or variants of a non-terminal |