|
Lime Parser Generator 0.1.0
Runtime-extensible LALR(1) parser with SIMD tokenization and LLVM JIT
|
Execution Policy Engine – controls semantic action dispatch after disambiguation. More...
#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
Data Structures | |
| struct | ExecutionPolicyConfig |
| Configuration for the execution policy engine. More... | |
| struct | ExecutionResult |
| Result of executing a single grammar's semantic actions. More... | |
| struct | GrammarExtensionMetadata |
| Metadata describing a grammar extension participant in the execution pipeline. More... | |
Typedefs | |
| typedef struct LimeParserHandle | LimeParserHandle |
| Opaque parser handle for the execution engine. | |
| typedef bool(* | ParserExecuteFn) (LimeParserHandle *parser, const GrammarExtensionMetadata *ext, void *input, void **result, char **error) |
| Callback type for executing a parser's semantic actions. | |
Enumerations | |
| enum | LimeExecMode { EXEC_FIRST_ONLY = 0 , EXEC_ALL , EXEC_CHAIN , EXEC_CONDITIONAL } |
| Available execution policies. More... | |
Functions | |
| ExecutionResult * | execute_first_only (ParserExecuteFn execute_fn, const struct StrategyResult *disambiguation, LimeParserHandle **parsers, GrammarExtensionMetadata **extensions, int *nresults_out) |
| Convenience: execute with EXEC_FIRST_ONLY policy. | |
| ExecutionResult * | execute_semantic_actions (const ExecutionPolicyConfig *config, const struct StrategyResult *disambiguation, LimeParserHandle **parsers, GrammarExtensionMetadata **extensions, int *nresults_out) |
| Execute semantic actions according to the configured policy. | |
| void | execution_policy_config_init (ExecutionPolicyConfig *config) |
| Initialize default execution policy configuration. | |
| const char * | execution_policy_name (LimeExecMode policy) |
| Return a human-readable name for an execution policy. | |
| void | execution_results_free (ExecutionResult *results, int nresults) |
| Free an array of execution results. | |
Execution Policy Engine – controls semantic action dispatch after disambiguation.
When multiple grammar extensions can parse the same input, the execution policy determines how their semantic actions are invoked.
| Policy | Description |
|---|---|
| EXEC_FIRST_ONLY | Only the highest-priority winner executes |
| EXEC_ALL | All winners execute independently |
| EXEC_CHAIN | Winners execute in sequence, output chained |
| EXEC_CONDITIONAL | Extension-provided callback decides |
Definition in file execution_policy.h.