The Right-Recursive Descent Parser.
void rdesc_stack_push(struct rdesc_stack **s, struct rdesc_token tk)
Pushes a token onto the stack.
Definition: stack.c:47
void rdesc_stack_init(struct rdesc_stack **s)
Initializes the token stack.
Definition: stack.c:37
size_t rdesc_stack_len(const struct rdesc_stack *s)
Returns the underlying dynamic buffer.
Definition: stack.c:80
struct rdesc_token rdesc_stack_pop(struct rdesc_stack **s)
Removes and returns the top token from the stack.
Definition: stack.c:63
void rdesc_stack_destroy(struct rdesc_stack *s)
Frees memory allocated by the token stack.
Definition: stack.c:58
struct rdesc_token * rdesc_stack_as_ref(struct rdesc_stack *s)
Returns a reference to underlying dynamic buffer.
Definition: stack.c:75
Default implementation of the token backtracking stack.
Definition: stack.c:31
terminal (token) object for context-free grammar
Definition: rdesc.h:43