|
Lime Parser Generator 0.1.0
Runtime-extensible LALR(1) parser with SIMD tokenization and LLVM JIT
|
Create, populate, and destroy conflict points. More...
Functions | |
| bool | conflict_point_add_context (ConflictPoint *cp, const LimeContext *ctx) |
| Add a grammar context to a conflict point. | |
| void | conflict_point_destroy (ConflictPoint *cp) |
| Free resources owned by a ConflictPoint. | |
| void | conflict_point_init (ConflictPoint *cp, uint16_t token, int state, ConflictLevel level) |
| Initialize a ConflictPoint. | |
Create, populate, and destroy conflict points.
| bool conflict_point_add_context | ( | ConflictPoint * | cp, |
| const LimeContext * | ctx | ||
| ) |
#include <include/conflict.h>
Add a grammar context to a conflict point.
| cp | ConflictPoint to add to. |
| ctx | Context describing one possible interpretation. |
| true | Context was added. |
| false | Allocation failure. |
| void conflict_point_destroy | ( | ConflictPoint * | cp | ) |
#include <include/conflict.h>
Free resources owned by a ConflictPoint.
Frees the contexts array and description. Does not free the ConflictPoint struct itself.
| cp | ConflictPoint to clean up. |
| void conflict_point_init | ( | ConflictPoint * | cp, |
| uint16_t | token, | ||
| int | state, | ||
| ConflictLevel | level | ||
| ) |
#include <include/conflict.h>
Initialize a ConflictPoint.
The caller owns the struct (typically stack- or array-allocated).
| cp | ConflictPoint to initialize. |
| token | Token code. |
| state | Parser state (-1 for token-level conflicts). |
| level | Ambiguity level. |