Volksdata 1.0b7
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
11#include "volksdata/codec.h"
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 *
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*/
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 */ "triples",
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 ::= triples EOF",
345 /* 2 */ "triples ::= eol",
346 /* 3 */ "triples ::= triple eol",
347 /* 4 */ "triples ::= triples 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{
492#line 39 "grammar_nt.y"
493 (void)(it); VOLK_term_free ((yypminor->yy22));
494#line 519 "../../build/grammar_nt.c"
495}
496 break;
497 case 14: /* predicate */
498 case 15: /* object */
499{
500#line 44 "grammar_nt.y"
501 VOLK_term_free ((yypminor->yy22));
502#line 527 "../../build/grammar_nt.c"
503}
504 break;
505/********* End destructor definitions *****************************************/
506 default: break; /* If no destructor action specified: do nothing */
507 }
508}
509
510/*
511** Pop the parser's stack once.
512**
513** If there is a destructor routine associated with the token which
514** is popped from the stack, then call it.
515*/
516static void yy_pop_parser_stack(yyParser *pParser){
518 assert( pParser->yytos!=0 );
519 assert( pParser->yytos > pParser->yystack );
520 yytos = pParser->yytos--;
521#ifndef NDEBUG
522 if( yyTraceFILE ){
523 fprintf(yyTraceFILE,"%sPopping %s\n",
524 yyTracePrompt,
525 yyTokenName[yytos->major]);
526 }
527#endif
528 yy_destructor(pParser, yytos->major, &yytos->minor);
529}
530
531/*
532** Clear all secondary memory allocations from the parser
533*/
534void NTParseFinalize(void *p){
535 yyParser *pParser = (yyParser*)p;
536 while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
537#if YYSTACKDEPTH<=0
538 if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
539#endif
540}
541
542#ifndef NTParse_ENGINEALWAYSONSTACK
543/*
544** Deallocate and destroy a parser. Destructors are called for
545** all stack elements before shutting the parser down.
546**
547** If the YYPARSEFREENEVERNULL macro exists (for example because it
548** is defined in a %include section of the input grammar) then it is
549** assumed that the input pointer is never NULL.
550*/
552 void *p, /* The parser to be deleted */
553 void (*freeProc)(void*) /* Function used to reclaim memory */
554){
555#ifndef YYPARSEFREENEVERNULL
556 if( p==0 ) return;
557#endif
559 (*freeProc)(p);
560}
561#endif /* NTParse_ENGINEALWAYSONSTACK */
562
563/*
564** Return the peak depth of the stack for a parser.
565*/
566#ifdef YYTRACKMAXSTACKDEPTH
567int NTParseStackPeak(void *p){
568 yyParser *pParser = (yyParser*)p;
569 return pParser->yyhwm;
570}
571#endif
572
573/* This array of booleans keeps track of the parser statement
574** coverage. The element yycoverage[X][Y] is set when the parser
575** is in state X and has a lookahead token Y. In a well-tested
576** systems, every element of this matrix should end up being set.
577*/
578#if defined(YYCOVERAGE)
579static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
580#endif
581
582/*
583** Write into out a description of every state/lookahead combination that
584**
585** (1) has not been used by the parser, and
586** (2) is not a syntax error.
587**
588** Return the number of missed state/lookahead combinations.
589*/
590#if defined(YYCOVERAGE)
591int NTParseCoverage(FILE *out){
592 int stateno, iLookAhead, i;
593 int nMissed = 0;
594 for(stateno=0; stateno<YYNSTATE; stateno++){
595 i = yy_shift_ofst[stateno];
596 for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
597 if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
598 if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
599 if( out ){
600 fprintf(out,"State %d lookahead %s %s\n", stateno,
601 yyTokenName[iLookAhead],
602 yycoverage[stateno][iLookAhead] ? "ok" : "missed");
603 }
604 }
605 }
606 return nMissed;
607}
608#endif
609
610/*
611** Find the appropriate action for a parser given the terminal
612** look-ahead token iLookAhead.
613*/
614static YYACTIONTYPE yy_find_shift_action(
615 YYCODETYPE iLookAhead, /* The look-ahead token */
616 YYACTIONTYPE stateno /* Current state number */
617){
618 int i;
619
620 if( stateno>YY_MAX_SHIFT ) return stateno;
621 assert( stateno <= YY_SHIFT_COUNT );
622#if defined(YYCOVERAGE)
623 yycoverage[stateno][iLookAhead] = 1;
624#endif
625 do{
626 i = yy_shift_ofst[stateno];
627 assert( i>=0 );
628 assert( i<=YY_ACTTAB_COUNT );
629 assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
630 assert( iLookAhead!=YYNOCODE );
631 assert( iLookAhead < YYNTOKEN );
632 i += iLookAhead;
633 assert( i<(int)YY_NLOOKAHEAD );
634 if( yy_lookahead[i]!=iLookAhead ){
635#ifdef YYFALLBACK
636 YYCODETYPE iFallback; /* Fallback token */
637 assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
638 iFallback = yyFallback[iLookAhead];
639 if( iFallback!=0 ){
640#ifndef NDEBUG
641 if( yyTraceFILE ){
642 fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
643 yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
644 }
645#endif
646 assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
647 iLookAhead = iFallback;
648 continue;
649 }
650#endif
651#ifdef YYWILDCARD
652 {
653 int j = i - iLookAhead + YYWILDCARD;
654 assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
655 if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
656#ifndef NDEBUG
657 if( yyTraceFILE ){
658 fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
659 yyTracePrompt, yyTokenName[iLookAhead],
660 yyTokenName[YYWILDCARD]);
661 }
662#endif /* NDEBUG */
663 return yy_action[j];
664 }
665 }
666#endif /* YYWILDCARD */
667 return yy_default[stateno];
668 }else{
669 assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
670 return yy_action[i];
671 }
672 }while(1);
673}
674
675/*
676** Find the appropriate action for a parser given the non-terminal
677** look-ahead token iLookAhead.
678*/
679static YYACTIONTYPE yy_find_reduce_action(
680 YYACTIONTYPE stateno, /* Current state number */
681 YYCODETYPE iLookAhead /* The look-ahead token */
682){
683 int i;
684#ifdef YYERRORSYMBOL
685 if( stateno>YY_REDUCE_COUNT ){
686 return yy_default[stateno];
687 }
688#else
689 assert( stateno<=YY_REDUCE_COUNT );
690#endif
691 i = yy_reduce_ofst[stateno];
692 assert( iLookAhead!=YYNOCODE );
693 i += iLookAhead;
694#ifdef YYERRORSYMBOL
695 if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
696 return yy_default[stateno];
697 }
698#else
699 assert( i>=0 && i<YY_ACTTAB_COUNT );
700 assert( yy_lookahead[i]==iLookAhead );
701#endif
702 return yy_action[i];
703}
704
705/*
706** The following routine is called if the stack overflows.
707*/
708static void yyStackOverflow(yyParser *yypParser){
711#ifndef NDEBUG
712 if( yyTraceFILE ){
713 fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
714 }
715#endif
716 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
717 /* Here code is inserted which will execute if the parser
718 ** stack every overflows */
719/******** Begin %stack_overflow code ******************************************/
720/******** End %stack_overflow code ********************************************/
721 NTParseARG_STORE /* Suppress warning about unused %extra_argument var */
723}
724
725/*
726** Print tracing information for a SHIFT action
727*/
728#ifndef NDEBUG
729static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
730 if( yyTraceFILE ){
731 if( yyNewState<YYNSTATE ){
732 fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
733 yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
734 yyNewState);
735 }else{
736 fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
737 yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
738 yyNewState - YY_MIN_REDUCE);
739 }
740 }
741}
742#else
743# define yyTraceShift(X,Y,Z)
744#endif
745
746/*
747** Perform a shift action.
748*/
749static void yy_shift(
750 yyParser *yypParser, /* The parser to be shifted */
751 YYACTIONTYPE yyNewState, /* The new state to shift in */
752 YYCODETYPE yyMajor, /* The major token to shift in */
753 NTParseTOKENTYPE yyMinor /* The minor token to shift in */
754){
756 yypParser->yytos++;
757#ifdef YYTRACKMAXSTACKDEPTH
758 if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
759 yypParser->yyhwm++;
760 assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
761 }
762#endif
763#if YYSTACKDEPTH>0
764 if( yypParser->yytos>yypParser->yystackEnd ){
765 yypParser->yytos--;
766 yyStackOverflow(yypParser);
767 return;
768 }
769#else
770 if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
771 if( yyGrowStack(yypParser) ){
772 yypParser->yytos--;
773 yyStackOverflow(yypParser);
774 return;
775 }
776 }
777#endif
778 if( yyNewState > YY_MAX_SHIFT ){
779 yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
780 }
781 yytos = yypParser->yytos;
782 yytos->stateno = yyNewState;
783 yytos->major = yyMajor;
784 yytos->minor.yy0 = yyMinor;
785 yyTraceShift(yypParser, yyNewState, "Shift");
786}
787
788/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
789** of that rule */
790static const YYCODETYPE yyRuleInfoLhs[] = {
791 11, /* (0) triple ::= ws subject ws predicate ws object ws DOT */
792 8, /* (1) ntriplesDoc ::= triples EOF */
793 9, /* (2) triples ::= eol */
794 9, /* (3) triples ::= triple eol */
795 9, /* (4) triples ::= triples triple eol */
796 13, /* (5) subject ::= IRIREF */
797 13, /* (6) subject ::= BNODE */
798 14, /* (7) predicate ::= IRIREF */
799 15, /* (8) object ::= IRIREF */
800 15, /* (9) object ::= BNODE */
801 15, /* (10) object ::= LITERAL */
802 10, /* (11) eol ::= EOL */
803 10, /* (12) eol ::= eol EOL */
804 12, /* (13) ws ::= */
805 12, /* (14) ws ::= WS */
806};
807
808/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
809** of symbols on the right-hand side of that rule. */
810static const signed char yyRuleInfoNRhs[] = {
811 -8, /* (0) triple ::= ws subject ws predicate ws object ws DOT */
812 -2, /* (1) ntriplesDoc ::= triples EOF */
813 -1, /* (2) triples ::= eol */
814 -2, /* (3) triples ::= triple eol */
815 -3, /* (4) triples ::= triples triple eol */
816 -1, /* (5) subject ::= IRIREF */
817 -1, /* (6) subject ::= BNODE */
818 -1, /* (7) predicate ::= IRIREF */
819 -1, /* (8) object ::= IRIREF */
820 -1, /* (9) object ::= BNODE */
821 -1, /* (10) object ::= LITERAL */
822 -1, /* (11) eol ::= EOL */
823 -2, /* (12) eol ::= eol EOL */
824 0, /* (13) ws ::= */
825 -1, /* (14) ws ::= WS */
826};
827
828static void yy_accept(yyParser*); /* Forward Declaration */
829
830/*
831** Perform a reduce action and the shift that must immediately
832** follow the reduce.
833**
834** The yyLookahead and yyLookaheadToken parameters provide reduce actions
835** access to the lookahead token (if any). The yyLookahead will be YYNOCODE
836** if the lookahead token has already been consumed. As this procedure is
837** only called from one place, optimizing compilers will in-line it, which
838** means that the extra parameters have no performance impact.
839*/
840static YYACTIONTYPE yy_reduce(
841 yyParser *yypParser, /* The parser */
842 unsigned int yyruleno, /* Number of the rule by which to reduce */
843 int yyLookahead, /* Lookahead token, or YYNOCODE if none */
844 NTParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */
845 NTParseCTX_PDECL /* %extra_context */
846){
847 int yygoto; /* The next state */
848 YYACTIONTYPE yyact; /* The next action */
849 yyStackEntry *yymsp; /* The top of the parser's stack */
850 int yysize; /* Amount to pop the stack */
852 (void)yyLookahead;
853 (void)yyLookaheadToken;
854 yymsp = yypParser->yytos;
855
856 switch( yyruleno ){
857 /* Beginning here are the reduction cases. A typical example
858 ** follows:
859 ** case 0:
860 ** #line <lineno> <grammarfile>
861 ** { ... } // User supplied code
862 ** #line <lineno> <thisfile>
863 ** break;
864 */
865/********** Begin reduce actions **********************************************/
866 case 0: /* triple ::= ws subject ws predicate ws object ws DOT */
867#line 33 "grammar_nt.y"
868{
869 yymsp[-7].minor.yy18 = VOLK_triple_new (yymsp[-6].minor.yy22, yymsp[-4].minor.yy22, yymsp[-2].minor.yy22);
870 VOLK_graph_add_iter (it, yymsp[-7].minor.yy18);
871 }
872#line 897 "../../build/grammar_nt.c"
873 break;
874 case 3: /* triples ::= triple eol */
875{ yy_destructor(yypParser,11,&yymsp[-1].minor);
876#line 28 "grammar_nt.y"
877{
878}
879#line 904 "../../build/grammar_nt.c"
880}
881 break;
882 case 4: /* triples ::= triples triple eol */
883#line 29 "grammar_nt.y"
884{
885}
886#line 911 "../../build/grammar_nt.c"
887 yy_destructor(yypParser,11,&yymsp[-1].minor);
888 break;
889 default:
890 /* (1) ntriplesDoc ::= triples EOF */ yytestcase(yyruleno==1);
891 /* (2) triples ::= eol */ yytestcase(yyruleno==2);
892 /* (5) subject ::= IRIREF */ yytestcase(yyruleno==5);
893 /* (6) subject ::= BNODE */ yytestcase(yyruleno==6);
894 /* (7) predicate ::= IRIREF */ yytestcase(yyruleno==7);
895 /* (8) object ::= IRIREF */ yytestcase(yyruleno==8);
896 /* (9) object ::= BNODE */ yytestcase(yyruleno==9);
897 /* (10) object ::= LITERAL */ yytestcase(yyruleno==10);
898 /* (11) eol ::= EOL */ yytestcase(yyruleno==11);
899 /* (12) eol ::= eol EOL */ yytestcase(yyruleno==12);
900 /* (13) ws ::= */ yytestcase(yyruleno==13);
901 /* (14) ws ::= WS */ yytestcase(yyruleno==14);
902 break;
903/********** End reduce actions ************************************************/
904 };
905 assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
906 yygoto = yyRuleInfoLhs[yyruleno];
907 yysize = yyRuleInfoNRhs[yyruleno];
908 yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
909
910 /* There are no SHIFTREDUCE actions on nonterminals because the table
911 ** generator has simplified them to pure REDUCE actions. */
912 assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );
913
914 /* It is not possible for a REDUCE to be followed by an error */
915 assert( yyact!=YY_ERROR_ACTION );
916
917 yymsp += yysize+1;
918 yypParser->yytos = yymsp;
919 yymsp->stateno = (YYACTIONTYPE)yyact;
920 yymsp->major = (YYCODETYPE)yygoto;
921 yyTraceShift(yypParser, yyact, "... then shift");
922 return yyact;
923}
924
925/*
926** The following code executes when the parse fails
927*/
928#ifndef YYNOERRORRECOVERY
929static void yy_parse_failed(
930 yyParser *yypParser /* The parser */
931){
934#ifndef NDEBUG
935 if( yyTraceFILE ){
936 fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
937 }
938#endif
939 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
940 /* Here code is inserted which will be executed whenever the
941 ** parser fails */
942/************ Begin %parse_failure code ***************************************/
943/************ End %parse_failure code *****************************************/
944 NTParseARG_STORE /* Suppress warning about unused %extra_argument variable */
946}
947#endif /* YYNOERRORRECOVERY */
948
949/*
950** The following code executes when a syntax error first occurs.
951*/
952static void yy_syntax_error(
953 yyParser *yypParser, /* The parser */
954 int yymajor, /* The major type of the error token */
955 NTParseTOKENTYPE yyminor /* The minor type of the error token */
956){
959#define TOKEN yyminor
960/************ Begin %syntax_error code ****************************************/
961/************ End %syntax_error code ******************************************/
962 NTParseARG_STORE /* Suppress warning about unused %extra_argument variable */
964}
965
966/*
967** The following is executed when the parser accepts
968*/
969static void yy_accept(
970 yyParser *yypParser /* The parser */
971){
974#ifndef NDEBUG
975 if( yyTraceFILE ){
976 fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
977 }
978#endif
979#ifndef YYNOERRORRECOVERY
980 yypParser->yyerrcnt = -1;
981#endif
982 assert( yypParser->yytos==yypParser->yystack );
983 /* Here code is inserted which will be executed whenever the
984 ** parser accepts */
985/*********** Begin %parse_accept code *****************************************/
986/*********** End %parse_accept code *******************************************/
987 NTParseARG_STORE /* Suppress warning about unused %extra_argument variable */
989}
990
991/* The main parser program.
992** The first argument is a pointer to a structure obtained from
993** "NTParseAlloc" which describes the current state of the parser.
994** The second argument is the major token number. The third is
995** the minor token. The fourth optional argument is whatever the
996** user wants (and specified in the grammar) and is available for
997** use by the action routines.
998**
999** Inputs:
1000** <ul>
1001** <li> A pointer to the parser (an opaque structure.)
1002** <li> The major token number.
1003** <li> The minor token number.
1004** <li> An option argument of a grammar-specified type.
1005** </ul>
1006**
1007** Outputs:
1008** None.
1009*/
1011 void *yyp, /* The parser */
1012 int yymajor, /* The major token code number */
1013 NTParseTOKENTYPE yyminor /* The value for the token */
1014 NTParseARG_PDECL /* Optional %extra_argument parameter */
1015){
1016 YYMINORTYPE yyminorunion;
1017 YYACTIONTYPE yyact; /* The parser action. */
1018#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
1019 int yyendofinput; /* True if we are at the end of input */
1020#endif
1021#ifdef YYERRORSYMBOL
1022 int yyerrorhit = 0; /* True if yymajor has invoked an error */
1023#endif
1024 yyParser *yypParser = (yyParser*)yyp; /* The parser */
1027
1028 assert( yypParser->yytos!=0 );
1029#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
1030 yyendofinput = (yymajor==0);
1031#endif
1032
1033 yyact = yypParser->yytos->stateno;
1034#ifndef NDEBUG
1035 if( yyTraceFILE ){
1036 if( yyact < YY_MIN_REDUCE ){
1037 fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
1038 yyTracePrompt,yyTokenName[yymajor],yyact);
1039 }else{
1040 fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
1041 yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
1042 }
1043 }
1044#endif
1045
1046 while(1){ /* Exit by "break" */
1047 assert( yypParser->yytos>=yypParser->yystack );
1048 assert( yyact==yypParser->yytos->stateno );
1049 yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
1050 if( yyact >= YY_MIN_REDUCE ){
1051 unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
1052#ifndef NDEBUG
1053 assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
1054 if( yyTraceFILE ){
1055 int yysize = yyRuleInfoNRhs[yyruleno];
1056 if( yysize ){
1057 fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
1058 yyTracePrompt,
1059 yyruleno, yyRuleName[yyruleno],
1060 yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
1061 yypParser->yytos[yysize].stateno);
1062 }else{
1063 fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
1064 yyTracePrompt, yyruleno, yyRuleName[yyruleno],
1065 yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
1066 }
1067 }
1068#endif /* NDEBUG */
1069
1070 /* Check that the stack is large enough to grow by a single entry
1071 ** if the RHS of the rule is empty. This ensures that there is room
1072 ** enough on the stack to push the LHS value */
1073 if( yyRuleInfoNRhs[yyruleno]==0 ){
1074#ifdef YYTRACKMAXSTACKDEPTH
1075 if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
1076 yypParser->yyhwm++;
1077 assert( yypParser->yyhwm ==
1078 (int)(yypParser->yytos - yypParser->yystack));
1079 }
1080#endif
1081#if YYSTACKDEPTH>0
1082 if( yypParser->yytos>=yypParser->yystackEnd ){
1083 yyStackOverflow(yypParser);
1084 break;
1085 }
1086#else
1087 if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
1088 if( yyGrowStack(yypParser) ){
1089 yyStackOverflow(yypParser);
1090 break;
1091 }
1092 }
1093#endif
1094 }
1095 yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor NTParseCTX_PARAM);
1096 }else if( yyact <= YY_MAX_SHIFTREDUCE ){
1097 yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
1098#ifndef YYNOERRORRECOVERY
1099 yypParser->yyerrcnt--;
1100#endif
1101 break;
1102 }else if( yyact==YY_ACCEPT_ACTION ){
1103 yypParser->yytos--;
1104 yy_accept(yypParser);
1105 return;
1106 }else{
1107 assert( yyact == YY_ERROR_ACTION );
1108 yyminorunion.yy0 = yyminor;
1109#ifdef YYERRORSYMBOL
1110 int yymx;
1111#endif
1112#ifndef NDEBUG
1113 if( yyTraceFILE ){
1114 fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
1115 }
1116#endif
1117#ifdef YYERRORSYMBOL
1118 /* A syntax error has occurred.
1119 ** The response to an error depends upon whether or not the
1120 ** grammar defines an error token "ERROR".
1121 **
1122 ** This is what we do if the grammar does define ERROR:
1123 **
1124 ** * Call the %syntax_error function.
1125 **
1126 ** * Begin popping the stack until we enter a state where
1127 ** it is legal to shift the error symbol, then shift
1128 ** the error symbol.
1129 **
1130 ** * Set the error count to three.
1131 **
1132 ** * Begin accepting and shifting new tokens. No new error
1133 ** processing will occur until three tokens have been
1134 ** shifted successfully.
1135 **
1136 */
1137 if( yypParser->yyerrcnt<0 ){
1138 yy_syntax_error(yypParser,yymajor,yyminor);
1139 }
1140 yymx = yypParser->yytos->major;
1141 if( yymx==YYERRORSYMBOL || yyerrorhit ){
1142#ifndef NDEBUG
1143 if( yyTraceFILE ){
1144 fprintf(yyTraceFILE,"%sDiscard input token %s\n",
1145 yyTracePrompt,yyTokenName[yymajor]);
1146 }
1147#endif
1148 yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
1149 yymajor = YYNOCODE;
1150 }else{
1151 while( yypParser->yytos > yypParser->yystack ){
1152 yyact = yy_find_reduce_action(yypParser->yytos->stateno,
1153 YYERRORSYMBOL);
1154 if( yyact<=YY_MAX_SHIFTREDUCE ) break;
1155 yy_pop_parser_stack(yypParser);
1156 }
1157 if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
1158 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
1159 yy_parse_failed(yypParser);
1160#ifndef YYNOERRORRECOVERY
1161 yypParser->yyerrcnt = -1;
1162#endif
1163 yymajor = YYNOCODE;
1164 }else if( yymx!=YYERRORSYMBOL ){
1165 yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
1166 }
1167 }
1168 yypParser->yyerrcnt = 3;
1169 yyerrorhit = 1;
1170 if( yymajor==YYNOCODE ) break;
1171 yyact = yypParser->yytos->stateno;
1172#elif defined(YYNOERRORRECOVERY)
1173 /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
1174 ** do any kind of error recovery. Instead, simply invoke the syntax
1175 ** error routine and continue going as if nothing had happened.
1176 **
1177 ** Applications can set this macro (for example inside %include) if
1178 ** they intend to abandon the parse upon the first syntax error seen.
1179 */
1180 yy_syntax_error(yypParser,yymajor, yyminor);
1181 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
1182 break;
1183#else /* YYERRORSYMBOL is not defined */
1184 /* This is what we do if the grammar does not define ERROR:
1185 **
1186 ** * Report an error message, and throw away the input token.
1187 **
1188 ** * If the input token is $, then fail the parse.
1189 **
1190 ** As before, subsequent error messages are suppressed until
1191 ** three input tokens have been successfully shifted.
1192 */
1193 if( yypParser->yyerrcnt<=0 ){
1194 yy_syntax_error(yypParser,yymajor, yyminor);
1195 }
1196 yypParser->yyerrcnt = 3;
1197 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
1198 if( yyendofinput ){
1199 yy_parse_failed(yypParser);
1200#ifndef YYNOERRORRECOVERY
1201 yypParser->yyerrcnt = -1;
1202#endif
1203 }
1204 break;
1205#endif
1206 }
1207 }
1208#ifndef NDEBUG
1209 if( yyTraceFILE ){
1210 yyStackEntry *i;
1211 char cDiv = '[';
1212 fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
1213 for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
1214 fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
1215 cDiv = ' ';
1216 }
1217 fprintf(yyTraceFILE,"]\n");
1218 }
1219#endif
1220 return;
1221}
1222
1223/*
1224** Return the fallback token corresponding to canonical token iToken, or
1225** 0 if iToken has no fallback.
1226*/
1227int NTParseFallback(int iToken){
1228#ifdef YYFALLBACK
1229 assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
1230 return yyFallback[iToken];
1231#else
1232 (void)iToken;
1233 return 0;
1234#endif
1235}
#define NTParseCTX_STORE
Definition grammar_nt.c:105
#define YYCODETYPE
Definition grammar_nt.c:82
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 YYACTIONTYPE
Definition grammar_nt.c:84
#define YYNOCODE
Definition grammar_nt.c:83
#define YY_MIN_SHIFTREDUCE
Definition grammar_nt.c:111
#define YY_ERROR_ACTION
Definition grammar_nt.c:113
#define YY_NLOOKAHEAD
Definition grammar_nt.c:119
#define NTParseCTX_FETCH
Definition grammar_nt.c:104
#define YYNSTATE
Definition grammar_nt.c:106
#define YY_ACTTAB_COUNT
Definition grammar_nt.c:184
#define YY_MIN_REDUCE
Definition grammar_nt.c:116
#define YYMALLOCARGTYPE
Definition grammar_nt.c:401
#define YY_MAX_SHIFT
Definition grammar_nt.c:110
void NTParseInit(void *yypRawParser NTParseCTX_PDECL)
Definition grammar_nt.c:406
#define YY_SHIFT_COUNT
Definition grammar_nt.c:197
#define YY_REDUCE_COUNT
Definition grammar_nt.c:204
#define YY_ACCEPT_ACTION
Definition grammar_nt.c:114
#define yytestcase(X)
Definition grammar_nt.c:130
#define NTParseARG_FETCH
Definition grammar_nt.c:99
void NTParseFinalize(void *p)
Definition grammar_nt.c:534
#define YYNTOKEN
Definition grammar_nt.c:109
#define NTParseARG_SDECL
Definition grammar_nt.c:96
#define YY_MAX_SHIFTREDUCE
Definition grammar_nt.c:112
#define NTParseCTX_PDECL
Definition grammar_nt.c:102
#define YYSTACKDEPTH
Definition grammar_nt.c:94
#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
#define YYNRULE_WITH_ACTION
Definition grammar_nt.c:108
#define YYCODETYPE
#define YYACTIONTYPE
#define YYSTACKDEPTH
VOLK_rc VOLK_graph_add_iter(VOLK_GraphIterator *it, const VOLK_Triple *spo)
Add a single triple to the store.
Definition graph.c:360
VOLK_Triple * VOLK_triple_new(VOLK_Term *s, VOLK_Term *p, VOLK_Term *o)
Create a new triple from three terms.
Definition term.c:456
void VOLK_term_free(VOLK_Term *term)
Definition term.c:387
void VOLK_triple_free(VOLK_Triple *spo)
Free a triple and all its internal pointers.
Definition term.c:532
void NTParse()
void NTParseFree()
void * NTParseAlloc()
RDF term.
Definition term.h:62
RDF triple.
Definition term.h:86
yyStackEntry * yytos
Definition grammar_nt.c:263
NTParseARG_SDECL NTParseCTX_SDECL yyStackEntry yystack[YYSTACKDEPTH]
Definition grammar_nt.c:277
yyStackEntry * yystackEnd
Definition grammar_nt.c:278
int yyerrcnt
Definition grammar_nt.c:268
YYMINORTYPE minor
Definition grammar_nt.c:255
YYACTIONTYPE stateno
Definition grammar_nt.c:252
YYCODETYPE major
Definition grammar_nt.c:253
VOLK_Triple * yy18
Definition grammar_nt.c:90
VOLK_Term * yy22
Definition grammar_nt.c:91
void * yy17
Definition grammar_nt.c:89
NTParseTOKENTYPE yy0
Definition grammar_nt.c:88