| 1 |
/* |
| 2 |
* Copyright 2022 Jeffrey Kegler |
| 3 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 4 |
* copy of this software and associated documentation files (the "Software"), |
| 5 |
* to deal in the Software without restriction, including without limitation |
| 6 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 7 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 8 |
* Software is furnished to do so, subject to the following conditions: |
| 9 |
* |
| 10 |
* The above copyright notice and this permission notice shall be included |
| 11 |
* in all copies or substantial portions of the Software. |
| 12 |
* |
| 13 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 16 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 17 |
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 18 |
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 19 |
* OTHER DEALINGS IN THE SOFTWARE. |
| 20 |
*/ |
| 21 |
|
| 22 |
/* |
| 23 |
* DO NOT EDIT DIRECTLY |
| 24 |
* This file is written by the Marpa build process |
| 25 |
* It is not intended to be modified directly |
| 26 |
*/ |
| 27 |
|
| 28 |
|
| 29 |
#line 1 "./marpa_codes.c.p10" |
| 30 |
#include "config.h" |
| 31 |
|
| 32 |
#include "marpa.h" |
| 33 |
#include "marpa_codes.h" |
| 34 |
#include "marpa_ami.h" |
| 35 |
|
| 36 |
|
| 37 |
#line 1 "./marpa.c-err" |
| 38 |
const struct marpa_error_description_s marpa_error_description[] = { |
| 39 |
{ 0, "MARPA_ERR_NONE", "No error" }, |
| 40 |
{ 1, "MARPA_ERR_AHFA_IX_NEGATIVE", "MARPA_ERR_AHFA_IX_NEGATIVE" }, |
| 41 |
{ 2, "MARPA_ERR_AHFA_IX_OOB", "MARPA_ERR_AHFA_IX_OOB" }, |
| 42 |
{ 3, "MARPA_ERR_ANDID_NEGATIVE", "MARPA_ERR_ANDID_NEGATIVE" }, |
| 43 |
{ 4, "MARPA_ERR_ANDID_NOT_IN_OR", "MARPA_ERR_ANDID_NOT_IN_OR" }, |
| 44 |
{ 5, "MARPA_ERR_ANDIX_NEGATIVE", "MARPA_ERR_ANDIX_NEGATIVE" }, |
| 45 |
{ 6, "MARPA_ERR_BAD_SEPARATOR", "Separator has invalid symbol ID" }, |
| 46 |
{ 7, "MARPA_ERR_BOCAGE_ITERATION_EXHAUSTED", "MARPA_ERR_BOCAGE_ITERATION_EXHAUSTED" }, |
| 47 |
{ 8, "MARPA_ERR_COUNTED_NULLABLE", "Nullable symbol on RHS of a sequence rule" }, |
| 48 |
{ 9, "MARPA_ERR_DEVELOPMENT", "Development error, see string" }, |
| 49 |
{ 10, "MARPA_ERR_DUPLICATE_AND_NODE", "MARPA_ERR_DUPLICATE_AND_NODE" }, |
| 50 |
{ 11, "MARPA_ERR_DUPLICATE_RULE", "Duplicate rule" }, |
| 51 |
{ 12, "MARPA_ERR_DUPLICATE_TOKEN", "Duplicate token" }, |
| 52 |
{ 13, "MARPA_ERR_YIM_COUNT", "Maximum number of Earley items exceeded" }, |
| 53 |
{ 14, "MARPA_ERR_YIM_ID_INVALID", "MARPA_ERR_YIM_ID_INVALID" }, |
| 54 |
{ 15, "MARPA_ERR_EVENT_IX_NEGATIVE", "Negative event index" }, |
| 55 |
{ 16, "MARPA_ERR_EVENT_IX_OOB", "No event at that index" }, |
| 56 |
{ 17, "MARPA_ERR_GRAMMAR_HAS_CYCLE", "Grammar has cycle" }, |
| 57 |
{ 18, "MARPA_ERR_INACCESSIBLE_TOKEN", "Token symbol is inaccessible" }, |
| 58 |
{ 19, "MARPA_ERR_INTERNAL", "MARPA_ERR_INTERNAL" }, |
| 59 |
{ 20, "MARPA_ERR_INVALID_AHFA_ID", "MARPA_ERR_INVALID_AHFA_ID" }, |
| 60 |
{ 21, "MARPA_ERR_INVALID_AIMID", "MARPA_ERR_INVALID_AIMID" }, |
| 61 |
{ 22, "MARPA_ERR_INVALID_BOOLEAN", "Argument is not boolean" }, |
| 62 |
{ 23, "MARPA_ERR_INVALID_IRLID", "MARPA_ERR_INVALID_IRLID" }, |
| 63 |
{ 24, "MARPA_ERR_INVALID_NSYID", "MARPA_ERR_INVALID_NSYID" }, |
| 64 |
{ 25, "MARPA_ERR_INVALID_LOCATION", "Location is not valid" }, |
| 65 |
{ 26, "MARPA_ERR_INVALID_RULE_ID", "Rule ID is malformed" }, |
| 66 |
{ 27, "MARPA_ERR_INVALID_START_SYMBOL", "Specified start symbol is not valid" }, |
| 67 |
{ 28, "MARPA_ERR_INVALID_SYMBOL_ID", "Symbol ID is malformed" }, |
| 68 |
{ 29, "MARPA_ERR_I_AM_NOT_OK", "Marpa is in a not OK state" }, |
| 69 |
{ 30, "MARPA_ERR_MAJOR_VERSION_MISMATCH", "Libmarpa major version number is a mismatch" }, |
| 70 |
{ 31, "MARPA_ERR_MICRO_VERSION_MISMATCH", "Libmarpa micro version number is a mismatch" }, |
| 71 |
{ 32, "MARPA_ERR_MINOR_VERSION_MISMATCH", "Libmarpa minor version number is a mismatch" }, |
| 72 |
{ 33, "MARPA_ERR_NOOKID_NEGATIVE", "MARPA_ERR_NOOKID_NEGATIVE" }, |
| 73 |
{ 34, "MARPA_ERR_NOT_PRECOMPUTED", "This grammar is not precomputed" }, |
| 74 |
{ 35, "MARPA_ERR_NOT_TRACING_COMPLETION_LINKS", "MARPA_ERR_NOT_TRACING_COMPLETION_LINKS" }, |
| 75 |
{ 36, "MARPA_ERR_NOT_TRACING_LEO_LINKS", "MARPA_ERR_NOT_TRACING_LEO_LINKS" }, |
| 76 |
{ 37, "MARPA_ERR_NOT_TRACING_TOKEN_LINKS", "MARPA_ERR_NOT_TRACING_TOKEN_LINKS" }, |
| 77 |
{ 38, "MARPA_ERR_NO_AND_NODES", "MARPA_ERR_NO_AND_NODES" }, |
| 78 |
{ 39, "MARPA_ERR_NO_EARLEY_SET_AT_LOCATION", "Earley set ID is after latest Earley set" }, |
| 79 |
{ 40, "MARPA_ERR_NO_OR_NODES", "MARPA_ERR_NO_OR_NODES" }, |
| 80 |
{ 41, "MARPA_ERR_NO_PARSE", "No parse" }, |
| 81 |
{ 42, "MARPA_ERR_NO_RULES", "This grammar does not have any rules" }, |
| 82 |
{ 43, "MARPA_ERR_NO_START_SYMBOL", "This grammar has no start symbol" }, |
| 83 |
{ 44, "MARPA_ERR_NO_TOKEN_EXPECTED_HERE", "No token is expected at this earleme location" }, |
| 84 |
{ 45, "MARPA_ERR_NO_TRACE_YIM", "MARPA_ERR_NO_TRACE_YIM" }, |
| 85 |
{ 46, "MARPA_ERR_NO_TRACE_YS", "MARPA_ERR_NO_TRACE_YS" }, |
| 86 |
{ 47, "MARPA_ERR_NO_TRACE_PIM", "MARPA_ERR_NO_TRACE_PIM" }, |
| 87 |
{ 48, "MARPA_ERR_NO_TRACE_SRCL", "MARPA_ERR_NO_TRACE_SRCL" }, |
| 88 |
{ 49, "MARPA_ERR_NULLING_TERMINAL", "A symbol is both terminal and nulling" }, |
| 89 |
{ 50, "MARPA_ERR_ORDER_FROZEN", "The ordering is frozen" }, |
| 90 |
{ 51, "MARPA_ERR_ORID_NEGATIVE", "MARPA_ERR_ORID_NEGATIVE" }, |
| 91 |
{ 52, "MARPA_ERR_OR_ALREADY_ORDERED", "MARPA_ERR_OR_ALREADY_ORDERED" }, |
| 92 |
{ 53, "MARPA_ERR_PARSE_EXHAUSTED", "The parse is exhausted" }, |
| 93 |
{ 54, "MARPA_ERR_PARSE_TOO_LONG", "This input would make the parse too long" }, |
| 94 |
{ 55, "MARPA_ERR_PIM_IS_NOT_LIM", "MARPA_ERR_PIM_IS_NOT_LIM" }, |
| 95 |
{ 56, "MARPA_ERR_POINTER_ARG_NULL", "An argument is null when it should not be" }, |
| 96 |
{ 57, "MARPA_ERR_PRECOMPUTED", "This grammar is precomputed" }, |
| 97 |
{ 58, "MARPA_ERR_PROGRESS_REPORT_EXHAUSTED", "The progress report is exhausted" }, |
| 98 |
{ 59, "MARPA_ERR_PROGRESS_REPORT_NOT_STARTED", "No progress report has been started" }, |
| 99 |
{ 60, "MARPA_ERR_RECCE_NOT_ACCEPTING_INPUT", "The recognizer is not accepting input" }, |
| 100 |
{ 61, "MARPA_ERR_RECCE_NOT_STARTED", "The recognizer has not been started" }, |
| 101 |
{ 62, "MARPA_ERR_RECCE_STARTED", "The recognizer has been started" }, |
| 102 |
{ 63, "MARPA_ERR_RHS_IX_NEGATIVE", "RHS index cannot be negative" }, |
| 103 |
{ 64, "MARPA_ERR_RHS_IX_OOB", "RHS index must be less than rule length" }, |
| 104 |
{ 65, "MARPA_ERR_RHS_TOO_LONG", "The RHS is too long" }, |
| 105 |
{ 66, "MARPA_ERR_SEQUENCE_LHS_NOT_UNIQUE", "LHS of sequence rule would not be unique" }, |
| 106 |
{ 67, "MARPA_ERR_SOURCE_TYPE_IS_AMBIGUOUS", "MARPA_ERR_SOURCE_TYPE_IS_AMBIGUOUS" }, |
| 107 |
{ 68, "MARPA_ERR_SOURCE_TYPE_IS_COMPLETION", "MARPA_ERR_SOURCE_TYPE_IS_COMPLETION" }, |
| 108 |
{ 69, "MARPA_ERR_SOURCE_TYPE_IS_LEO", "MARPA_ERR_SOURCE_TYPE_IS_LEO" }, |
| 109 |
{ 70, "MARPA_ERR_SOURCE_TYPE_IS_NONE", "MARPA_ERR_SOURCE_TYPE_IS_NONE" }, |
| 110 |
{ 71, "MARPA_ERR_SOURCE_TYPE_IS_TOKEN", "MARPA_ERR_SOURCE_TYPE_IS_TOKEN" }, |
| 111 |
{ 72, "MARPA_ERR_SOURCE_TYPE_IS_UNKNOWN", "MARPA_ERR_SOURCE_TYPE_IS_UNKNOWN" }, |
| 112 |
{ 73, "MARPA_ERR_START_NOT_LHS", "Start symbol not on LHS of any rule" }, |
| 113 |
{ 74, "MARPA_ERR_SYMBOL_VALUED_CONFLICT", "Symbol is treated both as valued and unvalued" }, |
| 114 |
{ 75, "MARPA_ERR_TERMINAL_IS_LOCKED", "The terminal status of the symbol is locked" }, |
| 115 |
{ 76, "MARPA_ERR_TOKEN_IS_NOT_TERMINAL", "Token symbol must be a terminal" }, |
| 116 |
{ 77, "MARPA_ERR_TOKEN_LENGTH_LE_ZERO", "Token length must greater than zero" }, |
| 117 |
{ 78, "MARPA_ERR_TOKEN_TOO_LONG", "Token is too long" }, |
| 118 |
{ 79, "MARPA_ERR_TREE_EXHAUSTED", "Tree iterator is exhausted" }, |
| 119 |
{ 80, "MARPA_ERR_TREE_PAUSED", "Tree iterator is paused" }, |
| 120 |
{ 81, "MARPA_ERR_UNEXPECTED_TOKEN_ID", "Unexpected token" }, |
| 121 |
{ 82, "MARPA_ERR_UNPRODUCTIVE_START", "Unproductive start symbol" }, |
| 122 |
{ 83, "MARPA_ERR_VALUATOR_INACTIVE", "Valuator inactive" }, |
| 123 |
{ 84, "MARPA_ERR_VALUED_IS_LOCKED", "The valued status of the symbol is locked" }, |
| 124 |
{ 85, "MARPA_ERR_RANK_TOO_LOW", "Rule or symbol rank too low" }, |
| 125 |
{ 86, "MARPA_ERR_RANK_TOO_HIGH", "Rule or symbol rank too high" }, |
| 126 |
{ 87, "MARPA_ERR_SYMBOL_IS_NULLING", "Symbol is nulling" }, |
| 127 |
{ 88, "MARPA_ERR_SYMBOL_IS_UNUSED", "Symbol is not used" }, |
| 128 |
{ 89, "MARPA_ERR_NO_SUCH_RULE_ID", "No rule with this ID exists" }, |
| 129 |
{ 90, "MARPA_ERR_NO_SUCH_SYMBOL_ID", "No symbol with this ID exists" }, |
| 130 |
{ 91, "MARPA_ERR_BEFORE_FIRST_TREE", "Tree iterator is before first tree" }, |
| 131 |
{ 92, "MARPA_ERR_SYMBOL_IS_NOT_COMPLETION_EVENT", "Symbol is not set up for completion events" }, |
| 132 |
{ 93, "MARPA_ERR_SYMBOL_IS_NOT_NULLED_EVENT", "Symbol is not set up for nulled events" }, |
| 133 |
{ 94, "MARPA_ERR_SYMBOL_IS_NOT_PREDICTION_EVENT", "Symbol is not set up for prediction events" }, |
| 134 |
{ 95, "MARPA_ERR_RECCE_IS_INCONSISTENT", "MARPA_ERR_RECCE_IS_INCONSISTENT" }, |
| 135 |
{ 96, "MARPA_ERR_INVALID_ASSERTION_ID", "Assertion ID is malformed" }, |
| 136 |
{ 97, "MARPA_ERR_NO_SUCH_ASSERTION_ID", "No assertion with this ID exists" }, |
| 137 |
{ 98, "MARPA_ERR_HEADERS_DO_NOT_MATCH", "Internal error: Libmarpa was built incorrectly" }, |
| 138 |
{ 99, "MARPA_ERR_NOT_A_SEQUENCE", "Rule is not a sequence" }, |
| 139 |
}; |
| 140 |
|
| 141 |
|
| 142 |
#line 1 "./marpa.c-event" |
| 143 |
const struct marpa_event_description_s marpa_event_description[] = { |
| 144 |
{ 0, "MARPA_EVENT_NONE", "No event" }, |
| 145 |
{ 1, "MARPA_EVENT_COUNTED_NULLABLE", "This symbol is a counted nullable" }, |
| 146 |
{ 2, "MARPA_EVENT_EARLEY_ITEM_THRESHOLD", "Too many Earley items" }, |
| 147 |
{ 3, "MARPA_EVENT_EXHAUSTED", "Recognizer is exhausted" }, |
| 148 |
{ 4, "MARPA_EVENT_LOOP_RULES", "Grammar contains a infinite loop" }, |
| 149 |
{ 5, "MARPA_EVENT_NULLING_TERMINAL", "This symbol is a nulling terminal" }, |
| 150 |
{ 6, "MARPA_EVENT_SYMBOL_COMPLETED", "Completed symbol" }, |
| 151 |
{ 7, "MARPA_EVENT_SYMBOL_EXPECTED", "Expecting symbol" }, |
| 152 |
{ 8, "MARPA_EVENT_SYMBOL_NULLED", "Symbol was nulled" }, |
| 153 |
{ 9, "MARPA_EVENT_SYMBOL_PREDICTED", "Symbol was predicted" }, |
| 154 |
}; |
| 155 |
|
| 156 |
|
| 157 |
#line 1 "./marpa.c-step" |
| 158 |
const struct marpa_step_type_description_s marpa_step_type_description[] = { |
| 159 |
{ 0, "MARPA_STEP_INTERNAL1" }, |
| 160 |
{ 1, "MARPA_STEP_RULE" }, |
| 161 |
{ 2, "MARPA_STEP_TOKEN" }, |
| 162 |
{ 3, "MARPA_STEP_NULLING_SYMBOL" }, |
| 163 |
{ 4, "MARPA_STEP_TRACE" }, |
| 164 |
{ 5, "MARPA_STEP_INACTIVE" }, |
| 165 |
{ 6, "MARPA_STEP_INTERNAL2" }, |
| 166 |
{ 7, "MARPA_STEP_INITIAL" }, |
| 167 |
}; |
| 168 |
|