Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
api
sabnf-grammar.h
Go to the documentation of this file.
1
//
2
// This C-language parser header was generated by APG Version 7.0.
3
// User modifications invalidate the license agreement and may cause unpredictable results.
4
//
5
/* *************************************************************************************
6
Copyright (c) 2021, Lowell D. Thomas
7
All rights reserved.
8
9
This file was generated by and is part of APG Version 7.0.
10
APG Version 7.0 may be used under the terms of the BSD 2-Clause License.
11
12
Redistribution and use in source and binary forms, with or without
13
modification, are permitted provided that the following conditions are met:
14
15
1. Redistributions of source code must retain the above copyright notice, this
16
list of conditions and the following disclaimer.
17
18
2. Redistributions in binary form must reproduce the above copyright notice,
19
this list of conditions and the following disclaimer in the documentation
20
and/or other materials provided with the distribution.
21
22
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33
* *************************************************************************************/
34
35
#ifndef _SABNF_GRAMMAR_H_
36
#define _SABNF_GRAMMAR_H_
37
38
// rule ids
39
#define SABNF_GRAMMAR_ABGOP 50
40
#define SABNF_GRAMMAR_AENOP 51
41
#define SABNF_GRAMMAR_ALPHANUM 87
42
#define SABNF_GRAMMAR_ALTERNATION 14
43
#define SABNF_GRAMMAR_ALTOP 44
44
#define SABNF_GRAMMAR_ANDOP 46
45
#define SABNF_GRAMMAR_BASICELEMENT 19
46
#define SABNF_GRAMMAR_BASICELEMENTERR 20
47
#define SABNF_GRAMMAR_BIN 77
48
#define SABNF_GRAMMAR_BKAOP 48
49
#define SABNF_GRAMMAR_BKNOP 49
50
#define SABNF_GRAMMAR_BKR_NAME 36
51
#define SABNF_GRAMMAR_BKRMODIFIER 31
52
#define SABNF_GRAMMAR_BKROP 30
53
#define SABNF_GRAMMAR_BLANKLINE 1
54
#define SABNF_GRAMMAR_BMAX 81
55
#define SABNF_GRAMMAR_BMIN 80
56
#define SABNF_GRAMMAR_BNUM 85
57
#define SABNF_GRAMMAR_BSTRING 74
58
#define SABNF_GRAMMAR_CATOP 45
59
#define SABNF_GRAMMAR_CI 33
60
#define SABNF_GRAMMAR_CLSCLOSE 62
61
#define SABNF_GRAMMAR_CLSOP 60
62
#define SABNF_GRAMMAR_CLSOPEN 61
63
#define SABNF_GRAMMAR_CLSSTRING 63
64
#define SABNF_GRAMMAR_COMMENT 91
65
#define SABNF_GRAMMAR_CONCATENATION 15
66
#define SABNF_GRAMMAR_CS 32
67
#define SABNF_GRAMMAR_DEC 75
68
#define SABNF_GRAMMAR_DEFINED 10
69
#define SABNF_GRAMMAR_DEFINEDAS 9
70
#define SABNF_GRAMMAR_DEFINEDASERROR 8
71
#define SABNF_GRAMMAR_DEFINEDASTEST 7
72
#define SABNF_GRAMMAR_DMAX 79
73
#define SABNF_GRAMMAR_DMIN 78
74
#define SABNF_GRAMMAR_DNUM 84
75
#define SABNF_GRAMMAR_DSTRING 72
76
#define SABNF_GRAMMAR_ENAME 39
77
#define SABNF_GRAMMAR_FILE 0
78
#define SABNF_GRAMMAR_GROUP 21
79
#define SABNF_GRAMMAR_GROUPCLOSE 24
80
#define SABNF_GRAMMAR_GROUPERROR 22
81
#define SABNF_GRAMMAR_GROUPOPEN 23
82
#define SABNF_GRAMMAR_HEX 76
83
#define SABNF_GRAMMAR_INCALT 11
84
#define SABNF_GRAMMAR_LINECONTINUE 93
85
#define SABNF_GRAMMAR_LINEEND 92
86
#define SABNF_GRAMMAR_LINEENDERROR 13
87
#define SABNF_GRAMMAR_MODIFIER 17
88
#define SABNF_GRAMMAR_NOTOP 47
89
#define SABNF_GRAMMAR_OPTION 25
90
#define SABNF_GRAMMAR_OPTIONCLOSE 28
91
#define SABNF_GRAMMAR_OPTIONERROR 26
92
#define SABNF_GRAMMAR_OPTIONOPEN 27
93
#define SABNF_GRAMMAR_OWSP 88
94
#define SABNF_GRAMMAR_PM 35
95
#define SABNF_GRAMMAR_PREDICATE 18
96
#define SABNF_GRAMMAR_PROSVAL 64
97
#define SABNF_GRAMMAR_PROSVALCLOSE 67
98
#define SABNF_GRAMMAR_PROSVALOPEN 65
99
#define SABNF_GRAMMAR_PROSVALSTRING 66
100
#define SABNF_GRAMMAR_REP_MAX 70
101
#define SABNF_GRAMMAR_REP_MIN 68
102
#define SABNF_GRAMMAR_REP_MIN_MAX 69
103
#define SABNF_GRAMMAR_REP_NUM 71
104
#define SABNF_GRAMMAR_REPETITION 16
105
#define SABNF_GRAMMAR_REPOP 43
106
#define SABNF_GRAMMAR_RNAME 37
107
#define SABNF_GRAMMAR_RNMOP 29
108
#define SABNF_GRAMMAR_RULE 2
109
#define SABNF_GRAMMAR_RULEERROR 12
110
#define SABNF_GRAMMAR_RULELOOKUP 3
111
#define SABNF_GRAMMAR_RULENAME 5
112
#define SABNF_GRAMMAR_RULENAMEERROR 6
113
#define SABNF_GRAMMAR_RULENAMETEST 4
114
#define SABNF_GRAMMAR_SPACE 90
115
#define SABNF_GRAMMAR_STRINGTAB 59
116
#define SABNF_GRAMMAR_TBSOP 53
117
#define SABNF_GRAMMAR_TLSCASE 55
118
#define SABNF_GRAMMAR_TLSCLOSE 57
119
#define SABNF_GRAMMAR_TLSOP 54
120
#define SABNF_GRAMMAR_TLSOPEN 56
121
#define SABNF_GRAMMAR_TLSSTRING 58
122
#define SABNF_GRAMMAR_TRGOP 52
123
#define SABNF_GRAMMAR_UDT_EMPTY 42
124
#define SABNF_GRAMMAR_UDT_NON_EMPTY 41
125
#define SABNF_GRAMMAR_UDTOP 40
126
#define SABNF_GRAMMAR_UM 34
127
#define SABNF_GRAMMAR_UNAME 38
128
#define SABNF_GRAMMAR_WSP 89
129
#define SABNF_GRAMMAR_XMAX 83
130
#define SABNF_GRAMMAR_XMIN 82
131
#define SABNF_GRAMMAR_XNUM 86
132
#define SABNF_GRAMMAR_XSTRING 73
133
#define RULE_COUNT_SABNF_GRAMMAR 94
134
135
// pointer to parser initialization data
136
extern
void
*
vpSabnfGrammarInit
;
137
138
// Helper function(s) for setting rule/UDT name callbacks.
139
// Un-comment and replace named NULL with pointer to the appropriate callback function.
140
// NOTE: This can easily be modified for setting AST callback functions:
141
// Replace parser_callback with ast_callback and
142
// vParserSetRuleCallback(vpParserCtx) with vAstSetRuleCallback(vpAstCtx) and
143
// vParserSetUdtCallback(vpParserCtx) with vAstSetUdtCallback(vpAstCtx).
144
/****************************************************************
145
void vSabnfGrammarRuleCallbacks(void* vpParserCtx){
146
aint ui;
147
parser_callback cb[RULE_COUNT_SABNF_GRAMMAR];
148
cb[SABNF_GRAMMAR_ABGOP] = NULL;
149
cb[SABNF_GRAMMAR_AENOP] = NULL;
150
cb[SABNF_GRAMMAR_ALPHANUM] = NULL;
151
cb[SABNF_GRAMMAR_ALTERNATION] = NULL;
152
cb[SABNF_GRAMMAR_ALTOP] = NULL;
153
cb[SABNF_GRAMMAR_ANDOP] = NULL;
154
cb[SABNF_GRAMMAR_BASICELEMENT] = NULL;
155
cb[SABNF_GRAMMAR_BASICELEMENTERR] = NULL;
156
cb[SABNF_GRAMMAR_BIN] = NULL;
157
cb[SABNF_GRAMMAR_BKAOP] = NULL;
158
cb[SABNF_GRAMMAR_BKNOP] = NULL;
159
cb[SABNF_GRAMMAR_BKR_NAME] = NULL;
160
cb[SABNF_GRAMMAR_BKRMODIFIER] = NULL;
161
cb[SABNF_GRAMMAR_BKROP] = NULL;
162
cb[SABNF_GRAMMAR_BLANKLINE] = NULL;
163
cb[SABNF_GRAMMAR_BMAX] = NULL;
164
cb[SABNF_GRAMMAR_BMIN] = NULL;
165
cb[SABNF_GRAMMAR_BNUM] = NULL;
166
cb[SABNF_GRAMMAR_BSTRING] = NULL;
167
cb[SABNF_GRAMMAR_CATOP] = NULL;
168
cb[SABNF_GRAMMAR_CI] = NULL;
169
cb[SABNF_GRAMMAR_CLSCLOSE] = NULL;
170
cb[SABNF_GRAMMAR_CLSOP] = NULL;
171
cb[SABNF_GRAMMAR_CLSOPEN] = NULL;
172
cb[SABNF_GRAMMAR_CLSSTRING] = NULL;
173
cb[SABNF_GRAMMAR_COMMENT] = NULL;
174
cb[SABNF_GRAMMAR_CONCATENATION] = NULL;
175
cb[SABNF_GRAMMAR_CS] = NULL;
176
cb[SABNF_GRAMMAR_DEC] = NULL;
177
cb[SABNF_GRAMMAR_DEFINED] = NULL;
178
cb[SABNF_GRAMMAR_DEFINEDAS] = NULL;
179
cb[SABNF_GRAMMAR_DEFINEDASERROR] = NULL;
180
cb[SABNF_GRAMMAR_DEFINEDASTEST] = NULL;
181
cb[SABNF_GRAMMAR_DMAX] = NULL;
182
cb[SABNF_GRAMMAR_DMIN] = NULL;
183
cb[SABNF_GRAMMAR_DNUM] = NULL;
184
cb[SABNF_GRAMMAR_DSTRING] = NULL;
185
cb[SABNF_GRAMMAR_ENAME] = NULL;
186
cb[SABNF_GRAMMAR_FILE] = NULL;
187
cb[SABNF_GRAMMAR_GROUP] = NULL;
188
cb[SABNF_GRAMMAR_GROUPCLOSE] = NULL;
189
cb[SABNF_GRAMMAR_GROUPERROR] = NULL;
190
cb[SABNF_GRAMMAR_GROUPOPEN] = NULL;
191
cb[SABNF_GRAMMAR_HEX] = NULL;
192
cb[SABNF_GRAMMAR_INCALT] = NULL;
193
cb[SABNF_GRAMMAR_LINECONTINUE] = NULL;
194
cb[SABNF_GRAMMAR_LINEEND] = NULL;
195
cb[SABNF_GRAMMAR_LINEENDERROR] = NULL;
196
cb[SABNF_GRAMMAR_MODIFIER] = NULL;
197
cb[SABNF_GRAMMAR_NOTOP] = NULL;
198
cb[SABNF_GRAMMAR_OPTION] = NULL;
199
cb[SABNF_GRAMMAR_OPTIONCLOSE] = NULL;
200
cb[SABNF_GRAMMAR_OPTIONERROR] = NULL;
201
cb[SABNF_GRAMMAR_OPTIONOPEN] = NULL;
202
cb[SABNF_GRAMMAR_OWSP] = NULL;
203
cb[SABNF_GRAMMAR_PM] = NULL;
204
cb[SABNF_GRAMMAR_PREDICATE] = NULL;
205
cb[SABNF_GRAMMAR_PROSVAL] = NULL;
206
cb[SABNF_GRAMMAR_PROSVALCLOSE] = NULL;
207
cb[SABNF_GRAMMAR_PROSVALOPEN] = NULL;
208
cb[SABNF_GRAMMAR_PROSVALSTRING] = NULL;
209
cb[SABNF_GRAMMAR_REP_MAX] = NULL;
210
cb[SABNF_GRAMMAR_REP_MIN] = NULL;
211
cb[SABNF_GRAMMAR_REP_MIN_MAX] = NULL;
212
cb[SABNF_GRAMMAR_REP_NUM] = NULL;
213
cb[SABNF_GRAMMAR_REPETITION] = NULL;
214
cb[SABNF_GRAMMAR_REPOP] = NULL;
215
cb[SABNF_GRAMMAR_RNAME] = NULL;
216
cb[SABNF_GRAMMAR_RNMOP] = NULL;
217
cb[SABNF_GRAMMAR_RULE] = NULL;
218
cb[SABNF_GRAMMAR_RULEERROR] = NULL;
219
cb[SABNF_GRAMMAR_RULELOOKUP] = NULL;
220
cb[SABNF_GRAMMAR_RULENAME] = NULL;
221
cb[SABNF_GRAMMAR_RULENAMEERROR] = NULL;
222
cb[SABNF_GRAMMAR_RULENAMETEST] = NULL;
223
cb[SABNF_GRAMMAR_SPACE] = NULL;
224
cb[SABNF_GRAMMAR_STRINGTAB] = NULL;
225
cb[SABNF_GRAMMAR_TBSOP] = NULL;
226
cb[SABNF_GRAMMAR_TLSCASE] = NULL;
227
cb[SABNF_GRAMMAR_TLSCLOSE] = NULL;
228
cb[SABNF_GRAMMAR_TLSOP] = NULL;
229
cb[SABNF_GRAMMAR_TLSOPEN] = NULL;
230
cb[SABNF_GRAMMAR_TLSSTRING] = NULL;
231
cb[SABNF_GRAMMAR_TRGOP] = NULL;
232
cb[SABNF_GRAMMAR_UDT_EMPTY] = NULL;
233
cb[SABNF_GRAMMAR_UDT_NON_EMPTY] = NULL;
234
cb[SABNF_GRAMMAR_UDTOP] = NULL;
235
cb[SABNF_GRAMMAR_UM] = NULL;
236
cb[SABNF_GRAMMAR_UNAME] = NULL;
237
cb[SABNF_GRAMMAR_WSP] = NULL;
238
cb[SABNF_GRAMMAR_XMAX] = NULL;
239
cb[SABNF_GRAMMAR_XMIN] = NULL;
240
cb[SABNF_GRAMMAR_XNUM] = NULL;
241
cb[SABNF_GRAMMAR_XSTRING] = NULL;
242
for(ui = 0; ui < (aint)RULE_COUNT_SABNF_GRAMMAR; ui++){
243
vParserSetRuleCallback(vpParserCtx, ui, cb[ui]);
244
}
245
}
246
****************************************************************/
247
248
#endif
/* _SABNF_GRAMMAR_H_ */
vpSabnfGrammarInit
void * vpSabnfGrammarInit
Definition:
sabnf-grammar.c:1437
Generated on Sun Jun 13 2021 14:32:59 for APG by
1.8.17
APG Version 7.0 is licensed under the
2-Clause BSD License
,
an Open Source Initiative Approved License.