|
librdesc
|
Token stack interface contract. More...
Go to the source code of this file.
Functions | |
| void | rdesc_stack_init (struct rdesc_stack **s) |
| Initializes the token stack. | |
| void | rdesc_stack_destroy (struct rdesc_stack *s) |
| Frees memory allocated by the token stack. | |
| void | rdesc_stack_push (struct rdesc_stack **s, struct rdesc_token tk) |
| Pushes a token onto the stack. | |
| struct rdesc_token | rdesc_stack_pop (struct rdesc_stack **s) |
| Removes and returns the top token from the stack. | |
| struct rdesc_token * | rdesc_stack_as_ref (struct rdesc_stack *s) |
| Returns a reference to underlying dynamic buffer. | |
| size_t | rdesc_stack_len (const struct rdesc_stack *s) |
| Returns the underlying dynamic buffer. | |
Token stack interface contract.
This header defines the function signatures required to manipulate the parser's backtracking stack.
struct rdesc_stack, you must provide implementations for all the functions declared in this file. The parser engine (librdesc) relies on these exact signatures to perform backtracking.