Volksdata 1.0b10
RDF library
Loading...
Searching...
No Matches
grammar_nt.c
Go to the documentation of this file.
1/* This file is automatically generated by Lemon from input grammar
2** source file "grammar_nt.y". */
10
12#line 38 "../../build/grammar_nt.c"
13/**************** End of %include directives **********************************/
14/* These constants specify the various numeric values for terminal symbols.
15***************** Begin token definitions *************************************/
16#ifndef T_EOF
17#define T_EOF 1
18#define T_DOT 2
19#define T_IRIREF 3
20#define T_BNODE 4
21#define T_LITERAL 5
22#define T_EOL 6
23#define T_WS 7
24#endif
25/**************** End token definitions ***************************************/
26
27/* The next sections is a series of control #defines.
28** various aspects of the generated parser.
29** YYCODETYPE is the data type used to store the integer codes
30** that represent terminal and non-terminal symbols.
31** "unsigned char" is used if there are fewer than
32** 256 symbols. Larger types otherwise.
33** YYNOCODE is a number of type YYCODETYPE that is not used for
34** any terminal or nonterminal symbol.
35** YYFALLBACK If defined, this indicates that one or more tokens
36** (also known as: "terminal symbols") have fall-back
37** values which should be used if the original symbol
38** would not parse. This permits keywords to sometimes
39** be used as identifiers, for example.
40** YYACTIONTYPE is the data type used for "action codes" - numbers
41** that indicate what to do in response to the next
42** token.
43** NTParseTOKENTYPE is the data type used for minor type for terminal
44** symbols. Background: A "minor type" is a semantic
45** value associated with a terminal or non-terminal
46** symbols. For example, for an "ID" terminal symbol,
47** the minor type might be the name of the identifier.
48** Each non-terminal can have a different minor type.
49** Terminal symbols all have the same minor type, though.
50** This macros defines the minor type for terminal
51** symbols.
52** YYMINORTYPE is the data type used for all minor types.
53** This is typically a union of many types, one of
54** which is NTParseTOKENTYPE. The entry in the union
55** for terminal symbols is called "yy0".
56** YYSTACKDEPTH is the maximum depth of the parser's stack. If
57** zero the stack is dynamically sized using realloc()
58** NTParseARG_SDECL A static variable declaration for the %extra_argument
59** NTParseARG_PDECL A parameter declaration for the %extra_argument
60** NTParseARG_PARAM Code to pass %extra_argument as a subroutine parameter
61** NTParseARG_STORE Code to store %extra_argument into yypParser
62** NTParseARG_FETCH Code to extract %extra_argument from yypParser
63** NTParseCTX_* As NTParseARG_ except for %extra_context
64** YYERRORSYMBOL is the code number of the error symbol. If not
65** defined, then do no error processing.
66** YYNSTATE the combined number of states.
67** YYNRULE the number of rules in the grammar
68** YYNTOKEN Number of terminal symbols
69** YY_MAX_SHIFT Maximum value for shift actions
70** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
71** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
72** YY_ERROR_ACTION The yy_action[] code for syntax error
73** YY_ACCEPT_ACTION The yy_action[] code for accept
74** YY_NO_ACTION The yy_action[] code for no-op
75** YY_MIN_REDUCE Minimum value for reduce actions
76** YY_MAX_REDUCE Maximum value for reduce actions
77*/
78#ifndef INTERFACE
79# define INTERFACE 1
80#endif
81/************* Begin control #defines *****************************************/
82#define YYCODETYPE unsigned char
83#define YYNOCODE 16
84#define YYACTIONTYPE unsigned char
85#define NTParseTOKENTYPE VOLK_Term *
86typedef union {
87 int yyinit;
89 void * yy17;
93#ifndef YYSTACKDEPTH
94#define YYSTACKDEPTH 100
95#endif
96#define NTParseARG_SDECL VOLK_GraphIterator *it ;
97#define NTParseARG_PDECL , VOLK_GraphIterator *it
98#define NTParseARG_PARAM ,it
99#define NTParseARG_FETCH VOLK_GraphIterator *it =yypParser->it ;
100#define NTParseARG_STORE yypParser->it =it ;
101#define NTParseCTX_SDECL
102#define NTParseCTX_PDECL
103#define NTParseCTX_PARAM
104#define NTParseCTX_FETCH
105#define NTParseCTX_STORE
106#define YYNSTATE 15
107#define YYNRULE 15
108#define YYNRULE_WITH_ACTION 1
109#define YYNTOKEN 8
110#define YY_MAX_SHIFT 14
111#define YY_MIN_SHIFTREDUCE 25
112#define YY_MAX_SHIFTREDUCE 39
113#define YY_ERROR_ACTION 40
114#define YY_ACCEPT_ACTION 41
115#define YY_NO_ACTION 42
116#define YY_MIN_REDUCE 43
117#define YY_MAX_REDUCE 57
118/************* End control #defines *******************************************/
119#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
120
121/* Define the yytestcase() macro to be a no-op if is not already defined
122** otherwise.
123**
124** Applications can choose to define yytestcase() in the %include section
125** to a macro that can assist in verifying code coverage. For production
126** code the yytestcase() macro should be turned off. But it is useful
127** for testing.
128*/
129#ifndef yytestcase
130# define yytestcase(X)
131#endif
132
133
134/* Next are the tables used to determine what action to take based on the
135** current state and lookahead token. These tables are used to implement
136** functions that take a state number and lookahead value and return an
137** action integer.
138**
139** Suppose the action integer is N. Then the action is determined as
140** follows
141**
142** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead
143** token onto the stack and goto state N.
144**
145** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then
146** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE.
147**
148** N == YY_ERROR_ACTION A syntax error has occurred.
149**
150** N == YY_ACCEPT_ACTION The parser accepts its input.
151**
152** N == YY_NO_ACTION No such action. Denotes unused
153** slots in the yy_action[] table.
154**
155** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
156** and YY_MAX_REDUCE
157**
158** The action table is constructed as a single large table named yy_action[].
159** Given state S and lookahead X, the action is computed as either:
160**
161** (A) N = yy_action[ yy_shift_ofst[S] + X ]
162** (B) N = yy_default[S]
163**
164** The (A) formula is preferred. The B formula is used instead if
165** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
166**
167** The formulas above are for computing the action when the lookahead is
168** a terminal symbol. If the lookahead is a non-terminal (as occurs after
169** a reduce action) then the yy_reduce_ofst[] array is used in place of
170** the yy_shift_ofst[] array.
171**
172** The following are the tables generated in this section:
173**
174** yy_action[] A single table containing all actions.
175** yy_lookahead[] A table containing the lookahead for each entry in
176** yy_action. Used to detect hash collisions.
177** yy_shift_ofst[] For each state, the offset into yy_action for
178** shifting terminals.
179** yy_reduce_ofst[] For each state, the offset into yy_action for
180** shifting non-terminals after a reduce.
181** yy_default[] Default action for each state.
182**
183*********** Begin parsing tables **********************************************/
184#define YY_ACTTAB_COUNT (31)
185static const YYACTIONTYPE yy_action[] = {
186 /* 0 */ 41, 1, 11, 4, 3, 33, 34, 35, 14, 36,
187 /* 10 */ 39, 9, 3, 5, 39, 30, 31, 8, 10, 36,
188 /* 20 */ 32, 39, 12, 2, 37, 25, 44, 42, 7, 6,
189 /* 30 */ 13,
190};
191static const YYCODETYPE yy_lookahead[] = {
192 /* 0 */ 8, 9, 10, 11, 12, 3, 4, 5, 1, 6,
193 /* 10 */ 7, 11, 12, 15, 7, 3, 4, 13, 10, 6,
194 /* 20 */ 3, 7, 12, 12, 6, 2, 0, 16, 12, 14,
195 /* 30 */ 10, 16, 16, 16, 16, 8, 8, 8, 8,
196};
197#define YY_SHIFT_COUNT (14)
198#define YY_SHIFT_MIN (0)
199#define YY_SHIFT_MAX (26)
200static const unsigned char yy_shift_ofst[] = {
201 /* 0 */ 3, 7, 2, 12, 13, 14, 14, 17, 14, 13,
202 /* 10 */ 18, 18, 23, 18, 26,
203};
204#define YY_REDUCE_COUNT (9)
205#define YY_REDUCE_MIN (-8)
206#define YY_REDUCE_MAX (20)
207static const signed char yy_reduce_ofst[] = {
208 /* 0 */ -8, 0, -2, 4, 8, 10, 11, 15, 16, 20,
209};
210static const YYACTIONTYPE yy_default[] = {
211 /* 0 */ 56, 56, 40, 40, 40, 56, 56, 40, 56, 40,
212 /* 10 */ 46, 45, 40, 47, 40,
213};
214/********** End of lemon-generated parsing tables *****************************/
215
216/* The next table maps tokens (terminal symbols) into fallback tokens.
217** If a construct like the following:
218**
219** %fallback ID X Y Z.
220**
221** appears in the grammar, then ID becomes a fallback token for X, Y,
222** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
223** but it does not parse, the type of the token is changed to ID and
224** the parse is retried before an error is thrown.
225**
226** This feature can be used, for example, to cause some keywords in a language
227** to revert to identifiers if they keyword does not apply in the context where
228** it appears.
229*/
230#ifdef YYFALLBACK
231static const YYCODETYPE yyFallback[] = {
232};
233#endif /* YYFALLBACK */
234
235/* The following structure represents a single element of the
236** parser's stack. Information stored includes:
237**
238** + The state number for the parser at this level of the stack.
239**
240** + The value of the token stored at this level of the stack.
241** (In other words, the "major" token.)
242**
243** + The semantic value stored at this level of the stack. This is
244** the information used by the action routines in the grammar.
245** It is sometimes called the "minor" token.
246**
247** After the "shift" half of a SHIFTREDUCE action, the stateno field
248** actually contains the reduce action for the second half of the
249** SHIFTREDUCE.
250*/
251struct yyStackEntry {
252 YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */
253 YYCODETYPE major; /* The major token value. This is the code
254 ** number for the token at this stack level */
255 YYMINORTYPE minor; /* The user-supplied minor token value. This
256 ** is the value of the token */
257};
258typedef struct yyStackEntry yyStackEntry;
259
260/* The state of the parser is completely contained in an instance of
261** the following structure */
262struct yyParser {
263 yyStackEntry *yytos; /* Pointer to top element of the stack */
264#ifdef YYTRACKMAXSTACKDEPTH
265 int yyhwm; /* High-water mark of the stack */
266#endif
267#ifndef YYNOERRORRECOVERY
268 int yyerrcnt; /* Shifts left before out of the error */
269#endif
270 NTParseARG_SDECL /* A place to hold %extra_argument */
271 NTParseCTX_SDECL /* A place to hold %extra_context */
272#if YYSTACKDEPTH<=0
273 int yystksz; /* Current side of the stack */
274 yyStackEntry *yystack; /* The parser's stack */
275 yyStackEntry yystk0; /* First stack entry */
276#else
277 yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
278 yyStackEntry *yystackEnd; /* Last entry in the stack */
279#endif
280};
281typedef struct yyParser yyParser;
282
283#include <assert.h>
284#ifndef NDEBUG
285#include <stdio.h>
286static FILE *yyTraceFILE = 0;
287static char *yyTracePrompt = 0;
288#endif /* NDEBUG */
289
290#ifndef NDEBUG
291/*
292** Turn parser tracing on by giving a stream to which to write the trace
293** and a prompt to preface each trace message. Tracing is turned off
294** by making either argument NULL
295**
296** Inputs:
297** <ul>
298** <li> A FILE* to which trace output should be written.
299** If NULL, then tracing is turned off.
300** <li> A prefix string written at the beginning of every
301** line of trace output. If NULL, then tracing is
302** turned off.
303** </ul>
304**
305** Outputs:
306** None.
307*/
308void NTParseTrace(FILE *TraceFILE, char *zTracePrompt){
309 yyTraceFILE = TraceFILE;
310 yyTracePrompt = zTracePrompt;
311 if( yyTraceFILE==0 ) yyTracePrompt = 0;
312 else if( yyTracePrompt==0 ) yyTraceFILE = 0;
313}
314#endif /* NDEBUG */
315
316#if defined(YYCOVERAGE) || !defined(NDEBUG)
317/* For tracing shifts, the names of all terminals and nonterminals
318** are required. The following table supplies these names */
319static const char *const yyTokenName[] = {
320 /* 0 */ "$",
321 /* 1 */ "EOF",
322 /* 2 */ "DOT",
323 /* 3 */ "IRIREF",
324 /* 4 */ "BNODE",
325 /* 5 */ "LITERAL",
326 /* 6 */ "EOL",
327 /* 7 */ "WS",
328 /* 8 */ "ntriplesDoc",
329 /* 9 */ "statements",
330 /* 10 */ "eol",
331 /* 11 */ "triple",
332 /* 12 */ "ws",
333 /* 13 */ "subject",
334 /* 14 */ "predicate",
335 /* 15 */ "object",
336};
337#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
338
339#ifndef NDEBUG
340/* For tracing reduce actions, the names of all rules are required.
341*/
342static const char *const yyRuleName[] = {
343 /* 0 */ "triple ::= ws subject ws predicate ws object ws DOT",
344 /* 1 */ "ntriplesDoc ::= statements EOF",
345 /* 2 */ "statements ::= eol",
346 /* 3 */ "statements ::= triple eol",
347 /* 4 */ "statements ::= statements triple eol",
348 /* 5 */ "subject ::= IRIREF",
349 /* 6 */ "subject ::= BNODE",
350 /* 7 */ "predicate ::= IRIREF",
351 /* 8 */ "object ::= IRIREF",
352 /* 9 */ "object ::= BNODE",
353 /* 10 */ "object ::= LITERAL",
354 /* 11 */ "eol ::= EOL",
355 /* 12 */ "eol ::= eol EOL",
356 /* 13 */ "ws ::=",
357 /* 14 */ "ws ::= WS",
358};
359#endif /* NDEBUG */
360
361
362#if YYSTACKDEPTH<=0
363/*
364** Try to increase the size of the parser stack. Return the number
365** of errors. Return 0 on success.
366*/
367static int yyGrowStack(yyParser *p){
368 int newSize;
369 int idx;
370 yyStackEntry *pNew;
371
372 newSize = p->yystksz*2 + 100;
373 idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
374 if( p->yystack==&p->yystk0 ){
375 pNew = malloc(newSize*sizeof(pNew[0]));
376 if( pNew ) pNew[0] = p->yystk0;
377 }else{
378 pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
379 }
380 if( pNew ){
381 p->yystack = pNew;
382 p->yytos = &p->yystack[idx];
383#ifndef NDEBUG
384 if( yyTraceFILE ){
385 fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
386 yyTracePrompt, p->yystksz, newSize);
387 }
388#endif
389 p->yystksz = newSize;
390 }
391 return pNew==0;
392}
393#endif
394
395/* Datatype of the argument to the memory allocated passed as the
396** second argument to NTParseAlloc() below. This can be changed by
397** putting an appropriate #define in the %include section of the input
398** grammar.
399*/
400#ifndef YYMALLOCARGTYPE
401# define YYMALLOCARGTYPE size_t
402#endif
403
404/* Initialize a new parser that has already been allocated.
405*/
406void NTParseInit(void *yypRawParser NTParseCTX_PDECL){
407 yyParser *yypParser = (yyParser*)yypRawParser;
409#ifdef YYTRACKMAXSTACKDEPTH
410 yypParser->yyhwm = 0;
411#endif
412#if YYSTACKDEPTH<=0
413 yypParser->yytos = NULL;
414 yypParser->yystack = NULL;
415 yypParser->yystksz = 0;
416 if( yyGrowStack(yypParser) ){
417 yypParser->yystack = &yypParser->yystk0;
418 yypParser->yystksz = 1;
419 }
420#endif
421#ifndef YYNOERRORRECOVERY
422 yypParser->yyerrcnt = -1;
423#endif
424 yypParser->yytos = yypParser->yystack;
425 yypParser->yystack[0].stateno = 0;
426 yypParser->yystack[0].major = 0;
427#if YYSTACKDEPTH>0
428 yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
429#endif
430}
431
432#ifndef NTParse_ENGINEALWAYSONSTACK
433/*
434** This function allocates a new parser.
435** The only argument is a pointer to a function which works like
436** malloc.
437**
438** Inputs:
439** A pointer to the function used to allocate memory.
440**
441** Outputs:
442** A pointer to a parser. This pointer is used in subsequent calls
443** to NTParse and NTParseFree.
444*/
446 yyParser *yypParser;
447 yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
448 if( yypParser ){
450 NTParseInit(yypParser NTParseCTX_PARAM);
451 }
452 return (void*)yypParser;
453}
454#endif /* NTParse_ENGINEALWAYSONSTACK */
455
456
457/* The following function deletes the "minor type" or semantic value
458** associated with a symbol. The symbol can be either a terminal
459** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
460** a pointer to the value to be deleted. The code used to do the
461** deletions is derived from the %destructor and/or %token_destructor
462** directives of the input grammar.
463*/
464static void yy_destructor(
465 yyParser *yypParser, /* The parser */
466 YYCODETYPE yymajor, /* Type code for object to destroy */
467 YYMINORTYPE *yypminor /* The object to be destroyed */
468){
471 switch( yymajor ){
472 /* Here is inserted the actions which take place when a
473 ** terminal or non-terminal is destroyed. This can happen
474 ** when the symbol is popped from the stack during a
475 ** reduce or during error processing or when a parser is
476 ** being destroyed before it is finished parsing.
477 **
478 ** Note: during a reduce, the only symbols destroyed are those
479 ** which appear on the RHS of the rule, but which are *not* used
480 ** inside the C code.
481 */
482/********* Begin destructor definitions ***************************************/
483 case 11: /* triple */
484{
485#line 32 "grammar_nt.y"
486 VOLK_triple_free ((yypminor->yy18));
487#line 512 "../../build/grammar_nt.c"
488}
489 break;
490 case 13: /* subject */
491 case 14: /* predicate */
492 case 15: /* object */
493{
494#line 39 "grammar_nt.y"
495 (void)it; VOLK_term_free ((yypminor->yy22));
496#line 521 "../../build/grammar_nt.c"
497}
498 break;
499/********* End destructor definitions *****************************************/
500 default: break; /* If no destructor action specified: do nothing */
501 }
502}
503
504/*
505** Pop the parser's stack once.
506**
507** If there is a destructor routine associated with the token which
508** is popped from the stack, then call it.
509*/
510static void yy_pop_parser_stack(yyParser *pParser){
512 assert( pParser->yytos!=0 );
513 assert( pParser->yytos > pParser->yystack );
514 yytos = pParser->yytos--;
515#ifndef NDEBUG
516 if( yyTraceFILE ){
517 fprintf(yyTraceFILE,"%sPopping %s\n",
518 yyTracePrompt,
519 yyTokenName[yytos->major]);
520 }
521#endif
522 yy_destructor(pParser, yytos->major, &yytos->minor);
523}
524
525/*
526** Clear all secondary memory allocations from the parser
527*/
528void NTParseFinalize(void *p){
529 yyParser *pParser = (yyParser*)p;
530 while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
531#if YYSTACKDEPTH<=0
532 if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
533#endif
534}
535
536#ifndef NTParse_ENGINEALWAYSONSTACK
537/*
538** Deallocate and destroy a parser. Destructors are called for
539** all stack elements before shutting the parser down.
540**
541** If the YYPARSEFREENEVERNULL macro exists (for example because it
542** is defined in a %include section of the input grammar) then it is
543** assumed that the input pointer is never NULL.
544*/
546 void *p, /* The parser to be deleted */
547 void (*freeProc)(void*) /* Function used to reclaim memory */
548){
549#ifndef YYPARSEFREENEVERNULL
550 if( p==0 ) return;
551#endif
553 (*freeProc)(p);
554}
555#endif /* NTParse_ENGINEALWAYSONSTACK */
556
557/*
558** Return the peak depth of the stack for a parser.
559*/
560#ifdef YYTRACKMAXSTACKDEPTH
561int NTParseStackPeak(void *p){
562 yyParser *pParser = (yyParser*)p;
563 return pParser->yyhwm;
564}
565#endif
566
567/* This array of booleans keeps track of the parser statement
568** coverage. The element yycoverage[X][Y] is set when the parser
569** is in state X and has a lookahead token Y. In a well-tested
570** systems, every element of this matrix should end up being set.
571*/
572#if defined(YYCOVERAGE)
573static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
574#endif
575
576/*
577** Write into out a description of every state/lookahead combination that
578**
579** (1) has not been used by the parser, and
580** (2) is not a syntax error.
581**
582** Return the number of missed state/lookahead combinations.
583*/
584#if defined(YYCOVERAGE)
585int NTParseCoverage(FILE *out){
586 int stateno, iLookAhead, i;
587 int nMissed = 0;
588 for(stateno=0; stateno<YYNSTATE; stateno++){
589 i = yy_shift_ofst[stateno];
590 for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
591 if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
592 if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
593 if( out ){
594 fprintf(out,"State %d lookahead %s %s\n", stateno,
595 yyTokenName[iLookAhead],
596 yycoverage[stateno][iLookAhead] ? "ok" : "missed");
597 }
598 }
599 }
600 return nMissed;
601}
602#endif
603
604/*
605** Find the appropriate action for a parser given the terminal
606** look-ahead token iLookAhead.
607*/
608static YYACTIONTYPE yy_find_shift_action(
609 YYCODETYPE iLookAhead, /* The look-ahead token */
610 YYACTIONTYPE stateno /* Current state number */
611){
612 int i;
613
614 if( stateno>YY_MAX_SHIFT ) return stateno;
615 assert( stateno <= YY_SHIFT_COUNT );
616#if defined(YYCOVERAGE)
617 yycoverage[stateno][iLookAhead] = 1;
618#endif
619 do{
620 i = yy_shift_ofst[stateno];
621 assert( i>=0 );
622 assert( i<=YY_ACTTAB_COUNT );
623 assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
624 assert( iLookAhead!=YYNOCODE );
625 assert( iLookAhead < YYNTOKEN );
626 i += iLookAhead;
627 assert( i<(int)YY_NLOOKAHEAD );
628 if( yy_lookahead[i]!=iLookAhead ){
629#ifdef YYFALLBACK
630 YYCODETYPE iFallback; /* Fallback token */
631 assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
632 iFallback = yyFallback[iLookAhead];
633 if( iFallback!=0 ){
634#ifndef NDEBUG
635 if( yyTraceFILE ){
636 fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
637 yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
638 }
639#endif
640 assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
641 iLookAhead = iFallback;
642 continue;
643 }
644#endif
645#ifdef YYWILDCARD
646 {
647 int j = i - iLookAhead + YYWILDCARD;
648 assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
649 if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
650#ifndef NDEBUG
651 if( yyTraceFILE ){
652 fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
653 yyTracePrompt, yyTokenName[iLookAhead],
654 yyTokenName[YYWILDCARD]);
655 }
656#endif /* NDEBUG */
657 return yy_action[j];
658 }
659 }
660#endif /* YYWILDCARD */
661 return yy_default[stateno];
662 }else{
663 assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
664 return yy_action[i];
665 }
666 }while(1);
667}
668
669/*
670** Find the appropriate action for a parser given the non-terminal
671** look-ahead token iLookAhead.
672*/
673static YYACTIONTYPE yy_find_reduce_action(
674 YYACTIONTYPE stateno, /* Current state number */
675 YYCODETYPE iLookAhead /* The look-ahead token */
676){
677 int i;
678#ifdef YYERRORSYMBOL
679 if( stateno>YY_REDUCE_COUNT ){
680 return yy_default[stateno];
681 }
682#else
683 assert( stateno<=YY_REDUCE_COUNT );
684#endif
685 i = yy_reduce_ofst[stateno];
686 assert( iLookAhead!=YYNOCODE );
687 i += iLookAhead;
688#ifdef YYERRORSYMBOL
689 if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
690 return yy_default[stateno];
691 }
692#else
693 assert( i>=0 && i<YY_ACTTAB_COUNT );
694 assert( yy_lookahead[i]==iLookAhead );
695#endif
696 return yy_action[i];
697}
698
699/*
700** The following routine is called if the stack overflows.
701*/
702static void yyStackOverflow(yyParser *yypParser){
705#ifndef NDEBUG
706 if( yyTraceFILE ){
707 fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
708 }
709#endif
710 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
711 /* Here code is inserted which will execute if the parser
712 ** stack every overflows */
713/******** Begin %stack_overflow code ******************************************/
714/******** End %stack_overflow code ********************************************/
715 NTParseARG_STORE /* Suppress warning about unused %extra_argument var */
717}
718
719/*
720** Print tracing information for a SHIFT action
721*/
722#ifndef NDEBUG
723static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
724 if( yyTraceFILE ){
725 if( yyNewState<YYNSTATE ){
726 fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
727 yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
728 yyNewState);
729 }else{
730 fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
731 yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
732 yyNewState - YY_MIN_REDUCE);
733 }
734 }
735}
736#else
737# define yyTraceShift(X,Y,Z)
738#endif
739
740/*
741** Perform a shift action.
742*/
743static void yy_shift(
744 yyParser *yypParser, /* The parser to be shifted */
745 YYACTIONTYPE yyNewState, /* The new state to shift in */
746 YYCODETYPE yyMajor, /* The major token to shift in */
747 NTParseTOKENTYPE yyMinor /* The minor token to shift in */
748){
750 yypParser->yytos++;
751#ifdef YYTRACKMAXSTACKDEPTH
752 if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
753 yypParser->yyhwm++;
754 assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
755 }
756#endif
757#if YYSTACKDEPTH>0
758 if( yypParser->yytos>yypParser->yystackEnd ){
759 yypParser->yytos--;
760 yyStackOverflow(yypParser);
761 return;
762 }
763#else
764 if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
765 if( yyGrowStack(yypParser) ){
766 yypParser->yytos--;
767 yyStackOverflow(yypParser);
768 return;
769 }
770 }
771#endif
772 if( yyNewState > YY_MAX_SHIFT ){
773 yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
774 }
775 yytos = yypParser->yytos;
776 yytos->stateno = yyNewState;
777 yytos->major = yyMajor;
778 yytos->minor.yy0 = yyMinor;
779 yyTraceShift(yypParser, yyNewState, "Shift");
780}
781
782/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
783** of that rule */
784static const YYCODETYPE yyRuleInfoLhs[] = {
785 11, /* (0) triple ::= ws subject ws predicate ws object ws DOT */
786 8, /* (1) ntriplesDoc ::= statements EOF */
787 9, /* (2) statements ::= eol */
788 9, /* (3) statements ::= triple eol */
789 9, /* (4) statements ::= statements triple eol */
790 13, /* (5) subject ::= IRIREF */
791 13, /* (6) subject ::= BNODE */
792 14, /* (7) predicate ::= IRIREF */
793 15, /* (8) object ::= IRIREF */
794 15, /* (9) object ::= BNODE */
795 15, /* (10) object ::= LITERAL */
796 10, /* (11) eol ::= EOL */
797 10, /* (12) eol ::= eol EOL */
798 12, /* (13) ws ::= */
799 12, /* (14) ws ::= WS */
800};
801
802/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
803** of symbols on the right-hand side of that rule. */
804static const signed char yyRuleInfoNRhs[] = {
805 -8, /* (0) triple ::= ws subject ws predicate ws object ws DOT */
806 -2, /* (1) ntriplesDoc ::= statements EOF */
807 -1, /* (2) statements ::= eol */
808 -2, /* (3) statements ::= triple eol */
809 -3, /* (4) statements ::= statements triple eol */
810 -1, /* (5) subject ::= IRIREF */
811 -1, /* (6) subject ::= BNODE */
812 -1, /* (7) predicate ::= IRIREF */
813 -1, /* (8) object ::= IRIREF */
814 -1, /* (9) object ::= BNODE */
815 -1, /* (10) object ::= LITERAL */
816 -1, /* (11) eol ::= EOL */
817 -2, /* (12) eol ::= eol EOL */
818 0, /* (13) ws ::= */
819 -1, /* (14) ws ::= WS */
820};
821
822static void yy_accept(yyParser*); /* Forward Declaration */
823
824/*
825** Perform a reduce action and the shift that must immediately
826** follow the reduce.
827**
828** The yyLookahead and yyLookaheadToken parameters provide reduce actions
829** access to the lookahead token (if any). The yyLookahead will be YYNOCODE
830** if the lookahead token has already been consumed. As this procedure is
831** only called from one place, optimizing compilers will in-line it, which
832** means that the extra parameters have no performance impact.
833*/
834static YYACTIONTYPE yy_reduce(
835 yyParser *yypParser, /* The parser */
836 unsigned int yyruleno, /* Number of the rule by which to reduce */
837 int yyLookahead, /* Lookahead token, or YYNOCODE if none */
838 NTParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */
839 NTParseCTX_PDECL /* %extra_context */
840){
841 int yygoto; /* The next state */
842 YYACTIONTYPE yyact; /* The next action */
843 yyStackEntry *yymsp; /* The top of the parser's stack */
844 int yysize; /* Amount to pop the stack */
846 (void)yyLookahead;
847 (void)yyLookaheadToken;
848 yymsp = yypParser->yytos;
849
850 switch( yyruleno ){
851 /* Beginning here are the reduction cases. A typical example
852 ** follows:
853 ** case 0:
854 ** #line <lineno> <grammarfile>
855 ** { ... } // User supplied code
856 ** #line <lineno> <thisfile>
857 ** break;
858 */
859/********** Begin reduce actions **********************************************/
860 case 0: /* triple ::= ws subject ws predicate ws object ws DOT */
861#line 33 "grammar_nt.y"
862{
863 yymsp[-7].minor.yy18 = VOLK_triple_new (yymsp[-6].minor.yy22, yymsp[-4].minor.yy22, yymsp[-2].minor.yy22);
864 VOLK_graph_add_iter (it, yymsp[-7].minor.yy18);
865 }
866#line 891 "../../build/grammar_nt.c"
867 break;
868 case 3: /* statements ::= triple eol */
869{ yy_destructor(yypParser,11,&yymsp[-1].minor);
870#line 28 "grammar_nt.y"
871{
872}
873#line 898 "../../build/grammar_nt.c"
874}
875 break;
876 case 4: /* statements ::= statements triple eol */
877#line 29 "grammar_nt.y"
878{
879}
880#line 905 "../../build/grammar_nt.c"
881 yy_destructor(yypParser,11,&yymsp[-1].minor);
882 break;
883 default:
884 /* (1) ntriplesDoc ::= statements EOF */ yytestcase(yyruleno==1);
885 /* (2) statements ::= eol */ yytestcase(yyruleno==2);
886 /* (5) subject ::= IRIREF */ yytestcase(yyruleno==5);
887 /* (6) subject ::= BNODE */ yytestcase(yyruleno==6);
888 /* (7) predicate ::= IRIREF */ yytestcase(yyruleno==7);
889 /* (8) object ::= IRIREF */ yytestcase(yyruleno==8);
890 /* (9) object ::= BNODE */ yytestcase(yyruleno==9);
891 /* (10) object ::= LITERAL */ yytestcase(yyruleno==10);
892 /* (11) eol ::= EOL */ yytestcase(yyruleno==11);
893 /* (12) eol ::= eol EOL */ yytestcase(yyruleno==12);
894 /* (13) ws ::= */ yytestcase(yyruleno==13);
895 /* (14) ws ::= WS */ yytestcase(yyruleno==14);
896 break;
897/********** End reduce actions ************************************************/
898 };
899 assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
900 yygoto = yyRuleInfoLhs[yyruleno];
901 yysize = yyRuleInfoNRhs[yyruleno];
902 yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
903
904 /* There are no SHIFTREDUCE actions on nonterminals because the table
905 ** generator has simplified them to pure REDUCE actions. */
906 assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );
907
908 /* It is not possible for a REDUCE to be followed by an error */
909 assert( yyact!=YY_ERROR_ACTION );
910
911 yymsp += yysize+1;
912 yypParser->yytos = yymsp;
913 yymsp->stateno = (YYACTIONTYPE)yyact;
914 yymsp->major = (YYCODETYPE)yygoto;
915 yyTraceShift(yypParser, yyact, "... then shift");
916 return yyact;
917}
918
919/*
920** The following code executes when the parse fails
921*/
922#ifndef YYNOERRORRECOVERY
923static void yy_parse_failed(
924 yyParser *yypParser /* The parser */
925){
928#ifndef NDEBUG
929 if( yyTraceFILE ){
930 fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
931 }
932#endif
933 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
934 /* Here code is inserted which will be executed whenever the
935 ** parser fails */
936/************ Begin %parse_failure code ***************************************/
937/************ End %parse_failure code *****************************************/
938 NTParseARG_STORE /* Suppress warning about unused %extra_argument variable */
940}
941#endif /* YYNOERRORRECOVERY */
942
943/*
944** The following code executes when a syntax error first occurs.
945*/
946static void yy_syntax_error(
947 yyParser *yypParser, /* The parser */
948 int yymajor, /* The major type of the error token */
949 NTParseTOKENTYPE yyminor /* The minor type of the error token */
950){
953#define TOKEN yyminor
954/************ Begin %syntax_error code ****************************************/
955/************ End %syntax_error code ******************************************/
956 NTParseARG_STORE /* Suppress warning about unused %extra_argument variable */
958}
959
960/*
961** The following is executed when the parser accepts
962*/
963static void yy_accept(
964 yyParser *yypParser /* The parser */
965){
968#ifndef NDEBUG
969 if( yyTraceFILE ){
970 fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
971 }
972#endif
973#ifndef YYNOERRORRECOVERY
974 yypParser->yyerrcnt = -1;
975#endif
976 assert( yypParser->yytos==yypParser->yystack );
977 /* Here code is inserted which will be executed whenever the
978 ** parser accepts */
979/*********** Begin %parse_accept code *****************************************/
980/*********** End %parse_accept code *******************************************/
981 NTParseARG_STORE /* Suppress warning about unused %extra_argument variable */
983}
984
985/* The main parser program.
986** The first argument is a pointer to a structure obtained from
987** "NTParseAlloc" which describes the current state of the parser.
988** The second argument is the major token number. The third is
989** the minor token. The fourth optional argument is whatever the
990** user wants (and specified in the grammar) and is available for
991** use by the action routines.
992**
993** Inputs:
994** <ul>
995** <li> A pointer to the parser (an opaque structure.)
996** <li> The major token number.
997** <li> The minor token number.
998** <li> An option argument of a grammar-specified type.
999** </ul>
1000**
1001** Outputs:
1002** None.
1003*/
1005 void *yyp, /* The parser */
1006 int yymajor, /* The major token code number */
1007 NTParseTOKENTYPE yyminor /* The value for the token */
1008 NTParseARG_PDECL /* Optional %extra_argument parameter */
1009){
1010 YYMINORTYPE yyminorunion;
1011 YYACTIONTYPE yyact; /* The parser action. */
1012#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
1013 int yyendofinput; /* True if we are at the end of input */
1014#endif
1015#ifdef YYERRORSYMBOL
1016 int yyerrorhit = 0; /* True if yymajor has invoked an error */
1017#endif
1018 yyParser *yypParser = (yyParser*)yyp; /* The parser */
1021
1022 assert( yypParser->yytos!=0 );
1023#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
1024 yyendofinput = (yymajor==0);
1025#endif
1026
1027 yyact = yypParser->yytos->stateno;
1028#ifndef NDEBUG
1029 if( yyTraceFILE ){
1030 if( yyact < YY_MIN_REDUCE ){
1031 fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
1032 yyTracePrompt,yyTokenName[yymajor],yyact);
1033 }else{
1034 fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
1035 yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
1036 }
1037 }
1038#endif
1039
1040 while(1){ /* Exit by "break" */
1041 assert( yypParser->yytos>=yypParser->yystack );
1042 assert( yyact==yypParser->yytos->stateno );
1043 yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
1044 if( yyact >= YY_MIN_REDUCE ){
1045 unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
1046#ifndef NDEBUG
1047 assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
1048 if( yyTraceFILE ){
1049 int yysize = yyRuleInfoNRhs[yyruleno];
1050 if( yysize ){
1051 fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
1052 yyTracePrompt,
1053 yyruleno, yyRuleName[yyruleno],
1054 yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
1055 yypParser->yytos[yysize].stateno);
1056 }else{
1057 fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
1058 yyTracePrompt, yyruleno, yyRuleName[yyruleno],
1059 yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
1060 }
1061 }
1062#endif /* NDEBUG */
1063
1064 /* Check that the stack is large enough to grow by a single entry
1065 ** if the RHS of the rule is empty. This ensures that there is room
1066 ** enough on the stack to push the LHS value */
1067 if( yyRuleInfoNRhs[yyruleno]==0 ){
1068#ifdef YYTRACKMAXSTACKDEPTH
1069 if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
1070 yypParser->yyhwm++;
1071 assert( yypParser->yyhwm ==
1072 (int)(yypParser->yytos - yypParser->yystack));
1073 }
1074#endif
1075#if YYSTACKDEPTH>0
1076 if( yypParser->yytos>=yypParser->yystackEnd ){
1077 yyStackOverflow(yypParser);
1078 break;
1079 }
1080#else
1081 if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
1082 if( yyGrowStack(yypParser) ){
1083 yyStackOverflow(yypParser);
1084 break;
1085 }
1086 }
1087#endif
1088 }
1089 yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor NTParseCTX_PARAM);
1090 }else if( yyact <= YY_MAX_SHIFTREDUCE ){
1091 yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
1092#ifndef YYNOERRORRECOVERY
1093 yypParser->yyerrcnt--;
1094#endif
1095 break;
1096 }else if( yyact==YY_ACCEPT_ACTION ){
1097 yypParser->yytos--;
1098 yy_accept(yypParser);
1099 return;
1100 }else{
1101 assert( yyact == YY_ERROR_ACTION );
1102 yyminorunion.yy0 = yyminor;
1103#ifdef YYERRORSYMBOL
1104 int yymx;
1105#endif
1106#ifndef NDEBUG
1107 if( yyTraceFILE ){
1108 fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
1109 }
1110#endif
1111#ifdef YYERRORSYMBOL
1112 /* A syntax error has occurred.
1113 ** The response to an error depends upon whether or not the
1114 ** grammar defines an error token "ERROR".
1115 **
1116 ** This is what we do if the grammar does define ERROR:
1117 **
1118 ** * Call the %syntax_error function.
1119 **
1120 ** * Begin popping the stack until we enter a state where
1121 ** it is legal to shift the error symbol, then shift
1122 ** the error symbol.
1123 **
1124 ** * Set the error count to three.
1125 **
1126 ** * Begin accepting and shifting new tokens. No new error
1127 ** processing will occur until three tokens have been
1128 ** shifted successfully.
1129 **
1130 */
1131 if( yypParser->yyerrcnt<0 ){
1132 yy_syntax_error(yypParser,yymajor,yyminor);
1133 }
1134 yymx = yypParser->yytos->major;
1135 if( yymx==YYERRORSYMBOL || yyerrorhit ){
1136#ifndef NDEBUG
1137 if( yyTraceFILE ){
1138 fprintf(yyTraceFILE,"%sDiscard input token %s\n",
1139 yyTracePrompt,yyTokenName[yymajor]);
1140 }
1141#endif
1142 yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
1143 yymajor = YYNOCODE;
1144 }else{
1145 while( yypParser->yytos > yypParser->yystack ){
1146 yyact = yy_find_reduce_action(yypParser->yytos->stateno,
1147 YYERRORSYMBOL);
1148 if( yyact<=YY_MAX_SHIFTREDUCE ) break;
1149 yy_pop_parser_stack(yypParser);
1150 }
1151 if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
1152 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
1153 yy_parse_failed(yypParser);
1154#ifndef YYNOERRORRECOVERY
1155 yypParser->yyerrcnt = -1;
1156#endif
1157 yymajor = YYNOCODE;
1158 }else if( yymx!=YYERRORSYMBOL ){
1159 yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
1160 }
1161 }
1162 yypParser->yyerrcnt = 3;
1163 yyerrorhit = 1;
1164 if( yymajor==YYNOCODE ) break;
1165 yyact = yypParser->yytos->stateno;
1166#elif defined(YYNOERRORRECOVERY)
1167 /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
1168 ** do any kind of error recovery. Instead, simply invoke the syntax
1169 ** error routine and continue going as if nothing had happened.
1170 **
1171 ** Applications can set this macro (for example inside %include) if
1172 ** they intend to abandon the parse upon the first syntax error seen.
1173 */
1174 yy_syntax_error(yypParser,yymajor, yyminor);
1175 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
1176 break;
1177#else /* YYERRORSYMBOL is not defined */
1178 /* This is what we do if the grammar does not define ERROR:
1179 **
1180 ** * Report an error message, and throw away the input token.
1181 **
1182 ** * If the input token is $, then fail the parse.
1183 **
1184 ** As before, subsequent error messages are suppressed until
1185 ** three input tokens have been successfully shifted.
1186 */
1187 if( yypParser->yyerrcnt<=0 ){
1188 yy_syntax_error(yypParser,yymajor, yyminor);
1189 }
1190 yypParser->yyerrcnt = 3;
1191 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
1192 if( yyendofinput ){
1193 yy_parse_failed(yypParser);
1194#ifndef YYNOERRORRECOVERY
1195 yypParser->yyerrcnt = -1;
1196#endif
1197 }
1198 break;
1199#endif
1200 }
1201 }
1202#ifndef NDEBUG
1203 if( yyTraceFILE ){
1204 yyStackEntry *i;
1205 char cDiv = '[';
1206 fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
1207 for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
1208 fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
1209 cDiv = ' ';
1210 }
1211 fprintf(yyTraceFILE,"]\n");
1212 }
1213#endif
1214 return;
1215}
1216
1217/*
1218** Return the fallback token corresponding to canonical token iToken, or
1219** 0 if iToken has no fallback.
1220*/
1221int NTParseFallback(int iToken){
1222#ifdef YYFALLBACK
1223 assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
1224 return yyFallback[iToken];
1225#else
1226 (void)iToken;
1227 return 0;
1228#endif
1229}
#define YYCODETYPE
Definition grammar_nq.c:82
#define YYACTIONTYPE
Definition grammar_nq.c:84
#define YYNOCODE
Definition grammar_nq.c:83
#define YY_MIN_SHIFTREDUCE
Definition grammar_nq.c:111
#define YY_ERROR_ACTION
Definition grammar_nq.c:113
#define YY_NLOOKAHEAD
Definition grammar_nq.c:119
#define YYNSTATE
Definition grammar_nq.c:106
#define YY_ACTTAB_COUNT
Definition grammar_nq.c:184
#define YY_MIN_REDUCE
Definition grammar_nq.c:116
#define YYMALLOCARGTYPE
Definition grammar_nq.c:409
#define YY_MAX_SHIFT
Definition grammar_nq.c:110
#define YY_SHIFT_COUNT
Definition grammar_nq.c:198
#define YY_REDUCE_COUNT
Definition grammar_nq.c:205
#define YY_ACCEPT_ACTION
Definition grammar_nq.c:114
#define YYNTOKEN
Definition grammar_nq.c:109
#define YY_MAX_SHIFTREDUCE
Definition grammar_nq.c:112
#define YYSTACKDEPTH
Definition grammar_nq.c:94
#define YYNRULE_WITH_ACTION
Definition grammar_nq.c:108
#define NTParseCTX_STORE
Definition grammar_nt.c:105
void NTParseTrace(FILE *TraceFILE, char *zTracePrompt)
Definition grammar_nt.c:308
#define NTParseARG_STORE
Definition grammar_nt.c:100
#define NTParseARG_PDECL
Definition grammar_nt.c:97
#define NTParseCTX_FETCH
Definition grammar_nt.c:104
#define yytestcase(X)
Definition grammar_nt.c:130
#define NTParseARG_FETCH
Definition grammar_nt.c:99
void NTParseFinalize(void *p)
Definition grammar_nt.c:528
#define NTParseARG_SDECL
Definition grammar_nt.c:96
#define NTParseCTX_PDECL
Definition grammar_nt.c:102
#define NTParseCTX_PARAM
Definition grammar_nt.c:103
int NTParseFallback(int iToken)
#define NTParseCTX_SDECL
Definition grammar_nt.c:101
#define NTParseTOKENTYPE
Definition grammar_nt.c:85
void NTParseInit(void *yypRawParser)
Definition grammar_nt.c:406
#define YYCODETYPE
#define YYACTIONTYPE
#define YYSTACKDEPTH
VOLK_Triple * VOLK_triple_new(VOLK_Term *s, VOLK_Term *p, VOLK_Term *o)
Create a new triple from three terms.
Definition term.c:455
void VOLK_term_free(VOLK_Term *term)
Definition term.c:392
void VOLK_triple_free(VOLK_Triple *spo)
Free a triple and all its internal pointers.
Definition term.c:531
VOLK_rc VOLK_graph_add_iter(VOLK_GraphIterator *it, const VOLK_Triple *spo)
Add a single triple to the store.
Definition graph.c:427
void NTParse()
void NTParseFree()
void * NTParseAlloc()
RDF term.
Definition term.h:61
RDF triple.
Definition term.h:85
yyStackEntry * yytos
Definition grammar_nq.c:265
VOLK_GraphIterator * it
Definition grammar_nt.c:270
yyStackEntry * yystackEnd
Definition grammar_nq.c:280
int yyerrcnt
Definition grammar_nq.c:270
yyStackEntry yystack[100]
Definition grammar_nq.c:279
YYMINORTYPE minor
Definition grammar_nq.c:257
unsigned char stateno
Definition grammar_nq.c:254
unsigned char major
Definition grammar_nq.c:255
VOLK_Triple * yy18
Definition grammar_nt.c:90
VOLK_Triple * yy22
Definition grammar_nq.c:90
void * yy17
Definition grammar_nt.c:89
VOLK_Term * yy0
Definition grammar_nq.c:88