• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /macosx-10.9.5/tcl-102/tcl_ext/tcllib/tcllib/modules/pt/tests/data/ok/peg_cparam-critcl/
1## -*- tcl -*-
2##
3## Critcl-based C/PARAM implementation of the parsing
4## expression grammar
5##
6##	TEMPLATE
7##
8## Generated from file	TEST
9##            for user  unknown
10##
11# # ## ### ##### ######## ############# #####################
12## Requirements
13
14package require Tcl 8.4
15package require critcl
16# @sak notprovided PACKAGE
17package provide    PACKAGE 1
18
19# Note: The implementation of the PARAM virtual machine
20#       underlying the C/PARAM code used below is inlined
21#       into the generated parser, allowing for direct access
22#       and manipulation of the RDE state, instead of having
23#       to dispatch through the Tcl interpreter.
24
25# # ## ### ##### ######## ############# #####################
26##
27
28namespace eval ::PARSER {
29    # # ## ### ##### ######## ############# #####################
30    ## Supporting code for the main command.
31
32    catch {
33	critcl::cheaders -g
34	critcl::debug memory symbols
35    }
36
37    # # ## ### ###### ######## #############
38    ## RDE runtime, inlined, and made static.
39
40    # This is the C code for the RDE, i.e. the implementation
41    # of pt::rde. Only the low-level engine is imported, the
42    # Tcl interface layer is ignored.  This generated parser
43    # provides its own layer for that.
44
45    critcl::ccode {
46	/* -*- c -*- */
47
48	#include <string.h>
49	#define SCOPE static
50
51#line 1 "rde_critcl/util.h"
52
53	#ifndef _RDE_UTIL_H
54	#define _RDE_UTIL_H 1
55	#ifndef SCOPE
56	#define SCOPE
57	#endif
58	#define ALLOC(type)    (type *) ckalloc (sizeof (type))
59	#define NALLOC(n,type) (type *) ckalloc ((n) * sizeof (type))
60	#undef  RDE_DEBUG
61	#define RDE_DEBUG 1
62	#undef  RDE_TRACE
63	#ifdef RDE_DEBUG
64	#define STOPAFTER(x) { static int count = (x); count --; if (!count) { Tcl_Panic ("stop"); } }
65	#define XSTR(x) #x
66	#define STR(x) XSTR(x)
67	#define RANGEOK(i,n) ((0 <= (i)) && (i < (n)))
68	#define ASSERT(x,msg) if (!(x)) { Tcl_Panic (msg " (" #x "), in file " __FILE__ " @line " STR(__LINE__));}
69	#define ASSERT_BOUNDS(i,n) ASSERT (RANGEOK(i,n),"array index out of bounds: " STR(i) " >= " STR(n))
70	#else
71	#define STOPAFTER(x)
72	#define ASSERT(x,msg)
73	#define ASSERT_BOUNDS(i,n)
74	#endif
75	#ifdef RDE_TRACE
76	SCOPE void trace_enter (const char* fun);
77	SCOPE void trace_return (const char *pat, ...);
78	SCOPE void trace_printf (const char *pat, ...);
79	#define ENTER(fun)          trace_enter (fun)
80	#define RETURN(format,x)    trace_return (format,x) ; return x
81	#define RETURNVOID          trace_return ("%s","(void)") ; return
82	#define TRACE0(x)           trace_printf0 x
83	#define TRACE(x)            trace_printf x
84	#else
85	#define ENTER(fun)
86	#define RETURN(f,x) return x
87	#define RETURNVOID  return
88	#define TRACE0(x)
89	#define TRACE(x)
90	#endif
91	#endif 
92	
93
94#line 1 "rde_critcl/stack.h"
95
96	#ifndef _RDE_DS_STACK_H
97	#define _RDE_DS_STACK_H 1
98	typedef void (*RDE_STACK_CELL_FREE) (void* cell);
99	typedef struct RDE_STACK_* RDE_STACK;
100	static const int RDE_STACK_INITIAL_SIZE = 256;
101	#endif 
102	
103
104#line 1 "rde_critcl/tc.h"
105
106	#ifndef _RDE_DS_TC_H
107	#define _RDE_DS_TC_H 1
108	typedef struct RDE_TC_* RDE_TC;
109	#endif 
110	
111
112#line 1 "rde_critcl/param.h"
113
114	#ifndef _RDE_DS_PARAM_H
115	#define _RDE_DS_PARAM_H 1
116	typedef struct RDE_PARAM_* RDE_PARAM;
117	typedef struct ERROR_STATE {
118	    int       refCount;
119	    long int  loc;
120	    RDE_STACK msg; 
121	} ERROR_STATE;
122	typedef struct NC_STATE {
123	    long int     CL;
124	    long int     ST;
125	    Tcl_Obj*     SV;
126	    ERROR_STATE* ER;
127	} NC_STATE;
128	#endif 
129	
130
131#line 1 "rde_critcl/util.c"
132
133	#ifdef RDE_TRACE
134	typedef struct F_STACK {
135	    const char*     str;
136	    struct F_STACK* down;
137	} F_STACK;
138	static F_STACK* top   = 0;
139	static int      level = 0;
140	static void
141	push (const char* str)
142	{
143	    F_STACK* new = ALLOC (F_STACK);
144	    new->str = str;
145	    new->down = top;
146	    top = new;
147	    level += 4;
148	}
149	static void
150	pop (void)
151	{
152	    F_STACK* next = top->down;
153	    level -= 4;
154	    ckfree ((char*)top);
155	    top = next;
156	}
157	static void
158	indent (void)
159	{
160	    int i;
161	    for (i = 0; i < level; i++) {
162		fwrite(" ", 1, 1, stdout);
163		fflush           (stdout);
164	    }
165	    if (top) {
166		fwrite(top->str, 1, strlen(top->str), stdout);
167		fflush                               (stdout);
168	    }
169	    fwrite(" ", 1, 1, stdout);
170	    fflush           (stdout);
171	}
172	SCOPE void
173	trace_enter (const char* fun)
174	{
175	    push (fun);
176	    indent();
177	    fwrite("ENTER\n", 1, 6, stdout);
178	    fflush                 (stdout);
179	}
180	static char msg [1024*1024];
181	SCOPE void
182	trace_return (const char *pat, ...)
183	{
184	    int len;
185	    va_list args;
186	    indent();
187	    fwrite("RETURN = ", 1, 9, stdout);
188	    fflush                   (stdout);
189	    va_start(args, pat);
190	    len = vsprintf(msg, pat, args);
191	    va_end(args);
192	    msg[len++] = '\n';
193	    msg[len] = '\0';
194	    fwrite(msg, 1, len, stdout);
195	    fflush             (stdout);
196	    pop();
197	}
198	SCOPE void
199	trace_printf (const char *pat, ...)
200	{
201	    int len;
202	    va_list args;
203	    indent();
204	    va_start(args, pat);
205	    len = vsprintf(msg, pat, args);
206	    va_end(args);
207	    msg[len++] = '\n';
208	    msg[len] = '\0';
209	    fwrite(msg, 1, len, stdout);
210	    fflush             (stdout);
211	}
212	SCOPE void
213	trace_printf0 (const char *pat, ...)
214	{
215	    int len;
216	    va_list args;
217	    va_start(args, pat);
218	    len = vsprintf(msg, pat, args);
219	    va_end(args);
220	    msg[len++] = '\n';
221	    msg[len] = '\0';
222	    fwrite(msg, 1, len, stdout);
223	    fflush             (stdout);
224	}
225	#endif
226	
227
228#line 1 "rde_critcl/stack.c"
229
230	typedef struct RDE_STACK_ {
231	    long int            max;   
232	    long int            top;   
233	    RDE_STACK_CELL_FREE freeCellProc; 
234	    void**              cell;  
235	} RDE_STACK_;
236	
237	SCOPE RDE_STACK
238	rde_stack_new (RDE_STACK_CELL_FREE freeCellProc)
239	{
240	    RDE_STACK s = ALLOC (RDE_STACK_);
241	    s->cell = NALLOC (RDE_STACK_INITIAL_SIZE, void*);
242	    s->max  = RDE_STACK_INITIAL_SIZE;
243	    s->top  = 0;
244	    s->freeCellProc = freeCellProc;
245	    return s;
246	}
247	SCOPE void
248	rde_stack_del (RDE_STACK s)
249	{
250	    if (s->freeCellProc && s->top) {
251		long int i;
252		for (i=0; i < s->top; i++) {
253		    ASSERT_BOUNDS(i,s->max);
254		    s->freeCellProc ( s->cell [i] );
255		}
256	    }
257	    ckfree ((char*) s->cell);
258	    ckfree ((char*) s);
259	}
260	SCOPE void
261	rde_stack_push (RDE_STACK s, void* item)
262	{
263	    if (s->top >= s->max) {
264		long int new  = s->max ? (2 * s->max) : RDE_STACK_INITIAL_SIZE;
265		void**   cell = (void**) ckrealloc ((char*) s->cell, new * sizeof(void*));
266		ASSERT (cell,"Memory allocation failure for RDE stack");
267		s->max  = new;
268		s->cell = cell;
269	    }
270	    ASSERT_BOUNDS(s->top,s->max);
271	    s->cell [s->top] = item;
272	    s->top ++;
273	}
274	SCOPE void*
275	rde_stack_top (RDE_STACK s)
276	{
277	    ASSERT_BOUNDS(s->top-1,s->max);
278	    return s->cell [s->top - 1];
279	}
280	SCOPE void
281	rde_stack_pop (RDE_STACK s, long int n)
282	{
283	    ASSERT (n >= 0, "Bad pop count");
284	    if (n == 0) return;
285	    if (s->freeCellProc) {
286		while (n) {
287		    s->top --;
288		    ASSERT_BOUNDS(s->top,s->max);
289		    s->freeCellProc ( s->cell [s->top] );
290		    n --;
291		}
292	    } else {
293		s->top -= n;
294	    }
295	}
296	SCOPE void
297	rde_stack_trim (RDE_STACK s, long int n)
298	{
299	    ASSERT (n >= 0, "Bad trimsize");
300	    if (s->freeCellProc) {
301		while (s->top > n) {
302		    s->top --;
303		    ASSERT_BOUNDS(s->top,s->max);
304		    s->freeCellProc ( s->cell [s->top] );
305		}
306	    } else {
307		s->top = n;
308	    }
309	}
310	SCOPE void
311	rde_stack_drop (RDE_STACK s, long int n)
312	{
313	    ASSERT (n >= 0, "Bad pop count");
314	    if (n == 0) return;
315	    s->top -= n;
316	}
317	SCOPE void
318	rde_stack_move (RDE_STACK dst, RDE_STACK src)
319	{
320	    ASSERT (dst->freeCellProc == src->freeCellProc, "Ownership mismatch");
321	    
322	    while (src->top > 0) {
323		src->top --;
324		ASSERT_BOUNDS(src->top,src->max);
325		rde_stack_push (dst, src->cell [src->top] );
326	    }
327	}
328	SCOPE void
329	rde_stack_get (RDE_STACK s, long int* cn, void*** cc)
330	{
331	    *cn = s->top;
332	    *cc = s->cell;
333	}
334	SCOPE long int
335	rde_stack_size (RDE_STACK s)
336	{
337	    return s->top;
338	}
339	
340
341#line 1 "rde_critcl/tc.c"
342
343	typedef struct RDE_TC_ {
344	    int       max;   
345	    int       num;   
346	    char*     str;   
347	    RDE_STACK off;   
348	} RDE_TC_;
349	
350	SCOPE RDE_TC
351	rde_tc_new (void)
352	{
353	    RDE_TC tc = ALLOC (RDE_TC_);
354	    tc->max   = RDE_STACK_INITIAL_SIZE;
355	    tc->num   = 0;
356	    tc->str   = NALLOC (RDE_STACK_INITIAL_SIZE, char);
357	    tc->off   = rde_stack_new (NULL);
358	    return tc;
359	}
360	SCOPE void
361	rde_tc_del (RDE_TC tc)
362	{
363	    rde_stack_del (tc->off);
364	    ckfree (tc->str);
365	    ckfree ((char*) tc);
366	}
367	SCOPE long int
368	rde_tc_size (RDE_TC tc)
369	{
370	    return rde_stack_size (tc->off);
371	}
372	SCOPE void
373	rde_tc_clear (RDE_TC tc)
374	{
375	    tc->num   = 0;
376	    rde_stack_trim (tc->off,  0);
377	}
378	SCOPE char*
379	rde_tc_append (RDE_TC tc, char* string, long int len)
380	{
381	    long int base = tc->num;
382	    long int off  = tc->num;
383	    char* ch;
384	    int clen;
385	    Tcl_UniChar uni;
386	    if (len < 0) {
387		len = strlen (ch);
388	    }
389	    
390	    if ((tc->num + len) >= tc->max) {
391		int   new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE);
392		char* str = ckrealloc (tc->str, new * sizeof(char));
393		ASSERT (str,"Memory allocation failure for token character array");
394		tc->max = new;
395		tc->str = str;
396	    }
397	    tc->num += len;
398	    ASSERT_BOUNDS(tc->num,tc->max);
399	    ASSERT_BOUNDS(off,tc->max);
400	    ASSERT_BOUNDS(off+len-1,tc->max);
401	    ASSERT_BOUNDS(off+len-1,tc->num);
402	    memcpy (tc->str + off, string, len);
403	    
404	    ch = string;
405	    while (ch < (string + len)) {
406		ASSERT_BOUNDS(off,tc->num);
407		rde_stack_push (tc->off,  (void*) off);
408		clen = Tcl_UtfToUniChar (ch, &uni);
409		off += clen;
410		ch  += clen;
411	    }
412	    return tc->str + base;
413	}
414	SCOPE void
415	rde_tc_get (RDE_TC tc, int at, char** ch, long int* len)
416	{
417	    long int  oc, off, top, end;
418	    long int* ov;
419	    rde_stack_get (tc->off, &oc, (void***) &ov);
420	    ASSERT_BOUNDS(at,oc);
421	    off = ov [at];
422	    if ((at+1) == oc) {
423		end = tc->num;
424	    } else {
425		end = ov [at+1];
426	    }
427	    TRACE (("rde_tc_get (RDE_TC %p, @ %d) => %d.[%d ... %d]/%d",tc,at,end-off,off,end-1,tc->num));
428	    ASSERT_BOUNDS(off,tc->num);
429	    ASSERT_BOUNDS(end-1,tc->num);
430	    *ch = tc->str + off;
431	    *len = end - off;
432	}
433	SCOPE void
434	rde_tc_get_s (RDE_TC tc, int at, int last, char** ch, long int* len)
435	{
436	    long int  oc, off, top, end;
437	    long int* ov;
438	    rde_stack_get (tc->off, &oc, (void***) &ov);
439	    ASSERT_BOUNDS(at,oc);
440	    ASSERT_BOUNDS(last,oc);
441	    off = ov [at];
442	    if ((last+1) == oc) {
443		end = tc->num;
444	    } else {
445		end = ov [last+1];
446	    }
447	    TRACE (("rde_tc_get_s (RDE_TC %p, @ %d .. %d) => %d.[%d ... %d]/%d",tc,at,last,end-off,off,end-1,tc->num));
448	    ASSERT_BOUNDS(off,tc->num);
449	    ASSERT_BOUNDS(end-1,tc->num);
450	    *ch = tc->str + off;
451	    *len = end - off;
452	}
453	
454
455#line 1 "rde_critcl/param.c"
456
457	typedef struct RDE_PARAM_ {
458	    Tcl_Channel   IN;
459	    Tcl_Obj*      readbuf;
460	    char*         CC; 
461	    long int      CC_len;
462	    RDE_TC        TC;
463	    long int      CL;
464	    RDE_STACK     LS; 
465	    ERROR_STATE*  ER;
466	    RDE_STACK     ES; 
467	    long int      ST;
468	    Tcl_Obj*      SV;
469	    Tcl_HashTable NC;
470	    
471	    RDE_STACK    ast  ; 
472	    RDE_STACK    mark ; 
473	    
474	    long int numstr; 
475	    char**  string;
476	    
477	    ClientData clientData;
478	} RDE_PARAM_;
479	typedef int (*UniCharClass) (int);
480	typedef enum test_class_id {
481	    tc_alnum,
482	    tc_alpha,
483	    tc_ascii,
484	    tc_ddigit,
485	    tc_digit,
486	    tc_graph,
487	    tc_lower,
488	    tc_printable,
489	    tc_punct,
490	    tc_space,
491	    tc_upper,
492	    tc_wordchar,
493	    tc_xdigit
494	} test_class_id;
495	static void ast_node_free    (void* n);
496	static void error_state_free (void* es);
497	static void error_set        (RDE_PARAM p, int s);
498	static void nc_clear         (RDE_PARAM p);
499	static int UniCharIsAscii    (int character);
500	static int UniCharIsHexDigit (int character);
501	static int UniCharIsDecDigit (int character);
502	static void test_class (RDE_PARAM p, UniCharClass class, test_class_id id);
503	static int  er_int_compare (const void* a, const void* b);
504	#define SV_INIT(p)             \
505	    p->SV = NULL; \
506	    TRACE (("SV_INIT (%p => %p)", (p), (p)->SV))
507	#define SV_SET(p,newsv)             \
508	    if (((p)->SV) != (newsv)) { \
509	        TRACE (("SV_CLEAR/set (%p => %p)", (p), (p)->SV)); \
510	        if ((p)->SV) {                  \
511		    Tcl_DecrRefCount ((p)->SV); \
512	        }				    \
513	        (p)->SV = (newsv);		    \
514	        TRACE (("SV_SET       (%p => %p)", (p), (p)->SV)); \
515	        if ((p)->SV) {                  \
516		    Tcl_IncrRefCount ((p)->SV); \
517	        } \
518	    }
519	#define SV_CLEAR(p)                 \
520	    TRACE (("SV_CLEAR (%p => %p)", (p), (p)->SV)); \
521	    if ((p)->SV) {                  \
522		Tcl_DecrRefCount ((p)->SV); \
523	    }				    \
524	    (p)->SV = NULL
525	#define ER_INIT(p)             \
526	    p->ER = NULL; \
527	    TRACE (("ER_INIT (%p => %p)", (p), (p)->ER))
528	#define ER_CLEAR(p)             \
529	    error_state_free ((p)->ER);	\
530	    (p)->ER = NULL
531	SCOPE RDE_PARAM
532	rde_param_new (long int nstr, char** strings)
533	{
534	    RDE_PARAM p;
535	    ENTER ("rde_param_new");
536	    TRACE (("\tINT %d strings @ %p", nstr, strings));
537	    p = ALLOC (RDE_PARAM_);
538	    p->numstr = nstr;
539	    p->string = strings;
540	    p->readbuf = Tcl_NewObj ();
541	    Tcl_IncrRefCount (p->readbuf);
542	    TRACE (("\tTcl_Obj* readbuf %p used %d", p->readbuf,p->readbuf->refCount));
543	    Tcl_InitHashTable (&p->NC, TCL_ONE_WORD_KEYS);
544	    p->IN   = NULL;
545	    p->CL   = -1;
546	    p->ST   = 0;
547	    ER_INIT (p);
548	    SV_INIT (p);
549	    p->CC   = NULL;
550	    p->CC_len = 0;
551	    p->TC   = rde_tc_new ();
552	    p->ES   = rde_stack_new (error_state_free);
553	    p->LS   = rde_stack_new (NULL);
554	    p->ast  = rde_stack_new (ast_node_free);
555	    p->mark = rde_stack_new (NULL);
556	    RETURN ("%p", p);
557	}
558	SCOPE void 
559	rde_param_del (RDE_PARAM p)
560	{
561	    ENTER ("rde_param_del");
562	    TRACE (("RDE_PARAM %p",p));
563	    ER_CLEAR (p);                 TRACE (("\ter_clear"));
564	    SV_CLEAR (p);                 TRACE (("\tsv_clear"));
565	    nc_clear (p);                 TRACE (("\tnc_clear"));
566	    Tcl_DeleteHashTable (&p->NC); TRACE (("\tnc hashtable delete"));
567	    rde_tc_del    (p->TC);        TRACE (("\ttc clear"));
568	    rde_stack_del (p->ES);        TRACE (("\tes clear"));
569	    rde_stack_del (p->LS);        TRACE (("\tls clear"));
570	    rde_stack_del (p->ast);       TRACE (("\tast clear"));
571	    rde_stack_del (p->mark);      TRACE (("\tmark clear"));
572	    TRACE (("\tTcl_Obj* readbuf %p used %d", p->readbuf,p->readbuf->refCount));
573	    Tcl_DecrRefCount (p->readbuf);
574	    ckfree ((char*) p);
575	    RETURNVOID;
576	}
577	SCOPE void 
578	rde_param_reset (RDE_PARAM p, Tcl_Channel chan)
579	{
580	    ENTER ("rde_param_reset");
581	    TRACE (("RDE_PARAM   %p",p));
582	    TRACE (("Tcl_Channel %p",chan));
583	    p->IN  = chan;
584	    p->CL  = -1;
585	    p->ST  = 0;
586	    p->CC  = NULL;
587	    p->CC_len = 0;
588	    ER_CLEAR (p);
589	    SV_CLEAR (p);
590	    nc_clear (p);
591	    rde_tc_clear   (p->TC);
592	    rde_stack_trim (p->ES,   0);
593	    rde_stack_trim (p->LS,   0);
594	    rde_stack_trim (p->ast,  0);
595	    rde_stack_trim (p->mark, 0);
596	    TRACE (("\tTcl_Obj* readbuf %p used %d", p->readbuf,p->readbuf->refCount));
597	    RETURNVOID;
598	}
599	SCOPE void
600	rde_param_update_strings (RDE_PARAM p, long int nstr, char** strings)
601	{
602	    ENTER ("rde_param_update_strings");
603	    TRACE (("RDE_PARAM %p", p));
604	    TRACE (("INT       %d strings", nstr));
605	    p->numstr = nstr;
606	    p->string = strings;
607	    RETURNVOID;
608	}
609	SCOPE void
610	rde_param_data (RDE_PARAM p, char* buf, long int len)
611	{
612	    (void) rde_tc_append (p->TC, buf, len);
613	}
614	SCOPE void
615	rde_param_clientdata (RDE_PARAM p, ClientData clientData)
616	{
617	    p->clientData = clientData;
618	}
619	static void
620	nc_clear (RDE_PARAM p)
621	{
622	    Tcl_HashSearch hs;
623	    Tcl_HashEntry* he;
624	    Tcl_HashTable* tablePtr;
625	    for(he = Tcl_FirstHashEntry(&p->NC, &hs);
626		he != NULL;
627		he = Tcl_FirstHashEntry(&p->NC, &hs)) {
628		Tcl_HashSearch hsc;
629		Tcl_HashEntry* hec;
630		tablePtr = (Tcl_HashTable*) Tcl_GetHashValue (he);
631		for(hec = Tcl_FirstHashEntry(tablePtr, &hsc);
632		    hec != NULL;
633		    hec = Tcl_NextHashEntry(&hsc)) {
634		    NC_STATE* scs = Tcl_GetHashValue (hec);
635		    error_state_free (scs->ER);
636		    if (scs->SV) { Tcl_DecrRefCount (scs->SV); }
637		    ckfree ((char*) scs);
638		}
639		Tcl_DeleteHashTable (tablePtr);
640		ckfree ((char*) tablePtr);
641		Tcl_DeleteHashEntry (he);
642	    }
643	}
644	SCOPE ClientData
645	rde_param_query_clientdata (RDE_PARAM p)
646	{
647	    return p->clientData;
648	}
649	SCOPE void
650	rde_param_query_amark (RDE_PARAM p, long int* mc, long int** mv)
651	{
652	    rde_stack_get (p->mark, mc, (void***) mv);
653	}
654	SCOPE void
655	rde_param_query_ast (RDE_PARAM p, long int* ac, Tcl_Obj*** av)
656	{
657	    rde_stack_get (p->ast, ac, (void***) av);
658	}
659	SCOPE const char*
660	rde_param_query_in (RDE_PARAM p)
661	{
662	    return p->IN
663		? Tcl_GetChannelName (p->IN)
664		: "";
665	}
666	SCOPE const char*
667	rde_param_query_cc (RDE_PARAM p, long int* len)
668	{
669	    *len = p->CC_len;
670	    return p->CC;
671	}
672	SCOPE int
673	rde_param_query_cl (RDE_PARAM p)
674	{
675	    return p->CL;
676	}
677	SCOPE const ERROR_STATE*
678	rde_param_query_er (RDE_PARAM p)
679	{
680	    return p->ER;
681	}
682	SCOPE Tcl_Obj*
683	rde_param_query_er_tcl (RDE_PARAM p, const ERROR_STATE* er)
684	{
685	    Tcl_Obj* res;
686	    if (!er) {
687		
688		res = Tcl_NewStringObj ("", 0);
689	    } else {
690		Tcl_Obj* ov [2];
691		Tcl_Obj** mov;
692		long int  mc, i, j;
693		long int* mv;
694		int lastid;
695		const char* msg;
696		rde_stack_get (er->msg, &mc, (void***) &mv);
697		
698		qsort (mv, mc, sizeof (long int), er_int_compare);
699		
700		mov = NALLOC (mc, Tcl_Obj*);
701		lastid = -1;
702		for (i=0, j=0; i < mc; i++) {
703		    ASSERT_BOUNDS (i,mc);
704		    if (mv [i] == lastid) continue;
705		    lastid = mv [i];
706		    ASSERT_BOUNDS(mv[i],p->numstr);
707		    msg = p->string [mv[i]]; 
708		    ASSERT_BOUNDS (j,mc);
709		    mov [j] = Tcl_NewStringObj (msg, -1);
710		    j++;
711		}
712		
713		ov [0] = Tcl_NewIntObj  (er->loc);
714		ov [1] = Tcl_NewListObj (j, mov);
715		res = Tcl_NewListObj (2, ov);
716		ckfree ((char*) mov);
717	    }
718	    return res;
719	}
720	SCOPE void
721	rde_param_query_es (RDE_PARAM p, long int* ec, ERROR_STATE*** ev)
722	{
723	    rde_stack_get (p->ES, ec, (void***) ev);
724	}
725	SCOPE void
726	rde_param_query_ls (RDE_PARAM p, long int* lc, long int** lv)
727	{
728	    rde_stack_get (p->LS, lc, (void***) lv);
729	}
730	SCOPE Tcl_HashTable*
731	rde_param_query_nc (RDE_PARAM p)
732	{
733	    return &p->NC;
734	}
735	SCOPE int
736	rde_param_query_st (RDE_PARAM p)
737	{
738	    return p->ST;
739	}
740	SCOPE Tcl_Obj*
741	rde_param_query_sv (RDE_PARAM p)
742	{
743	    TRACE (("SV_QUERY %p => (%p)", (p), (p)->SV)); \
744	    return p->SV;
745	}
746	SCOPE long int
747	rde_param_query_tc_size (RDE_PARAM p)
748	{
749	    return rde_tc_size (p->TC);
750	}
751	SCOPE void
752	rde_param_query_tc_get_s (RDE_PARAM p, long int at, long int last, char** ch, long int* len)
753	{
754	    rde_tc_get_s (p->TC, at, last, ch, len);
755	}
756	SCOPE const char*
757	rde_param_query_string (RDE_PARAM p, long int id)
758	{
759	    TRACE (("rde_param_query_string (RDE_PARAM %p, %d/%d)", p, id, p->numstr));
760	    ASSERT_BOUNDS(id,p->numstr);
761	    return p->string [id];
762	}
763	SCOPE void
764	rde_param_i_ast_pop_discard (RDE_PARAM p)
765	{
766	    rde_stack_pop (p->mark, 1);
767	}
768	SCOPE void
769	rde_param_i_ast_pop_rewind (RDE_PARAM p)
770	{
771	    long int trim = (long int) rde_stack_top (p->mark);
772	    ENTER ("rde_param_i_ast_pop_rewind");
773	    TRACE (("RDE_PARAM %p",p));
774	    rde_stack_pop  (p->mark, 1);
775	    rde_stack_trim (p->ast, (int) trim);
776	    TRACE (("SV = (%p rc%d '%s')",
777		    p->SV,
778		    p->SV ? p->SV->refCount       : -1,
779		    p->SV ? Tcl_GetString (p->SV) : ""));
780	    RETURNVOID;
781	}
782	SCOPE void
783	rde_param_i_ast_rewind (RDE_PARAM p)
784	{
785	    long int trim = (long int) rde_stack_top (p->mark);
786	    ENTER ("rde_param_i_ast_rewind");
787	    TRACE (("RDE_PARAM %p",p));
788	    rde_stack_trim (p->ast, (int) trim);
789	    TRACE (("SV = (%p rc%d '%s')",
790		    p->SV,
791		    p->SV ? p->SV->refCount       : -1,
792		    p->SV ? Tcl_GetString (p->SV) : ""));
793	    RETURNVOID;
794	}
795	SCOPE void
796	rde_param_i_ast_push (RDE_PARAM p)
797	{
798	    rde_stack_push (p->mark, (void*) rde_stack_size (p->ast));
799	}
800	SCOPE void
801	rde_param_i_ast_value_push (RDE_PARAM p)
802	{
803	    ENTER ("rde_param_i_ast_value_push");
804	    TRACE (("RDE_PARAM %p",p));
805	    ASSERT(p->SV,"Unable to push undefined semantic value");
806	    TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, ));
807	    TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV)));
808	    rde_stack_push (p->ast, p->SV);
809	    Tcl_IncrRefCount (p->SV);
810	    RETURNVOID;
811	}
812	static void
813	ast_node_free (void* n)
814	{
815	    Tcl_DecrRefCount ((Tcl_Obj*) n);
816	}
817	SCOPE void
818	rde_param_i_error_clear (RDE_PARAM p)
819	{
820	    ER_CLEAR (p);
821	}
822	SCOPE void
823	rde_param_i_error_nonterminal (RDE_PARAM p, int s)
824	{
825	    long int pos;
826	    if (!p->ER) return;
827	    pos = 1 + (long int) rde_stack_top (p->LS);
828	    if (p->ER->loc != pos) return;
829	    error_set (p, s);
830	    p->ER->loc = pos;
831	}
832	SCOPE void
833	rde_param_i_error_pop_merge (RDE_PARAM p)
834	{
835	    ERROR_STATE* top = (ERROR_STATE*) rde_stack_top (p->ES);
836	    
837	    if (top == p->ER) {
838		rde_stack_pop (p->ES, 1);
839		return;
840	    }
841	    
842	    if (!top) {
843		rde_stack_pop (p->ES, 1);
844		return;
845	    }
846	    
847	    if (!p->ER) {
848		rde_stack_drop (p->ES, 1);
849		p->ER = top;
850		
851		return;
852	    }
853	    
854	    if (top->loc < p->ER->loc) {
855		rde_stack_pop (p->ES, 1);
856		return;
857	    }
858	    
859	    if (top->loc > p->ER->loc) {
860		rde_stack_drop (p->ES, 1);
861		error_state_free (p->ER);
862		p->ER = top;
863		
864		return;
865	    }
866	    
867	    rde_stack_move (p->ER->msg, top->msg);
868	    rde_stack_pop  (p->ES, 1);
869	}
870	SCOPE void
871	rde_param_i_error_push (RDE_PARAM p)
872	{
873	    rde_stack_push (p->ES, p->ER);
874	    if (p->ER) { p->ER->refCount ++; }
875	}
876	static void
877	error_set (RDE_PARAM p, int s)
878	{
879	    error_state_free (p->ER);
880	    p->ER = ALLOC (ERROR_STATE);
881	    p->ER->refCount = 1;
882	    p->ER->loc      = p->CL;
883	    p->ER->msg      = rde_stack_new (NULL);
884	    ASSERT_BOUNDS(s,p->numstr);
885	    rde_stack_push (p->ER->msg, (void*) s);
886	}
887	static void
888	error_state_free (void* esx)
889	{
890	    ERROR_STATE* es = esx;
891	    if (!es) return;
892	    es->refCount --;
893	    if (es->refCount > 0) return;
894	    rde_stack_del (es->msg);
895	    ckfree ((char*) es);
896	}
897	SCOPE void
898	rde_param_i_loc_pop_discard (RDE_PARAM p)
899	{
900	    rde_stack_pop (p->LS, 1);
901	}
902	SCOPE void
903	rde_param_i_loc_pop_rewind (RDE_PARAM p)
904	{
905	    p->CL = (long int) rde_stack_top (p->LS);
906	    rde_stack_pop (p->LS, 1);
907	}
908	SCOPE void
909	rde_param_i_loc_push (RDE_PARAM p)
910	{
911	    rde_stack_push (p->LS, (void*) p->CL);
912	}
913	SCOPE void
914	rde_param_i_loc_rewind (RDE_PARAM p)
915	{
916	    p->CL = (long int) rde_stack_top (p->LS);
917	}
918	SCOPE void
919	rde_param_i_input_next (RDE_PARAM p, int m)
920	{
921	    int leni;
922	    char* ch;
923	    ASSERT_BOUNDS(m,p->numstr);
924	    p->CL ++;
925	    if (p->CL < rde_tc_size (p->TC)) {
926		
927		rde_tc_get (p->TC, p->CL, &p->CC, &p->CC_len);
928		ASSERT_BOUNDS (p->CC_len, TCL_UTF_MAX);
929		p->ST = 1;
930		ER_CLEAR (p);
931		return;
932	    }
933	    if (!p->IN || 
934		Tcl_Eof (p->IN) ||
935		(Tcl_ReadChars (p->IN, p->readbuf, 1, 0) <= 0)) {
936		
937		p->ST = 0;
938		error_set (p, m);
939		return;
940	    }
941	    
942	    ch = Tcl_GetStringFromObj (p->readbuf, &leni);
943	    ASSERT_BOUNDS (leni, TCL_UTF_MAX);
944	    p->CC = rde_tc_append (p->TC, ch, leni);
945	    p->CC_len = leni;
946	    p->ST = 1;
947	    ER_CLEAR (p);
948	}
949	SCOPE void
950	rde_param_i_status_fail (RDE_PARAM p)
951	{
952	    p->ST = 0;
953	}
954	SCOPE void
955	rde_param_i_status_ok (RDE_PARAM p)
956	{
957	    p->ST = 1;
958	}
959	SCOPE void
960	rde_param_i_status_negate (RDE_PARAM p)
961	{
962	    p->ST = !p->ST;
963	}
964	SCOPE int 
965	rde_param_i_symbol_restore (RDE_PARAM p, int s)
966	{
967	    NC_STATE*      scs;
968	    Tcl_HashEntry* hPtr;
969	    Tcl_HashTable* tablePtr;
970	    
971	    hPtr = Tcl_FindHashEntry (&p->NC, (char*) p->CL);
972	    if (!hPtr) { return 0; }
973	    tablePtr = (Tcl_HashTable*) Tcl_GetHashValue (hPtr);
974	    hPtr = Tcl_FindHashEntry (tablePtr, (char*) s);
975	    if (!hPtr) { return 0; }
976	    
977	    scs = Tcl_GetHashValue (hPtr);
978	    p->CL = scs->CL;
979	    p->ST = scs->ST;
980	    error_state_free (p->ER);
981	    p->ER = scs->ER;
982	    if (p->ER) { p->ER->refCount ++; }
983	    TRACE (("SV_RESTORE (%p) '%s'",scs->SV, scs->SV ? Tcl_GetString (scs->SV):""));
984	    SV_SET (p, scs->SV);
985	    return 1;
986	}
987	SCOPE void
988	rde_param_i_symbol_save (RDE_PARAM p, int s)
989	{
990	    long int       at = (long int) rde_stack_top (p->LS);
991	    NC_STATE*      scs;
992	    Tcl_HashEntry* hPtr;
993	    Tcl_HashTable* tablePtr;
994	    int            isnew;
995	    ENTER ("rde_param_i_symbol_save");
996	    TRACE (("RDE_PARAM %p",p));
997	    TRACE (("INT       %d",s));
998	    
999	    hPtr = Tcl_CreateHashEntry (&p->NC, (char*) at, &isnew);
1000	    if (isnew) {
1001		tablePtr = ALLOC (Tcl_HashTable);
1002		Tcl_InitHashTable (tablePtr, TCL_ONE_WORD_KEYS);
1003		Tcl_SetHashValue (hPtr, tablePtr);
1004	    } else {
1005		tablePtr = (Tcl_HashTable*) Tcl_GetHashValue (hPtr);
1006	    }
1007	    hPtr = Tcl_CreateHashEntry (tablePtr, (char*) s, &isnew);
1008	    if (isnew) {
1009		
1010		scs = ALLOC (NC_STATE);
1011		scs->CL = p->CL;
1012		scs->ST = p->ST;
1013		TRACE (("SV_CACHE (%p '%s')", p->SV, p->SV ? Tcl_GetString(p->SV) : ""));
1014		scs->SV = p->SV;
1015		if (scs->SV) { Tcl_IncrRefCount (scs->SV); }
1016		scs->ER = p->ER;
1017		if (scs->ER) { scs->ER->refCount ++; }
1018		Tcl_SetHashValue (hPtr, scs);
1019	    } else {
1020		
1021		scs = (NC_STATE*) Tcl_GetHashValue (hPtr);
1022		scs->CL = p->CL;
1023		scs->ST = p->ST;
1024		TRACE (("SV_CACHE/over (%p '%s')", p->SV, p->SV ? Tcl_GetString(p->SV) : "" ));
1025		if (scs->SV) { Tcl_DecrRefCount (scs->SV); }
1026		scs->SV = p->SV;
1027		if (scs->SV) { Tcl_IncrRefCount (scs->SV); }
1028		error_state_free (scs->ER);
1029		scs->ER = p->ER;
1030		if (scs->ER) { scs->ER->refCount ++; }
1031	    }
1032	    TRACE (("SV = (%p rc%d '%s')",
1033		    p->SV,
1034		    p->SV ? p->SV->refCount       : -1,
1035		    p->SV ? Tcl_GetString (p->SV) : ""));
1036	    RETURNVOID;
1037	}
1038	SCOPE void
1039	rde_param_i_test_alnum (RDE_PARAM p)
1040	{
1041	    test_class (p, Tcl_UniCharIsAlnum, tc_alnum);
1042	}
1043	SCOPE void
1044	rde_param_i_test_alpha (RDE_PARAM p)
1045	{
1046	    test_class (p, Tcl_UniCharIsAlpha, tc_alpha);
1047	}
1048	SCOPE void
1049	rde_param_i_test_ascii (RDE_PARAM p)
1050	{
1051	    test_class (p, UniCharIsAscii, tc_ascii);
1052	}
1053	SCOPE void
1054	rde_param_i_test_char (RDE_PARAM p, char* c, int msg)
1055	{
1056	    ASSERT_BOUNDS(msg,p->numstr);
1057	    p->ST = Tcl_UtfNcmp (p->CC, c, 1) == 0;
1058	    if (p->ST) {
1059		ER_CLEAR (p);
1060	    } else {
1061		error_set (p, msg);
1062		p->CL --;
1063	    }
1064	}
1065	SCOPE void
1066	rde_param_i_test_ddigit (RDE_PARAM p)
1067	{
1068	    test_class (p, UniCharIsDecDigit, tc_ddigit);
1069	}
1070	SCOPE void
1071	rde_param_i_test_digit (RDE_PARAM p)
1072	{
1073	    test_class (p, Tcl_UniCharIsDigit, tc_digit);
1074	}
1075	SCOPE void
1076	rde_param_i_test_graph (RDE_PARAM p)
1077	{
1078	    test_class (p, Tcl_UniCharIsGraph, tc_graph);
1079	}
1080	SCOPE void
1081	rde_param_i_test_lower (RDE_PARAM p)
1082	{
1083	    test_class (p, Tcl_UniCharIsLower, tc_lower);
1084	}
1085	SCOPE void
1086	rde_param_i_test_print (RDE_PARAM p)
1087	{
1088	    test_class (p, Tcl_UniCharIsPrint, tc_printable);
1089	}
1090	SCOPE void
1091	rde_param_i_test_punct (RDE_PARAM p)
1092	{
1093	    test_class (p, Tcl_UniCharIsPunct, tc_punct);
1094	}
1095	SCOPE void
1096	rde_param_i_test_range (RDE_PARAM p, char* s, char* e, int msg)
1097	{
1098	    ASSERT_BOUNDS(msg,p->numstr);
1099	    p->ST =
1100		(Tcl_UtfNcmp (s, p->CC, 1) <= 0) &&
1101		(Tcl_UtfNcmp (p->CC, e, 1) <= 0);
1102	    if (p->ST) {
1103		ER_CLEAR (p);
1104	    } else {
1105		error_set (p, msg);
1106		p->CL --;
1107	    }
1108	}
1109	SCOPE void
1110	rde_param_i_test_space (RDE_PARAM p)
1111	{
1112	    test_class (p, Tcl_UniCharIsSpace, tc_space);
1113	}
1114	SCOPE void
1115	rde_param_i_test_upper (RDE_PARAM p)
1116	{
1117	    test_class (p, Tcl_UniCharIsUpper, tc_upper);
1118	}
1119	SCOPE void
1120	rde_param_i_test_wordchar (RDE_PARAM p)
1121	{
1122	    test_class (p, Tcl_UniCharIsWordChar, tc_wordchar);
1123	}
1124	SCOPE void
1125	rde_param_i_test_xdigit (RDE_PARAM p)
1126	{
1127	    test_class (p, UniCharIsHexDigit, tc_xdigit);
1128	}
1129	static void
1130	test_class (RDE_PARAM p, UniCharClass class, test_class_id id)
1131	{
1132	    Tcl_UniChar ch;
1133	    Tcl_UtfToUniChar(p->CC, &ch);
1134	    ASSERT_BOUNDS(id,p->numstr);
1135	    p->ST = !!class (ch);
1136	    
1137	    if (p->ST) {
1138		ER_CLEAR (p);
1139	    } else {
1140		error_set (p, id);
1141		p->CL --;
1142	    }
1143	}
1144	static int
1145	UniCharIsAscii (int character)
1146	{
1147	    return (character >= 0) && (character < 0x80);
1148	}
1149	static int
1150	UniCharIsHexDigit (int character)
1151	{
1152	    return (character >= 0) && (character < 0x80) && isxdigit(character);
1153	}
1154	static int
1155	UniCharIsDecDigit (int character)
1156	{
1157	    return (character >= 0) && (character < 0x80) && isdigit(character);
1158	}
1159	SCOPE void
1160	rde_param_i_value_clear (RDE_PARAM p)
1161	{
1162	    SV_CLEAR (p);
1163	}
1164	SCOPE void
1165	rde_param_i_value_leaf (RDE_PARAM p, int s)
1166	{
1167	    Tcl_Obj* newsv;
1168	    Tcl_Obj* ov [3];
1169	    long int pos = 1 + (long int) rde_stack_top (p->LS);
1170	    ASSERT_BOUNDS(s,p->numstr);
1171	    ov [0] = Tcl_NewStringObj (p->string[s], -1);
1172	    ov [1] = Tcl_NewIntObj (pos);
1173	    ov [2] = Tcl_NewIntObj (p->CL);
1174	    newsv = Tcl_NewListObj (3, ov);
1175	    TRACE (("rde_param_i_value_leaf => '%s'",Tcl_GetString (newsv)));
1176	    SV_SET (p, newsv);
1177	}
1178	SCOPE void
1179	rde_param_i_value_reduce (RDE_PARAM p, int s)
1180	{
1181	    Tcl_Obj*  newsv;
1182	    int       oc, i, j;
1183	    Tcl_Obj** ov;
1184	    long int  ac;
1185	    Tcl_Obj** av;
1186	    long int pos   = 1 + (long int) rde_stack_top (p->LS);
1187	    long int mark  = (long int) rde_stack_top (p->mark);
1188	    long int asize = rde_stack_size (p->ast);
1189	    long int new   = asize - mark;
1190	    ASSERT (new >= 0, "Bad number of elements to reduce");
1191	    ov = NALLOC (3+new, Tcl_Obj*);
1192	    ASSERT_BOUNDS(s,p->numstr);
1193	    ov [0] = Tcl_NewStringObj (p->string[s], -1);
1194	    ov [1] = Tcl_NewIntObj (pos);
1195	    ov [2] = Tcl_NewIntObj (p->CL);
1196	    rde_stack_get (p->ast, &ac, (void***) &av);
1197	    for (i = 3, j = mark; j < asize; i++, j++) {
1198		ASSERT_BOUNDS (i, 3+new);
1199		ASSERT_BOUNDS (j, ac);
1200		ov [i] = av [j];
1201	    }
1202	    ASSERT (i == 3+new, "Reduction result incomplete");
1203	    newsv = Tcl_NewListObj (3+new, ov);
1204	    TRACE (("rde_param_i_value_reduce => '%s'",Tcl_GetString (newsv)));
1205	    SV_SET (p, newsv);
1206	    ckfree ((char*) ov);
1207	}
1208	static int
1209	er_int_compare (const void* a, const void* b)
1210	{
1211	    long int ai = *((long int*) a);
1212	    long int bi = *((long int*) b);
1213	    if (ai < bi) { return -1; }
1214	    if (ai > bi) { return  1; }
1215	    return 0;
1216	}
1217	SCOPE int
1218	rde_param_i_symbol_start (RDE_PARAM p, int s)
1219	{
1220	    if (rde_param_i_symbol_restore (p, s)) {
1221		if (p->ST) {
1222		    rde_stack_push (p->ast, p->SV);
1223		    Tcl_IncrRefCount (p->SV);
1224		}
1225		return 1;
1226	    }
1227	    rde_stack_push (p->LS, (void*) p->CL);
1228	    return 0;
1229	}
1230	SCOPE int
1231	rde_param_i_symbol_start_d (RDE_PARAM p, int s)
1232	{
1233	    if (rde_param_i_symbol_restore (p, s)) {
1234		if (p->ST) {
1235		    rde_stack_push (p->ast, p->SV);
1236		    Tcl_IncrRefCount (p->SV);
1237		}
1238		return 1;
1239	    }
1240	    rde_stack_push (p->LS,   (void*) p->CL);
1241	    rde_stack_push (p->mark, (void*) rde_stack_size (p->ast));
1242	    return 0;
1243	}
1244	SCOPE int
1245	rde_param_i_symbol_void_start (RDE_PARAM p, int s)
1246	{
1247	    if (rde_param_i_symbol_restore (p, s)) return 1;
1248	    rde_stack_push (p->LS, (void*) p->CL);
1249	    return 0;
1250	}
1251	SCOPE int
1252	rde_param_i_symbol_void_start_d (RDE_PARAM p, int s)
1253	{
1254	    if (rde_param_i_symbol_restore (p, s)) return 1;
1255	    rde_stack_push (p->LS,   (void*) p->CL);
1256	    rde_stack_push (p->mark, (void*) rde_stack_size (p->ast));
1257	    return 0;
1258	}
1259	SCOPE void
1260	rde_param_i_symbol_done_d_reduce (RDE_PARAM p, int s, int m)
1261	{
1262	    if (p->ST) {
1263		rde_param_i_value_reduce (p, s);
1264	    } else {
1265		SV_CLEAR (p);
1266	    }
1267	    rde_param_i_symbol_save       (p, s);
1268	    rde_param_i_error_nonterminal (p, m);
1269	    rde_param_i_ast_pop_rewind    (p);
1270	    rde_stack_pop (p->LS, 1);
1271	    if (p->ST) {
1272		rde_stack_push (p->ast, p->SV);
1273		Tcl_IncrRefCount (p->SV);
1274	    }
1275	}
1276	SCOPE void
1277	rde_param_i_symbol_done_leaf (RDE_PARAM p, int s, int m)
1278	{
1279	    if (p->ST) {
1280		rde_param_i_value_leaf (p, s);
1281	    } else {
1282		SV_CLEAR (p);
1283	    }
1284	    rde_param_i_symbol_save       (p, s);
1285	    rde_param_i_error_nonterminal (p, m);
1286	    rde_stack_pop (p->LS, 1);
1287	    if (p->ST) {
1288		rde_stack_push (p->ast, p->SV);
1289		Tcl_IncrRefCount (p->SV);
1290	    }
1291	}
1292	SCOPE void
1293	rde_param_i_symbol_done_d_leaf (RDE_PARAM p, int s, int m)
1294	{
1295	    if (p->ST) {
1296		rde_param_i_value_leaf (p, s);
1297	    } else {
1298		SV_CLEAR (p);
1299	    }
1300	    rde_param_i_symbol_save       (p, s);
1301	    rde_param_i_error_nonterminal (p, m);
1302	    rde_param_i_ast_pop_rewind    (p);
1303	    rde_stack_pop (p->LS, 1);
1304	    if (p->ST) {
1305		rde_stack_push (p->ast, p->SV);
1306		Tcl_IncrRefCount (p->SV);
1307	    }
1308	}
1309	SCOPE void
1310	rde_param_i_symbol_done_void (RDE_PARAM p, int s, int m)
1311	{
1312	    SV_CLEAR (p);
1313	    rde_param_i_symbol_save       (p, s);
1314	    rde_param_i_error_nonterminal (p, m);
1315	    rde_stack_pop (p->LS, 1);
1316	}
1317	SCOPE void
1318	rde_param_i_symbol_done_d_void (RDE_PARAM p, int s, int m)
1319	{
1320	    SV_CLEAR (p);
1321	    rde_param_i_symbol_save       (p, s);
1322	    rde_param_i_error_nonterminal (p, m);
1323	    rde_param_i_ast_pop_rewind    (p);
1324	    rde_stack_pop (p->LS, 1);
1325	}
1326	SCOPE void
1327	rde_param_i_next_char (RDE_PARAM p, char* c, int m)
1328	{
1329	    rde_param_i_input_next (p, m);
1330	    if (!p->ST) return;
1331	    rde_param_i_test_char (p, c, m);
1332	}
1333	SCOPE void
1334	rde_param_i_next_range (RDE_PARAM p, char* s, char* e, int m)
1335	{
1336	    rde_param_i_input_next (p, m);
1337	    if (!p->ST) return;
1338	    rde_param_i_test_range (p, s, e, m);
1339	}
1340	SCOPE void
1341	rde_param_i_next_alnum (RDE_PARAM p, int m)
1342	{
1343	    rde_param_i_input_next (p, m);
1344	    if (!p->ST) return;
1345	    rde_param_i_test_alnum (p);
1346	}
1347	SCOPE void
1348	rde_param_i_next_alpha (RDE_PARAM p, int m)
1349	{
1350	    rde_param_i_input_next (p, m);
1351	    if (!p->ST) return;
1352	    rde_param_i_test_alpha (p);
1353	}
1354	SCOPE void
1355	rde_param_i_next_ascii (RDE_PARAM p, int m)
1356	{
1357	    rde_param_i_input_next (p, m);
1358	    if (!p->ST) return;
1359	    rde_param_i_test_ascii (p);
1360	}
1361	SCOPE void
1362	rde_param_i_next_ddigit (RDE_PARAM p, int m)
1363	{
1364	    rde_param_i_input_next (p, m);
1365	    if (!p->ST) return;
1366	    rde_param_i_test_ddigit (p);
1367	}
1368	SCOPE void
1369	rde_param_i_next_digit (RDE_PARAM p, int m)
1370	{
1371	    rde_param_i_input_next (p, m);
1372	    if (!p->ST) return;
1373	    rde_param_i_test_digit (p);
1374	}
1375	SCOPE void
1376	rde_param_i_next_graph (RDE_PARAM p, int m)
1377	{
1378	    rde_param_i_input_next (p, m);
1379	    if (!p->ST) return;
1380	    rde_param_i_test_graph (p);
1381	}
1382	SCOPE void
1383	rde_param_i_next_lower (RDE_PARAM p, int m)
1384	{
1385	    rde_param_i_input_next (p, m);
1386	    if (!p->ST) return;
1387	    rde_param_i_test_lower (p);
1388	}
1389	SCOPE void
1390	rde_param_i_next_print (RDE_PARAM p, int m)
1391	{
1392	    rde_param_i_input_next (p, m);
1393	    if (!p->ST) return;
1394	    rde_param_i_test_print (p);
1395	}
1396	SCOPE void
1397	rde_param_i_next_punct (RDE_PARAM p, int m)
1398	{
1399	    rde_param_i_input_next (p, m);
1400	    if (!p->ST) return;
1401	    rde_param_i_test_punct (p);
1402	}
1403	SCOPE void
1404	rde_param_i_next_space (RDE_PARAM p, int m)
1405	{
1406	    rde_param_i_input_next (p, m);
1407	    if (!p->ST) return;
1408	    rde_param_i_test_space (p);
1409	}
1410	SCOPE void
1411	rde_param_i_next_upper (RDE_PARAM p, int m)
1412	{
1413	    rde_param_i_input_next (p, m);
1414	    if (!p->ST) return;
1415	    rde_param_i_test_upper (p);
1416	}
1417	SCOPE void
1418	rde_param_i_next_wordchar (RDE_PARAM p, int m)
1419	{
1420	    rde_param_i_input_next (p, m);
1421	    if (!p->ST) return;
1422	    rde_param_i_test_wordchar (p);
1423	}
1424	SCOPE void
1425	rde_param_i_next_xdigit (RDE_PARAM p, int m)
1426	{
1427	    rde_param_i_input_next (p, m);
1428	    if (!p->ST) return;
1429	    rde_param_i_test_xdigit (p);
1430	}
1431	SCOPE void
1432	rde_param_i_notahead_start_d (RDE_PARAM p)
1433	{
1434	    rde_stack_push (p->LS, (void*) p->CL);
1435	    rde_stack_push (p->mark, (void*) rde_stack_size (p->ast));
1436	}
1437	SCOPE void
1438	rde_param_i_notahead_exit_d (RDE_PARAM p)
1439	{
1440	    if (p->ST) {
1441		rde_param_i_ast_pop_rewind (p); 
1442	    } else {
1443		rde_stack_pop (p->mark, 1);
1444	    }
1445	    p->CL = (long int) rde_stack_top (p->LS);
1446	    rde_stack_pop (p->LS, 1);
1447	    p->ST = !p->ST;
1448	}
1449	SCOPE void
1450	rde_param_i_notahead_exit (RDE_PARAM p)
1451	{
1452	    p->CL = (long int) rde_stack_top (p->LS);
1453	    rde_stack_pop (p->LS, 1);
1454	    p->ST = !p->ST;
1455	}
1456	SCOPE void
1457	rde_param_i_state_push_2 (RDE_PARAM p)
1458	{
1459	    
1460	    rde_stack_push (p->LS, (void*) p->CL);
1461	    rde_stack_push (p->ES, p->ER);
1462	    if (p->ER) { p->ER->refCount ++; }
1463	}
1464	SCOPE void
1465	rde_param_i_state_push_void (RDE_PARAM p)
1466	{
1467	    rde_stack_push (p->LS, (void*) p->CL);
1468	    ER_CLEAR (p);
1469	    rde_stack_push (p->ES, p->ER);
1470	    
1471	}
1472	SCOPE void
1473	rde_param_i_state_push_value (RDE_PARAM p)
1474	{
1475	    rde_stack_push (p->mark, (void*) rde_stack_size (p->ast));
1476	    rde_stack_push (p->LS, (void*) p->CL);
1477	    ER_CLEAR (p);
1478	    rde_stack_push (p->ES, p->ER);
1479	    
1480	}
1481	SCOPE void
1482	rde_param_i_state_merge_ok (RDE_PARAM p)
1483	{
1484	    rde_param_i_error_pop_merge (p);
1485	    if (!p->ST) {
1486		p->ST = 1;
1487		p->CL = (long int) rde_stack_top (p->LS);
1488	    }
1489	    rde_stack_pop (p->LS, 1);
1490	}
1491	SCOPE void
1492	rde_param_i_state_merge_void (RDE_PARAM p)
1493	{
1494	    rde_param_i_error_pop_merge (p);
1495	    if (!p->ST) {
1496		p->CL = (long int) rde_stack_top (p->LS);
1497	    }
1498	    rde_stack_pop (p->LS, 1);
1499	}
1500	SCOPE void
1501	rde_param_i_state_merge_value (RDE_PARAM p)
1502	{
1503	    rde_param_i_error_pop_merge (p);
1504	    if (!p->ST) {
1505		long int trim = (long int) rde_stack_top (p->mark);
1506		rde_stack_trim (p->ast, (int) trim);
1507		p->CL = (long int) rde_stack_top (p->LS);
1508	    }
1509	    rde_stack_pop (p->mark, 1);
1510	    rde_stack_pop (p->LS, 1);
1511	}
1512	SCOPE int
1513	rde_param_i_kleene_close (RDE_PARAM p)
1514	{
1515	    int stop = !p->ST;
1516	    rde_param_i_error_pop_merge (p);
1517	    if (stop) {
1518		p->ST = 1;
1519		p->CL = (long int) rde_stack_top (p->LS);
1520	    }
1521	    rde_stack_pop (p->LS, 1);
1522	    return stop;
1523	}
1524	SCOPE int
1525	rde_param_i_kleene_abort (RDE_PARAM p)
1526	{
1527	    int stop = !p->ST;
1528	    if (stop) {
1529		p->CL = (long int) rde_stack_top (p->LS);
1530	    }
1531	    rde_stack_pop (p->LS, 1);
1532	    return stop;
1533	}
1534	SCOPE int
1535	rde_param_i_seq_void2void (RDE_PARAM p)
1536	{
1537	    rde_param_i_error_pop_merge (p);
1538	    if (p->ST) {
1539		rde_stack_push (p->ES, p->ER);
1540		if (p->ER) { p->ER->refCount ++; }
1541		return 0;
1542	    } else {
1543		p->CL = (long int) rde_stack_top (p->LS);
1544		rde_stack_pop (p->LS, 1);
1545		return 1;
1546	    }
1547	}
1548	SCOPE int
1549	rde_param_i_seq_void2value (RDE_PARAM p)
1550	{
1551	    rde_param_i_error_pop_merge (p);
1552	    if (p->ST) {
1553		rde_stack_push (p->mark, (void*) rde_stack_size (p->ast));
1554		rde_stack_push (p->ES, p->ER);
1555		if (p->ER) { p->ER->refCount ++; }
1556		return 0;
1557	    } else {
1558		p->CL = (long int) rde_stack_top (p->LS);
1559		rde_stack_pop (p->LS, 1);
1560		return 1;
1561	    }
1562	}
1563	SCOPE int
1564	rde_param_i_seq_value2value (RDE_PARAM p)
1565	{
1566	    rde_param_i_error_pop_merge (p);
1567	    if (p->ST) {
1568		rde_stack_push (p->ES, p->ER);
1569		if (p->ER) { p->ER->refCount ++; }
1570		return 0;
1571	    } else {
1572		long int trim = (long int) rde_stack_top (p->mark);
1573		rde_stack_pop  (p->mark, 1);
1574		rde_stack_trim (p->ast, (int) trim);
1575		p->CL = (long int) rde_stack_top (p->LS);
1576		rde_stack_pop (p->LS, 1);
1577		return 1;
1578	    }
1579	}
1580	SCOPE int
1581	rde_param_i_bra_void2void (RDE_PARAM p)
1582	{
1583	    rde_param_i_error_pop_merge (p);
1584	    if (p->ST) {
1585		rde_stack_pop (p->LS, 1);
1586	    } else {
1587		p->CL = (long int) rde_stack_top (p->LS);
1588		rde_stack_push (p->ES, p->ER);
1589		if (p->ER) { p->ER->refCount ++; }
1590	    }
1591	    return p->ST;
1592	}
1593	SCOPE int
1594	rde_param_i_bra_void2value (RDE_PARAM p)
1595	{
1596	    rde_param_i_error_pop_merge (p);
1597	    if (p->ST) {
1598		rde_stack_pop (p->LS, 1);
1599	    } else {
1600		rde_stack_push (p->mark, (void*) rde_stack_size (p->ast));
1601		p->CL = (long int) rde_stack_top (p->LS);
1602		rde_stack_push (p->ES, p->ER);
1603		if (p->ER) { p->ER->refCount ++; }
1604	    }
1605	    return p->ST;
1606	}
1607	SCOPE int
1608	rde_param_i_bra_value2void (RDE_PARAM p)
1609	{
1610	    rde_param_i_error_pop_merge (p);
1611	    if (p->ST) {
1612		rde_stack_pop (p->mark, 1);
1613		rde_stack_pop (p->LS, 1);
1614	    } else {
1615		long int trim = (long int) rde_stack_top (p->mark);
1616		rde_stack_pop  (p->mark, 1);
1617		rde_stack_trim (p->ast, (int) trim);
1618		p->CL = (long int) rde_stack_top (p->LS);
1619		rde_stack_push (p->ES, p->ER);
1620		if (p->ER) { p->ER->refCount ++; }
1621	    }
1622	    return p->ST;
1623	}
1624	SCOPE int
1625	rde_param_i_bra_value2value (RDE_PARAM p)
1626	{
1627	    rde_param_i_error_pop_merge (p);
1628	    if (p->ST) {
1629		rde_stack_pop (p->mark, 1);
1630		rde_stack_pop (p->LS, 1);
1631	    } else {
1632		long int trim = (long int) rde_stack_top (p->mark);
1633		rde_stack_trim (p->ast, (int) trim);
1634		p->CL = (long int) rde_stack_top (p->LS);
1635		rde_stack_push (p->ES, p->ER);
1636		if (p->ER) { p->ER->refCount ++; }
1637	    }
1638	    return p->ST;
1639	}
1640	SCOPE void
1641	rde_param_i_next_str (RDE_PARAM p, char* str, int m)
1642	{
1643	    int at = p->CL;
1644	    while (*str) {
1645		rde_param_i_input_next (p, m);
1646		if (!p->ST) {
1647		    p->CL = at;
1648		    return;
1649		}
1650		rde_param_i_test_char (p, str, m);
1651		if (!p->ST) {
1652		    p->CL = at;
1653		    return;
1654		}
1655		str = Tcl_UtfNext (str);
1656	    }
1657	}
1658	SCOPE void
1659	rde_param_i_next_class (RDE_PARAM p, char* class, int m)
1660	{
1661	    rde_param_i_input_next (p, m);
1662	    if (!p->ST) return;
1663	    while (*class) {
1664		p->ST = Tcl_UtfNcmp (p->CC, class, 1) == 0;
1665		if (p->ST) {
1666		    ER_CLEAR (p);
1667		    return;
1668		}
1669		class = Tcl_UtfNext (class);
1670	    }
1671	    error_set (p, m);
1672	    p->CL --;
1673	}
1674	
1675
1676    }
1677
1678    # # ## ### ###### ######## #############
1679    ## BEGIN of GENERATED CODE. DO NOT EDIT.
1680
1681    critcl::ccode {
1682	/* -*- c -*- */
1683
1684        /*
1685         * Declaring the parse functions
1686         */
1687        
1688        static void sequence_4 (RDE_PARAM p);
1689        static void sym_ALNUM (RDE_PARAM p);
1690        static void sequence_9 (RDE_PARAM p);
1691        static void sym_ALPHA (RDE_PARAM p);
1692        static void sequence_14 (RDE_PARAM p);
1693        static void sym_AND (RDE_PARAM p);
1694        static void sym_APOSTROPH (RDE_PARAM p);
1695        static void sequence_21 (RDE_PARAM p);
1696        static void sym_ASCII (RDE_PARAM p);
1697        static void choice_26 (RDE_PARAM p);
1698        static void sequence_29 (RDE_PARAM p);
1699        static void sym_Attribute (RDE_PARAM p);
1700        static void choice_37 (RDE_PARAM p);
1701        static void sym_Char (RDE_PARAM p);
1702        static void sequence_44 (RDE_PARAM p);
1703        static void sym_CharOctalFull (RDE_PARAM p);
1704        static void optional_50 (RDE_PARAM p);
1705        static void sequence_52 (RDE_PARAM p);
1706        static void sym_CharOctalPart (RDE_PARAM p);
1707        static void sequence_57 (RDE_PARAM p);
1708        static void sym_CharSpecial (RDE_PARAM p);
1709        static void notahead_61 (RDE_PARAM p);
1710        static void sequence_64 (RDE_PARAM p);
1711        static void sym_CharUnescaped (RDE_PARAM p);
1712        static void optional_72 (RDE_PARAM p);
1713        static void sequence_74 (RDE_PARAM p);
1714        static void optional_76 (RDE_PARAM p);
1715        static void sequence_78 (RDE_PARAM p);
1716        static void optional_80 (RDE_PARAM p);
1717        static void sequence_82 (RDE_PARAM p);
1718        static void sym_CharUnicode (RDE_PARAM p);
1719        static void notahead_87 (RDE_PARAM p);
1720        static void sequence_90 (RDE_PARAM p);
1721        static void kleene_92 (RDE_PARAM p);
1722        static void sequence_96 (RDE_PARAM p);
1723        static void sym_Class (RDE_PARAM p);
1724        static void sequence_101 (RDE_PARAM p);
1725        static void sym_CLOSE (RDE_PARAM p);
1726        static void sym_CLOSEB (RDE_PARAM p);
1727        static void sequence_108 (RDE_PARAM p);
1728        static void sym_COLON (RDE_PARAM p);
1729        static void notahead_113 (RDE_PARAM p);
1730        static void sequence_116 (RDE_PARAM p);
1731        static void kleene_118 (RDE_PARAM p);
1732        static void sequence_121 (RDE_PARAM p);
1733        static void sym_COMMENT (RDE_PARAM p);
1734        static void sequence_126 (RDE_PARAM p);
1735        static void sym_CONTROL (RDE_PARAM p);
1736        static void sym_DAPOSTROPH (RDE_PARAM p);
1737        static void sequence_133 (RDE_PARAM p);
1738        static void sym_DDIGIT (RDE_PARAM p);
1739        static void optional_137 (RDE_PARAM p);
1740        static void sequence_143 (RDE_PARAM p);
1741        static void sym_Definition (RDE_PARAM p);
1742        static void sequence_148 (RDE_PARAM p);
1743        static void sym_DIGIT (RDE_PARAM p);
1744        static void sequence_153 (RDE_PARAM p);
1745        static void sym_DOT (RDE_PARAM p);
1746        static void sequence_158 (RDE_PARAM p);
1747        static void sym_END (RDE_PARAM p);
1748        static void notahead_162 (RDE_PARAM p);
1749        static void sym_EOF (RDE_PARAM p);
1750        static void sym_EOL (RDE_PARAM p);
1751        static void sequence_170 (RDE_PARAM p);
1752        static void kleene_172 (RDE_PARAM p);
1753        static void sequence_174 (RDE_PARAM p);
1754        static void sym_Expression (RDE_PARAM p);
1755        static void sequence_180 (RDE_PARAM p);
1756        static void sym_Final (RDE_PARAM p);
1757        static void kleene_186 (RDE_PARAM p);
1758        static void sequence_190 (RDE_PARAM p);
1759        static void sym_Grammar (RDE_PARAM p);
1760        static void sequence_195 (RDE_PARAM p);
1761        static void sym_GRAPH (RDE_PARAM p);
1762        static void sequence_201 (RDE_PARAM p);
1763        static void sym_Header (RDE_PARAM p);
1764        static void choice_206 (RDE_PARAM p);
1765        static void choice_210 (RDE_PARAM p);
1766        static void kleene_212 (RDE_PARAM p);
1767        static void sequence_214 (RDE_PARAM p);
1768        static void sym_Ident (RDE_PARAM p);
1769        static void sequence_219 (RDE_PARAM p);
1770        static void sym_Identifier (RDE_PARAM p);
1771        static void sequence_224 (RDE_PARAM p);
1772        static void sym_IS (RDE_PARAM p);
1773        static void sequence_229 (RDE_PARAM p);
1774        static void sym_LEAF (RDE_PARAM p);
1775        static void notahead_234 (RDE_PARAM p);
1776        static void sequence_237 (RDE_PARAM p);
1777        static void kleene_239 (RDE_PARAM p);
1778        static void sequence_243 (RDE_PARAM p);
1779        static void notahead_247 (RDE_PARAM p);
1780        static void sequence_250 (RDE_PARAM p);
1781        static void kleene_252 (RDE_PARAM p);
1782        static void sequence_256 (RDE_PARAM p);
1783        static void choice_258 (RDE_PARAM p);
1784        static void sym_Literal (RDE_PARAM p);
1785        static void sequence_263 (RDE_PARAM p);
1786        static void sym_LOWER (RDE_PARAM p);
1787        static void sequence_268 (RDE_PARAM p);
1788        static void sym_NOT (RDE_PARAM p);
1789        static void sequence_273 (RDE_PARAM p);
1790        static void sym_OPEN (RDE_PARAM p);
1791        static void sym_OPENB (RDE_PARAM p);
1792        static void sequence_280 (RDE_PARAM p);
1793        static void sym_PEG (RDE_PARAM p);
1794        static void sequence_285 (RDE_PARAM p);
1795        static void sym_PLUS (RDE_PARAM p);
1796        static void choice_290 (RDE_PARAM p);
1797        static void optional_292 (RDE_PARAM p);
1798        static void sequence_295 (RDE_PARAM p);
1799        static void sym_Prefix (RDE_PARAM p);
1800        static void sequence_316 (RDE_PARAM p);
1801        static void choice_321 (RDE_PARAM p);
1802        static void sym_Primary (RDE_PARAM p);
1803        static void sequence_326 (RDE_PARAM p);
1804        static void sym_PRINTABLE (RDE_PARAM p);
1805        static void sequence_331 (RDE_PARAM p);
1806        static void sym_PUNCT (RDE_PARAM p);
1807        static void sequence_336 (RDE_PARAM p);
1808        static void sym_QUESTION (RDE_PARAM p);
1809        static void sequence_342 (RDE_PARAM p);
1810        static void choice_345 (RDE_PARAM p);
1811        static void sym_Range (RDE_PARAM p);
1812        static void sequence_350 (RDE_PARAM p);
1813        static void sym_SEMICOLON (RDE_PARAM p);
1814        static void poskleene_354 (RDE_PARAM p);
1815        static void sym_Sequence (RDE_PARAM p);
1816        static void sequence_359 (RDE_PARAM p);
1817        static void sym_SLASH (RDE_PARAM p);
1818        static void sequence_364 (RDE_PARAM p);
1819        static void sym_SPACE (RDE_PARAM p);
1820        static void sequence_369 (RDE_PARAM p);
1821        static void sym_STAR (RDE_PARAM p);
1822        static void sym_StartExpr (RDE_PARAM p);
1823        static void choice_381 (RDE_PARAM p);
1824        static void optional_383 (RDE_PARAM p);
1825        static void sequence_385 (RDE_PARAM p);
1826        static void sym_Suffix (RDE_PARAM p);
1827        static void sym_TO (RDE_PARAM p);
1828        static void sequence_392 (RDE_PARAM p);
1829        static void sym_UPPER (RDE_PARAM p);
1830        static void sequence_397 (RDE_PARAM p);
1831        static void sym_VOID (RDE_PARAM p);
1832        static void choice_402 (RDE_PARAM p);
1833        static void kleene_404 (RDE_PARAM p);
1834        static void sym_WHITESPACE (RDE_PARAM p);
1835        static void sequence_409 (RDE_PARAM p);
1836        static void sym_WORDCHAR (RDE_PARAM p);
1837        static void sequence_414 (RDE_PARAM p);
1838        static void sym_XDIGIT (RDE_PARAM p);
1839        
1840        /*
1841         * Precomputed table of strings (symbols, error messages, etc.).
1842         */
1843        
1844        static char const* p_string [170] = {
1845            /*        0 = */   "str '<alnum>'",
1846            /*        1 = */   "n ALNUM",
1847            /*        2 = */   "ALNUM",
1848            /*        3 = */   "str '<alpha>'",
1849            /*        4 = */   "n ALPHA",
1850            /*        5 = */   "ALPHA",
1851            /*        6 = */   "t &",
1852            /*        7 = */   "n AND",
1853            /*        8 = */   "AND",
1854            /*        9 = */   "t '",
1855            /*       10 = */   "n APOSTROPH",
1856            /*       11 = */   "APOSTROPH",
1857            /*       12 = */   "str '<ascii>'",
1858            /*       13 = */   "n ASCII",
1859            /*       14 = */   "ASCII",
1860            /*       15 = */   "n Attribute",
1861            /*       16 = */   "Attribute",
1862            /*       17 = */   "n Char",
1863            /*       18 = */   "Char",
1864            /*       19 = */   "t \134",
1865            /*       20 = */   ".. 0 2",
1866            /*       21 = */   ".. 0 7",
1867            /*       22 = */   "n CharOctalFull",
1868            /*       23 = */   "CharOctalFull",
1869            /*       24 = */   "n CharOctalPart",
1870            /*       25 = */   "CharOctalPart",
1871            /*       26 = */   "cl 'nrt'\42\133\135\134'",
1872            /*       27 = */   "n CharSpecial",
1873            /*       28 = */   "CharSpecial",
1874            /*       29 = */   "dot",
1875            /*       30 = */   "n CharUnescaped",
1876            /*       31 = */   "CharUnescaped",
1877            /*       32 = */   "str '\134u'",
1878            /*       33 = */   "xdigit",
1879            /*       34 = */   "n CharUnicode",
1880            /*       35 = */   "CharUnicode",
1881            /*       36 = */   "n Class",
1882            /*       37 = */   "Class",
1883            /*       38 = */   "t \51",
1884            /*       39 = */   "n CLOSE",
1885            /*       40 = */   "CLOSE",
1886            /*       41 = */   "t \135",
1887            /*       42 = */   "n CLOSEB",
1888            /*       43 = */   "CLOSEB",
1889            /*       44 = */   "t :",
1890            /*       45 = */   "n COLON",
1891            /*       46 = */   "COLON",
1892            /*       47 = */   "t #",
1893            /*       48 = */   "n COMMENT",
1894            /*       49 = */   "COMMENT",
1895            /*       50 = */   "str '<control>'",
1896            /*       51 = */   "n CONTROL",
1897            /*       52 = */   "CONTROL",
1898            /*       53 = */   "t \42",
1899            /*       54 = */   "n DAPOSTROPH",
1900            /*       55 = */   "DAPOSTROPH",
1901            /*       56 = */   "str '<ddigit>'",
1902            /*       57 = */   "n DDIGIT",
1903            /*       58 = */   "DDIGIT",
1904            /*       59 = */   "n Definition",
1905            /*       60 = */   "Definition",
1906            /*       61 = */   "str '<digit>'",
1907            /*       62 = */   "n DIGIT",
1908            /*       63 = */   "DIGIT",
1909            /*       64 = */   "t .",
1910            /*       65 = */   "n DOT",
1911            /*       66 = */   "DOT",
1912            /*       67 = */   "str 'END'",
1913            /*       68 = */   "n END",
1914            /*       69 = */   "END",
1915            /*       70 = */   "n EOF",
1916            /*       71 = */   "EOF",
1917            /*       72 = */   "cl '\n\r'",
1918            /*       73 = */   "n EOL",
1919            /*       74 = */   "EOL",
1920            /*       75 = */   "n Expression",
1921            /*       76 = */   "Expression",
1922            /*       77 = */   "n Final",
1923            /*       78 = */   "Final",
1924            /*       79 = */   "n Grammar",
1925            /*       80 = */   "Grammar",
1926            /*       81 = */   "str '<graph>'",
1927            /*       82 = */   "n GRAPH",
1928            /*       83 = */   "GRAPH",
1929            /*       84 = */   "n Header",
1930            /*       85 = */   "Header",
1931            /*       86 = */   "cl '_:'",
1932            /*       87 = */   "alpha",
1933            /*       88 = */   "alnum",
1934            /*       89 = */   "n Ident",
1935            /*       90 = */   "Ident",
1936            /*       91 = */   "n Identifier",
1937            /*       92 = */   "Identifier",
1938            /*       93 = */   "str '<-'",
1939            /*       94 = */   "n IS",
1940            /*       95 = */   "IS",
1941            /*       96 = */   "str 'leaf'",
1942            /*       97 = */   "n LEAF",
1943            /*       98 = */   "LEAF",
1944            /*       99 = */   "n Literal",
1945            /*      100 = */   "Literal",
1946            /*      101 = */   "str '<lower>'",
1947            /*      102 = */   "n LOWER",
1948            /*      103 = */   "LOWER",
1949            /*      104 = */   "t !",
1950            /*      105 = */   "n NOT",
1951            /*      106 = */   "NOT",
1952            /*      107 = */   "t \50",
1953            /*      108 = */   "n OPEN",
1954            /*      109 = */   "OPEN",
1955            /*      110 = */   "t \133",
1956            /*      111 = */   "n OPENB",
1957            /*      112 = */   "OPENB",
1958            /*      113 = */   "str 'PEG'",
1959            /*      114 = */   "n PEG",
1960            /*      115 = */   "PEG",
1961            /*      116 = */   "t +",
1962            /*      117 = */   "n PLUS",
1963            /*      118 = */   "PLUS",
1964            /*      119 = */   "n Prefix",
1965            /*      120 = */   "Prefix",
1966            /*      121 = */   "n Primary",
1967            /*      122 = */   "Primary",
1968            /*      123 = */   "str '<print>'",
1969            /*      124 = */   "n PRINTABLE",
1970            /*      125 = */   "PRINTABLE",
1971            /*      126 = */   "str '<punct>'",
1972            /*      127 = */   "n PUNCT",
1973            /*      128 = */   "PUNCT",
1974            /*      129 = */   "t ?",
1975            /*      130 = */   "n QUESTION",
1976            /*      131 = */   "QUESTION",
1977            /*      132 = */   "n Range",
1978            /*      133 = */   "Range",
1979            /*      134 = */   "t \73",
1980            /*      135 = */   "n SEMICOLON",
1981            /*      136 = */   "SEMICOLON",
1982            /*      137 = */   "n Sequence",
1983            /*      138 = */   "Sequence",
1984            /*      139 = */   "t /",
1985            /*      140 = */   "n SLASH",
1986            /*      141 = */   "SLASH",
1987            /*      142 = */   "str '<space>'",
1988            /*      143 = */   "n SPACE",
1989            /*      144 = */   "SPACE",
1990            /*      145 = */   "t *",
1991            /*      146 = */   "n STAR",
1992            /*      147 = */   "STAR",
1993            /*      148 = */   "n StartExpr",
1994            /*      149 = */   "StartExpr",
1995            /*      150 = */   "n Suffix",
1996            /*      151 = */   "Suffix",
1997            /*      152 = */   "t -",
1998            /*      153 = */   "n TO",
1999            /*      154 = */   "TO",
2000            /*      155 = */   "str '<upper>'",
2001            /*      156 = */   "n UPPER",
2002            /*      157 = */   "UPPER",
2003            /*      158 = */   "str 'void'",
2004            /*      159 = */   "n VOID",
2005            /*      160 = */   "VOID",
2006            /*      161 = */   "space",
2007            /*      162 = */   "n WHITESPACE",
2008            /*      163 = */   "WHITESPACE",
2009            /*      164 = */   "str '<wordchar>'",
2010            /*      165 = */   "n WORDCHAR",
2011            /*      166 = */   "WORDCHAR",
2012            /*      167 = */   "str '<xdigit>'",
2013            /*      168 = */   "n XDIGIT",
2014            /*      169 = */   "XDIGIT"
2015        };
2016        
2017        /*
2018         * Grammar Start Expression
2019         */
2020        
2021        static void MAIN (RDE_PARAM p) {
2022            sym_Grammar (p);
2023            return;
2024        }
2025        
2026        /*
2027         * leaf Symbol 'ALNUM'
2028         */
2029        
2030        static void sym_ALNUM (RDE_PARAM p) {
2031           /*
2032            * x
2033            *     "<alnum>"
2034            *     (WHITESPACE)
2035            */
2036        
2037            if (rde_param_i_symbol_start (p, 2)) return ;
2038            sequence_4 (p);
2039            rde_param_i_symbol_done_leaf (p, 2, 1);
2040            return;
2041        }
2042        
2043        static void sequence_4 (RDE_PARAM p) {
2044           /*
2045            * x
2046            *     "<alnum>"
2047            *     (WHITESPACE)
2048            */
2049        
2050            rde_param_i_state_push_void (p);
2051            rde_param_i_next_str (p, "<alnum>", 0);
2052            if (rde_param_i_seq_void2void(p)) return;
2053            sym_WHITESPACE (p);
2054            rde_param_i_state_merge_void (p);
2055            return;
2056        }
2057        
2058        /*
2059         * leaf Symbol 'ALPHA'
2060         */
2061        
2062        static void sym_ALPHA (RDE_PARAM p) {
2063           /*
2064            * x
2065            *     "<alpha>"
2066            *     (WHITESPACE)
2067            */
2068        
2069            if (rde_param_i_symbol_start (p, 5)) return ;
2070            sequence_9 (p);
2071            rde_param_i_symbol_done_leaf (p, 5, 4);
2072            return;
2073        }
2074        
2075        static void sequence_9 (RDE_PARAM p) {
2076           /*
2077            * x
2078            *     "<alpha>"
2079            *     (WHITESPACE)
2080            */
2081        
2082            rde_param_i_state_push_void (p);
2083            rde_param_i_next_str (p, "<alpha>", 3);
2084            if (rde_param_i_seq_void2void(p)) return;
2085            sym_WHITESPACE (p);
2086            rde_param_i_state_merge_void (p);
2087            return;
2088        }
2089        
2090        /*
2091         * leaf Symbol 'AND'
2092         */
2093        
2094        static void sym_AND (RDE_PARAM p) {
2095           /*
2096            * x
2097            *     '&'
2098            *     (WHITESPACE)
2099            */
2100        
2101            if (rde_param_i_symbol_start (p, 8)) return ;
2102            sequence_14 (p);
2103            rde_param_i_symbol_done_leaf (p, 8, 7);
2104            return;
2105        }
2106        
2107        static void sequence_14 (RDE_PARAM p) {
2108           /*
2109            * x
2110            *     '&'
2111            *     (WHITESPACE)
2112            */
2113        
2114            rde_param_i_state_push_void (p);
2115            rde_param_i_next_char (p, "&", 6);
2116            if (rde_param_i_seq_void2void(p)) return;
2117            sym_WHITESPACE (p);
2118            rde_param_i_state_merge_void (p);
2119            return;
2120        }
2121        
2122        /*
2123         * void Symbol 'APOSTROPH'
2124         */
2125        
2126        static void sym_APOSTROPH (RDE_PARAM p) {
2127           /*
2128            * '''
2129            */
2130        
2131            if (rde_param_i_symbol_void_start (p, 11)) return ;
2132            rde_param_i_next_char (p, "'", 9);
2133            rde_param_i_symbol_done_void (p, 11, 10);
2134            return;
2135        }
2136        
2137        /*
2138         * leaf Symbol 'ASCII'
2139         */
2140        
2141        static void sym_ASCII (RDE_PARAM p) {
2142           /*
2143            * x
2144            *     "<ascii>"
2145            *     (WHITESPACE)
2146            */
2147        
2148            if (rde_param_i_symbol_start (p, 14)) return ;
2149            sequence_21 (p);
2150            rde_param_i_symbol_done_leaf (p, 14, 13);
2151            return;
2152        }
2153        
2154        static void sequence_21 (RDE_PARAM p) {
2155           /*
2156            * x
2157            *     "<ascii>"
2158            *     (WHITESPACE)
2159            */
2160        
2161            rde_param_i_state_push_void (p);
2162            rde_param_i_next_str (p, "<ascii>", 12);
2163            if (rde_param_i_seq_void2void(p)) return;
2164            sym_WHITESPACE (p);
2165            rde_param_i_state_merge_void (p);
2166            return;
2167        }
2168        
2169        /*
2170         * value Symbol 'Attribute'
2171         */
2172        
2173        static void sym_Attribute (RDE_PARAM p) {
2174           /*
2175            * x
2176            *     /
2177            *         (VOID)
2178            *         (LEAF)
2179            *     (COLON)
2180            */
2181        
2182            if (rde_param_i_symbol_start_d (p, 16)) return ;
2183            sequence_29 (p);
2184            rde_param_i_symbol_done_d_reduce (p, 16, 15);
2185            return;
2186        }
2187        
2188        static void sequence_29 (RDE_PARAM p) {
2189           /*
2190            * x
2191            *     /
2192            *         (VOID)
2193            *         (LEAF)
2194            *     (COLON)
2195            */
2196        
2197            rde_param_i_state_push_value (p);
2198            choice_26 (p);
2199            if (rde_param_i_seq_value2value(p)) return;
2200            sym_COLON (p);
2201            rde_param_i_state_merge_value (p);
2202            return;
2203        }
2204        
2205        static void choice_26 (RDE_PARAM p) {
2206           /*
2207            * /
2208            *     (VOID)
2209            *     (LEAF)
2210            */
2211        
2212            rde_param_i_state_push_value (p);
2213            sym_VOID (p);
2214            if (rde_param_i_bra_value2value(p)) return;
2215            sym_LEAF (p);
2216            rde_param_i_state_merge_value (p);
2217            return;
2218        }
2219        
2220        /*
2221         * value Symbol 'Char'
2222         */
2223        
2224        static void sym_Char (RDE_PARAM p) {
2225           /*
2226            * /
2227            *     (CharSpecial)
2228            *     (CharOctalFull)
2229            *     (CharOctalPart)
2230            *     (CharUnicode)
2231            *     (CharUnescaped)
2232            */
2233        
2234            if (rde_param_i_symbol_start_d (p, 18)) return ;
2235            choice_37 (p);
2236            rde_param_i_symbol_done_d_reduce (p, 18, 17);
2237            return;
2238        }
2239        
2240        static void choice_37 (RDE_PARAM p) {
2241           /*
2242            * /
2243            *     (CharSpecial)
2244            *     (CharOctalFull)
2245            *     (CharOctalPart)
2246            *     (CharUnicode)
2247            *     (CharUnescaped)
2248            */
2249        
2250            rde_param_i_state_push_value (p);
2251            sym_CharSpecial (p);
2252            if (rde_param_i_bra_value2value(p)) return;
2253            sym_CharOctalFull (p);
2254            if (rde_param_i_bra_value2value(p)) return;
2255            sym_CharOctalPart (p);
2256            if (rde_param_i_bra_value2value(p)) return;
2257            sym_CharUnicode (p);
2258            if (rde_param_i_bra_value2value(p)) return;
2259            sym_CharUnescaped (p);
2260            rde_param_i_state_merge_value (p);
2261            return;
2262        }
2263        
2264        /*
2265         * leaf Symbol 'CharOctalFull'
2266         */
2267        
2268        static void sym_CharOctalFull (RDE_PARAM p) {
2269           /*
2270            * x
2271            *     '\'
2272            *     range (0 .. 2)
2273            *     range (0 .. 7)
2274            *     range (0 .. 7)
2275            */
2276        
2277            if (rde_param_i_symbol_start (p, 23)) return ;
2278            sequence_44 (p);
2279            rde_param_i_symbol_done_leaf (p, 23, 22);
2280            return;
2281        }
2282        
2283        static void sequence_44 (RDE_PARAM p) {
2284           /*
2285            * x
2286            *     '\'
2287            *     range (0 .. 2)
2288            *     range (0 .. 7)
2289            *     range (0 .. 7)
2290            */
2291        
2292            rde_param_i_state_push_void (p);
2293            rde_param_i_next_char (p, "\134", 19);
2294            if (rde_param_i_seq_void2void(p)) return;
2295            rde_param_i_next_range (p, "0", "2", 20);
2296            if (rde_param_i_seq_void2void(p)) return;
2297            rde_param_i_next_range (p, "0", "7", 21);
2298            if (rde_param_i_seq_void2void(p)) return;
2299            rde_param_i_next_range (p, "0", "7", 21);
2300            rde_param_i_state_merge_void (p);
2301            return;
2302        }
2303        
2304        /*
2305         * leaf Symbol 'CharOctalPart'
2306         */
2307        
2308        static void sym_CharOctalPart (RDE_PARAM p) {
2309           /*
2310            * x
2311            *     '\'
2312            *     range (0 .. 7)
2313            *     ?
2314            *         range (0 .. 7)
2315            */
2316        
2317            if (rde_param_i_symbol_start (p, 25)) return ;
2318            sequence_52 (p);
2319            rde_param_i_symbol_done_leaf (p, 25, 24);
2320            return;
2321        }
2322        
2323        static void sequence_52 (RDE_PARAM p) {
2324           /*
2325            * x
2326            *     '\'
2327            *     range (0 .. 7)
2328            *     ?
2329            *         range (0 .. 7)
2330            */
2331        
2332            rde_param_i_state_push_void (p);
2333            rde_param_i_next_char (p, "\134", 19);
2334            if (rde_param_i_seq_void2void(p)) return;
2335            rde_param_i_next_range (p, "0", "7", 21);
2336            if (rde_param_i_seq_void2void(p)) return;
2337            optional_50 (p);
2338            rde_param_i_state_merge_void (p);
2339            return;
2340        }
2341        
2342        static void optional_50 (RDE_PARAM p) {
2343           /*
2344            * ?
2345            *     range (0 .. 7)
2346            */
2347        
2348            rde_param_i_state_push_2 (p);
2349            rde_param_i_next_range (p, "0", "7", 21);
2350            rde_param_i_state_merge_ok (p);
2351            return;
2352        }
2353        
2354        /*
2355         * leaf Symbol 'CharSpecial'
2356         */
2357        
2358        static void sym_CharSpecial (RDE_PARAM p) {
2359           /*
2360            * x
2361            *     '\'
2362            *     [nrt'\"[]\]
2363            */
2364        
2365            if (rde_param_i_symbol_start (p, 28)) return ;
2366            sequence_57 (p);
2367            rde_param_i_symbol_done_leaf (p, 28, 27);
2368            return;
2369        }
2370        
2371        static void sequence_57 (RDE_PARAM p) {
2372           /*
2373            * x
2374            *     '\'
2375            *     [nrt'\"[]\]
2376            */
2377        
2378            rde_param_i_state_push_void (p);
2379            rde_param_i_next_char (p, "\134", 19);
2380            if (rde_param_i_seq_void2void(p)) return;
2381            rde_param_i_next_class (p, "nrt'\42\133\135\134", 26);
2382            rde_param_i_state_merge_void (p);
2383            return;
2384        }
2385        
2386        /*
2387         * leaf Symbol 'CharUnescaped'
2388         */
2389        
2390        static void sym_CharUnescaped (RDE_PARAM p) {
2391           /*
2392            * x
2393            *     !
2394            *         '\'
2395            *     <dot>
2396            */
2397        
2398            if (rde_param_i_symbol_start (p, 31)) return ;
2399            sequence_64 (p);
2400            rde_param_i_symbol_done_leaf (p, 31, 30);
2401            return;
2402        }
2403        
2404        static void sequence_64 (RDE_PARAM p) {
2405           /*
2406            * x
2407            *     !
2408            *         '\'
2409            *     <dot>
2410            */
2411        
2412            rde_param_i_state_push_void (p);
2413            notahead_61 (p);
2414            if (rde_param_i_seq_void2void(p)) return;
2415            rde_param_i_input_next (p, 29);
2416            rde_param_i_state_merge_void (p);
2417            return;
2418        }
2419        
2420        static void notahead_61 (RDE_PARAM p) {
2421           /*
2422            * !
2423            *     '\'
2424            */
2425        
2426            rde_param_i_loc_push (p);
2427            rde_param_i_next_char (p, "\134", 19);
2428            rde_param_i_notahead_exit (p);
2429            return;
2430        }
2431        
2432        /*
2433         * leaf Symbol 'CharUnicode'
2434         */
2435        
2436        static void sym_CharUnicode (RDE_PARAM p) {
2437           /*
2438            * x
2439            *     "\u"
2440            *     <xdigit>
2441            *     ?
2442            *         x
2443            *             <xdigit>
2444            *             ?
2445            *                 x
2446            *                     <xdigit>
2447            *                     ?
2448            *                         <xdigit>
2449            */
2450        
2451            if (rde_param_i_symbol_start (p, 35)) return ;
2452            sequence_82 (p);
2453            rde_param_i_symbol_done_leaf (p, 35, 34);
2454            return;
2455        }
2456        
2457        static void sequence_82 (RDE_PARAM p) {
2458           /*
2459            * x
2460            *     "\u"
2461            *     <xdigit>
2462            *     ?
2463            *         x
2464            *             <xdigit>
2465            *             ?
2466            *                 x
2467            *                     <xdigit>
2468            *                     ?
2469            *                         <xdigit>
2470            */
2471        
2472            rde_param_i_state_push_void (p);
2473            rde_param_i_next_str (p, "\134u", 32);
2474            if (rde_param_i_seq_void2void(p)) return;
2475            rde_param_i_next_xdigit (p, 33);
2476            if (rde_param_i_seq_void2void(p)) return;
2477            optional_80 (p);
2478            rde_param_i_state_merge_void (p);
2479            return;
2480        }
2481        
2482        static void optional_80 (RDE_PARAM p) {
2483           /*
2484            * ?
2485            *     x
2486            *         <xdigit>
2487            *         ?
2488            *             x
2489            *                 <xdigit>
2490            *                 ?
2491            *                     <xdigit>
2492            */
2493        
2494            rde_param_i_state_push_2 (p);
2495            sequence_78 (p);
2496            rde_param_i_state_merge_ok (p);
2497            return;
2498        }
2499        
2500        static void sequence_78 (RDE_PARAM p) {
2501           /*
2502            * x
2503            *     <xdigit>
2504            *     ?
2505            *         x
2506            *             <xdigit>
2507            *             ?
2508            *                 <xdigit>
2509            */
2510        
2511            rde_param_i_state_push_void (p);
2512            rde_param_i_next_xdigit (p, 33);
2513            if (rde_param_i_seq_void2void(p)) return;
2514            optional_76 (p);
2515            rde_param_i_state_merge_void (p);
2516            return;
2517        }
2518        
2519        static void optional_76 (RDE_PARAM p) {
2520           /*
2521            * ?
2522            *     x
2523            *         <xdigit>
2524            *         ?
2525            *             <xdigit>
2526            */
2527        
2528            rde_param_i_state_push_2 (p);
2529            sequence_74 (p);
2530            rde_param_i_state_merge_ok (p);
2531            return;
2532        }
2533        
2534        static void sequence_74 (RDE_PARAM p) {
2535           /*
2536            * x
2537            *     <xdigit>
2538            *     ?
2539            *         <xdigit>
2540            */
2541        
2542            rde_param_i_state_push_void (p);
2543            rde_param_i_next_xdigit (p, 33);
2544            if (rde_param_i_seq_void2void(p)) return;
2545            optional_72 (p);
2546            rde_param_i_state_merge_void (p);
2547            return;
2548        }
2549        
2550        static void optional_72 (RDE_PARAM p) {
2551           /*
2552            * ?
2553            *     <xdigit>
2554            */
2555        
2556            rde_param_i_state_push_2 (p);
2557            rde_param_i_next_xdigit (p, 33);
2558            rde_param_i_state_merge_ok (p);
2559            return;
2560        }
2561        
2562        /*
2563         * value Symbol 'Class'
2564         */
2565        
2566        static void sym_Class (RDE_PARAM p) {
2567           /*
2568            * x
2569            *     (OPENB)
2570            *     *
2571            *         x
2572            *             !
2573            *                 (CLOSEB)
2574            *             (Range)
2575            *     (CLOSEB)
2576            *     (WHITESPACE)
2577            */
2578        
2579            if (rde_param_i_symbol_start_d (p, 37)) return ;
2580            sequence_96 (p);
2581            rde_param_i_symbol_done_d_reduce (p, 37, 36);
2582            return;
2583        }
2584        
2585        static void sequence_96 (RDE_PARAM p) {
2586           /*
2587            * x
2588            *     (OPENB)
2589            *     *
2590            *         x
2591            *             !
2592            *                 (CLOSEB)
2593            *             (Range)
2594            *     (CLOSEB)
2595            *     (WHITESPACE)
2596            */
2597        
2598            rde_param_i_state_push_void (p);
2599            sym_OPENB (p);
2600            if (rde_param_i_seq_void2value(p)) return;
2601            kleene_92 (p);
2602            if (rde_param_i_seq_value2value(p)) return;
2603            sym_CLOSEB (p);
2604            if (rde_param_i_seq_value2value(p)) return;
2605            sym_WHITESPACE (p);
2606            rde_param_i_state_merge_value (p);
2607            return;
2608        }
2609        
2610        static void kleene_92 (RDE_PARAM p) {
2611           /*
2612            * *
2613            *     x
2614            *         !
2615            *             (CLOSEB)
2616            *         (Range)
2617            */
2618        
2619            while (1) {
2620                rde_param_i_state_push_2 (p);
2621                sequence_90 (p);
2622                if (rde_param_i_kleene_close(p)) return;
2623            }
2624            return;
2625        }
2626        
2627        static void sequence_90 (RDE_PARAM p) {
2628           /*
2629            * x
2630            *     !
2631            *         (CLOSEB)
2632            *     (Range)
2633            */
2634        
2635            rde_param_i_state_push_void (p);
2636            notahead_87 (p);
2637            if (rde_param_i_seq_void2value(p)) return;
2638            sym_Range (p);
2639            rde_param_i_state_merge_value (p);
2640            return;
2641        }
2642        
2643        static void notahead_87 (RDE_PARAM p) {
2644           /*
2645            * !
2646            *     (CLOSEB)
2647            */
2648        
2649            rde_param_i_loc_push (p);
2650            sym_CLOSEB (p);
2651            rde_param_i_notahead_exit (p);
2652            return;
2653        }
2654        
2655        /*
2656         * void Symbol 'CLOSE'
2657         */
2658        
2659        static void sym_CLOSE (RDE_PARAM p) {
2660           /*
2661            * x
2662            *     '\)'
2663            *     (WHITESPACE)
2664            */
2665        
2666            if (rde_param_i_symbol_void_start (p, 40)) return ;
2667            sequence_101 (p);
2668            rde_param_i_symbol_done_void (p, 40, 39);
2669            return;
2670        }
2671        
2672        static void sequence_101 (RDE_PARAM p) {
2673           /*
2674            * x
2675            *     '\)'
2676            *     (WHITESPACE)
2677            */
2678        
2679            rde_param_i_state_push_void (p);
2680            rde_param_i_next_char (p, "\51", 38);
2681            if (rde_param_i_seq_void2void(p)) return;
2682            sym_WHITESPACE (p);
2683            rde_param_i_state_merge_void (p);
2684            return;
2685        }
2686        
2687        /*
2688         * void Symbol 'CLOSEB'
2689         */
2690        
2691        static void sym_CLOSEB (RDE_PARAM p) {
2692           /*
2693            * ']'
2694            */
2695        
2696            if (rde_param_i_symbol_void_start (p, 43)) return ;
2697            rde_param_i_next_char (p, "\135", 41);
2698            rde_param_i_symbol_done_void (p, 43, 42);
2699            return;
2700        }
2701        
2702        /*
2703         * void Symbol 'COLON'
2704         */
2705        
2706        static void sym_COLON (RDE_PARAM p) {
2707           /*
2708            * x
2709            *     ':'
2710            *     (WHITESPACE)
2711            */
2712        
2713            if (rde_param_i_symbol_void_start (p, 46)) return ;
2714            sequence_108 (p);
2715            rde_param_i_symbol_done_void (p, 46, 45);
2716            return;
2717        }
2718        
2719        static void sequence_108 (RDE_PARAM p) {
2720           /*
2721            * x
2722            *     ':'
2723            *     (WHITESPACE)
2724            */
2725        
2726            rde_param_i_state_push_void (p);
2727            rde_param_i_next_char (p, ":", 44);
2728            if (rde_param_i_seq_void2void(p)) return;
2729            sym_WHITESPACE (p);
2730            rde_param_i_state_merge_void (p);
2731            return;
2732        }
2733        
2734        /*
2735         * void Symbol 'COMMENT'
2736         */
2737        
2738        static void sym_COMMENT (RDE_PARAM p) {
2739           /*
2740            * x
2741            *     '#'
2742            *     *
2743            *         x
2744            *             !
2745            *                 (EOL)
2746            *             <dot>
2747            *     (EOL)
2748            */
2749        
2750            if (rde_param_i_symbol_void_start (p, 49)) return ;
2751            sequence_121 (p);
2752            rde_param_i_symbol_done_void (p, 49, 48);
2753            return;
2754        }
2755        
2756        static void sequence_121 (RDE_PARAM p) {
2757           /*
2758            * x
2759            *     '#'
2760            *     *
2761            *         x
2762            *             !
2763            *                 (EOL)
2764            *             <dot>
2765            *     (EOL)
2766            */
2767        
2768            rde_param_i_state_push_void (p);
2769            rde_param_i_next_char (p, "#", 47);
2770            if (rde_param_i_seq_void2void(p)) return;
2771            kleene_118 (p);
2772            if (rde_param_i_seq_void2void(p)) return;
2773            sym_EOL (p);
2774            rde_param_i_state_merge_void (p);
2775            return;
2776        }
2777        
2778        static void kleene_118 (RDE_PARAM p) {
2779           /*
2780            * *
2781            *     x
2782            *         !
2783            *             (EOL)
2784            *         <dot>
2785            */
2786        
2787            while (1) {
2788                rde_param_i_state_push_2 (p);
2789                sequence_116 (p);
2790                if (rde_param_i_kleene_close(p)) return;
2791            }
2792            return;
2793        }
2794        
2795        static void sequence_116 (RDE_PARAM p) {
2796           /*
2797            * x
2798            *     !
2799            *         (EOL)
2800            *     <dot>
2801            */
2802        
2803            rde_param_i_state_push_void (p);
2804            notahead_113 (p);
2805            if (rde_param_i_seq_void2void(p)) return;
2806            rde_param_i_input_next (p, 29);
2807            rde_param_i_state_merge_void (p);
2808            return;
2809        }
2810        
2811        static void notahead_113 (RDE_PARAM p) {
2812           /*
2813            * !
2814            *     (EOL)
2815            */
2816        
2817            rde_param_i_loc_push (p);
2818            sym_EOL (p);
2819            rde_param_i_notahead_exit (p);
2820            return;
2821        }
2822        
2823        /*
2824         * leaf Symbol 'CONTROL'
2825         */
2826        
2827        static void sym_CONTROL (RDE_PARAM p) {
2828           /*
2829            * x
2830            *     "<control>"
2831            *     (WHITESPACE)
2832            */
2833        
2834            if (rde_param_i_symbol_start (p, 52)) return ;
2835            sequence_126 (p);
2836            rde_param_i_symbol_done_leaf (p, 52, 51);
2837            return;
2838        }
2839        
2840        static void sequence_126 (RDE_PARAM p) {
2841           /*
2842            * x
2843            *     "<control>"
2844            *     (WHITESPACE)
2845            */
2846        
2847            rde_param_i_state_push_void (p);
2848            rde_param_i_next_str (p, "<control>", 50);
2849            if (rde_param_i_seq_void2void(p)) return;
2850            sym_WHITESPACE (p);
2851            rde_param_i_state_merge_void (p);
2852            return;
2853        }
2854        
2855        /*
2856         * void Symbol 'DAPOSTROPH'
2857         */
2858        
2859        static void sym_DAPOSTROPH (RDE_PARAM p) {
2860           /*
2861            * '\"'
2862            */
2863        
2864            if (rde_param_i_symbol_void_start (p, 55)) return ;
2865            rde_param_i_next_char (p, "\42", 53);
2866            rde_param_i_symbol_done_void (p, 55, 54);
2867            return;
2868        }
2869        
2870        /*
2871         * leaf Symbol 'DDIGIT'
2872         */
2873        
2874        static void sym_DDIGIT (RDE_PARAM p) {
2875           /*
2876            * x
2877            *     "<ddigit>"
2878            *     (WHITESPACE)
2879            */
2880        
2881            if (rde_param_i_symbol_start (p, 58)) return ;
2882            sequence_133 (p);
2883            rde_param_i_symbol_done_leaf (p, 58, 57);
2884            return;
2885        }
2886        
2887        static void sequence_133 (RDE_PARAM p) {
2888           /*
2889            * x
2890            *     "<ddigit>"
2891            *     (WHITESPACE)
2892            */
2893        
2894            rde_param_i_state_push_void (p);
2895            rde_param_i_next_str (p, "<ddigit>", 56);
2896            if (rde_param_i_seq_void2void(p)) return;
2897            sym_WHITESPACE (p);
2898            rde_param_i_state_merge_void (p);
2899            return;
2900        }
2901        
2902        /*
2903         * value Symbol 'Definition'
2904         */
2905        
2906        static void sym_Definition (RDE_PARAM p) {
2907           /*
2908            * x
2909            *     ?
2910            *         (Attribute)
2911            *     (Identifier)
2912            *     (IS)
2913            *     (Expression)
2914            *     (SEMICOLON)
2915            */
2916        
2917            if (rde_param_i_symbol_start_d (p, 60)) return ;
2918            sequence_143 (p);
2919            rde_param_i_symbol_done_d_reduce (p, 60, 59);
2920            return;
2921        }
2922        
2923        static void sequence_143 (RDE_PARAM p) {
2924           /*
2925            * x
2926            *     ?
2927            *         (Attribute)
2928            *     (Identifier)
2929            *     (IS)
2930            *     (Expression)
2931            *     (SEMICOLON)
2932            */
2933        
2934            rde_param_i_state_push_value (p);
2935            optional_137 (p);
2936            if (rde_param_i_seq_value2value(p)) return;
2937            sym_Identifier (p);
2938            if (rde_param_i_seq_value2value(p)) return;
2939            sym_IS (p);
2940            if (rde_param_i_seq_value2value(p)) return;
2941            sym_Expression (p);
2942            if (rde_param_i_seq_value2value(p)) return;
2943            sym_SEMICOLON (p);
2944            rde_param_i_state_merge_value (p);
2945            return;
2946        }
2947        
2948        static void optional_137 (RDE_PARAM p) {
2949           /*
2950            * ?
2951            *     (Attribute)
2952            */
2953        
2954            rde_param_i_state_push_2 (p);
2955            sym_Attribute (p);
2956            rde_param_i_state_merge_ok (p);
2957            return;
2958        }
2959        
2960        /*
2961         * leaf Symbol 'DIGIT'
2962         */
2963        
2964        static void sym_DIGIT (RDE_PARAM p) {
2965           /*
2966            * x
2967            *     "<digit>"
2968            *     (WHITESPACE)
2969            */
2970        
2971            if (rde_param_i_symbol_start (p, 63)) return ;
2972            sequence_148 (p);
2973            rde_param_i_symbol_done_leaf (p, 63, 62);
2974            return;
2975        }
2976        
2977        static void sequence_148 (RDE_PARAM p) {
2978           /*
2979            * x
2980            *     "<digit>"
2981            *     (WHITESPACE)
2982            */
2983        
2984            rde_param_i_state_push_void (p);
2985            rde_param_i_next_str (p, "<digit>", 61);
2986            if (rde_param_i_seq_void2void(p)) return;
2987            sym_WHITESPACE (p);
2988            rde_param_i_state_merge_void (p);
2989            return;
2990        }
2991        
2992        /*
2993         * leaf Symbol 'DOT'
2994         */
2995        
2996        static void sym_DOT (RDE_PARAM p) {
2997           /*
2998            * x
2999            *     '.'
3000            *     (WHITESPACE)
3001            */
3002        
3003            if (rde_param_i_symbol_start (p, 66)) return ;
3004            sequence_153 (p);
3005            rde_param_i_symbol_done_leaf (p, 66, 65);
3006            return;
3007        }
3008        
3009        static void sequence_153 (RDE_PARAM p) {
3010           /*
3011            * x
3012            *     '.'
3013            *     (WHITESPACE)
3014            */
3015        
3016            rde_param_i_state_push_void (p);
3017            rde_param_i_next_char (p, ".", 64);
3018            if (rde_param_i_seq_void2void(p)) return;
3019            sym_WHITESPACE (p);
3020            rde_param_i_state_merge_void (p);
3021            return;
3022        }
3023        
3024        /*
3025         * void Symbol 'END'
3026         */
3027        
3028        static void sym_END (RDE_PARAM p) {
3029           /*
3030            * x
3031            *     "END"
3032            *     (WHITESPACE)
3033            */
3034        
3035            if (rde_param_i_symbol_void_start (p, 69)) return ;
3036            sequence_158 (p);
3037            rde_param_i_symbol_done_void (p, 69, 68);
3038            return;
3039        }
3040        
3041        static void sequence_158 (RDE_PARAM p) {
3042           /*
3043            * x
3044            *     "END"
3045            *     (WHITESPACE)
3046            */
3047        
3048            rde_param_i_state_push_void (p);
3049            rde_param_i_next_str (p, "END", 67);
3050            if (rde_param_i_seq_void2void(p)) return;
3051            sym_WHITESPACE (p);
3052            rde_param_i_state_merge_void (p);
3053            return;
3054        }
3055        
3056        /*
3057         * void Symbol 'EOF'
3058         */
3059        
3060        static void sym_EOF (RDE_PARAM p) {
3061           /*
3062            * !
3063            *     <dot>
3064            */
3065        
3066            if (rde_param_i_symbol_void_start (p, 71)) return ;
3067            notahead_162 (p);
3068            rde_param_i_symbol_done_void (p, 71, 70);
3069            return;
3070        }
3071        
3072        static void notahead_162 (RDE_PARAM p) {
3073           /*
3074            * !
3075            *     <dot>
3076            */
3077        
3078            rde_param_i_loc_push (p);
3079            rde_param_i_input_next (p, 29);
3080            rde_param_i_notahead_exit (p);
3081            return;
3082        }
3083        
3084        /*
3085         * void Symbol 'EOL'
3086         */
3087        
3088        static void sym_EOL (RDE_PARAM p) {
3089           /*
3090            * [\n\r]
3091            */
3092        
3093            if (rde_param_i_symbol_void_start (p, 74)) return ;
3094            rde_param_i_next_class (p, "\n\r", 72);
3095            rde_param_i_symbol_done_void (p, 74, 73);
3096            return;
3097        }
3098        
3099        /*
3100         * value Symbol 'Expression'
3101         */
3102        
3103        static void sym_Expression (RDE_PARAM p) {
3104           /*
3105            * x
3106            *     (Sequence)
3107            *     *
3108            *         x
3109            *             (SLASH)
3110            *             (Sequence)
3111            */
3112        
3113            if (rde_param_i_symbol_start_d (p, 76)) return ;
3114            sequence_174 (p);
3115            rde_param_i_symbol_done_d_reduce (p, 76, 75);
3116            return;
3117        }
3118        
3119        static void sequence_174 (RDE_PARAM p) {
3120           /*
3121            * x
3122            *     (Sequence)
3123            *     *
3124            *         x
3125            *             (SLASH)
3126            *             (Sequence)
3127            */
3128        
3129            rde_param_i_state_push_value (p);
3130            sym_Sequence (p);
3131            if (rde_param_i_seq_value2value(p)) return;
3132            kleene_172 (p);
3133            rde_param_i_state_merge_value (p);
3134            return;
3135        }
3136        
3137        static void kleene_172 (RDE_PARAM p) {
3138           /*
3139            * *
3140            *     x
3141            *         (SLASH)
3142            *         (Sequence)
3143            */
3144        
3145            while (1) {
3146                rde_param_i_state_push_2 (p);
3147                sequence_170 (p);
3148                if (rde_param_i_kleene_close(p)) return;
3149            }
3150            return;
3151        }
3152        
3153        static void sequence_170 (RDE_PARAM p) {
3154           /*
3155            * x
3156            *     (SLASH)
3157            *     (Sequence)
3158            */
3159        
3160            rde_param_i_state_push_void (p);
3161            sym_SLASH (p);
3162            if (rde_param_i_seq_void2value(p)) return;
3163            sym_Sequence (p);
3164            rde_param_i_state_merge_value (p);
3165            return;
3166        }
3167        
3168        /*
3169         * void Symbol 'Final'
3170         */
3171        
3172        static void sym_Final (RDE_PARAM p) {
3173           /*
3174            * x
3175            *     (END)
3176            *     (SEMICOLON)
3177            *     (WHITESPACE)
3178            */
3179        
3180            if (rde_param_i_symbol_void_start (p, 78)) return ;
3181            sequence_180 (p);
3182            rde_param_i_symbol_done_void (p, 78, 77);
3183            return;
3184        }
3185        
3186        static void sequence_180 (RDE_PARAM p) {
3187           /*
3188            * x
3189            *     (END)
3190            *     (SEMICOLON)
3191            *     (WHITESPACE)
3192            */
3193        
3194            rde_param_i_state_push_void (p);
3195            sym_END (p);
3196            if (rde_param_i_seq_void2void(p)) return;
3197            sym_SEMICOLON (p);
3198            if (rde_param_i_seq_void2void(p)) return;
3199            sym_WHITESPACE (p);
3200            rde_param_i_state_merge_void (p);
3201            return;
3202        }
3203        
3204        /*
3205         * value Symbol 'Grammar'
3206         */
3207        
3208        static void sym_Grammar (RDE_PARAM p) {
3209           /*
3210            * x
3211            *     (WHITESPACE)
3212            *     (Header)
3213            *     *
3214            *         (Definition)
3215            *     (Final)
3216            *     (EOF)
3217            */
3218        
3219            if (rde_param_i_symbol_start_d (p, 80)) return ;
3220            sequence_190 (p);
3221            rde_param_i_symbol_done_d_reduce (p, 80, 79);
3222            return;
3223        }
3224        
3225        static void sequence_190 (RDE_PARAM p) {
3226           /*
3227            * x
3228            *     (WHITESPACE)
3229            *     (Header)
3230            *     *
3231            *         (Definition)
3232            *     (Final)
3233            *     (EOF)
3234            */
3235        
3236            rde_param_i_state_push_void (p);
3237            sym_WHITESPACE (p);
3238            if (rde_param_i_seq_void2value(p)) return;
3239            sym_Header (p);
3240            if (rde_param_i_seq_value2value(p)) return;
3241            kleene_186 (p);
3242            if (rde_param_i_seq_value2value(p)) return;
3243            sym_Final (p);
3244            if (rde_param_i_seq_value2value(p)) return;
3245            sym_EOF (p);
3246            rde_param_i_state_merge_value (p);
3247            return;
3248        }
3249        
3250        static void kleene_186 (RDE_PARAM p) {
3251           /*
3252            * *
3253            *     (Definition)
3254            */
3255        
3256            while (1) {
3257                rde_param_i_state_push_2 (p);
3258                sym_Definition (p);
3259                if (rde_param_i_kleene_close(p)) return;
3260            }
3261            return;
3262        }
3263        
3264        /*
3265         * leaf Symbol 'GRAPH'
3266         */
3267        
3268        static void sym_GRAPH (RDE_PARAM p) {
3269           /*
3270            * x
3271            *     "<graph>"
3272            *     (WHITESPACE)
3273            */
3274        
3275            if (rde_param_i_symbol_start (p, 83)) return ;
3276            sequence_195 (p);
3277            rde_param_i_symbol_done_leaf (p, 83, 82);
3278            return;
3279        }
3280        
3281        static void sequence_195 (RDE_PARAM p) {
3282           /*
3283            * x
3284            *     "<graph>"
3285            *     (WHITESPACE)
3286            */
3287        
3288            rde_param_i_state_push_void (p);
3289            rde_param_i_next_str (p, "<graph>", 81);
3290            if (rde_param_i_seq_void2void(p)) return;
3291            sym_WHITESPACE (p);
3292            rde_param_i_state_merge_void (p);
3293            return;
3294        }
3295        
3296        /*
3297         * value Symbol 'Header'
3298         */
3299        
3300        static void sym_Header (RDE_PARAM p) {
3301           /*
3302            * x
3303            *     (PEG)
3304            *     (Identifier)
3305            *     (StartExpr)
3306            */
3307        
3308            if (rde_param_i_symbol_start_d (p, 85)) return ;
3309            sequence_201 (p);
3310            rde_param_i_symbol_done_d_reduce (p, 85, 84);
3311            return;
3312        }
3313        
3314        static void sequence_201 (RDE_PARAM p) {
3315           /*
3316            * x
3317            *     (PEG)
3318            *     (Identifier)
3319            *     (StartExpr)
3320            */
3321        
3322            rde_param_i_state_push_void (p);
3323            sym_PEG (p);
3324            if (rde_param_i_seq_void2value(p)) return;
3325            sym_Identifier (p);
3326            if (rde_param_i_seq_value2value(p)) return;
3327            sym_StartExpr (p);
3328            rde_param_i_state_merge_value (p);
3329            return;
3330        }
3331        
3332        /*
3333         * leaf Symbol 'Ident'
3334         */
3335        
3336        static void sym_Ident (RDE_PARAM p) {
3337           /*
3338            * x
3339            *     /
3340            *         [_:]
3341            *         <alpha>
3342            *     *
3343            *         /
3344            *             [_:]
3345            *             <alnum>
3346            */
3347        
3348            if (rde_param_i_symbol_start (p, 90)) return ;
3349            sequence_214 (p);
3350            rde_param_i_symbol_done_leaf (p, 90, 89);
3351            return;
3352        }
3353        
3354        static void sequence_214 (RDE_PARAM p) {
3355           /*
3356            * x
3357            *     /
3358            *         [_:]
3359            *         <alpha>
3360            *     *
3361            *         /
3362            *             [_:]
3363            *             <alnum>
3364            */
3365        
3366            rde_param_i_state_push_void (p);
3367            choice_206 (p);
3368            if (rde_param_i_seq_void2void(p)) return;
3369            kleene_212 (p);
3370            rde_param_i_state_merge_void (p);
3371            return;
3372        }
3373        
3374        static void choice_206 (RDE_PARAM p) {
3375           /*
3376            * /
3377            *     [_:]
3378            *     <alpha>
3379            */
3380        
3381            rde_param_i_state_push_void (p);
3382            rde_param_i_next_class (p, "_:", 86);
3383            if (rde_param_i_bra_void2void(p)) return;
3384            rde_param_i_next_alpha (p, 87);
3385            rde_param_i_state_merge_void (p);
3386            return;
3387        }
3388        
3389        static void kleene_212 (RDE_PARAM p) {
3390           /*
3391            * *
3392            *     /
3393            *         [_:]
3394            *         <alnum>
3395            */
3396        
3397            while (1) {
3398                rde_param_i_state_push_2 (p);
3399                choice_210 (p);
3400                if (rde_param_i_kleene_close(p)) return;
3401            }
3402            return;
3403        }
3404        
3405        static void choice_210 (RDE_PARAM p) {
3406           /*
3407            * /
3408            *     [_:]
3409            *     <alnum>
3410            */
3411        
3412            rde_param_i_state_push_void (p);
3413            rde_param_i_next_class (p, "_:", 86);
3414            if (rde_param_i_bra_void2void(p)) return;
3415            rde_param_i_next_alnum (p, 88);
3416            rde_param_i_state_merge_void (p);
3417            return;
3418        }
3419        
3420        /*
3421         * value Symbol 'Identifier'
3422         */
3423        
3424        static void sym_Identifier (RDE_PARAM p) {
3425           /*
3426            * x
3427            *     (Ident)
3428            *     (WHITESPACE)
3429            */
3430        
3431            if (rde_param_i_symbol_start_d (p, 92)) return ;
3432            sequence_219 (p);
3433            rde_param_i_symbol_done_d_reduce (p, 92, 91);
3434            return;
3435        }
3436        
3437        static void sequence_219 (RDE_PARAM p) {
3438           /*
3439            * x
3440            *     (Ident)
3441            *     (WHITESPACE)
3442            */
3443        
3444            rde_param_i_state_push_value (p);
3445            sym_Ident (p);
3446            if (rde_param_i_seq_value2value(p)) return;
3447            sym_WHITESPACE (p);
3448            rde_param_i_state_merge_value (p);
3449            return;
3450        }
3451        
3452        /*
3453         * void Symbol 'IS'
3454         */
3455        
3456        static void sym_IS (RDE_PARAM p) {
3457           /*
3458            * x
3459            *     "<-"
3460            *     (WHITESPACE)
3461            */
3462        
3463            if (rde_param_i_symbol_void_start (p, 95)) return ;
3464            sequence_224 (p);
3465            rde_param_i_symbol_done_void (p, 95, 94);
3466            return;
3467        }
3468        
3469        static void sequence_224 (RDE_PARAM p) {
3470           /*
3471            * x
3472            *     "<-"
3473            *     (WHITESPACE)
3474            */
3475        
3476            rde_param_i_state_push_void (p);
3477            rde_param_i_next_str (p, "<-", 93);
3478            if (rde_param_i_seq_void2void(p)) return;
3479            sym_WHITESPACE (p);
3480            rde_param_i_state_merge_void (p);
3481            return;
3482        }
3483        
3484        /*
3485         * leaf Symbol 'LEAF'
3486         */
3487        
3488        static void sym_LEAF (RDE_PARAM p) {
3489           /*
3490            * x
3491            *     "leaf"
3492            *     (WHITESPACE)
3493            */
3494        
3495            if (rde_param_i_symbol_start (p, 98)) return ;
3496            sequence_229 (p);
3497            rde_param_i_symbol_done_leaf (p, 98, 97);
3498            return;
3499        }
3500        
3501        static void sequence_229 (RDE_PARAM p) {
3502           /*
3503            * x
3504            *     "leaf"
3505            *     (WHITESPACE)
3506            */
3507        
3508            rde_param_i_state_push_void (p);
3509            rde_param_i_next_str (p, "leaf", 96);
3510            if (rde_param_i_seq_void2void(p)) return;
3511            sym_WHITESPACE (p);
3512            rde_param_i_state_merge_void (p);
3513            return;
3514        }
3515        
3516        /*
3517         * value Symbol 'Literal'
3518         */
3519        
3520        static void sym_Literal (RDE_PARAM p) {
3521           /*
3522            * /
3523            *     x
3524            *         (APOSTROPH)
3525            *         *
3526            *             x
3527            *                 !
3528            *                     (APOSTROPH)
3529            *                 (Char)
3530            *         (APOSTROPH)
3531            *         (WHITESPACE)
3532            *     x
3533            *         (DAPOSTROPH)
3534            *         *
3535            *             x
3536            *                 !
3537            *                     (DAPOSTROPH)
3538            *                 (Char)
3539            *         (DAPOSTROPH)
3540            *         (WHITESPACE)
3541            */
3542        
3543            if (rde_param_i_symbol_start_d (p, 100)) return ;
3544            choice_258 (p);
3545            rde_param_i_symbol_done_d_reduce (p, 100, 99);
3546            return;
3547        }
3548        
3549        static void choice_258 (RDE_PARAM p) {
3550           /*
3551            * /
3552            *     x
3553            *         (APOSTROPH)
3554            *         *
3555            *             x
3556            *                 !
3557            *                     (APOSTROPH)
3558            *                 (Char)
3559            *         (APOSTROPH)
3560            *         (WHITESPACE)
3561            *     x
3562            *         (DAPOSTROPH)
3563            *         *
3564            *             x
3565            *                 !
3566            *                     (DAPOSTROPH)
3567            *                 (Char)
3568            *         (DAPOSTROPH)
3569            *         (WHITESPACE)
3570            */
3571        
3572            rde_param_i_state_push_value (p);
3573            sequence_243 (p);
3574            if (rde_param_i_bra_value2value(p)) return;
3575            sequence_256 (p);
3576            rde_param_i_state_merge_value (p);
3577            return;
3578        }
3579        
3580        static void sequence_243 (RDE_PARAM p) {
3581           /*
3582            * x
3583            *     (APOSTROPH)
3584            *     *
3585            *         x
3586            *             !
3587            *                 (APOSTROPH)
3588            *             (Char)
3589            *     (APOSTROPH)
3590            *     (WHITESPACE)
3591            */
3592        
3593            rde_param_i_state_push_void (p);
3594            sym_APOSTROPH (p);
3595            if (rde_param_i_seq_void2value(p)) return;
3596            kleene_239 (p);
3597            if (rde_param_i_seq_value2value(p)) return;
3598            sym_APOSTROPH (p);
3599            if (rde_param_i_seq_value2value(p)) return;
3600            sym_WHITESPACE (p);
3601            rde_param_i_state_merge_value (p);
3602            return;
3603        }
3604        
3605        static void kleene_239 (RDE_PARAM p) {
3606           /*
3607            * *
3608            *     x
3609            *         !
3610            *             (APOSTROPH)
3611            *         (Char)
3612            */
3613        
3614            while (1) {
3615                rde_param_i_state_push_2 (p);
3616                sequence_237 (p);
3617                if (rde_param_i_kleene_close(p)) return;
3618            }
3619            return;
3620        }
3621        
3622        static void sequence_237 (RDE_PARAM p) {
3623           /*
3624            * x
3625            *     !
3626            *         (APOSTROPH)
3627            *     (Char)
3628            */
3629        
3630            rde_param_i_state_push_void (p);
3631            notahead_234 (p);
3632            if (rde_param_i_seq_void2value(p)) return;
3633            sym_Char (p);
3634            rde_param_i_state_merge_value (p);
3635            return;
3636        }
3637        
3638        static void notahead_234 (RDE_PARAM p) {
3639           /*
3640            * !
3641            *     (APOSTROPH)
3642            */
3643        
3644            rde_param_i_loc_push (p);
3645            sym_APOSTROPH (p);
3646            rde_param_i_notahead_exit (p);
3647            return;
3648        }
3649        
3650        static void sequence_256 (RDE_PARAM p) {
3651           /*
3652            * x
3653            *     (DAPOSTROPH)
3654            *     *
3655            *         x
3656            *             !
3657            *                 (DAPOSTROPH)
3658            *             (Char)
3659            *     (DAPOSTROPH)
3660            *     (WHITESPACE)
3661            */
3662        
3663            rde_param_i_state_push_void (p);
3664            sym_DAPOSTROPH (p);
3665            if (rde_param_i_seq_void2value(p)) return;
3666            kleene_252 (p);
3667            if (rde_param_i_seq_value2value(p)) return;
3668            sym_DAPOSTROPH (p);
3669            if (rde_param_i_seq_value2value(p)) return;
3670            sym_WHITESPACE (p);
3671            rde_param_i_state_merge_value (p);
3672            return;
3673        }
3674        
3675        static void kleene_252 (RDE_PARAM p) {
3676           /*
3677            * *
3678            *     x
3679            *         !
3680            *             (DAPOSTROPH)
3681            *         (Char)
3682            */
3683        
3684            while (1) {
3685                rde_param_i_state_push_2 (p);
3686                sequence_250 (p);
3687                if (rde_param_i_kleene_close(p)) return;
3688            }
3689            return;
3690        }
3691        
3692        static void sequence_250 (RDE_PARAM p) {
3693           /*
3694            * x
3695            *     !
3696            *         (DAPOSTROPH)
3697            *     (Char)
3698            */
3699        
3700            rde_param_i_state_push_void (p);
3701            notahead_247 (p);
3702            if (rde_param_i_seq_void2value(p)) return;
3703            sym_Char (p);
3704            rde_param_i_state_merge_value (p);
3705            return;
3706        }
3707        
3708        static void notahead_247 (RDE_PARAM p) {
3709           /*
3710            * !
3711            *     (DAPOSTROPH)
3712            */
3713        
3714            rde_param_i_loc_push (p);
3715            sym_DAPOSTROPH (p);
3716            rde_param_i_notahead_exit (p);
3717            return;
3718        }
3719        
3720        /*
3721         * leaf Symbol 'LOWER'
3722         */
3723        
3724        static void sym_LOWER (RDE_PARAM p) {
3725           /*
3726            * x
3727            *     "<lower>"
3728            *     (WHITESPACE)
3729            */
3730        
3731            if (rde_param_i_symbol_start (p, 103)) return ;
3732            sequence_263 (p);
3733            rde_param_i_symbol_done_leaf (p, 103, 102);
3734            return;
3735        }
3736        
3737        static void sequence_263 (RDE_PARAM p) {
3738           /*
3739            * x
3740            *     "<lower>"
3741            *     (WHITESPACE)
3742            */
3743        
3744            rde_param_i_state_push_void (p);
3745            rde_param_i_next_str (p, "<lower>", 101);
3746            if (rde_param_i_seq_void2void(p)) return;
3747            sym_WHITESPACE (p);
3748            rde_param_i_state_merge_void (p);
3749            return;
3750        }
3751        
3752        /*
3753         * leaf Symbol 'NOT'
3754         */
3755        
3756        static void sym_NOT (RDE_PARAM p) {
3757           /*
3758            * x
3759            *     '!'
3760            *     (WHITESPACE)
3761            */
3762        
3763            if (rde_param_i_symbol_start (p, 106)) return ;
3764            sequence_268 (p);
3765            rde_param_i_symbol_done_leaf (p, 106, 105);
3766            return;
3767        }
3768        
3769        static void sequence_268 (RDE_PARAM p) {
3770           /*
3771            * x
3772            *     '!'
3773            *     (WHITESPACE)
3774            */
3775        
3776            rde_param_i_state_push_void (p);
3777            rde_param_i_next_char (p, "!", 104);
3778            if (rde_param_i_seq_void2void(p)) return;
3779            sym_WHITESPACE (p);
3780            rde_param_i_state_merge_void (p);
3781            return;
3782        }
3783        
3784        /*
3785         * void Symbol 'OPEN'
3786         */
3787        
3788        static void sym_OPEN (RDE_PARAM p) {
3789           /*
3790            * x
3791            *     '\('
3792            *     (WHITESPACE)
3793            */
3794        
3795            if (rde_param_i_symbol_void_start (p, 109)) return ;
3796            sequence_273 (p);
3797            rde_param_i_symbol_done_void (p, 109, 108);
3798            return;
3799        }
3800        
3801        static void sequence_273 (RDE_PARAM p) {
3802           /*
3803            * x
3804            *     '\('
3805            *     (WHITESPACE)
3806            */
3807        
3808            rde_param_i_state_push_void (p);
3809            rde_param_i_next_char (p, "\50", 107);
3810            if (rde_param_i_seq_void2void(p)) return;
3811            sym_WHITESPACE (p);
3812            rde_param_i_state_merge_void (p);
3813            return;
3814        }
3815        
3816        /*
3817         * void Symbol 'OPENB'
3818         */
3819        
3820        static void sym_OPENB (RDE_PARAM p) {
3821           /*
3822            * '['
3823            */
3824        
3825            if (rde_param_i_symbol_void_start (p, 112)) return ;
3826            rde_param_i_next_char (p, "\133", 110);
3827            rde_param_i_symbol_done_void (p, 112, 111);
3828            return;
3829        }
3830        
3831        /*
3832         * void Symbol 'PEG'
3833         */
3834        
3835        static void sym_PEG (RDE_PARAM p) {
3836           /*
3837            * x
3838            *     "PEG"
3839            *     (WHITESPACE)
3840            */
3841        
3842            if (rde_param_i_symbol_void_start (p, 115)) return ;
3843            sequence_280 (p);
3844            rde_param_i_symbol_done_void (p, 115, 114);
3845            return;
3846        }
3847        
3848        static void sequence_280 (RDE_PARAM p) {
3849           /*
3850            * x
3851            *     "PEG"
3852            *     (WHITESPACE)
3853            */
3854        
3855            rde_param_i_state_push_void (p);
3856            rde_param_i_next_str (p, "PEG", 113);
3857            if (rde_param_i_seq_void2void(p)) return;
3858            sym_WHITESPACE (p);
3859            rde_param_i_state_merge_void (p);
3860            return;
3861        }
3862        
3863        /*
3864         * leaf Symbol 'PLUS'
3865         */
3866        
3867        static void sym_PLUS (RDE_PARAM p) {
3868           /*
3869            * x
3870            *     '+'
3871            *     (WHITESPACE)
3872            */
3873        
3874            if (rde_param_i_symbol_start (p, 118)) return ;
3875            sequence_285 (p);
3876            rde_param_i_symbol_done_leaf (p, 118, 117);
3877            return;
3878        }
3879        
3880        static void sequence_285 (RDE_PARAM p) {
3881           /*
3882            * x
3883            *     '+'
3884            *     (WHITESPACE)
3885            */
3886        
3887            rde_param_i_state_push_void (p);
3888            rde_param_i_next_char (p, "+", 116);
3889            if (rde_param_i_seq_void2void(p)) return;
3890            sym_WHITESPACE (p);
3891            rde_param_i_state_merge_void (p);
3892            return;
3893        }
3894        
3895        /*
3896         * value Symbol 'Prefix'
3897         */
3898        
3899        static void sym_Prefix (RDE_PARAM p) {
3900           /*
3901            * x
3902            *     ?
3903            *         /
3904            *             (AND)
3905            *             (NOT)
3906            *     (Suffix)
3907            */
3908        
3909            if (rde_param_i_symbol_start_d (p, 120)) return ;
3910            sequence_295 (p);
3911            rde_param_i_symbol_done_d_reduce (p, 120, 119);
3912            return;
3913        }
3914        
3915        static void sequence_295 (RDE_PARAM p) {
3916           /*
3917            * x
3918            *     ?
3919            *         /
3920            *             (AND)
3921            *             (NOT)
3922            *     (Suffix)
3923            */
3924        
3925            rde_param_i_state_push_value (p);
3926            optional_292 (p);
3927            if (rde_param_i_seq_value2value(p)) return;
3928            sym_Suffix (p);
3929            rde_param_i_state_merge_value (p);
3930            return;
3931        }
3932        
3933        static void optional_292 (RDE_PARAM p) {
3934           /*
3935            * ?
3936            *     /
3937            *         (AND)
3938            *         (NOT)
3939            */
3940        
3941            rde_param_i_state_push_2 (p);
3942            choice_290 (p);
3943            rde_param_i_state_merge_ok (p);
3944            return;
3945        }
3946        
3947        static void choice_290 (RDE_PARAM p) {
3948           /*
3949            * /
3950            *     (AND)
3951            *     (NOT)
3952            */
3953        
3954            rde_param_i_state_push_value (p);
3955            sym_AND (p);
3956            if (rde_param_i_bra_value2value(p)) return;
3957            sym_NOT (p);
3958            rde_param_i_state_merge_value (p);
3959            return;
3960        }
3961        
3962        /*
3963         * value Symbol 'Primary'
3964         */
3965        
3966        static void sym_Primary (RDE_PARAM p) {
3967           /*
3968            * /
3969            *     (ALNUM)
3970            *     (ALPHA)
3971            *     (ASCII)
3972            *     (CONTROL)
3973            *     (DDIGIT)
3974            *     (DIGIT)
3975            *     (GRAPH)
3976            *     (LOWER)
3977            *     (PRINTABLE)
3978            *     (PUNCT)
3979            *     (SPACE)
3980            *     (UPPER)
3981            *     (WORDCHAR)
3982            *     (XDIGIT)
3983            *     (Identifier)
3984            *     x
3985            *         (OPEN)
3986            *         (Expression)
3987            *         (CLOSE)
3988            *     (Literal)
3989            *     (Class)
3990            *     (DOT)
3991            */
3992        
3993            if (rde_param_i_symbol_start_d (p, 122)) return ;
3994            choice_321 (p);
3995            rde_param_i_symbol_done_d_reduce (p, 122, 121);
3996            return;
3997        }
3998        
3999        static void choice_321 (RDE_PARAM p) {
4000           /*
4001            * /
4002            *     (ALNUM)
4003            *     (ALPHA)
4004            *     (ASCII)
4005            *     (CONTROL)
4006            *     (DDIGIT)
4007            *     (DIGIT)
4008            *     (GRAPH)
4009            *     (LOWER)
4010            *     (PRINTABLE)
4011            *     (PUNCT)
4012            *     (SPACE)
4013            *     (UPPER)
4014            *     (WORDCHAR)
4015            *     (XDIGIT)
4016            *     (Identifier)
4017            *     x
4018            *         (OPEN)
4019            *         (Expression)
4020            *         (CLOSE)
4021            *     (Literal)
4022            *     (Class)
4023            *     (DOT)
4024            */
4025        
4026            rde_param_i_state_push_value (p);
4027            sym_ALNUM (p);
4028            if (rde_param_i_bra_value2value(p)) return;
4029            sym_ALPHA (p);
4030            if (rde_param_i_bra_value2value(p)) return;
4031            sym_ASCII (p);
4032            if (rde_param_i_bra_value2value(p)) return;
4033            sym_CONTROL (p);
4034            if (rde_param_i_bra_value2value(p)) return;
4035            sym_DDIGIT (p);
4036            if (rde_param_i_bra_value2value(p)) return;
4037            sym_DIGIT (p);
4038            if (rde_param_i_bra_value2value(p)) return;
4039            sym_GRAPH (p);
4040            if (rde_param_i_bra_value2value(p)) return;
4041            sym_LOWER (p);
4042            if (rde_param_i_bra_value2value(p)) return;
4043            sym_PRINTABLE (p);
4044            if (rde_param_i_bra_value2value(p)) return;
4045            sym_PUNCT (p);
4046            if (rde_param_i_bra_value2value(p)) return;
4047            sym_SPACE (p);
4048            if (rde_param_i_bra_value2value(p)) return;
4049            sym_UPPER (p);
4050            if (rde_param_i_bra_value2value(p)) return;
4051            sym_WORDCHAR (p);
4052            if (rde_param_i_bra_value2value(p)) return;
4053            sym_XDIGIT (p);
4054            if (rde_param_i_bra_value2value(p)) return;
4055            sym_Identifier (p);
4056            if (rde_param_i_bra_value2value(p)) return;
4057            sequence_316 (p);
4058            if (rde_param_i_bra_value2value(p)) return;
4059            sym_Literal (p);
4060            if (rde_param_i_bra_value2value(p)) return;
4061            sym_Class (p);
4062            if (rde_param_i_bra_value2value(p)) return;
4063            sym_DOT (p);
4064            rde_param_i_state_merge_value (p);
4065            return;
4066        }
4067        
4068        static void sequence_316 (RDE_PARAM p) {
4069           /*
4070            * x
4071            *     (OPEN)
4072            *     (Expression)
4073            *     (CLOSE)
4074            */
4075        
4076            rde_param_i_state_push_void (p);
4077            sym_OPEN (p);
4078            if (rde_param_i_seq_void2value(p)) return;
4079            sym_Expression (p);
4080            if (rde_param_i_seq_value2value(p)) return;
4081            sym_CLOSE (p);
4082            rde_param_i_state_merge_value (p);
4083            return;
4084        }
4085        
4086        /*
4087         * leaf Symbol 'PRINTABLE'
4088         */
4089        
4090        static void sym_PRINTABLE (RDE_PARAM p) {
4091           /*
4092            * x
4093            *     "<print>"
4094            *     (WHITESPACE)
4095            */
4096        
4097            if (rde_param_i_symbol_start (p, 125)) return ;
4098            sequence_326 (p);
4099            rde_param_i_symbol_done_leaf (p, 125, 124);
4100            return;
4101        }
4102        
4103        static void sequence_326 (RDE_PARAM p) {
4104           /*
4105            * x
4106            *     "<print>"
4107            *     (WHITESPACE)
4108            */
4109        
4110            rde_param_i_state_push_void (p);
4111            rde_param_i_next_str (p, "<print>", 123);
4112            if (rde_param_i_seq_void2void(p)) return;
4113            sym_WHITESPACE (p);
4114            rde_param_i_state_merge_void (p);
4115            return;
4116        }
4117        
4118        /*
4119         * leaf Symbol 'PUNCT'
4120         */
4121        
4122        static void sym_PUNCT (RDE_PARAM p) {
4123           /*
4124            * x
4125            *     "<punct>"
4126            *     (WHITESPACE)
4127            */
4128        
4129            if (rde_param_i_symbol_start (p, 128)) return ;
4130            sequence_331 (p);
4131            rde_param_i_symbol_done_leaf (p, 128, 127);
4132            return;
4133        }
4134        
4135        static void sequence_331 (RDE_PARAM p) {
4136           /*
4137            * x
4138            *     "<punct>"
4139            *     (WHITESPACE)
4140            */
4141        
4142            rde_param_i_state_push_void (p);
4143            rde_param_i_next_str (p, "<punct>", 126);
4144            if (rde_param_i_seq_void2void(p)) return;
4145            sym_WHITESPACE (p);
4146            rde_param_i_state_merge_void (p);
4147            return;
4148        }
4149        
4150        /*
4151         * leaf Symbol 'QUESTION'
4152         */
4153        
4154        static void sym_QUESTION (RDE_PARAM p) {
4155           /*
4156            * x
4157            *     '?'
4158            *     (WHITESPACE)
4159            */
4160        
4161            if (rde_param_i_symbol_start (p, 131)) return ;
4162            sequence_336 (p);
4163            rde_param_i_symbol_done_leaf (p, 131, 130);
4164            return;
4165        }
4166        
4167        static void sequence_336 (RDE_PARAM p) {
4168           /*
4169            * x
4170            *     '?'
4171            *     (WHITESPACE)
4172            */
4173        
4174            rde_param_i_state_push_void (p);
4175            rde_param_i_next_char (p, "?", 129);
4176            if (rde_param_i_seq_void2void(p)) return;
4177            sym_WHITESPACE (p);
4178            rde_param_i_state_merge_void (p);
4179            return;
4180        }
4181        
4182        /*
4183         * value Symbol 'Range'
4184         */
4185        
4186        static void sym_Range (RDE_PARAM p) {
4187           /*
4188            * /
4189            *     x
4190            *         (Char)
4191            *         (TO)
4192            *         (Char)
4193            *     (Char)
4194            */
4195        
4196            if (rde_param_i_symbol_start_d (p, 133)) return ;
4197            choice_345 (p);
4198            rde_param_i_symbol_done_d_reduce (p, 133, 132);
4199            return;
4200        }
4201        
4202        static void choice_345 (RDE_PARAM p) {
4203           /*
4204            * /
4205            *     x
4206            *         (Char)
4207            *         (TO)
4208            *         (Char)
4209            *     (Char)
4210            */
4211        
4212            rde_param_i_state_push_value (p);
4213            sequence_342 (p);
4214            if (rde_param_i_bra_value2value(p)) return;
4215            sym_Char (p);
4216            rde_param_i_state_merge_value (p);
4217            return;
4218        }
4219        
4220        static void sequence_342 (RDE_PARAM p) {
4221           /*
4222            * x
4223            *     (Char)
4224            *     (TO)
4225            *     (Char)
4226            */
4227        
4228            rde_param_i_state_push_value (p);
4229            sym_Char (p);
4230            if (rde_param_i_seq_value2value(p)) return;
4231            sym_TO (p);
4232            if (rde_param_i_seq_value2value(p)) return;
4233            sym_Char (p);
4234            rde_param_i_state_merge_value (p);
4235            return;
4236        }
4237        
4238        /*
4239         * void Symbol 'SEMICOLON'
4240         */
4241        
4242        static void sym_SEMICOLON (RDE_PARAM p) {
4243           /*
4244            * x
4245            *     ';'
4246            *     (WHITESPACE)
4247            */
4248        
4249            if (rde_param_i_symbol_void_start (p, 136)) return ;
4250            sequence_350 (p);
4251            rde_param_i_symbol_done_void (p, 136, 135);
4252            return;
4253        }
4254        
4255        static void sequence_350 (RDE_PARAM p) {
4256           /*
4257            * x
4258            *     ';'
4259            *     (WHITESPACE)
4260            */
4261        
4262            rde_param_i_state_push_void (p);
4263            rde_param_i_next_char (p, "\73", 134);
4264            if (rde_param_i_seq_void2void(p)) return;
4265            sym_WHITESPACE (p);
4266            rde_param_i_state_merge_void (p);
4267            return;
4268        }
4269        
4270        /*
4271         * value Symbol 'Sequence'
4272         */
4273        
4274        static void sym_Sequence (RDE_PARAM p) {
4275           /*
4276            * +
4277            *     (Prefix)
4278            */
4279        
4280            if (rde_param_i_symbol_start_d (p, 138)) return ;
4281            poskleene_354 (p);
4282            rde_param_i_symbol_done_d_reduce (p, 138, 137);
4283            return;
4284        }
4285        
4286        static void poskleene_354 (RDE_PARAM p) {
4287           /*
4288            * +
4289            *     (Prefix)
4290            */
4291        
4292            rde_param_i_loc_push (p);
4293            sym_Prefix (p);
4294            if (rde_param_i_kleene_abort(p)) return;
4295            while (1) {
4296                rde_param_i_state_push_2 (p);
4297                sym_Prefix (p);
4298                if (rde_param_i_kleene_close(p)) return;
4299            }
4300            return;
4301        }
4302        
4303        /*
4304         * void Symbol 'SLASH'
4305         */
4306        
4307        static void sym_SLASH (RDE_PARAM p) {
4308           /*
4309            * x
4310            *     '/'
4311            *     (WHITESPACE)
4312            */
4313        
4314            if (rde_param_i_symbol_void_start (p, 141)) return ;
4315            sequence_359 (p);
4316            rde_param_i_symbol_done_void (p, 141, 140);
4317            return;
4318        }
4319        
4320        static void sequence_359 (RDE_PARAM p) {
4321           /*
4322            * x
4323            *     '/'
4324            *     (WHITESPACE)
4325            */
4326        
4327            rde_param_i_state_push_void (p);
4328            rde_param_i_next_char (p, "/", 139);
4329            if (rde_param_i_seq_void2void(p)) return;
4330            sym_WHITESPACE (p);
4331            rde_param_i_state_merge_void (p);
4332            return;
4333        }
4334        
4335        /*
4336         * leaf Symbol 'SPACE'
4337         */
4338        
4339        static void sym_SPACE (RDE_PARAM p) {
4340           /*
4341            * x
4342            *     "<space>"
4343            *     (WHITESPACE)
4344            */
4345        
4346            if (rde_param_i_symbol_start (p, 144)) return ;
4347            sequence_364 (p);
4348            rde_param_i_symbol_done_leaf (p, 144, 143);
4349            return;
4350        }
4351        
4352        static void sequence_364 (RDE_PARAM p) {
4353           /*
4354            * x
4355            *     "<space>"
4356            *     (WHITESPACE)
4357            */
4358        
4359            rde_param_i_state_push_void (p);
4360            rde_param_i_next_str (p, "<space>", 142);
4361            if (rde_param_i_seq_void2void(p)) return;
4362            sym_WHITESPACE (p);
4363            rde_param_i_state_merge_void (p);
4364            return;
4365        }
4366        
4367        /*
4368         * leaf Symbol 'STAR'
4369         */
4370        
4371        static void sym_STAR (RDE_PARAM p) {
4372           /*
4373            * x
4374            *     '*'
4375            *     (WHITESPACE)
4376            */
4377        
4378            if (rde_param_i_symbol_start (p, 147)) return ;
4379            sequence_369 (p);
4380            rde_param_i_symbol_done_leaf (p, 147, 146);
4381            return;
4382        }
4383        
4384        static void sequence_369 (RDE_PARAM p) {
4385           /*
4386            * x
4387            *     '*'
4388            *     (WHITESPACE)
4389            */
4390        
4391            rde_param_i_state_push_void (p);
4392            rde_param_i_next_char (p, "*", 145);
4393            if (rde_param_i_seq_void2void(p)) return;
4394            sym_WHITESPACE (p);
4395            rde_param_i_state_merge_void (p);
4396            return;
4397        }
4398        
4399        /*
4400         * value Symbol 'StartExpr'
4401         */
4402        
4403        static void sym_StartExpr (RDE_PARAM p) {
4404           /*
4405            * x
4406            *     (OPEN)
4407            *     (Expression)
4408            *     (CLOSE)
4409            */
4410        
4411            if (rde_param_i_symbol_start_d (p, 149)) return ;
4412            sequence_316 (p);
4413            rde_param_i_symbol_done_d_reduce (p, 149, 148);
4414            return;
4415        }
4416        
4417        /*
4418         * value Symbol 'Suffix'
4419         */
4420        
4421        static void sym_Suffix (RDE_PARAM p) {
4422           /*
4423            * x
4424            *     (Primary)
4425            *     ?
4426            *         /
4427            *             (QUESTION)
4428            *             (STAR)
4429            *             (PLUS)
4430            */
4431        
4432            if (rde_param_i_symbol_start_d (p, 151)) return ;
4433            sequence_385 (p);
4434            rde_param_i_symbol_done_d_reduce (p, 151, 150);
4435            return;
4436        }
4437        
4438        static void sequence_385 (RDE_PARAM p) {
4439           /*
4440            * x
4441            *     (Primary)
4442            *     ?
4443            *         /
4444            *             (QUESTION)
4445            *             (STAR)
4446            *             (PLUS)
4447            */
4448        
4449            rde_param_i_state_push_value (p);
4450            sym_Primary (p);
4451            if (rde_param_i_seq_value2value(p)) return;
4452            optional_383 (p);
4453            rde_param_i_state_merge_value (p);
4454            return;
4455        }
4456        
4457        static void optional_383 (RDE_PARAM p) {
4458           /*
4459            * ?
4460            *     /
4461            *         (QUESTION)
4462            *         (STAR)
4463            *         (PLUS)
4464            */
4465        
4466            rde_param_i_state_push_2 (p);
4467            choice_381 (p);
4468            rde_param_i_state_merge_ok (p);
4469            return;
4470        }
4471        
4472        static void choice_381 (RDE_PARAM p) {
4473           /*
4474            * /
4475            *     (QUESTION)
4476            *     (STAR)
4477            *     (PLUS)
4478            */
4479        
4480            rde_param_i_state_push_value (p);
4481            sym_QUESTION (p);
4482            if (rde_param_i_bra_value2value(p)) return;
4483            sym_STAR (p);
4484            if (rde_param_i_bra_value2value(p)) return;
4485            sym_PLUS (p);
4486            rde_param_i_state_merge_value (p);
4487            return;
4488        }
4489        
4490        /*
4491         * void Symbol 'TO'
4492         */
4493        
4494        static void sym_TO (RDE_PARAM p) {
4495           /*
4496            * '-'
4497            */
4498        
4499            if (rde_param_i_symbol_void_start (p, 154)) return ;
4500            rde_param_i_next_char (p, "-", 152);
4501            rde_param_i_symbol_done_void (p, 154, 153);
4502            return;
4503        }
4504        
4505        /*
4506         * leaf Symbol 'UPPER'
4507         */
4508        
4509        static void sym_UPPER (RDE_PARAM p) {
4510           /*
4511            * x
4512            *     "<upper>"
4513            *     (WHITESPACE)
4514            */
4515        
4516            if (rde_param_i_symbol_start (p, 157)) return ;
4517            sequence_392 (p);
4518            rde_param_i_symbol_done_leaf (p, 157, 156);
4519            return;
4520        }
4521        
4522        static void sequence_392 (RDE_PARAM p) {
4523           /*
4524            * x
4525            *     "<upper>"
4526            *     (WHITESPACE)
4527            */
4528        
4529            rde_param_i_state_push_void (p);
4530            rde_param_i_next_str (p, "<upper>", 155);
4531            if (rde_param_i_seq_void2void(p)) return;
4532            sym_WHITESPACE (p);
4533            rde_param_i_state_merge_void (p);
4534            return;
4535        }
4536        
4537        /*
4538         * leaf Symbol 'VOID'
4539         */
4540        
4541        static void sym_VOID (RDE_PARAM p) {
4542           /*
4543            * x
4544            *     "void"
4545            *     (WHITESPACE)
4546            */
4547        
4548            if (rde_param_i_symbol_start (p, 160)) return ;
4549            sequence_397 (p);
4550            rde_param_i_symbol_done_leaf (p, 160, 159);
4551            return;
4552        }
4553        
4554        static void sequence_397 (RDE_PARAM p) {
4555           /*
4556            * x
4557            *     "void"
4558            *     (WHITESPACE)
4559            */
4560        
4561            rde_param_i_state_push_void (p);
4562            rde_param_i_next_str (p, "void", 158);
4563            if (rde_param_i_seq_void2void(p)) return;
4564            sym_WHITESPACE (p);
4565            rde_param_i_state_merge_void (p);
4566            return;
4567        }
4568        
4569        /*
4570         * void Symbol 'WHITESPACE'
4571         */
4572        
4573        static void sym_WHITESPACE (RDE_PARAM p) {
4574           /*
4575            * *
4576            *     /
4577            *         <space>
4578            *         (COMMENT)
4579            */
4580        
4581            if (rde_param_i_symbol_void_start (p, 163)) return ;
4582            kleene_404 (p);
4583            rde_param_i_symbol_done_void (p, 163, 162);
4584            return;
4585        }
4586        
4587        static void kleene_404 (RDE_PARAM p) {
4588           /*
4589            * *
4590            *     /
4591            *         <space>
4592            *         (COMMENT)
4593            */
4594        
4595            while (1) {
4596                rde_param_i_state_push_2 (p);
4597                choice_402 (p);
4598                if (rde_param_i_kleene_close(p)) return;
4599            }
4600            return;
4601        }
4602        
4603        static void choice_402 (RDE_PARAM p) {
4604           /*
4605            * /
4606            *     <space>
4607            *     (COMMENT)
4608            */
4609        
4610            rde_param_i_state_push_void (p);
4611            rde_param_i_next_space (p, 161);
4612            if (rde_param_i_bra_void2void(p)) return;
4613            sym_COMMENT (p);
4614            rde_param_i_state_merge_void (p);
4615            return;
4616        }
4617        
4618        /*
4619         * leaf Symbol 'WORDCHAR'
4620         */
4621        
4622        static void sym_WORDCHAR (RDE_PARAM p) {
4623           /*
4624            * x
4625            *     "<wordchar>"
4626            *     (WHITESPACE)
4627            */
4628        
4629            if (rde_param_i_symbol_start (p, 166)) return ;
4630            sequence_409 (p);
4631            rde_param_i_symbol_done_leaf (p, 166, 165);
4632            return;
4633        }
4634        
4635        static void sequence_409 (RDE_PARAM p) {
4636           /*
4637            * x
4638            *     "<wordchar>"
4639            *     (WHITESPACE)
4640            */
4641        
4642            rde_param_i_state_push_void (p);
4643            rde_param_i_next_str (p, "<wordchar>", 164);
4644            if (rde_param_i_seq_void2void(p)) return;
4645            sym_WHITESPACE (p);
4646            rde_param_i_state_merge_void (p);
4647            return;
4648        }
4649        
4650        /*
4651         * leaf Symbol 'XDIGIT'
4652         */
4653        
4654        static void sym_XDIGIT (RDE_PARAM p) {
4655           /*
4656            * x
4657            *     "<xdigit>"
4658            *     (WHITESPACE)
4659            */
4660        
4661            if (rde_param_i_symbol_start (p, 169)) return ;
4662            sequence_414 (p);
4663            rde_param_i_symbol_done_leaf (p, 169, 168);
4664            return;
4665        }
4666        
4667        static void sequence_414 (RDE_PARAM p) {
4668           /*
4669            * x
4670            *     "<xdigit>"
4671            *     (WHITESPACE)
4672            */
4673        
4674            rde_param_i_state_push_void (p);
4675            rde_param_i_next_str (p, "<xdigit>", 167);
4676            if (rde_param_i_seq_void2void(p)) return;
4677            sym_WHITESPACE (p);
4678            rde_param_i_state_merge_void (p);
4679            return;
4680        }
4681        
4682    }
4683
4684    ## END of GENERATED CODE. DO NOT EDIT.
4685    # # ## ### ###### ######## #############
4686
4687    # # ## ### ###### ######## #############
4688    ## Global PARSER management, per interp
4689
4690    critcl::ccode {
4691	/* -*- c -*- */
4692
4693	typedef struct PARSERg {
4694	    long int counter;
4695	    char     buf [50];
4696	} PARSERg;
4697
4698	static void
4699	PARSERgRelease (ClientData cd, Tcl_Interp* interp)
4700	{
4701	    ckfree((char*) cd);
4702	}
4703
4704	static const char*
4705	PARSERnewName (Tcl_Interp* interp)
4706	{
4707#define KEY "tcllib/parser/PACKAGE/critcl"
4708
4709	    Tcl_InterpDeleteProc* proc = PARSERgRelease;
4710	    PARSERg*                  parserg;
4711
4712	    parserg = Tcl_GetAssocData (interp, KEY, &proc);
4713	    if (parserg  == NULL) {
4714		parserg = (PARSERg*) ckalloc (sizeof (PARSERg));
4715		parserg->counter = 0;
4716
4717		Tcl_SetAssocData (interp, KEY, proc,
4718				  (ClientData) parserg);
4719	    }
4720
4721	    parserg->counter ++;
4722	    sprintf (parserg->buf, "PARSER%d", parserg->counter);
4723	    return parserg->buf;
4724#undef  KEY
4725	}
4726
4727	static void
4728	PARSERdeleteCmd (ClientData clientData)
4729	{
4730	    /*
4731	     * Release the whole PARSER
4732	     * (Low-level engine only actually).
4733	     */
4734	    rde_param_del ((RDE_PARAM) clientData);
4735	}
4736    }
4737
4738    # # ## ### ##### ######## #############
4739    ## Functions implementing the object methods, and helper.
4740
4741    critcl::ccode {
4742	static int  COMPLETE (RDE_PARAM p, Tcl_Interp* interp);
4743
4744	static int parser_PARSE  (RDE_PARAM p, Tcl_Interp* interp, int objc, Tcl_Obj* CONST* objv)
4745	{
4746	    int mode;
4747	    Tcl_Channel chan;
4748
4749	    if (objc != 3) {
4750		Tcl_WrongNumArgs (interp, 2, objv, "chan");
4751		return TCL_ERROR;
4752	    }
4753
4754	    chan = Tcl_GetChannel(interp,
4755				  Tcl_GetString (objv[2]),
4756				  &mode);
4757
4758	    if (!chan) {
4759		return TCL_ERROR;
4760	    }
4761
4762	    rde_param_reset (p, chan);
4763	    MAIN (p) ; /* Entrypoint for the generated code. */
4764	    return COMPLETE (p, interp);
4765	}
4766
4767	static int parser_PARSET (RDE_PARAM p, Tcl_Interp* interp, int objc, Tcl_Obj* CONST* objv)
4768	{
4769	    char* buf;
4770	    int   len;
4771
4772	    if (objc != 3) {
4773		Tcl_WrongNumArgs (interp, 2, objv, "text");
4774		return TCL_ERROR;
4775	    }
4776
4777	    buf = Tcl_GetStringFromObj (objv[2], &len);
4778
4779	    rde_param_reset (p, NULL);
4780	    rde_param_data  (p, buf, len);
4781	    MAIN (p) ; /* Entrypoint for the generated code. */
4782	    return COMPLETE (p, interp);
4783	}
4784
4785	static int COMPLETE (RDE_PARAM p, Tcl_Interp* interp)
4786	{
4787	    if (rde_param_query_st (p)) {
4788		long int  ac;
4789		Tcl_Obj** av;
4790
4791		rde_param_query_ast (p, &ac, &av);
4792
4793		if (ac > 1) {
4794		    long int  lsc;
4795		    long int* lsv;
4796		    Tcl_Obj** lv = NALLOC (3+ac, Tcl_Obj*);
4797
4798		    rde_param_query_ls (p, &lsc, &lsv);
4799
4800		    memcpy(lv + 3, av, ac * sizeof (Tcl_Obj*));
4801		    lv [0] = Tcl_NewObj ();
4802		    lv [1] = Tcl_NewIntObj (1 + lsv [lsc-1]);
4803		    lv [2] = Tcl_NewIntObj (rde_param_query_cl (p));
4804
4805		    Tcl_SetObjResult (interp, Tcl_NewListObj (3, lv));
4806		    ckfree ((char*) lv);
4807		} else {
4808		    Tcl_SetObjResult (interp, av [0]);
4809		}
4810
4811		return TCL_OK;
4812	    } else {
4813		Tcl_Obj* xv [1];
4814		const ERROR_STATE* er = rde_param_query_er (p);
4815		Tcl_Obj* res = rde_param_query_er_tcl (p, er);
4816
4817		xv [0] = Tcl_NewStringObj ("pt::rde",-1);
4818		Tcl_ListObjReplace(interp, res, 0, 1, 1, xv);
4819
4820		Tcl_SetObjResult (interp, res);
4821		return TCL_ERROR;
4822	    }
4823	}
4824    }
4825
4826    # # ## ### ##### ######## #############
4827    ## Object command, method dispatch.
4828
4829    critcl::ccode {
4830	static int parser_objcmd (ClientData cd, Tcl_Interp* interp, int objc, Tcl_Obj* CONST* objv)
4831	{
4832	    RDE_PARAM p = (RDE_PARAM) cd;
4833	    int m, res;
4834
4835	    static CONST char* methods [] = {
4836		"destroy", "parse", "parset", NULL
4837	    };
4838	    enum methods {
4839		M_DESTROY, M_PARSE, M_PARSET
4840	    };
4841
4842	    if (objc < 2) {
4843		Tcl_WrongNumArgs (interp, objc, objv, "option ?arg arg ...?");
4844		return TCL_ERROR;
4845	    } else if (Tcl_GetIndexFromObj (interp, objv [1], methods, "option",
4846					    0, &m) != TCL_OK) {
4847		return TCL_ERROR;
4848	    }
4849
4850	    /* Dispatch to methods. They check the #args in
4851	     * detail before performing the requested
4852	     * functionality
4853	     */
4854
4855	    switch (m) {
4856		case M_DESTROY:
4857		    if (objc != 2) {
4858			Tcl_WrongNumArgs (interp, 2, objv, NULL);
4859			return TCL_ERROR;
4860		    }
4861
4862		Tcl_DeleteCommandFromToken(interp, (Tcl_Command) rde_param_query_clientdata (p));
4863		return TCL_OK;
4864
4865		case M_PARSE:	res = parser_PARSE  (p, interp, objc, objv); break;
4866		case M_PARSET:	res = parser_PARSET (p, interp, objc, objv); break;
4867		default:
4868		/* Not coming to this place */
4869		ASSERT (0,"Reached unreachable location");
4870	    }
4871
4872	    return res;
4873	}
4874    }
4875
4876    # # ## ### ##### ######## #############
4877    # Class command, i.e. object construction.
4878
4879    critcl::ccommand PARSER_critcl {dummy interp objc objv} {
4880	/*
4881	 * Syntax: No arguments beyond the name
4882	 */
4883
4884	RDE_PARAM   parser;
4885	CONST char* name;
4886	Tcl_Obj*    fqn;
4887	Tcl_CmdInfo ci;
4888	Tcl_Command c;
4889
4890#define USAGE "?name?"
4891
4892	if ((objc != 2) && (objc != 1)) {
4893	    Tcl_WrongNumArgs (interp, 1, objv, USAGE);
4894	    return TCL_ERROR;
4895	}
4896
4897	if (objc < 2) {
4898	    name = PARSERnewName (interp);
4899	} else {
4900	    name = Tcl_GetString (objv [1]);
4901	}
4902
4903	if (!Tcl_StringMatch (name, "::*")) {
4904	    /* Relative name. Prefix with current namespace */
4905
4906	    Tcl_Eval (interp, "namespace current");
4907	    fqn = Tcl_GetObjResult (interp);
4908	    fqn = Tcl_DuplicateObj (fqn);
4909	    Tcl_IncrRefCount (fqn);
4910
4911	    if (!Tcl_StringMatch (Tcl_GetString (fqn), "::")) {
4912		Tcl_AppendToObj (fqn, "::", -1);
4913	    }
4914	    Tcl_AppendToObj (fqn, name, -1);
4915	} else {
4916	    fqn = Tcl_NewStringObj (name, -1);
4917	    Tcl_IncrRefCount (fqn);
4918	}
4919	Tcl_ResetResult (interp);
4920
4921	if (Tcl_GetCommandInfo (interp,
4922				Tcl_GetString (fqn),
4923				&ci)) {
4924	    Tcl_Obj* err;
4925
4926	    err = Tcl_NewObj ();
4927	    Tcl_AppendToObj    (err, "command \"", -1);
4928	    Tcl_AppendObjToObj (err, fqn);
4929	    Tcl_AppendToObj    (err, "\" already exists", -1);
4930
4931	    Tcl_DecrRefCount (fqn);
4932	    Tcl_SetObjResult (interp, err);
4933	    return TCL_ERROR;
4934	}
4935
4936	parser = rde_param_new (sizeof(p_string)/sizeof(char*), (char**) p_string);
4937	c = Tcl_CreateObjCommand (interp, Tcl_GetString (fqn),
4938				  parser_objcmd, (ClientData) parser,
4939				  PARSERdeleteCmd);
4940	rde_param_clientdata (parser, (ClientData) c);
4941	Tcl_SetObjResult (interp, fqn);
4942	Tcl_DecrRefCount (fqn);
4943	return TCL_OK;
4944    }
4945
4946    ##
4947    # # ## ### ##### ######## #############
4948}
4949
4950# # ## ### ##### ######## ############# #####################
4951## Ready (Note: Our package provide is at the top).
4952return
4953