eĿlipsis
a language independent preprocessor
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
ellipsis-lexer.h
Go to the documentation of this file.
1
7#ifndef ELLIPSIS_SPACE_H
8#define ELLIPSIS_SPACE_H 1
9
10#include <uchar.h>
11#include <stdbool.h>
12#include <inttypes.h>
20#include "ellipsis-infra.h"
23#include "encoding/XID_Start.h"
24
25extern thread_local bool volatile ellipsis‿contracts‿ignore‿dynamic;
26extern thread_local bool volatile ellipsis‿contracts‿proceed‿dynamic;
27extern thread_local bool volatile ellipsis‿contracts‿verbose‿dynamic;
28
30
31#include <stdio.h>
32#include <stdlib.h>
33#include <stdint.h>
34
35#define STRINGIFY(...) STRINGIFY_(__VA_ARGS__)
36#define STRINGIFY_(...) #__VA_ARGS__
37
38#define ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR, ...) \
39({\
40 static char const contract_format_ ## COUNT[] = \
41 __FILE__ ":" STRINGIFY(__LINE__) ": violation of " CTYPE " `" CSTR "`" __VA_OPT__(", ") __VA_ARGS__ "\n";\
42 (VERB \
43 ? fputs(contract_format_ ## COUNT, stderr) \
44 : 0);\
45 })
46
47#define ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...) \
48(((false) || (COND)) \
49 ? (void)0 \
50 : (ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR __VA_OPT__(,) __VA_ARGS__) \
51 , ((false) \
52 ? (void)0 \
53 : ACTION())))
54
55#define ELLIPSIS_TO_VOIDS(...) ((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__))))
56
57#define ELLIPSIS_TEST_ICE(...) (false ? ELLIPSIS_TO_VOIDS(__VA_ARGS__) : (ellipsis‿contracts‿is_ice*)nullptr)
58
59#define ELLIPSIS_CONTRACT_ICE_OR_TRUE(...) \
60 _Generic( \
61 ELLIPSIS_TEST_ICE(__VA_ARGS__), \
62 ellipsis‿contracts‿is_ice*: (__VA_ARGS__), \
63 default: true)
64
65#define ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR, ...) \
66 ({\
67 static_assert(ELLIPSIS_CONTRACT_ICE_OR_TRUE(COND), \
68 "compile time violation of " CTYPE " " CSTR \
69 __VA_OPT__(", ") __VA_ARGS__ );\
70 })
71
72#define ELLIPSIS_CONTRACT(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...) \
73 \
74 do { \
75 _Generic( \
76 ELLIPSIS_TEST_ICE(COND), \
77 ellipsis‿contracts‿is_ice*: ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR __VA_OPT__(,) __VA_ARGS__), \
78 default: ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE __VA_OPT__(,) __VA_ARGS__));\
79 } while(false)
80
81inline
82ellipsis‿str32 const* ellipsis‿lex‿nonspace(size_t len[static 1], char const*restrict s[static 1],
83 ellipsis‿special const** sp, ellipsis‿token t[static 1],
85 typeof(ellipsis‿str32 const*) DEFER_LOC_ID_0_1;
86 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
87 DEFER_LOC_ID_0_1 = (typeof(ellipsis‿str32 const*)) {};
88 }
89 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
90 [[__maybe_unused__]] register bool defer_return_flag = false;
91 if (false) {
92 DEFER_ID_1_1:
93 goto DEFER_END_ID_1_2;
94 } else {
95 (void)0 ;
96 /* defer */
97 [[__maybe_unused__, __deprecated__("dummy variable for better diagnostics")]]
98 unsigned (*DEFER_LOC_ID_1_1)[DEFER_LOC_ID_0_2] = {};
99 if (false) {
100 DEFER_ID_1_2: {
101 [[__maybe_unused__, __deprecated__("invalid termination of a deferred block")]]
102 register bool const defer_return_flag = false, defer_break_flag = false, defer_continue_flag = false;
103 {ELLIPSIS_CONTRACT(1, ((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1), unreachable, false, "((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1)", "assumption", "unable to allocate string for non-space token");}
104 }
105 goto DEFER_ID_1_1;
106 } else
107 (void)0 ;
109 do {
110 /* return mode 2 */
111 defer_return_flag = true;
112 DEFER_LOC_ID_0_1 = ellipsis‿lex‿nonspace‿_Insta(len, s, sp, t, f);
113 goto DEFER_ID_1_2;
114 } while(false);
115
116 goto DEFER_ID_1_2;
117 }
118[[__maybe_unused__]] DEFER_END_ID_1_2:;
119 return DEFER_LOC_ID_0_1;
120}
121
122inline
123ellipsis‿str32 const* ellipsis‿lex‿space(size_t len[static 1], char const*restrict s[static 1]) {
124 typeof(ellipsis‿str32 const*) DEFER_LOC_ID_0_1;
125 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
126 DEFER_LOC_ID_0_1 = (typeof(ellipsis‿str32 const*)) {};
127 }
128 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
129 [[__maybe_unused__]] register bool defer_return_flag = false;
130 if (false) {
131 DEFER_ID_1_3:
132 goto DEFER_END_ID_1_4;
133 } else {
134 (void)0 ;
135
137 do {
138 /* return mode 2 */
139 defer_return_flag = true;
140 DEFER_LOC_ID_0_1 = ellipsis‿lex‿space‿_Insta(len, s);
141 goto DEFER_ID_1_3;
142 } while(false);
143
144 goto DEFER_ID_1_3;
145 }
146[[__maybe_unused__]] DEFER_END_ID_1_4:;
147 return DEFER_LOC_ID_0_1;
148}
149
150inline
152 typeof(ellipsis‿category) DEFER_LOC_ID_0_1;
153 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
154 DEFER_LOC_ID_0_1 = (typeof(ellipsis‿category)) {};
155 }
156 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
157 [[__maybe_unused__]] register bool defer_return_flag = false;
158 if (false) {
159 DEFER_ID_1_4:
160 goto DEFER_END_ID_1_6;
161 } else {
162 (void)0 ;
164 do {
165 /* return mode 2 */
166 defer_return_flag = true;
167 DEFER_LOC_ID_0_1 = ellipsis‿lex‿category‿_Insta(s, find);
168 goto DEFER_ID_1_4;
169 } while(false);
170
171 goto DEFER_ID_1_4;
172 }
173[[__maybe_unused__]] DEFER_END_ID_1_6:;
174 return DEFER_LOC_ID_0_1;
175}
176
177inline
178char* ellipsis‿lex‿strdup_escape(size_t len, char const s[static len], size_t nlenp[static 1]) {
179 typeof(char*) DEFER_LOC_ID_0_1;
180 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
181 DEFER_LOC_ID_0_1 = (typeof(char*)) {};
182 }
183 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
184 [[__maybe_unused__]] register bool defer_return_flag = false;
185 if (false) {
186 DEFER_ID_1_5:
187 goto DEFER_END_ID_1_8;
188 } else {
189 (void)0 ;
190 /* defer */
191 [[__maybe_unused__, __deprecated__("dummy variable for better diagnostics")]]
192 unsigned (*DEFER_LOC_ID_1_2)[DEFER_LOC_ID_0_2] = {};
193 if (false) {
194 DEFER_ID_1_6: {
195 [[__maybe_unused__, __deprecated__("invalid termination of a deferred block")]]
196 register bool const defer_return_flag = false, defer_break_flag = false, defer_continue_flag = false;
197 {ELLIPSIS_CONTRACT(2, ((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1), unreachable, false, "((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1)", "assumption", "unable to allocate string for strdup with escapes");}
198 }
199 goto DEFER_ID_1_5;
200 } else
201 (void)0 ;
203 do {
204 /* return mode 2 */
205 defer_return_flag = true;
206 DEFER_LOC_ID_0_1 = ellipsis‿lex‿strdup_escape‿_Insta(len, s, nlenp);
207 goto DEFER_ID_1_6;
208 } while(false);
209
210 goto DEFER_ID_1_6;
211 }
212[[__maybe_unused__]] DEFER_END_ID_1_8:;
213 return DEFER_LOC_ID_0_1;
214}
215
216inline
217ellipsis‿str32 const* ellipsis‿lex‿nonspace‿_Ctra(size_t len[static 1], char const*restrict s[static 1],
218 ellipsis‿special const** sp, ellipsis‿token t[static 1],
220 typeof(ellipsis‿str32 const*) DEFER_LOC_ID_0_1;
221 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
222 DEFER_LOC_ID_0_1 = (typeof(ellipsis‿str32 const*)) {};
223 }
224 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
225 [[__maybe_unused__]] register bool defer_return_flag = false;
226 if (false) {
227 DEFER_ID_1_7:
228 goto DEFER_END_ID_1_10;
229 } else {
230 (void)0 ;
231 /* defer */
232 [[__maybe_unused__, __deprecated__("dummy variable for better diagnostics")]]
233 unsigned (*DEFER_LOC_ID_1_3)[DEFER_LOC_ID_0_2] = {};
234 if (false) {
235 DEFER_ID_1_8: {
236 [[__maybe_unused__, __deprecated__("invalid termination of a deferred block")]]
237 register bool const defer_return_flag = false, defer_break_flag = false, defer_continue_flag = false;
238 {ELLIPSIS_CONTRACT(3, ((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1), abort, true, "((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1)", "assertion", "unable to allocate string for non-space token");}
239 }
240 goto DEFER_ID_1_7;
241 } else
242 (void)0 ;
244 do {
245 /* return mode 2 */
246 defer_return_flag = true;
247 DEFER_LOC_ID_0_1 = ellipsis‿lex‿nonspace‿_Inner(len, s, sp, t, f);
248 goto DEFER_ID_1_8;
249 } while(false);
250
251 goto DEFER_ID_1_8;
252 }
253[[__maybe_unused__]] DEFER_END_ID_1_10:;
254 return DEFER_LOC_ID_0_1;
255}
256
257inline
258ellipsis‿str32 const* ellipsis‿lex‿space‿_Ctra(size_t len[static 1], char const*restrict s[static 1]) {
259 typeof(ellipsis‿str32 const*) DEFER_LOC_ID_0_1;
260 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
261 DEFER_LOC_ID_0_1 = (typeof(ellipsis‿str32 const*)) {};
262 }
263 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
264 [[__maybe_unused__]] register bool defer_return_flag = false;
265 if (false) {
266 DEFER_ID_1_9:
267 goto DEFER_END_ID_1_12;
268 } else {
269 (void)0 ;
270
272 do {
273 /* return mode 2 */
274 defer_return_flag = true;
275 DEFER_LOC_ID_0_1 = ellipsis‿lex‿space‿_Inner(len, s);
276 goto DEFER_ID_1_9;
277 } while(false);
278
279 goto DEFER_ID_1_9;
280 }
281[[__maybe_unused__]] DEFER_END_ID_1_12:;
282 return DEFER_LOC_ID_0_1;
283}
284
285inline
287 typeof(ellipsis‿category) DEFER_LOC_ID_0_1;
288 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
289 DEFER_LOC_ID_0_1 = (typeof(ellipsis‿category)) {};
290 }
291 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
292 [[__maybe_unused__]] register bool defer_return_flag = false;
293 if (false) {
294 DEFER_ID_1_10:
295 goto DEFER_END_ID_1_14;
296 } else {
297 (void)0 ;
299 do {
300 /* return mode 2 */
301 defer_return_flag = true;
302 DEFER_LOC_ID_0_1 = ellipsis‿lex‿category‿_Inner(s, find);
303 goto DEFER_ID_1_10;
304 } while(false);
305
306 goto DEFER_ID_1_10;
307 }
308[[__maybe_unused__]] DEFER_END_ID_1_14:;
309 return DEFER_LOC_ID_0_1;
310}
311
312inline
313char* ellipsis‿lex‿strdup_escape‿_Ctra(size_t len, char const s[static len], size_t nlenp[static 1]) {
314 typeof(char*) DEFER_LOC_ID_0_1;
315 if (__func__[0] == 'm' && __func__[1] == 'a' && __func__[2] == 'i' && __func__[3] == 'n' && !__func__[4]) {
316 DEFER_LOC_ID_0_1 = (typeof(char*)) {};
317 }
318 [[__maybe_unused__]] register unsigned DEFER_LOC_ID_0_2 = 1U;
319 [[__maybe_unused__]] register bool defer_return_flag = false;
320 if (false) {
321 DEFER_ID_1_11:
322 goto DEFER_END_ID_1_16;
323 } else {
324 (void)0 ;
325 /* defer */
326 [[__maybe_unused__, __deprecated__("dummy variable for better diagnostics")]]
327 unsigned (*DEFER_LOC_ID_1_4)[DEFER_LOC_ID_0_2] = {};
328 if (false) {
329 DEFER_ID_1_12: {
330 [[__maybe_unused__, __deprecated__("invalid termination of a deferred block")]]
331 register bool const defer_return_flag = false, defer_break_flag = false, defer_continue_flag = false;
332 {ELLIPSIS_CONTRACT(4, ((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1), abort, true, "((typeof(DEFER_LOC_ID_0_1))DEFER_LOC_ID_0_1)", "assertion", "unable to allocate string for strdup with escapes");}
333 }
334 goto DEFER_ID_1_11;
335 } else
336 (void)0 ;
338 do {
339 /* return mode 2 */
340 defer_return_flag = true;
341 DEFER_LOC_ID_0_1 = ellipsis‿lex‿strdup_escape‿_Inner(len, s, nlenp);
342 goto DEFER_ID_1_12;
343 } while(false);
344
345 goto DEFER_ID_1_12;
346 }
347[[__maybe_unused__]] DEFER_END_ID_1_16:;
348 return DEFER_LOC_ID_0_1;
349}
350
351inline
352bool ellipsis‿lex‿Start(char32_t val) {
353 return val == U'_' || ellipsis_bitset_member(ellipsis‿XID‿Start, val);
354}
355
356inline
360
361inline
363 switch (c) {
364 case U'\t' : return true;
365 case U' ' : return true;
366 case U' ': return true;
367 case U' ': return true;
368 case U' ': return true;
369 case U' ': return true;
370 case U' ': return true;
371 case U' ': return true;
372 case U' ': return true;
373 case U' ': return true;
374 case U' ': return true;
375 case U' ': return true;
376 case U' ': return true;
377 case U' ': return true;
378 case U' ': return true;
379 case U' ': return true;
380 case U' ': return true;
381 case U' ': return true;
382 default: return false;
383 }
384}
385
386inline
387size_t ellipsis‿str32‿escape(char32_t* pc32, char const* s, bool account_eol) {
388 size_t l = 1;
389 switch (s[1]) {
390 default: *pc32 = U'\\';/* downgraded */ break;
391
392 case '\\': *pc32 = U'\\'; l = 2;/* downgraded */ break;
393 case 'a': *pc32 = U'\a'; l = 2;/* downgraded */ break;
394 case 'b': *pc32 = U'\b'; l = 2;/* downgraded */ break;
395 case 'f': *pc32 = U'\f'; l = 2;/* downgraded */ break;
396 case 'n': *pc32 = U'\n'; l = 2;/* downgraded */ break;
397 case 'r': *pc32 = U'\r'; l = 2;/* downgraded */ break;
398 case 't': *pc32 = U'\t'; l = 2;/* downgraded */ break;
399 case 'v': *pc32 = U'\v'; l = 2;/* downgraded */ break;
400 case '\"': *pc32 = U'\"'; l = 2;/* downgraded */ break;
401 case '\'': *pc32 = U'\''; l = 2;/* downgraded */ break;
402
403 case '\n': *pc32 = U'\r'; l = 2; if (account_eol) {ellipsis‿infra‿newline();}/* downgraded */ break;
404
405 case 'u':
406 if (sscanf(s+2, "%4" SCNx32, pc32) < 1) {
407 l = 1;
408 *pc32 = U'\\';
409 } else {
410 l = 6;
411 }
412 /* downgraded */ break;
413
414 case 'U':
415 if (sscanf(s+2, "%8" SCNx32, pc32) < 1) {
416 l = 1;
417 *pc32 = U'\\';
418 } else {
419 l = 10;
420 }
421 /* downgraded */ break;
422 }
423 return l;
424}
425
426inline
427size_t ellipsis‿lex‿str_escape(char pc[static 1], size_t lenp[static 1], char const s[static 2], bool account_eol) {
428 char32_t c32 = 0;
429 size_t l = 1;
430 *lenp = 1;
431 switch (s[1]) {
432 default: *pc = '\\';/* downgraded */ break;
433
434 case '\\': *pc = '\\'; l = 2;/* downgraded */ break;
435 case 'a': *pc = '\a'; l = 2;/* downgraded */ break;
436 case 'b': *pc = '\b'; l = 2;/* downgraded */ break;
437 case 'f': *pc = '\f'; l = 2;/* downgraded */ break;
438 case 'n': *pc = '\n'; l = 2;/* downgraded */ break;
439 case 'r': *pc = '\r'; l = 2;/* downgraded */ break;
440 case 't': *pc = '\t'; l = 2;/* downgraded */ break;
441 case 'v': *pc = '\v'; l = 2;/* downgraded */ break;
442 case '\"': *pc = '\"'; l = 2;/* downgraded */ break;
443 case '\'': *pc = '\''; l = 2;/* downgraded */ break;
444
445 case '\n': *pc = '\r'; l = 2; if (account_eol) {ellipsis‿infra‿newline();}/* downgraded */ break;
446
447 case '0':
448 case '1':
449 case '2':
450 case '3':
451 case '4':
452 case '5':
453 case '6':
454 case '7': {
455 int el = 0;
456 if (sscanf(s+1, "%3" SCNo32 "%n", &c32, &el) < 1) {
457 l = 1;
458 *pc = '\\';
459 } else {
460 if (!c32) {
461 *lenp = 1;
462 l = el+1;
463 *pc = 0;
464 } else {
465 size_t len = c32rtomb(pc, c32, &(mbstate_t) {});
466 ELLIPSIS_CONTRACT(5, len <= MB_CUR_MAX, abort, true, "len ≤ MB_CUR_MAX", "assertion", "Unable to convert octal escape character");
467 *lenp = len;
468 l = el+1;
469 }
470 }
471 /* downgraded */ break;
472 }
473 case 'x': {
474 int el = 0;
475 if (sscanf(s+2, "%" SCNx32 "%n", &c32, &el) < 1) {
476 l = 1;
477 *pc = '\\';
478 } else {
479 if (!c32) {
480 *lenp = 1;
481 l = el+2;
482 *pc = 0;
483 } else {
484 size_t len = c32rtomb(pc, c32, &(mbstate_t) {});
485 ELLIPSIS_CONTRACT(6, len <= MB_CUR_MAX, abort, true, "len ≤ MB_CUR_MAX", "assertion", "Unable to convert hexadecimal escape character");
486 *lenp = len;
487 l = el+2;
488 }
489 }
490 /* downgraded */ break;
491 }
492
493 case 'u':
494 if (sscanf(s+2, "%4" SCNx32, &c32) < 1) {
495 l = 1;
496 *pc = '\\';
497 } else {
498 size_t len = c32rtomb(pc, c32, &(mbstate_t) {});
499 ELLIPSIS_CONTRACT(7, len <= MB_CUR_MAX, abort, true, "len ≤ MB_CUR_MAX", "assertion", "unable to convert short Unicode identifier");
500 *lenp = len;
501 l = 6;
502 }
503 /* downgraded */ break;
504
505 case 'U':
506 if (sscanf(s+2, "%8" SCNx32, &c32) < 1) {
507 l = 1;
508 *pc = '\\';
509 } else {
510 size_t len = c32rtomb(pc, c32, &(mbstate_t) {});
511 ELLIPSIS_CONTRACT(8, len <= MB_CUR_MAX, abort, true, "len ≤ MB_CUR_MAX", "assertion", "unable to convert long Unicode identifier");
512 *lenp = len;
513 l = 10;
514 }
515 /* downgraded */ break;
516 }
517 return l;
518}
519
520#endif
ellipsis‿bitset‿base ellipsis‿XID‿Continue[0x1000]
Definition XID_Continue.c:8
ellipsis‿bitset‿base ellipsis‿XID‿Start[0x1000]
Definition XID_Start.c:8
#define ellipsis_bitset_member(A, V)
Definition ellipsis-bitset.h:46
ellipsis‿category
An enumeration type ellipsis‿category with the underlying integer type ellipsis‿category‿base.
Definition ellipsis-category.h:32
struct ellipsis‿contracts‿is_ice ellipsis‿contracts‿is_ice
Definition ellipsis-expression.c:24
void ellipsis‿infra‿newline(void)
Definition ellipsis-infra.c:158
ellipsis‿category ellipsis‿lex‿category‿_Inner(ellipsis‿str32 const st[static 1], ellipsis‿special‿find *find)
Definition ellipsis-lexer.c:428
char * ellipsis‿lex‿strdup_escape‿_Inner(size_t len, char const s[static len], size_t nlenp[static 1])
Definition ellipsis-lexer.c:443
ellipsis‿category ellipsis‿lex‿category‿_Insta(ellipsis‿str32 const s[static 1], ellipsis‿special‿find *find)
Definition ellipsis-lexer.c:599
ellipsis‿str32 const * ellipsis‿lex‿space‿_Inner(size_t len[static 1], char const *restrict s[static 1])
Definition ellipsis-lexer.c:503
ellipsis‿str32 const * ellipsis‿lex‿nonspace‿_Insta(size_t len[static 1], char const *restrict s[static 1], ellipsis‿special const **sp, ellipsis‿token t[static 1], ellipsis‿special‿find *f)
Definition ellipsis-lexer.c:541
ellipsis‿str32 const * ellipsis‿lex‿nonspace‿_Inner(size_t len[static 1], char const *restrict s[static 1], ellipsis‿special const **sp, ellipsis‿token t[static 1], ellipsis‿special‿find *find)
Definition ellipsis-lexer.c:184
ellipsis‿str32 const * ellipsis‿lex‿space‿_Insta(size_t len[static 1], char const *restrict s[static 1])
Definition ellipsis-lexer.c:571
char * ellipsis‿lex‿strdup_escape‿_Insta(size_t len, char const s[static len], size_t nlenp[static 1])
Definition ellipsis-lexer.c:626
ellipsis‿str32 const * ellipsis‿lex‿space‿_Ctra(size_t len[static 1], char const *restrict s[static 1])
Definition ellipsis-lexer.h:258
thread_local bool volatile ellipsis‿contracts‿verbose‿dynamic
char * ellipsis‿lex‿strdup_escape(size_t len, char const s[static len], size_t nlenp[static 1])
Definition ellipsis-lexer.h:178
#define ELLIPSIS_CONTRACT(COUNT, COND, ACTION, VERB, CSTR, CTYPE,...)
Definition ellipsis-lexer.h:72
ellipsis‿str32 const * ellipsis‿lex‿space(size_t len[static 1], char const *restrict s[static 1])
Definition ellipsis-lexer.h:123
bool ellipsis‿lex‿is_space(char32_t c)
Definition ellipsis-lexer.h:362
bool ellipsis‿lex‿Start(char32_t val)
Definition ellipsis-lexer.h:352
ellipsis‿category ellipsis‿lex‿category(ellipsis‿str32 const s[static 1], ellipsis‿special‿find *find)
Definition ellipsis-lexer.h:151
ellipsis‿str32 const * ellipsis‿lex‿nonspace‿_Ctra(size_t len[static 1], char const *restrict s[static 1], ellipsis‿special const **sp, ellipsis‿token t[static 1], ellipsis‿special‿find *f)
Definition ellipsis-lexer.h:217
thread_local bool volatile ellipsis‿contracts‿proceed‿dynamic
ellipsis‿str32 const * ellipsis‿lex‿nonspace(size_t len[static 1], char const *restrict s[static 1], ellipsis‿special const **sp, ellipsis‿token t[static 1], ellipsis‿special‿find *f)
Definition ellipsis-lexer.h:82
size_t ellipsis‿lex‿str_escape(char pc[static 1], size_t lenp[static 1], char const s[static 2], bool account_eol)
Definition ellipsis-lexer.h:427
ellipsis‿category ellipsis‿lex‿category‿_Ctra(ellipsis‿str32 const s[static 1], ellipsis‿special‿find *find)
Definition ellipsis-lexer.h:286
size_t ellipsis‿str32‿escape(char32_t *pc32, char const *s, bool account_eol)
Definition ellipsis-lexer.h:387
bool ellipsis‿lex‿Continue(char32_t val)
Definition ellipsis-lexer.h:357
thread_local bool volatile ellipsis‿contracts‿ignore‿dynamic
char * ellipsis‿lex‿strdup_escape‿_Ctra(size_t len, char const s[static len], size_t nlenp[static 1])
Definition ellipsis-lexer.h:313
ellipsis‿special const * ellipsis‿special‿find(size_t len, char const buf[len])
Definition ellipsis-special.h:102
Definition ellipsis-special.h:95
A structure with a flexible array member of base type ellipsis‿str32‿base.
Definition ellipsis-str32.h:156
A token element as recognized during processing.
Definition ellipsis-token.h:94