|
Lime Parser Generator 0.1.0
Runtime-extensible LALR(1) parser with SIMD tokenization and LLVM JIT
|
Scan loaded extensions for token, rule, and semantic conflicts. More...
Functions | |
| bool | detect_all_multi_grammar_conflicts (struct ExtensionRegistry *reg, MultiGrammarConflictResult *result) |
| Run a full multi-grammar conflict scan across all loaded extensions. | |
| ConflictPoint | detect_conflict (struct ExtensionRegistry *reg, uint16_t token, int state) |
| Detect all levels of conflict for a specific token and state. | |
| uint32_t | detect_rule_conflicts (struct ExtensionRegistry *reg, uint16_t token, int state, MultiGrammarConflictResult *result) |
| Detect rule-level conflicts for a given token and state. | |
| uint32_t | detect_semantic_conflicts (struct ExtensionRegistry *reg, uint16_t token, int state, MultiGrammarConflictResult *result) |
| Detect semantic-level conflicts for a given token and state. | |
| uint32_t | detect_token_conflicts (struct ExtensionRegistry *reg, MultiGrammarConflictResult *result) |
| Detect token-level conflicts across all loaded extensions. | |
Scan loaded extensions for token, rule, and semantic conflicts.
| bool detect_all_multi_grammar_conflicts | ( | struct ExtensionRegistry * | reg, |
| MultiGrammarConflictResult * | result | ||
| ) |
#include <include/conflict.h>
Run a full multi-grammar conflict scan across all loaded extensions.
Walks every loaded extension's modifications and detects conflicts at all three levels (token, rule, semantic).
| reg | Extension registry with loaded extensions. |
| result | Result set to populate (must be pre-created). |
| true | At least one conflict was detected. |
| false | No conflicts found. |
| ConflictPoint detect_conflict | ( | struct ExtensionRegistry * | reg, |
| uint16_t | token, | ||
| int | state | ||
| ) |
#include <include/conflict.h>
Detect all levels of conflict for a specific token and state.
Convenience function that runs token, rule, and semantic detection and returns a single ConflictPoint summarizing all interpretations. If ncontexts > 1, the token is ambiguous.
| reg | Extension registry with loaded extensions. |
| token | The token code to check. |
| state | The parser state to check (-1 for token-only check). |
| uint32_t detect_rule_conflicts | ( | struct ExtensionRegistry * | reg, |
| uint16_t | token, | ||
| int | state, | ||
| MultiGrammarConflictResult * | result | ||
| ) |
#include <include/conflict.h>
Detect rule-level conflicts for a given token and state.
Checks whether multiple extensions provide rules that could handle the specified token at the given state, creating a parse ambiguity.
| reg | Extension registry with loaded extensions. |
| token | The token code to check. |
| state | The parser state to check. |
| result | Result set to populate (must be pre-created). |
| uint32_t detect_semantic_conflicts | ( | struct ExtensionRegistry * | reg, |
| uint16_t | token, | ||
| int | state, | ||
| MultiGrammarConflictResult * | result | ||
| ) |
#include <include/conflict.h>
Detect semantic-level conflicts for a given token and state.
Checks whether multiple extensions provide different semantic actions for the same syntactic construct.
| reg | Extension registry with loaded extensions. |
| token | The token code to check. |
| state | The parser state to check. |
| result | Result set to populate (must be pre-created). |
| uint32_t detect_token_conflicts | ( | struct ExtensionRegistry * | reg, |
| MultiGrammarConflictResult * | result | ||
| ) |
#include <include/conflict.h>
Detect token-level conflicts across all loaded extensions.
Scans the extension registry for loaded extensions whose modifications introduce tokens that collide (same name, different semantics).
| reg | Extension registry with loaded extensions. |
| result | Result set to populate (must be pre-created). |