/*
 * DO NOT EDIT THIS FILE!
 *
 * Parser generated by BisonGen on Mon Oct 29 11:36:41 2007.
 */

#include "Python.h"
#include "structmember.h"

#define PROJECT_NAME "rdflib.sparql.bison"
#define PARSER_NAME "SPARQLParser"
#define MODULE_INITFUNC initSPARQLParserc

/* modules required for action routines */
static PyObject *IRIRef;
static PyObject *Bindings;
static PyObject *Query;
static PyObject *QName;
static PyObject *GraphPattern;
static PyObject *FunctionLibrary;
static PyObject *Operators;
static PyObject *Triples;
static PyObject *Resource;
static PyObject *Filter;
static PyObject *Util;
static PyObject *Expression;
static PyObject *SolutionModifier;
static PyObject *rdflib;
static PyObject *RDF;

/* token definitions */
#define WHITESPACE 257
#define UNION 258
#define COLON 259
#define Q_IRI_CONTENT 260
#define PNAME_NS 261
#define CONSTRUCT 262
#define DESCRIBE 263
#define PNAME_LN 264
#define BLANK_NODE_LABEL 265
#define VARNAME 266
#define PREFIX 267
#define ASTERISK 268
#define DOT 269
#define QUESTION_MARK 270
#define DOLLAR 271
#define BASE 272
#define SELECT 273
#define DISTINCT 274
#define FROM 275
#define NAMED 276
#define OPTIONAL 277
#define FILTER 278
#define GRAPH 279
#define WHERE 280
#define ORDER 281
#define BY 282
#define ASC 283
#define ASK 284
#define DESC 285
#define LIMIT 286
#define OFFSET 287
#define STR 288
#define LANG 289
#define LANGMATCHES 290
#define DATATYPE 291
#define isIRI 292
#define isURI 293
#define isLITERAL 294
#define isBLANK 295
#define BOUND 296
#define REGEX 297
#define A 298
#define TRUE 299
#define FALSE 300
#define DOUBLE_AMPERSAND 301
#define DOUBLE_PIPE 302
#define BANG 303
#define DOUBLE_HAT 304
#define COMMA 305
#define FORWARDSLASH 306
#define LEFT_PAREN 307
#define RIGHT_PAREN 308
#define LEFT_SQUARE 309
#define RIGHT_SQUARE 310
#define SEMICOLON 311
#define INTEGER 312
#define DECIMAL 313
#define DOUBLE 314
#define STRING_LITERAL_DELIMETER_1 315
#define STRING_LITERAL_DELIMETER_2 316
#define STRING_LITERAL_DELIMETER_3 317
#define STRING_LITERAL_DELIMETER_4 318
#define STRING_LITERAL1 319
#define STRING_LITERAL2 320
#define STRING_LITERAL_LONG1 321
#define STRING_LITERAL_LONG2 322
#define NIL 323
#define ANON 324
#define LANGTAG 325
#define LEFT_CURLY 326
#define RIGHT_CURLY 327
#define PLUS 328
#define MINUS 329
#define EQUALITY_OP 330
#define NOT_EQUAL 331
#define LESS_THAN 332
#define GREATER_THAN 333
#define LESS_THAN_EQUAL 334
#define GREATER_THAN_EQUAL 335

/* vector mapping lexer token numbers into internal token numbers */
static const int token_translations[] = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 
72, 73, 74, 75, 76, 77, 78, 79, 80, 81};

#define YYTRANSLATE(x) ((unsigned)(x) <= 335 ? token_translations[x] : 143)

/* vector of items of all rules. */
static const int rhs_tokens[] = {0, 86, 83, 0, 91, 0, 85, 0, 84, 0, 90, 0, 
9, 92, 96, 98, 99, 0, 9, 92, 99, 0, 9, 92, 96, 99, 0, 9, 92, 98, 99, 0, 
8, 72, 126, 73, 96, 98, 99, 0, 8, 72, 126, 73, 98, 99, 0, 89, 87, 0, 89, 
0, 87, 0, 0, 88, 0, 87, 88, 0, 13, 7, 78, 6, 79, 0, 13, 7, 78, 79, 0, 18, 
78, 6, 79, 0, 30, 98, 0, 30, 96, 98, 0, 19, 92, 98, 99, 0, 19, 92, 96, 
98, 99, 0, 19, 20, 92, 98, 99, 0, 19, 20, 92, 96, 98, 99, 0, 93, 0, 14, 
0, 136, 0, 93, 136, 0, 78, 6, 79, 0, 95, 0, 7, 0, 10, 0, 97, 0, 96, 97, 
0, 21, 94, 0, 21, 22, 94, 0, 26, 105, 0, 105, 0, 0, 100, 0, 100, 103, 0, 
100, 103, 104, 0, 100, 104, 103, 0, 103, 104, 0, 100, 104, 0, 104, 0, 103, 
0, 27, 28, 101, 0, 102, 0, 101, 102, 0, 29, 53, 110, 54, 0, 31, 53, 110, 
54, 0, 122, 0, 120, 0, 53, 110, 54, 0, 136, 0, 32, 138, 0, 33, 138, 0, 
72, 73, 0, 72, 126, 106, 73, 0, 72, 126, 73, 0, 72, 106, 73, 0, 107, 0, 
106, 107, 0, 125, 126, 0, 125, 15, 126, 0, 125, 15, 0, 125, 0, 108, 126, 
0, 108, 15, 126, 0, 108, 0, 108, 15, 0, 23, 105, 0, 105, 0, 105, 109, 0, 
25, 136, 105, 0, 25, 142, 105, 0, 25, 94, 105, 0, 4, 105, 0, 109, 4, 105, 
0, 112, 0, 112, 111, 0, 48, 112, 0, 111, 48, 112, 0, 114, 113, 0, 114, 
0, 47, 114, 0, 113, 47, 114, 0, 115, 0, 115, 76, 115, 0, 115, 77, 115, 
0, 115, 78, 115, 0, 115, 79, 115, 0, 115, 80, 115, 0, 115, 81, 115, 0, 
117, 0, 117, 116, 0, 74, 117, 0, 75, 117, 0, 116, 75, 117, 0, 116, 74, 
117, 0, 119, 0, 119, 118, 0, 14, 119, 0, 52, 119, 0, 118, 14, 119, 0, 118, 
52, 119, 0, 49, 124, 0, 74, 124, 0, 75, 124, 0, 124, 0, 34, 53, 110, 54, 
0, 35, 53, 110, 54, 0, 36, 53, 110, 51, 110, 54, 0, 37, 53, 110, 54, 0, 
42, 53, 136, 54, 0, 38, 53, 110, 54, 0, 39, 53, 110, 54, 0, 41, 53, 110, 
54, 0, 40, 53, 110, 54, 0, 121, 0, 43, 53, 110, 51, 110, 54, 0, 43, 53, 
110, 51, 110, 51, 110, 54, 0, 94, 53, 123, 54, 0, 94, 69, 0, 110, 0, 110, 
51, 123, 0, 53, 110, 54, 0, 120, 0, 94, 0, 122, 0, 139, 0, 138, 0, 140, 
0, 142, 0, 136, 0, 24, 53, 110, 54, 0, 24, 120, 0, 24, 122, 0, 126, 15, 
127, 0, 126, 15, 0, 127, 0, 136, 129, 0, 137, 129, 0, 55, 129, 56, 128, 
0, 134, 129, 0, 134, 0, 129, 0, 0, 132, 130, 0, 132, 130, 57, 128, 0, 131, 
0, 130, 51, 131, 0, 136, 0, 133, 0, 137, 0, 136, 0, 94, 0, 44, 0, 134, 
0, 55, 128, 56, 0, 53, 135, 54, 0, 131, 0, 135, 131, 0, 12, 0, 94, 0, 139, 
0, 138, 0, 74, 138, 0, 75, 138, 0, 140, 0, 142, 0, 69, 0, 58, 0, 59, 0, 
60, 0, 141, 0, 141, 71, 0, 141, 50, 94, 0, 45, 0, 46, 0, 61, 65, 61, 0, 
63, 66, 63, 0, 62, 67, 62, 0, 64, 68, 64, 0, 61, 61, 0, 63, 63, 0, 62, 
62, 0, 64, 64, 0, 70, 0, 11, 0};

/* vector of line numbers and filename of all rules */
static const char* const rule_info[] = {
    ": line 0",
    "SPARQL.bgen: line 41",
    "SPARQL.bgen: line 52",
    "SPARQL.bgen: line 59",
    "SPARQL.bgen: line 62",
    "SPARQL.bgen: line 65",
    "SPARQL.bgen: line 78",
    "SPARQL.bgen: line 88",
    "SPARQL.bgen: line 98",
    "SPARQL.bgen: line 108",
    "SPARQL.bgen: line 123",
    "SPARQL.bgen: line 135",
    "SPARQL.bgen: line 152",
    "SPARQL.bgen: line 159",
    "SPARQL.bgen: line 166",
    "SPARQL.bgen: line 173",
    "SPARQL.bgen: line 192",
    "SPARQL.bgen: line 200",
    "SPARQL.bgen: line 216",
    "SPARQL.bgen: line 226",
    "SPARQL.bgen: line 242",
    "SPARQL.bgen: line 256",
    "SPARQL.bgen: line 264",
    "SPARQL.bgen: line 277",
    "SPARQL.bgen: line 287",
    "SPARQL.bgen: line 297",
    "SPARQL.bgen: line 308",
    "SPARQL.bgen: line 324",
    "SPARQL.bgen: line 327",
    "SPARQL.bgen: line 337",
    "SPARQL.bgen: line 345",
    "SPARQL.bgen: line 361",
    "SPARQL.bgen: line 369",
    "SPARQL.bgen: line 384",
    "SPARQL.bgen: line 390",
    "SPARQL.bgen: line 400",
    "SPARQL.bgen: line 408",
    "SPARQL.bgen: line 422",
    "SPARQL.bgen: line 429",
    "SPARQL.bgen: line 442",
    "SPARQL.bgen: line 449",
    "SPARQL.bgen: line 461",
    "SPARQL.bgen: line 466",
    "SPARQL.bgen: line 472",
    "SPARQL.bgen: line 479",
    "SPARQL.bgen: line 487",
    "SPARQL.bgen: line 495",
    "SPARQL.bgen: line 503",
    "SPARQL.bgen: line 511",
    "SPARQL.bgen: line 519",
    "SPARQL.bgen: line 532",
    "SPARQL.bgen: line 545",
    "SPARQL.bgen: line 553",
    "SPARQL.bgen: line 569",
    "SPARQL.bgen: line 580",
    "SPARQL.bgen: line 591",
    "SPARQL.bgen: line 594",
    "SPARQL.bgen: line 597",
    "SPARQL.bgen: line 607",
    "SPARQL.bgen: line 615",
    "SPARQL.bgen: line 628",
    "SPARQL.bgen: line 645",
    "SPARQL.bgen: line 653",
    "SPARQL.bgen: line 662",
    "SPARQL.bgen: line 671",
    "SPARQL.bgen: line 684",
    "SPARQL.bgen: line 692",
    "SPARQL.bgen: line 739",
    "SPARQL.bgen: line 747",
    "SPARQL.bgen: line 756",
    "SPARQL.bgen: line 764",
    "SPARQL.bgen: line 771",
    "SPARQL.bgen: line 779",
    "SPARQL.bgen: line 788",
    "SPARQL.bgen: line 795",
    "SPARQL.bgen: line 847",
    "SPARQL.bgen: line 854",
    "SPARQL.bgen: line 860",
    "SPARQL.bgen: line 867",
    "SPARQL.bgen: line 875",
    "SPARQL.bgen: line 883",
    "SPARQL.bgen: line 898",
    "SPARQL.bgen: line 907",
    "SPARQL.bgen: line 928",
    "SPARQL.bgen: line 934",
    "SPARQL.bgen: line 946",
    "SPARQL.bgen: line 955",
    "SPARQL.bgen: line 970",
    "SPARQL.bgen: line 977",
    "SPARQL.bgen: line 987",
    "SPARQL.bgen: line 996",
    "SPARQL.bgen: line 1021",
    "SPARQL.bgen: line 1024",
    "SPARQL.bgen: line 1032",
    "SPARQL.bgen: line 1040",
    "SPARQL.bgen: line 1048",
    "SPARQL.bgen: line 1056",
    "SPARQL.bgen: line 1064",
    "SPARQL.bgen: line 1077",
    "SPARQL.bgen: line 1083",
    "SPARQL.bgen: line 1095",
    "SPARQL.bgen: line 1105",
    "SPARQL.bgen: line 1115",
    "SPARQL.bgen: line 1125",
    "SPARQL.bgen: line 1140",
    "SPARQL.bgen: line 1146",
    "SPARQL.bgen: line 1157",
    "SPARQL.bgen: line 1166",
    "SPARQL.bgen: line 1175",
    "SPARQL.bgen: line 1185",
    "SPARQL.bgen: line 1200",
    "SPARQL.bgen: line 1207",
    "SPARQL.bgen: line 1214",
    "SPARQL.bgen: line 1221",
    "SPARQL.bgen: line 1241",
    "SPARQL.bgen: line 1251",
    "SPARQL.bgen: line 1261",
    "SPARQL.bgen: line 1273",
    "SPARQL.bgen: line 1283",
    "SPARQL.bgen: line 1293",
    "SPARQL.bgen: line 1303",
    "SPARQL.bgen: line 1313",
    "SPARQL.bgen: line 1323",
    "SPARQL.bgen: line 1333",
    "SPARQL.bgen: line 1341",
    "SPARQL.bgen: line 1352",
    "SPARQL.bgen: line 1370",
    "SPARQL.bgen: line 1379",
    "SPARQL.bgen: line 1396",
    "SPARQL.bgen: line 1405",
    "SPARQL.bgen: line 1421",
    "SPARQL.bgen: line 1430",
    "SPARQL.bgen: line 1433",
    "SPARQL.bgen: line 1436",
    "SPARQL.bgen: line 1439",
    "SPARQL.bgen: line 1442",
    "SPARQL.bgen: line 1445",
    "SPARQL.bgen: line 1448",
    "SPARQL.bgen: line 1451",
    "SPARQLTurtleSuperSet.bgen.frag: line 8",
    "SPARQLTurtleSuperSet.bgen.frag: line 17",
    "SPARQLTurtleSuperSet.bgen.frag: line 24",
    "SPARQLTurtleSuperSet.bgen.frag: line 40",
    "SPARQLTurtleSuperSet.bgen.frag: line 50",
    "SPARQLTurtleSuperSet.bgen.frag: line 54",
    "SPARQLTurtleSuperSet.bgen.frag: line 80",
    "SPARQLTurtleSuperSet.bgen.frag: line 87",
    "SPARQLTurtleSuperSet.bgen.frag: line 94",
    "SPARQLTurtleSuperSet.bgen.frag: line 103",
    "SPARQLTurtleSuperSet.bgen.frag: line 112",
    "SPARQLTurtleSuperSet.bgen.frag: line 124",
    "SPARQLTurtleSuperSet.bgen.frag: line 127",
    "SPARQLTurtleSuperSet.bgen.frag: line 135",
    "SPARQLTurtleSuperSet.bgen.frag: line 143",
    "SPARQLTurtleSuperSet.bgen.frag: line 159",
    "SPARQLTurtleSuperSet.bgen.frag: line 167",
    "SPARQLTurtleSuperSet.bgen.frag: line 186",
    "SPARQLTurtleSuperSet.bgen.frag: line 189",
    "SPARQLTurtleSuperSet.bgen.frag: line 192",
    "SPARQLTurtleSuperSet.bgen.frag: line 204",
    "SPARQLTurtleSuperSet.bgen.frag: line 207",
    "SPARQLTurtleSuperSet.bgen.frag: line 210",
    "SPARQLTurtleSuperSet.bgen.frag: line 225",
    "SPARQLTurtleSuperSet.bgen.frag: line 228",
    "SPARQLTurtleSuperSet.bgen.frag: line 244",
    "SPARQLTurtleSuperSet.bgen.frag: line 256",
    "SPARQLTurtleSuperSet.bgen.frag: line 264",
    "SPARQLTurtleSuperSet.bgen.frag: line 278",
    "SPARQLTurtleSuperSet.bgen.frag: line 299",
    "SPARQLTurtleSuperSet.bgen.frag: line 302",
    "SPARQLTurtleSuperSet.bgen.frag: line 305",
    "SPARQLTurtleSuperSet.bgen.frag: line 308",
    "SPARQLTurtleSuperSet.bgen.frag: line 312",
    "SPARQLTurtleSuperSet.bgen.frag: line 322",
    "SPARQLTurtleSuperSet.bgen.frag: line 325",
    "SPARQLTurtleSuperSet.bgen.frag: line 328",
    "SPARQLTurtleSuperSet.bgen.frag: line 340",
    "SPARQLTurtleSuperSet.bgen.frag: line 349",
    "SPARQLTurtleSuperSet.bgen.frag: line 358",
    "SPARQLTurtleSuperSet.bgen.frag: line 371",
    "SPARQLTurtleSuperSet.bgen.frag: line 377",
    "SPARQLTurtleSuperSet.bgen.frag: line 386",
    "SPARQLTurtleSuperSet.bgen.frag: line 399",
    "SPARQLTurtleSuperSet.bgen.frag: line 402",
    "SPARQLTurtleSuperSet.bgen.frag: line 413",
    "SPARQLTurtleSuperSet.bgen.frag: line 421",
    "SPARQLTurtleSuperSet.bgen.frag: line 429",
    "SPARQLTurtleSuperSet.bgen.frag: line 437",
    "SPARQLTurtleSuperSet.bgen.frag: line 446",
    "SPARQLTurtleSuperSet.bgen.frag: line 453",
    "SPARQLTurtleSuperSet.bgen.frag: line 460",
    "SPARQLTurtleSuperSet.bgen.frag: line 467",
    "SPARQLTurtleSuperSet.bgen.frag: line 480",
    "SPARQLTurtleSuperSet.bgen.frag: line 491",
};

/* vector of string-names indexed by token number */
static const char* const token_names[] = {
    "<EOF>",
    "error",
    "$undefined.",
    "WHITESPACE",
    "UNION",
    "COLON",
    "Q_IRI_CONTENT",
    "PNAME_NS",
    "CONSTRUCT",
    "DESCRIBE",
    "PNAME_LN",
    "BLANK_NODE_LABEL",
    "VARNAME",
    "PREFIX",
    "ASTERISK",
    "DOT",
    "QUESTION_MARK",
    "DOLLAR",
    "BASE",
    "SELECT",
    "DISTINCT",
    "FROM",
    "NAMED",
    "OPTIONAL",
    "FILTER",
    "GRAPH",
    "WHERE",
    "ORDER",
    "BY",
    "ASC",
    "ASK",
    "DESC",
    "LIMIT",
    "OFFSET",
    "STR",
    "LANG",
    "LANGMATCHES",
    "DATATYPE",
    "isIRI",
    "isURI",
    "isLITERAL",
    "isBLANK",
    "BOUND",
    "REGEX",
    "A",
    "TRUE",
    "FALSE",
    "DOUBLE_AMPERSAND",
    "DOUBLE_PIPE",
    "BANG",
    "DOUBLE_HAT",
    "COMMA",
    "FORWARDSLASH",
    "LEFT_PAREN",
    "RIGHT_PAREN",
    "LEFT_SQUARE",
    "RIGHT_SQUARE",
    "SEMICOLON",
    "INTEGER",
    "DECIMAL",
    "DOUBLE",
    "STRING_LITERAL_DELIMETER_1",
    "STRING_LITERAL_DELIMETER_2",
    "STRING_LITERAL_DELIMETER_3",
    "STRING_LITERAL_DELIMETER_4",
    "STRING_LITERAL1",
    "STRING_LITERAL2",
    "STRING_LITERAL_LONG1",
    "STRING_LITERAL_LONG2",
    "NIL",
    "ANON",
    "LANGTAG",
    "LEFT_CURLY",
    "RIGHT_CURLY",
    "PLUS",
    "MINUS",
    "EQUALITY_OP",
    "NOT_EQUAL",
    "LESS_THAN",
    "GREATER_THAN",
    "LESS_THAN_EQUAL",
    "GREATER_THAN_EQUAL",
    "Query",
    "QueryTypes",
    "DescribeQuery",
    "ConstructQuery",
    "Prolog",
    "PrefixDeclList",
    "PrefixDecl",
    "BaseDecl",
    "AskQuery",
    "SelectQuery",
    "VAR_REFERENCES",
    "VariableReferenceList",
    "IRIref",
    "PrefixedName",
    "DataSetClauseList",
    "DataSetClause",
    "WhereClause",
    "SolutionModifier",
    "OrderClause",
    "OrderConditionList",
    "OrderCondition",
    "LimitClause",
    "OffsetClause",
    "GroupGraphPattern",
    "GraphPatternList",
    "GraphPattern",
    "GraphPatternNotTriples",
    "AlternativeGroupGraphPatterns",
    "ConditionalOrExpression",
    "ConditionalAndExpressionList",
    "ConditionalAndExpression",
    "ValueLogicalList",
    "RelationalExpression",
    "AdditiveExpression",
    "MultiplicativeExpressionList",
    "MultiplicativeExpression",
    "UnaryExpressionList",
    "UnaryExpression",
    "BuiltInCall",
    "RegexExpression",
    "FunctionCall",
    "ArgumentList",
    "PrimaryExpression",
    "Filter",
    "Triples",
    "TriplesSameSubject",
    "PropertyList",
    "PropertyListNotEmpty",
    "ObjectList",
    "GraphNode",
    "Verb",
    "TriplesNode",
    "Collection",
    "GraphNodeList",
    "Var",
    "GraphTerm",
    "NumericLiteral",
    "RDFLiteral",
    "BooleanLiteral",
    "String",
    "BlankNode",
    "0",
};

/* symbol number of symbol that rule derives. */
static const int derives[] = {0, 82, 83, 83, 83, 83, 84, 84, 84, 84, 85, 
85, 86, 86, 86, 86, 87, 87, 88, 88, 89, 90, 90, 91, 91, 91, 91, 92, 92, 
93, 93, 94, 94, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 99, 99, 99, 99, 
99, 99, 99, 100, 101, 101, 102, 102, 102, 102, 102, 102, 103, 104, 105, 
105, 105, 105, 106, 106, 107, 107, 107, 107, 107, 107, 107, 107, 108, 108, 
108, 108, 108, 108, 109, 109, 110, 110, 111, 111, 112, 112, 113, 113, 114, 
114, 114, 114, 114, 114, 114, 115, 115, 116, 116, 116, 116, 117, 117, 118, 
118, 118, 118, 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, 120, 120, 
120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 124, 124, 124, 124, 124, 
124, 124, 125, 125, 125, 126, 126, 126, 127, 127, 127, 127, 127, 128, 128, 
129, 129, 130, 130, 131, 131, 131, 132, 132, 132, 133, 133, 134, 135, 135, 
136, 137, 137, 137, 137, 137, 137, 137, 137, 138, 138, 138, 139, 139, 139, 
140, 140, 141, 141, 141, 141, 141, 141, 141, 141, 142, 142};

/* number of symbols composing right hand side of rule. */
static const int rhs_size[] = {0, 2, 1, 1, 1, 1, 5, 3, 4, 4, 7, 6, 2, 1, 
1, 0, 1, 2, 5, 4, 4, 2, 3, 4, 5, 5, 6, 1, 1, 1, 2, 3, 1, 1, 1, 1, 2, 2, 
3, 2, 1, 0, 1, 2, 3, 3, 2, 2, 1, 1, 3, 1, 2, 4, 4, 1, 1, 3, 1, 2, 2, 2, 
4, 3, 3, 1, 2, 2, 3, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 3, 3, 2, 3, 1, 2, 2, 
3, 2, 1, 2, 3, 1, 3, 3, 3, 3, 3, 3, 1, 2, 2, 2, 3, 3, 1, 2, 2, 2, 3, 3, 
2, 2, 2, 1, 4, 4, 6, 4, 4, 4, 4, 4, 4, 1, 6, 8, 4, 2, 1, 3, 3, 1, 1, 1, 
1, 1, 1, 1, 1, 4, 2, 2, 3, 2, 1, 2, 2, 4, 2, 1, 1, 0, 2, 4, 1, 3, 1, 1, 
1, 1, 1, 1, 1, 3, 3, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 
1, 1, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1};

/* default rule to reduce with in state. 0 means the default is an error.
   indexed by state number */
static const int default_action[] = {15, 0, 0, 0, 14, 16, 13, 0, 0, 0, 0, 
0, 0, 1, 4, 3, 5, 2, 17, 12, 0, 0, 0, 167, 28, 41, 27, 29, 0, 0, 0, 0, 
0, 0, 35, 21, 40, 0, 19, 20, 33, 34, 193, 182, 183, 0, 0, 176, 177, 178, 
0, 0, 0, 0, 175, 192, 0, 0, 0, 168, 32, 0, 144, 149, 0, 0, 170, 169, 173, 
179, 174, 0, 0, 0, 41, 41, 7, 42, 49, 48, 30, 0, 0, 41, 0, 37, 39, 0, 0, 
0, 61, 76, 0, 65, 73, 70, 0, 36, 22, 18, 151, 165, 157, 162, 0, 156, 158, 
161, 160, 0, 0, 159, 188, 0, 190, 0, 189, 0, 191, 0, 171, 172, 0, 143, 
0, 148, 145, 146, 0, 180, 0, 59, 60, 41, 8, 9, 43, 47, 46, 0, 41, 41, 23, 
38, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 123, 141, 0, 0, 0, 0, 
77, 64, 66, 74, 71, 69, 67, 63, 0, 0, 150, 164, 166, 151, 152, 154, 184, 
186, 185, 187, 31, 142, 0, 41, 181, 0, 0, 0, 50, 51, 56, 55, 58, 6, 44, 
45, 41, 25, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 83, 88, 
91, 98, 104, 131, 133, 113, 138, 135, 134, 136, 137, 0, 127, 80, 78, 79, 
81, 0, 72, 68, 62, 163, 147, 0, 151, 41, 11, 0, 0, 0, 52, 26, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 110, 0, 111, 112, 139, 0, 84, 0, 87, 0, 0, 0, 0, 0, 
0, 0, 0, 99, 0, 0, 105, 128, 0, 82, 155, 153, 10, 0, 0, 57, 114, 115, 0, 
117, 119, 120, 122, 121, 118, 0, 130, 85, 0, 89, 0, 92, 93, 94, 95, 96, 
97, 100, 101, 0, 0, 106, 107, 0, 0, 0, 126, 53, 54, 0, 0, 86, 90, 103, 
102, 108, 109, 129, 116, 0, 124, 0, 125, 0, 0, 0};

/* default state to go to after a reduction of a rule.
   indexed by variable number (lhs token) */
static const int default_goto[] = {340, 13, 14, 15, 3, 4, 5, 6, 16, 17, 25, 
26, 217, 60, 33, 34, 35, 76, 77, 192, 193, 78, 79, 36, 92, 93, 94, 164, 
284, 269, 219, 271, 220, 221, 280, 222, 283, 223, 224, 158, 225, 285, 226, 
95, 61, 62, 173, 174, 178, 101, 110, 102, 63, 104, 227, 65, 228, 229, 230, 
69, 231};

/* index in yytable of the portion describing state (indexed by state number)
   If the value in yytable is positive, we shift the token and go to that state.
   If the value is negative, it is minus a rule number to reduce by.
   If the value is zero, the default action from yydefact[s] is used. */
static const int action_idx[] = {47, 97, -64, 299, 11, -32768, 11, -40, 52, 
50, 1, 250, 139, -32768, -32768, -32768, -32768, -32768, -32768, 11, 19, 
53, 312, -32768, -32768, 311, 169, -32768, 1, 181, 21, 113, 339, 181, -32768, 
-32768, -32768, 108, -32768, -32768, -32768, -32768, -32768, -32768, -32768, 
408, 119, -32768, -32768, -32768, 101, 116, 87, 131, -32768, -32768, 110, 
110, 190, -32768, -32768, -9, -32768, 119, 119, 119, -32768, -32768, -32768, 
-30, -32768, 177, 110, 110, 490, 309, -32768, 281, 179, -32768, -32768, 
182, 182, 309, 27, -32768, -32768, 113, 397, 239, -32768, 206, 287, -32768, 
434, 495, 275, -32768, -32768, -32768, 215, -32768, -32768, -32768, 521, 
-32768, -32768, -32768, -32768, 158, 582, -32768, -32768, 162, -32768, 
168, -32768, 170, -32768, 180, -32768, -32768, 173, 608, 182, -32768, -32768, 
-32768, 38, -32768, 669, -32768, -32768, 309, -32768, -32768, 179, 226, 
-32768, 182, 309, 309, -32768, -32768, -32768, 214, 238, 241, 243, 248, 
252, 263, 272, 277, 286, 714, 72, -32768, -32768, -32768, 113, 113, 113, 
113, 330, -32768, -32768, 754, 288, 754, 288, -32768, 354, 289, -32768, 
-32768, -32768, 253, 82, -32768, -32768, -32768, -32768, -32768, -32768, 
-32768, 182, 389, -32768, 301, 303, 815, 874, -32768, -32768, -32768, -32768, 
-32768, -32768, -32768, 389, -32768, -32768, 919, 919, 919, 919, 919, 919, 
919, 919, 169, 919, 964, 1009, 1054, 1054, 72, 314, 318, 333, 379, 246, 
9, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, 1099, 
-32768, -32768, -32768, -32768, -32768, 113, 288, 288, -32768, -32768, 
-32768, 1139, 262, 389, -32768, 1200, 1200, 334, -32768, -32768, 335, 337, 
342, 341, 351, 352, 356, 369, 370, 345, -32768, 371, -32768, -32768, -32768, 
1200, 380, 1200, 382, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 278, 
1200, 1200, 43, 391, 376, -32768, -32768, -32768, -32768, 393, 394, -32768, 
-32768, -32768, 1200, -32768, -32768, -32768, -32768, -32768, -32768, 1200, 
-32768, -32768, 1200, -32768, 1200, -32768, -32768, -32768, -32768, -32768, 
-32768, -32768, -32768, 1200, 1200, -32768, -32768, 1200, 1200, 1200, -32768, 
-32768, -32768, 398, 165, -32768, -32768, -32768, -32768, -32768, -32768, 
-32768, -32768, 1200, -32768, 410, -32768, 443, 451, -32768};

/* The index in yytable of the portion describing what to do after reducing a rule.
   The value from yytable is the state to go to. */
static const int goto_idx[] = {-32768, -32768, -32768, -32768, -32768, 456, 
7, -32768, -32768, -32768, 31, -32768, -13, -32768, 49, 118, 147, 115, 
-32768, -32768, 273, -74, 58, 117, 377, -84, -32768, -32768, 33, -32768, 
-191, -32768, -169, 270, -32768, -249, -32768, 6, -86, -32768, -83, 152, 
60, -32768, 8, 353, -156, 220, -32768, -100, -32768, -32768, -38, -32768, 
-10, -18, 51, 17, 24, -32768, 48};

/* A vector filled with portions for different uses.
   (using action_idx and goto_idx) */
static const int yytable[] = {27, 27, 157, 136, 176, 159, 123, 103, 166, 
59, 179, 18, 64, 23, 8, 24, 80, 85, 27, 59, 128, 243, 64, 281, 1, 37, 18, 
106, 40, 314, 315, 41, 59, 108, 40, 105, 111, 41, 20, 67, 96, 129, 29, 
84, 194, 40, 68, 195, 41, 67, 108, 108, 108, 111, 111, 111, 68, 320, 21, 
81, 1, 282, 67, 199, 124, 2, 103, 330, 331, 68, 70, 143, 103, 66, 74, 156, 
160, 304, 82, 161, 70, 59, 59, 66, 64, 64, 106, 108, 166, 288, 111, 59, 
106, 70, 105, 321, 66, 59, 38, 58, 105, 306, 168, 170, 7, 58, 194, 120, 
121, 195, 59, 67, 67, 64, 328, 188, 58, 156, 68, 68, 196, 67, 22, 131, 
132, 232, 40, 67, 68, 41, 139, 23, 39, 244, 68, 137, 138, 162, 329, 245, 
67, 233, 70, 70, 287, 66, 66, 68, 86, 91, 116, 97, 70, 117, 59, 66, 59, 
64, 70, 64, 30, 66, 112, 107, 108, 31, 113, 111, 47, 48, 49, 70, 75, 186, 
66, 239, 83, 240, 114, 156, 98, 23, 196, 115, 67, 32, 67, 99, 218, 134, 
135, 68, 97, 68, 198, 118, 122, 58, 142, 119, 97, 261, 30, 30, 144, 130, 
103, 31, 31, 91, 163, 32, 73, 91, 177, 70, 336, 70, 66, 337, 66, 133, 40, 
180, 250, 41, 106, 23, 140, 141, 181, 59, 108, 182, 105, 111, 253, 254, 
255, 256, 257, 258, 259, 260, 183, 262, 40, 264, 197, 41, 42, 23, 184, 
32, 32, 201, 202, 97, 72, 107, 40, 67, 23, 41, 24, 23, 109, 203, 68, 40, 
28, 187, 41, 263, 23, 265, 266, 234, 235, 236, 237, 290, 291, 125, 126, 
127, 200, 318, 319, 91, 123, 204, 70, 58, 205, 66, 206, 107, 87, 88, 89, 
207, 247, 123, 97, 208, 107, 9, 10, 55, 87, 88, 89, 72, 73, 252, 209, 58, 
11, 40, 278, 279, 41, 42, 23, 210, 332, 333, 326, 12, 211, 58, 30, 246, 
238, 327, 71, 31, 71, 212, 58, 72, 73, 72, 73, 242, 40, 32, 171, 41, 42, 
23, 316, 317, 248, 286, 249, 43, 44, 32, 165, 289, 87, 88, 89, 45, 268, 
46, 267, 338, 47, 48, 49, 50, 51, 52, 53, 87, 88, 89, 270, 54, 55, 32, 
43, 44, 56, 57, 292, 293, 58, 294, 45, 295, 46, 296, 302, 47, 48, 49, 50, 
51, 52, 53, 40, 297, 298, 41, 54, 55, 299, 32, 90, 56, 57, 40, 71, 58, 
41, 42, 23, 72, 73, 300, 301, 303, 32, 241, 305, 307, 323, 145, 146, 147, 
148, 149, 150, 151, 152, 153, 154, 40, 322, 341, 41, 42, 23, 324, 325, 
167, 155, 342, 335, 43, 44, 272, 273, 274, 275, 276, 277, 45, 19, 100, 
339, 251, 47, 48, 49, 50, 51, 52, 53, 172, 334, 58, 185, 54, 55, 43, 44, 
0, 56, 57, 0, 0, 58, 45, 0, 46, 0, 0, 47, 48, 49, 50, 51, 52, 53, 0, 0, 
0, 40, 54, 55, 41, 42, 23, 56, 57, 169, 30, 58, 0, 0, 0, 31, 71, 0, 0, 
0, 0, 72, 73, 0, 0, 0, 0, 40, 0, 0, 41, 42, 23, 0, 0, 0, 0, 0, 0, 43, 44, 
308, 309, 310, 311, 312, 313, 45, 0, 46, 0, 0, 47, 48, 49, 50, 51, 52, 
53, 0, 0, 32, 0, 54, 55, 43, 44, 0, 56, 57, 0, 0, 58, 45, 175, 100, 0, 
0, 47, 48, 49, 50, 51, 52, 53, 0, 0, 0, 40, 54, 55, 41, 42, 23, 56, 57, 
0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 41, 42, 
23, 0, 0, 0, 0, 0, 0, 43, 44, 0, 0, 0, 0, 0, 0, 45, 0, 100, 0, 0, 47, 48, 
49, 50, 51, 52, 53, 0, 0, 0, 0, 54, 55, 43, 44, 0, 56, 57, 0, 0, 58, 45, 
0, 46, 0, 0, 47, 48, 49, 50, 51, 52, 53, 0, 0, 0, 40, 54, 55, 41, 0, 23, 
56, 57, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 0, 190, 0, 0, 145, 
146, 147, 148, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 0, 0, 40, 
191, 0, 41, 42, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 58, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 0, 43, 44, 
40, 0, 213, 41, 42, 23, 214, 0, 0, 0, 0, 47, 48, 49, 50, 51, 52, 53, 0, 
0, 0, 0, 0, 55, 0, 0, 0, 215, 216, 0, 0, 58, 0, 0, 0, 0, 0, 0, 43, 44, 
0, 0, 0, 0, 0, 0, 45, 0, 46, 0, 0, 47, 48, 49, 50, 51, 52, 53, 0, 0, 0, 
40, 54, 55, 41, 42, 23, 56, 57, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 0, 
43, 44, 0, 0, 213, 0, 0, 0, 214, 0, 0, 0, 0, 47, 48, 49, 50, 51, 52, 53, 
0, 40, 0, 0, 41, 55, 23, 0, 0, 215, 216, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 189, 0, 190, 0, 0, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 
0, 0, 0, 0, 0, 0, 0, 0, 40, 191, 0, 41, 42, 23, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 145, 146, 147, 148, 149, 150, 151, 
152, 153, 154, 0, 43, 44, 0, 0, 213, 0, 0, 40, 214, 0, 41, 42, 23, 47, 
48, 49, 50, 51, 52, 53, 0, 0, 0, 0, 0, 55, 0, 0, 0, 215, 216, 0, 0, 58, 
145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 0, 43, 44, 0, 0, 0, 0, 
0, 40, 214, 0, 41, 42, 23, 47, 48, 49, 50, 51, 52, 53, 0, 0, 0, 0, 0, 55, 
0, 0, 0, 0, 0, 0, 0, 58, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 
0, 43, 44, 0, 0, 213, 0, 0, 40, 214, 0, 41, 42, 23, 47, 48, 49, 50, 51, 
52, 53, 0, 0, 0, 0, 0, 55, 0, 0, 0, 215, 216, 0, 0, 58, 145, 146, 147, 
148, 149, 150, 151, 152, 153, 154, 0, 43, 44, 0, 0, 0, 0, 0, 40, 214, 0, 
41, 42, 23, 47, 48, 49, 50, 51, 52, 53, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 
0, 0, 0, 58, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 0, 43, 44, 
40, 0, 213, 41, 42, 23, 214, 0, 0, 0, 0, 47, 48, 49, 50, 51, 52, 53, 0, 
0, 0, 0, 0, 55, 0, 0, 0, 215, 216, 0, 0, 58, 0, 0, 0, 0, 0, 0, 43, 44, 
0, 0, 0, 0, 0, 0, 45, 0, 100, 0, 0, 47, 48, 49, 50, 51, 52, 53, 0, 0, 0, 
40, 54, 55, 41, 42, 23, 56, 57, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 0, 
43, 44, 0, 0, 213, 0, 0, 0, 214, 0, 0, 0, 0, 47, 48, 49, 50, 51, 52, 53, 
0, 0, 0, 0, 0, 55, 0, 0, 0, 215, 216, 0, 0, 58};

/* a vector indexed in parallel with yytable.
   It indicates the bounds of the portion you are trying to examine. */
static const int yycheck[] = {10, 11, 88, 77, 104, 88, 15, 45, 92, 22, 110, 
4, 22, 12, 78, 14, 26, 30, 28, 32, 50, 177, 32, 14, 13, 6, 19, 45, 7, 278, 
279, 10, 45, 46, 7, 45, 46, 10, 78, 22, 32, 71, 11, 22, 130, 7, 22, 130, 
10, 32, 63, 64, 65, 63, 64, 65, 32, 14, 6, 28, 13, 52, 45, 137, 73, 18, 
104, 316, 317, 45, 22, 84, 110, 22, 25, 88, 89, 268, 29, 89, 32, 94, 95, 
32, 94, 95, 104, 100, 172, 245, 100, 104, 110, 45, 104, 52, 45, 110, 79, 
78, 110, 270, 94, 95, 7, 78, 192, 56, 57, 192, 123, 94, 95, 123, 305, 128, 
78, 130, 94, 95, 130, 104, 72, 72, 73, 53, 7, 110, 104, 10, 81, 12, 79, 
51, 110, 77, 78, 89, 307, 57, 123, 69, 94, 95, 244, 94, 95, 123, 31, 32, 
63, 33, 104, 66, 167, 104, 169, 167, 110, 169, 21, 110, 61, 44, 177, 26, 
65, 177, 58, 59, 60, 123, 25, 124, 123, 167, 29, 169, 62, 192, 33, 12, 
192, 67, 167, 72, 169, 79, 155, 74, 75, 167, 74, 169, 136, 64, 6, 78, 83, 
68, 82, 211, 21, 21, 87, 28, 244, 26, 26, 92, 4, 72, 33, 96, 56, 167, 51, 
169, 167, 54, 169, 74, 7, 61, 191, 10, 244, 12, 81, 82, 62, 244, 245, 63, 
244, 245, 203, 204, 205, 206, 207, 208, 209, 210, 64, 212, 7, 214, 133, 
10, 11, 12, 79, 72, 72, 140, 141, 139, 32, 44, 7, 244, 12, 10, 14, 12, 
46, 53, 244, 7, 20, 124, 10, 213, 12, 215, 216, 160, 161, 162, 163, 248, 
249, 63, 64, 65, 139, 281, 282, 172, 15, 53, 244, 78, 53, 244, 53, 44, 
23, 24, 25, 53, 187, 15, 186, 53, 44, 8, 9, 70, 23, 24, 25, 32, 33, 200, 
53, 78, 19, 7, 74, 75, 10, 11, 12, 53, 320, 321, 295, 30, 53, 78, 21, 186, 
4, 302, 27, 26, 27, 53, 78, 32, 33, 32, 33, 56, 7, 72, 73, 10, 11, 12, 
74, 75, 53, 238, 53, 45, 46, 72, 73, 246, 23, 24, 25, 53, 48, 55, 54, 336, 
58, 59, 60, 61, 62, 63, 64, 23, 24, 25, 47, 69, 70, 72, 45, 46, 74, 75, 
54, 54, 78, 54, 53, 51, 55, 54, 51, 58, 59, 60, 61, 62, 63, 64, 7, 54, 
54, 10, 69, 70, 54, 72, 73, 74, 75, 7, 27, 78, 10, 11, 12, 32, 33, 54, 
54, 54, 72, 73, 48, 47, 54, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 7, 
51, 0, 10, 11, 12, 54, 54, 15, 53, 0, 54, 45, 46, 76, 77, 78, 79, 80, 81, 
53, 6, 55, 54, 192, 58, 59, 60, 61, 62, 63, 64, 96, 322, 78, 123, 69, 70, 
45, 46, -1, 74, 75, -1, -1, 78, 53, -1, 55, -1, -1, 58, 59, 60, 61, 62, 
63, 64, -1, -1, -1, 7, 69, 70, 10, 11, 12, 74, 75, 15, 21, 78, -1, -1, 
-1, 26, 27, -1, -1, -1, -1, 32, 33, -1, -1, -1, -1, 7, -1, -1, 10, 11, 
12, -1, -1, -1, -1, -1, -1, 45, 46, 272, 273, 274, 275, 276, 277, 53, -1, 
55, -1, -1, 58, 59, 60, 61, 62, 63, 64, -1, -1, 72, -1, 69, 70, 45, 46, 
-1, 74, 75, -1, -1, 78, 53, 54, 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, 
-1, -1, -1, 7, 69, 70, 10, 11, 12, 74, 75, -1, -1, 78, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, 10, 11, 12, -1, 
-1, -1, -1, -1, -1, 45, 46, -1, -1, -1, -1, -1, -1, 53, -1, 55, -1, -1, 
58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, 69, 70, 45, 46, -1, 74, 75, 
-1, -1, 78, 53, -1, 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, 
7, 69, 70, 10, -1, 12, 74, 75, -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, 29, -1, 31, -1, -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 
43, -1, -1, -1, -1, -1, -1, -1, -1, 7, 53, -1, 10, 11, 12, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, 
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 45, 46, 7, -1, 49, 10, 11, 
12, 53, -1, -1, -1, -1, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 
70, -1, -1, -1, 74, 75, -1, -1, 78, -1, -1, -1, -1, -1, -1, 45, 46, -1, 
-1, -1, -1, -1, -1, 53, -1, 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, -1, 
-1, -1, 7, 69, 70, 10, 11, 12, 74, 75, -1, -1, 78, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, 35, 36, 37, 38, 39, 40, 
41, 42, 43, -1, 45, 46, -1, -1, 49, -1, -1, -1, 53, -1, -1, -1, -1, 58, 
59, 60, 61, 62, 63, 64, -1, 7, -1, -1, 10, 70, 12, -1, -1, 74, 75, -1, 
-1, 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, 31, -1, -1, 34, 35, 
36, 37, 38, 39, 40, 41, 42, 43, -1, -1, -1, -1, -1, -1, -1, -1, 7, 53, 
-1, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, 78, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 
45, 46, -1, -1, 49, -1, -1, 7, 53, -1, 10, 11, 12, 58, 59, 60, 61, 62, 
63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, 74, 75, -1, -1, 78, 34, 35, 
36, 37, 38, 39, 40, 41, 42, 43, -1, 45, 46, -1, -1, -1, -1, -1, 7, 53, 
-1, 10, 11, 12, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, 
-1, -1, -1, -1, -1, -1, 78, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 
45, 46, -1, -1, 49, -1, -1, 7, 53, -1, 10, 11, 12, 58, 59, 60, 61, 62, 
63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, 74, 75, -1, -1, 78, 34, 35, 
36, 37, 38, 39, 40, 41, 42, 43, -1, 45, 46, -1, -1, -1, -1, -1, 7, 53, 
-1, 10, 11, 12, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, 
-1, -1, -1, -1, -1, -1, 78, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 
45, 46, 7, -1, 49, 10, 11, 12, 53, -1, -1, -1, -1, 58, 59, 60, 61, 62, 
63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, 74, 75, -1, -1, 78, -1, -1, 
-1, -1, -1, -1, 45, 46, -1, -1, -1, -1, -1, -1, 53, -1, 55, -1, -1, 58, 
59, 60, 61, 62, 63, 64, -1, -1, -1, 7, 69, 70, 10, 11, 12, 74, 75, -1, 
-1, 78, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 45, 46, -1, -1, 49, -1, -1, 
-1, 53, -1, -1, -1, -1, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 
70, -1, -1, -1, 74, 75, -1, -1, 78};

#define YYLAST 1278
#define YYFINAL 342
#define YYFLAG -32768
#define YYNTBASE 82

#define LEXER_OP_FAILURE 0
#define LEXER_OP_SUCCESS 1
#define LEXER_OP_BOL 2
#define LEXER_OP_EOL 3
#define LEXER_OP_EOF 4
#define LEXER_OP_ANY 5
#define LEXER_OP_LITERAL 6
#define LEXER_OP_NOT_LITERAL 7
#define LEXER_OP_CHARSET 8
#define LEXER_OP_NOT_CHARSET 9
#define LEXER_OP_ASSERT 10
#define LEXER_OP_BRANCH 11
#define LEXER_OP_REPEAT 12
#define LEXER_OP_REPEAT_RANGE 13

#define LEXER_CHARSET_FAILURE 0
#define LEXER_CHARSET_LITERAL 1
#define LEXER_CHARSET_RANGE 2
#define LEXER_CHARSET_SMALL 3
#define LEXER_CHARSET_BIG 4

#define LEXER_INITIAL 1
#define LEXER_STRING_MODE_SHORT_2 2
#define LEXER_STRING_MODE_LONG_2 3
#define LEXER_STRING_MODE_LONG_1 4
#define LEXER_STRING_MODE_SHORT_1 5
#define LEXER_IRI_MODE 6
#define LEXER_START_STATE LEXER_INITIAL

static unsigned char lexer_charsets[69][32] = {
  { 0xFF, 0xFF, 0xFF, 0xFF, 0x81, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40,
    0x01, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x26, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x07,
    0xFE, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0xFE, 0xFF, 0xFF, 0x07,
    0xFE, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x07,
    0xFE, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x7F, 0xFE, 0xFD, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0x0F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x31, 0xFC },
  { 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0xF8,
    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x40, 0xD7, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF,
    0xFF, 0x7F, 0x7F, 0x54, 0xFD, 0xFF, 0x0F, 0x00 },
  { 0xFE, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDF,
    0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0x9F, 0x19, 0xFF, 0xFF, 0xFF, 0xCF, 0x3F, 0x03 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0x02,
    0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0x07, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0x07, 0x00, 0x00,
    0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C,
    0xFF, 0x7F, 0x2F, 0x00, 0x60, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x23, 0x00, 0x00, 0x00, 0xFF,
    0x03, 0x00, 0x00, 0x00, 0xE0, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xC5, 0x03,
    0x00, 0x00, 0x00, 0xB0, 0x03, 0x00, 0x03, 0x00 },
  { 0xE0, 0x87, 0xF9, 0xFF, 0xFF, 0xFD, 0x6D, 0x03, 0x00, 0x00, 0x00, 0x5E,
    0x00, 0x00, 0x1C, 0x00, 0xE0, 0xAF, 0xFB, 0xFF, 0xFF, 0xFD, 0xED, 0x23,
    0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 },
  { 0xE0, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xCD, 0x23, 0x00, 0x00, 0x00, 0xB0,
    0x03, 0x00, 0x00, 0x00, 0xE0, 0xC7, 0x3D, 0xD6, 0x18, 0xC7, 0xBF, 0x03,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0xE0, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xEF, 0x03, 0x00, 0x00, 0x00, 0x00,
    0x03, 0x00, 0x00, 0x00, 0xE0, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xEF, 0x03,
    0x00, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00 },
  { 0xE0, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00,
    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x0D, 0x00, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x96, 0x25, 0xF0, 0xFE, 0xAE, 0x6C, 0x0D, 0x20,
    0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0xFF, 0xFF,
    0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
    0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00 },
  { 0xED, 0xDA, 0x07, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x50, 0x31, 0x82,
    0xAB, 0x62, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xC9, 0x80, 0xF5,
    0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x02 },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03 },
  { 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xAA,
    0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x5F,
    0xDC, 0x1F, 0xCF, 0x0F, 0xFF, 0x1F, 0xDC, 0x1F },
  { 0x00, 0x00, 0x00, 0x00, 0x40, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xFE, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07 },
  { 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x80, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00,
    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFB, 0xFF, 0xFF, 0xBB,
    0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x00,
    0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xC0, 0xFF, 0x9F, 0x3D, 0x00, 0x00 },
  { 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0x3F, 0x1E, 0x00,
    0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0,
    0x9F, 0x39, 0x80, 0x00, 0x0C, 0x00, 0x00, 0x00 },
  { 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x87, 0x39, 0x00, 0x00,
    0x00, 0x00, 0x03, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0,
    0xBF, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x8F, 0x39, 0xC0, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
    0xC7, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xDF, 0x3D, 0x60, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
    0xDF, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xCF, 0x3D, 0x80, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF2, 0x07, 0x80, 0x7F, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF2, 0x1B,
    0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xA0, 0xC2, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xFE, 0xFF, 0xDF, 0x0F, 0xBF, 0xFE, 0xFF, 0x3F, 0xFE, 0x02,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xFF, 0x1F, 0x02, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70 },
  { 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
  { 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00 },
  { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F },
  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
    0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x24, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x44, 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x24, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
  { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
};

static unsigned char lexer_blockmaps[6][256] = {
  { 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0B, 0x0C, 0x0D, 0x0E,
    0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x15, 0x16, 0x0B, 0x17, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x18, 0x19, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B },
  { 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x1C, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1D, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B },
  { 0x0B, 0x0B, 0x0B, 0x20, 0x21, 0x22, 0x23, 0x0B, 0x0B, 0x24, 0x25, 0x26,
    0x27, 0x28, 0x29, 0x2A, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x2B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x2C, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B },
  { 0x2D, 0x0B, 0x2E, 0x2F, 0x0B, 0x0B, 0x30, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x31, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x32, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B },
  { 0x34, 0x1A, 0x1A, 0x35, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x36, 0x37, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x1A, 0x1A, 0x1A, 0x38,
    0x39, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x1A, 0x1A, 0x1A,
    0x1A, 0x1A, 0x1A, 0x3A },
  { 0x2D, 0x0B, 0x0B, 0x3B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
    0x0B, 0x0B, 0x0B, 0x0B },
};

static const Py_UCS4 lexer_INITIAL_pattern_0[] = { 6, 39, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_1[] = { 6, 39, 6, 39, 6, 39, 
  1 };

static const Py_UCS4 lexer_INITIAL_pattern_2[] = { 6, 34, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_3[] = { 6, 34, 6, 34, 6, 34, 
  1 };

static const Py_UCS4 lexer_INITIAL_pattern_4[] = { 6, 60, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_5[] = { 6, 64, 12, 8, 1, 8, 
  4, 3, 2, 0, 1, 12, 14, 0, 6, 45, 12, 8, 1, 8, 4, 3, 3, 0, 1, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_6[] = { 6, 40, 12, 8, 0, 8, 
  4, 3, 1, 0, 1, 6, 41, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_7[] = { 6, 91, 12, 8, 0, 8, 
  4, 3, 1, 0, 1, 6, 93, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_8[] = { 13, 80, 0, 1, 11, 4, 
  6, 95, 1, 18, 11, 7, 8, 4, 4, 0, 0, 1, 7, 8, 4, 4, 1, 0, 1, 0, 1, 0, 
  12, 51, 0, 11, 7, 8, 4, 3, 30, 0, 1, 18, 11, 7, 8, 4, 4, 0, 0, 1, 7, 
  8, 4, 4, 1, 0, 1, 0, 1, 7, 8, 4, 3, 31, 0, 1, 7, 8, 4, 4, 2, 0, 1, 7, 
  8, 4, 4, 3, 0, 1, 0, 1, 1, 6, 58, 11, 4, 6, 95, 1, 18, 11, 7, 8, 4, 4, 
  0, 0, 1, 7, 8, 4, 4, 1, 0, 1, 0, 1, 7, 8, 4, 3, 31, 0, 1, 0, 12, 51, 
  0, 11, 7, 8, 4, 3, 30, 0, 1, 18, 11, 7, 8, 4, 4, 0, 0, 1, 7, 8, 4, 4, 
  1, 0, 1, 0, 1, 7, 8, 4, 3, 31, 0, 1, 7, 8, 4, 4, 2, 0, 1, 7, 8, 4, 4, 
  3, 0, 1, 0, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_9[] = { 13, 80, 0, 1, 11, 4, 
  6, 95, 1, 18, 11, 7, 8, 4, 4, 0, 0, 1, 7, 8, 4, 4, 1, 0, 1, 0, 1, 0, 
  12, 51, 0, 11, 7, 8, 4, 3, 30, 0, 1, 18, 11, 7, 8, 4, 4, 0, 0, 1, 7, 
  8, 4, 4, 1, 0, 1, 0, 1, 7, 8, 4, 3, 31, 0, 1, 7, 8, 4, 4, 2, 0, 1, 7, 
  8, 4, 4, 3, 0, 1, 0, 1, 1, 6, 58, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_10[] = { 6, 95, 6, 58, 11, 4, 
  6, 95, 1, 18, 11, 7, 8, 4, 4, 0, 0, 1, 7, 8, 4, 4, 1, 0, 1, 0, 1, 0, 
  12, 51, 0, 11, 7, 8, 4, 3, 30, 0, 1, 18, 11, 7, 8, 4, 4, 0, 0, 1, 7, 
  8, 4, 4, 1, 0, 1, 0, 1, 7, 8, 4, 3, 31, 0, 1, 7, 8, 4, 4, 2, 0, 1, 7, 
  8, 4, 4, 3, 0, 1, 0, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_11[] = { 8, 4, 3, 51, 0, 11, 
  15, 11, 4, 6, 95, 1, 7, 8, 4, 4, 4, 0, 1, 0, 1, 7, 8, 4, 3, 31, 0, 1, 
  0, 12, 34, 0, 11, 7, 8, 4, 4, 5, 0, 1, 15, 11, 4, 6, 95, 1, 7, 8, 4, 
  4, 4, 0, 1, 0, 1, 7, 8, 4, 3, 31, 0, 1, 0, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_12[] = { 6, 64, 12, 8, 1, 8, 
  4, 3, 2, 0, 1, 12, 14, 0, 6, 45, 12, 8, 1, 8, 4, 3, 3, 0, 1, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_13[] = { 12, 8, 1, 8, 4, 3, 
  31, 0, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_14[] = { 11, 22, 12, 8, 1, 8, 
  4, 3, 31, 0, 1, 6, 46, 12, 8, 0, 8, 4, 3, 31, 0, 1, 1, 13, 6, 46, 12, 
  8, 1, 8, 4, 3, 31, 0, 1, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_15[] = { 11, 46, 12, 8, 1, 8, 
  4, 3, 31, 0, 1, 6, 46, 12, 8, 0, 8, 4, 3, 31, 0, 1, 8, 4, 3, 60, 0, 13, 
  9, 0, 1, 8, 4, 3, 61, 0, 1, 12, 8, 1, 8, 4, 3, 31, 0, 1, 1, 37, 6, 46, 
  12, 8, 1, 8, 4, 3, 31, 0, 1, 8, 4, 3, 60, 0, 13, 9, 0, 1, 8, 4, 3, 61, 
  0, 1, 12, 8, 1, 8, 4, 3, 31, 0, 1, 1, 35, 12, 8, 1, 8, 4, 3, 31, 0, 1, 
  8, 4, 3, 60, 0, 13, 9, 0, 1, 8, 4, 3, 61, 0, 1, 12, 8, 1, 8, 4, 3, 31, 
  0, 1, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_16[] = { 6, 35, 12, 8, 0, 9, 
  4, 3, 62, 0, 1, 13, 19, 0, 1, 11, 7, 8, 4, 3, 62, 0, 1, 6, 6, 13, 6, 
  10, 1, 0, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_17[] = { 12, 8, 1, 8, 4, 3, 
  1, 0, 1, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_18[] = { 11, 12, 6, 117, 6, 
  110, 6, 105, 6, 111, 6, 110, 1, 12, 6, 85, 6, 78, 6, 73, 6, 79, 6, 78, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_19[] = { 6, 42, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_20[] = { 11, 10, 6, 98, 6, 97, 
  6, 115, 6, 101, 1, 10, 6, 66, 6, 65, 6, 83, 6, 69, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_21[] = { 11, 14, 6, 112, 6, 
  114, 6, 101, 6, 102, 6, 105, 6, 120, 1, 14, 6, 80, 6, 82, 6, 69, 6, 70, 
  6, 73, 6, 88, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_22[] = { 11, 14, 6, 115, 6, 
  101, 6, 108, 6, 101, 6, 99, 6, 116, 1, 14, 6, 83, 6, 69, 6, 76, 6, 69, 
  6, 67, 6, 84, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_23[] = { 11, 18, 6, 100, 6, 
  105, 6, 115, 6, 116, 6, 105, 6, 110, 6, 99, 6, 116, 1, 18, 6, 68, 6, 
  73, 6, 83, 6, 84, 6, 73, 6, 78, 6, 67, 6, 84, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_24[] = { 11, 10, 6, 102, 6, 
  114, 6, 111, 6, 109, 1, 10, 6, 70, 6, 82, 6, 79, 6, 77, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_25[] = { 11, 12, 6, 110, 6, 
  97, 6, 109, 6, 101, 6, 100, 1, 12, 6, 78, 6, 65, 6, 77, 6, 69, 6, 68, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_26[] = { 11, 18, 6, 111, 6, 
  112, 6, 116, 6, 105, 6, 111, 6, 110, 6, 97, 6, 108, 1, 18, 6, 79, 6, 
  80, 6, 84, 6, 73, 6, 79, 6, 78, 6, 65, 6, 76, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_27[] = { 11, 14, 6, 102, 6, 
  105, 6, 108, 6, 116, 6, 101, 6, 114, 1, 14, 6, 70, 6, 73, 6, 76, 6, 84, 
  6, 69, 6, 82, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_28[] = { 11, 12, 6, 103, 6, 
  114, 6, 97, 6, 112, 6, 104, 1, 12, 6, 71, 6, 82, 6, 65, 6, 80, 6, 72, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_29[] = { 11, 12, 6, 119, 6, 
  104, 6, 101, 6, 114, 6, 101, 1, 12, 6, 87, 6, 72, 6, 69, 6, 82, 6, 69, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_30[] = { 11, 12, 6, 111, 6, 
  114, 6, 100, 6, 101, 6, 114, 1, 12, 6, 79, 6, 82, 6, 68, 6, 69, 6, 82, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_31[] = { 11, 6, 6, 98, 6, 121, 
  1, 6, 6, 66, 6, 89, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_32[] = { 11, 8, 6, 97, 6, 115, 
  6, 99, 1, 8, 6, 65, 6, 83, 6, 67, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_33[] = { 6, 65, 6, 83, 6, 75, 
  1 };

static const Py_UCS4 lexer_INITIAL_pattern_34[] = { 6, 67, 6, 79, 6, 78, 
  6, 83, 6, 84, 6, 82, 6, 85, 6, 67, 6, 84, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_35[] = { 6, 68, 6, 69, 6, 83, 
  6, 67, 6, 82, 6, 73, 6, 66, 6, 69, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_36[] = { 11, 10, 6, 100, 6, 
  101, 6, 115, 6, 99, 1, 10, 6, 68, 6, 69, 6, 83, 6, 67, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_37[] = { 11, 12, 6, 108, 6, 
  105, 6, 109, 6, 105, 6, 116, 1, 12, 6, 76, 6, 73, 6, 77, 6, 73, 6, 84, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_38[] = { 11, 14, 6, 111, 6, 
  102, 6, 102, 6, 115, 6, 101, 6, 116, 1, 14, 6, 79, 6, 70, 6, 70, 6, 83, 
  6, 69, 6, 84, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_39[] = { 11, 8, 6, 115, 6, 116, 
  6, 114, 1, 8, 6, 83, 6, 84, 6, 82, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_40[] = { 11, 10, 6, 108, 6, 
  97, 6, 110, 6, 103, 1, 10, 6, 76, 6, 65, 6, 78, 6, 71, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_41[] = { 11, 24, 6, 108, 6, 
  97, 6, 110, 6, 103, 6, 77, 6, 97, 6, 116, 6, 99, 6, 104, 6, 101, 6, 115, 
  1, 24, 6, 76, 6, 65, 6, 78, 6, 71, 6, 77, 6, 65, 6, 84, 6, 67, 6, 72, 
  6, 69, 6, 83, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_42[] = { 11, 18, 6, 100, 6, 
  97, 6, 116, 6, 97, 6, 116, 6, 121, 6, 112, 6, 101, 1, 18, 6, 68, 6, 65, 
  6, 84, 6, 65, 6, 84, 6, 89, 6, 80, 6, 69, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_43[] = { 6, 105, 6, 115, 6, 
  73, 6, 82, 6, 73, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_44[] = { 11, 12, 6, 105, 6, 
  115, 6, 85, 6, 114, 6, 105, 1, 12, 6, 105, 6, 115, 6, 85, 6, 82, 6, 73, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_45[] = { 11, 16, 6, 105, 6, 
  115, 6, 66, 6, 108, 6, 97, 6, 110, 6, 107, 1, 16, 6, 105, 6, 115, 6, 
  66, 6, 76, 6, 65, 6, 78, 6, 75, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_46[] = { 11, 20, 6, 105, 6, 
  115, 6, 76, 6, 105, 6, 116, 6, 101, 6, 114, 6, 97, 6, 108, 1, 20, 6, 
  105, 6, 115, 6, 76, 6, 73, 6, 84, 6, 69, 6, 82, 6, 65, 6, 76, 1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_47[] = { 11, 12, 6, 98, 6, 111, 
  6, 117, 6, 110, 6, 100, 1, 12, 6, 66, 6, 79, 6, 85, 6, 78, 6, 68, 1, 
  0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_48[] = { 11, 12, 6, 114, 6, 
  101, 6, 103, 6, 101, 6, 120, 1, 12, 6, 82, 6, 69, 6, 71, 6, 69, 6, 88, 
  1, 0, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_49[] = { 6, 116, 6, 114, 6, 
  117, 6, 101, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_50[] = { 6, 102, 6, 97, 6, 108, 
  6, 115, 6, 101, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_51[] = { 6, 97, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_52[] = { 6, 45, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_53[] = { 6, 43, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_54[] = { 6, 38, 6, 38, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_55[] = { 6, 124, 6, 124, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_56[] = { 6, 33, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_57[] = { 6, 94, 6, 94, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_58[] = { 6, 44, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_59[] = { 6, 58, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_60[] = { 6, 63, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_61[] = { 6, 36, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_62[] = { 6, 47, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_63[] = { 6, 40, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_64[] = { 6, 41, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_65[] = { 6, 91, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_66[] = { 6, 93, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_67[] = { 6, 61, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_68[] = { 6, 33, 6, 61, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_69[] = { 6, 60, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_70[] = { 6, 62, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_71[] = { 6, 60, 6, 61, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_72[] = { 6, 62, 6, 61, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_73[] = { 6, 59, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_74[] = { 6, 123, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_75[] = { 6, 125, 1 };

static const Py_UCS4 lexer_INITIAL_pattern_76[] = { 6, 46, 1 };

static const Py_UCS4 *lexer_INITIAL_patterns[] = {
  lexer_INITIAL_pattern_0,
  lexer_INITIAL_pattern_1,
  lexer_INITIAL_pattern_2,
  lexer_INITIAL_pattern_3,
  lexer_INITIAL_pattern_4,
  lexer_INITIAL_pattern_5,
  lexer_INITIAL_pattern_6,
  lexer_INITIAL_pattern_7,
  lexer_INITIAL_pattern_8,
  lexer_INITIAL_pattern_9,
  lexer_INITIAL_pattern_10,
  lexer_INITIAL_pattern_11,
  lexer_INITIAL_pattern_12,
  lexer_INITIAL_pattern_13,
  lexer_INITIAL_pattern_14,
  lexer_INITIAL_pattern_15,
  lexer_INITIAL_pattern_16,
  lexer_INITIAL_pattern_17,
  lexer_INITIAL_pattern_18,
  lexer_INITIAL_pattern_19,
  lexer_INITIAL_pattern_20,
  lexer_INITIAL_pattern_21,
  lexer_INITIAL_pattern_22,
  lexer_INITIAL_pattern_23,
  lexer_INITIAL_pattern_24,
  lexer_INITIAL_pattern_25,
  lexer_INITIAL_pattern_26,
  lexer_INITIAL_pattern_27,
  lexer_INITIAL_pattern_28,
  lexer_INITIAL_pattern_29,
  lexer_INITIAL_pattern_30,
  lexer_INITIAL_pattern_31,
  lexer_INITIAL_pattern_32,
  lexer_INITIAL_pattern_33,
  lexer_INITIAL_pattern_34,
  lexer_INITIAL_pattern_35,
  lexer_INITIAL_pattern_36,
  lexer_INITIAL_pattern_37,
  lexer_INITIAL_pattern_38,
  lexer_INITIAL_pattern_39,
  lexer_INITIAL_pattern_40,
  lexer_INITIAL_pattern_41,
  lexer_INITIAL_pattern_42,
  lexer_INITIAL_pattern_43,
  lexer_INITIAL_pattern_44,
  lexer_INITIAL_pattern_45,
  lexer_INITIAL_pattern_46,
  lexer_INITIAL_pattern_47,
  lexer_INITIAL_pattern_48,
  lexer_INITIAL_pattern_49,
  lexer_INITIAL_pattern_50,
  lexer_INITIAL_pattern_51,
  lexer_INITIAL_pattern_52,
  lexer_INITIAL_pattern_53,
  lexer_INITIAL_pattern_54,
  lexer_INITIAL_pattern_55,
  lexer_INITIAL_pattern_56,
  lexer_INITIAL_pattern_57,
  lexer_INITIAL_pattern_58,
  lexer_INITIAL_pattern_59,
  lexer_INITIAL_pattern_60,
  lexer_INITIAL_pattern_61,
  lexer_INITIAL_pattern_62,
  lexer_INITIAL_pattern_63,
  lexer_INITIAL_pattern_64,
  lexer_INITIAL_pattern_65,
  lexer_INITIAL_pattern_66,
  lexer_INITIAL_pattern_67,
  lexer_INITIAL_pattern_68,
  lexer_INITIAL_pattern_69,
  lexer_INITIAL_pattern_70,
  lexer_INITIAL_pattern_71,
  lexer_INITIAL_pattern_72,
  lexer_INITIAL_pattern_73,
  lexer_INITIAL_pattern_74,
  lexer_INITIAL_pattern_75,
  lexer_INITIAL_pattern_76,
  NULL
};

static const Py_UCS4 lexer_STRING_MODE_SHORT_2_pattern_0[] = { 12, 21, 
  0, 11, 7, 9, 4, 3, 63, 0, 1, 9, 6, 92, 8, 4, 3, 64, 0, 1, 0, 1, 1 };

static const Py_UCS4 lexer_STRING_MODE_SHORT_2_pattern_1[] = { 6, 34, 1 };

static const Py_UCS4 *lexer_STRING_MODE_SHORT_2_patterns[] = {
  lexer_STRING_MODE_SHORT_2_pattern_0,
  lexer_STRING_MODE_SHORT_2_pattern_1,
  NULL
};

static const Py_UCS4 lexer_STRING_MODE_LONG_2_pattern_0[] = { 12, 28, 0, 
  13, 6, 0, 2, 6, 34, 1, 11, 7, 9, 4, 3, 66, 0, 1, 9, 6, 92, 8, 4, 3, 64, 
  0, 1, 0, 1, 1 };

static const Py_UCS4 lexer_STRING_MODE_LONG_2_pattern_1[] = { 6, 34, 6, 
  34, 6, 34, 1 };

static const Py_UCS4 *lexer_STRING_MODE_LONG_2_patterns[] = {
  lexer_STRING_MODE_LONG_2_pattern_0,
  lexer_STRING_MODE_LONG_2_pattern_1,
  NULL
};

static const Py_UCS4 lexer_STRING_MODE_LONG_1_pattern_0[] = { 12, 28, 0, 
  6, 39, 8, 4, 3, 67, 0, 11, 7, 9, 4, 3, 68, 0, 1, 9, 6, 92, 8, 4, 3, 64, 
  0, 1, 0, 1, 1 };

static const Py_UCS4 lexer_STRING_MODE_LONG_1_pattern_1[] = { 6, 39, 6, 
  39, 6, 39, 1 };

static const Py_UCS4 *lexer_STRING_MODE_LONG_1_patterns[] = {
  lexer_STRING_MODE_LONG_1_pattern_0,
  lexer_STRING_MODE_LONG_1_pattern_1,
  NULL
};

static const Py_UCS4 lexer_STRING_MODE_SHORT_1_pattern_0[] = { 12, 21, 
  0, 11, 7, 9, 4, 3, 65, 0, 1, 9, 6, 92, 8, 4, 3, 64, 0, 1, 0, 1, 1 };

static const Py_UCS4 lexer_STRING_MODE_SHORT_1_pattern_1[] = { 6, 39, 1 };

static const Py_UCS4 *lexer_STRING_MODE_SHORT_1_patterns[] = {
  lexer_STRING_MODE_SHORT_1_pattern_0,
  lexer_STRING_MODE_SHORT_1_pattern_1,
  NULL
};

static const Py_UCS4 lexer_IRI_MODE_pattern_0[] = { 6, 62, 1 };

static const Py_UCS4 lexer_IRI_MODE_pattern_1[] = { 12, 8, 0, 9, 4, 3, 
  0, 0, 1, 1 };

static const Py_UCS4 lexer_IRI_MODE_pattern_2[] = { 11, 4, 6, 61, 1, 11, 
  12, 8, 1, 8, 4, 3, 1, 0, 1, 1, 0, 1 };

static const Py_UCS4 *lexer_IRI_MODE_patterns[] = {
  lexer_IRI_MODE_pattern_0,
  lexer_IRI_MODE_pattern_1,
  lexer_IRI_MODE_pattern_2,
  NULL
};

static const Py_UCS4 **lexer_patterns[] = {
  NULL,
  lexer_INITIAL_patterns,
  lexer_STRING_MODE_SHORT_2_patterns,
  lexer_STRING_MODE_LONG_2_patterns,
  lexer_STRING_MODE_LONG_1_patterns,
  lexer_STRING_MODE_SHORT_1_patterns,
  lexer_IRI_MODE_patterns
};

static const int lexer_INITIAL_actions[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 
  12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 
  30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 
  48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 
  66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79 };

static const int lexer_STRING_MODE_SHORT_2_actions[] = { 80, 81 };

static const int lexer_STRING_MODE_LONG_2_actions[] = { 84, 85 };

static const int lexer_STRING_MODE_LONG_1_actions[] = { 86, 87 };

static const int lexer_STRING_MODE_SHORT_1_actions[] = { 82, 83 };

static const int lexer_IRI_MODE_actions[] = { 0, 1, 2 };

static const int *lexer_actions[] = {
  NULL,
  lexer_INITIAL_actions,
  lexer_STRING_MODE_SHORT_2_actions,
  lexer_STRING_MODE_LONG_2_actions,
  lexer_STRING_MODE_LONG_1_actions,
  lexer_STRING_MODE_SHORT_1_actions,
  lexer_IRI_MODE_actions
};

#if PY_VERSION_HEX < 0x02020000 || !defined(Py_USING_UNICODE)
#error "Python 2.2+ with unicode support required"
#endif

/* Static Definitions */
#define YYEMPTY -2
#define YYERROR -1
#define YYEOF 0
#define YYINITDEPTH 1000
#define LEXER_INITIAL_BACKTRACKS 20

/* Parsing objects */
typedef struct {
  PyObject_HEAD
  int verbose;
  PyObject *dict;
} parserobject;

typedef struct {
  PyObject *text;
  int last;
  int state;
  Py_UNICODE *end;
  Py_UNICODE *position;

  /* backtracking stack */
  int backtracks;
  Py_UNICODE **positions;
  int allocated;
} lexerobject;

static int parser_yylex(parserobject *, lexerobject *, PyObject **);
static lexerobject *lexer_new(PyObject *);
static void lexer_free(lexerobject *);
static int lexer_save_position(lexerobject *);
static Py_UNICODE *lexer_restore_position(lexerobject *);
static int lexer_charset(parserobject *, Py_UCS4 *, Py_UCS4, int);
static int lexer_match(parserobject *, lexerobject *, Py_UCS4 *);
static void lexer_error(lexerobject *);

static char *unicode_escape(Py_UNICODE *, int);
static PyObject *report_error(int state, PyObject *lval, lexerobject *lexer);
static void print_reduce(int ruleno);
static void print_state_stack(int *stack, int *end);

/* Parser Methods */

/* Attempt to use C99 variable argument macros for improved error detection
 * (just in case). 
 */
#ifdef __STDC__ /* C99 conformance macro */
#define TRACE(...) if (self->verbose > 0) PySys_WriteStderr(__VA_ARGS__)
#define REGEX_TRACE(...) if (self->verbose > 1) PySys_WriteStderr(__VA_ARGS__)
#else
#define TRACE if (self->verbose > 0) PySys_WriteStderr
#define REGEX_TRACE if (self->verbose > 1) PySys_WriteStderr
#endif

static char parse_doc[] = "\
parse(string) -> object\n\
Converts the given string to a parse tree and return the top-most\n\
element of the tree.";

static PyObject* parser_parse(register parserobject *self, PyObject *text)
{
  register int yystate;
  register int yyn;

  PyObject *yylval = NULL;
  PyObject *yyval = NULL;

  int state_stack[YYINITDEPTH];
  int *state_ptr;
  PyObject *value_stack[YYINITDEPTH];
  PyObject **value_ptr;

  int yylen;
  int yychar = YYEMPTY;         /* cause a token to be read */
  int yychar1 = 0;

  lexerobject *lexer;

  lexer = lexer_new(text);
  if (lexer == NULL)
    return NULL;

  TRACE("Starting parse\n");

  /* Initialize stack pointers
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized. */
  state_ptr = state_stack - 1;
  value_ptr = value_stack;

  yystate = 0;

  while (1) {
    /* Push a new state, which is found in yystate. */
    /* In all cases, when you get here, the value and location stacks
       have just been pushed.  So pushing a state here evens the stacks. */
    *++state_ptr = yystate;

    TRACE("Entering state %d\n", yystate);

    /* Do appropriate processing given the current state. */
    /* Read a lookahead token if we need one and don't already have one. */

    /* First try to decide what to do without reference to lookahead token. */
    yyn = action_idx[yystate];
    if (yyn == YYFLAG) {
      yyn = default_action[yystate];
      if (yyn == 0) {
        return report_error(yystate, yylval, lexer);
      }

      /* Do a reduction. yyn is the number of a rule to reduce with. */
      if (self->verbose) print_reduce(yyn);

      yylen = rhs_size[yyn];
      state_ptr -= yylen;
      value_ptr -= yylen;
      if (yylen > 0) yyval = value_ptr[1];

      /* Action routines */
      switch (yyn) {
case 1: {
  /* from SPARQL.bgen, line 41
   * Query: Prolog QueryTypes
   */
  yyval = PyObject_CallMethod(Query, "Query", "OO", value_ptr[1], value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Query(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 2: {
  /* from SPARQL.bgen, line 52
   * QueryTypes: SelectQuery
   */
  yyval = value_ptr[1];
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--QueryTypes(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 5: {
  /* from SPARQL.bgen, line 65
   * QueryTypes: AskQuery
   */
  yyval = value_ptr[1];
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--QueryTypes(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 6: {
  /* from SPARQL.bgen, line 78
   * DescribeQuery: DESCRIBE VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],value_ptr[3],value_ptr[4],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 7: {
  /* from SPARQL.bgen, line 88
   * DescribeQuery: DESCRIBE VAR_REFERENCES SolutionModifier
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],Py_None,Py_None,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 8: {
  /* from SPARQL.bgen, line 98
   * DescribeQuery: DESCRIBE VAR_REFERENCES DataSetClauseList SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],value_ptr[3],Py_None,value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 9: {
  /* from SPARQL.bgen, line 108
   * DescribeQuery: DESCRIBE VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],Py_None,value_ptr[3],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 10: {
  /* from SPARQL.bgen, line 123
   * ConstructQuery: CONSTRUCT LEFT_CURLY Triples RIGHT_CURLY DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "ConstructQuery", "OOOO", value_ptr[3],value_ptr[5],value_ptr[6],value_ptr[7]);
  if (self->verbose) {
    fprintf(stderr, "--ConstructQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[7], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  Py_DECREF(value_ptr[7]);
  break;
}
case 11: {
  /* from SPARQL.bgen, line 135
   * ConstructQuery: CONSTRUCT LEFT_CURLY Triples RIGHT_CURLY WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "ConstructQuery", "OOOO", value_ptr[3],Py_None,value_ptr[5],value_ptr[6]);
  if (self->verbose) {
    fprintf(stderr, "--ConstructQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 12: {
  /* from SPARQL.bgen, line 152
   * Prolog: BaseDecl PrefixDeclList
   */
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", value_ptr[1], value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 13: {
  /* from SPARQL.bgen, line 159
   * Prolog: BaseDecl
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", value_ptr[1], Py_None);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 14: {
  /* from SPARQL.bgen, line 166
   * Prolog: PrefixDeclList
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", Py_None, value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 15: {
  /* from SPARQL.bgen, line 173
   * Prolog:
   */
  yyval = Py_None;
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 16: {
  /* from SPARQL.bgen, line 192
   * PrefixDeclList: PrefixDecl
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDeclList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 17: {
  /* from SPARQL.bgen, line 200
   * PrefixDeclList: PrefixDeclList PrefixDecl
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--PrefixDeclList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 18: {
  /* from SPARQL.bgen, line 216
   * PrefixDecl: PREFIX PNAME_NS LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(Bindings, "PrefixDeclaration", "OO", value_ptr[2],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 19: {
  /* from SPARQL.bgen, line 226
   * PrefixDecl: PREFIX PNAME_NS LESS_THAN GREATER_THAN
   */
  PyObject *t = PyObject_GetAttrString(Bindings, "EMPTY_STRING");
  yyval = PyObject_CallMethod(Bindings, "PrefixDeclaration", "OO", value_ptr[2],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 20: {
  /* from SPARQL.bgen, line 242
   * BaseDecl: BASE LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(Bindings, "BaseDeclaration", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BaseDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 21: {
  /* from SPARQL.bgen, line 256
   * AskQuery: ASK WhereClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "AskQuery", "OO", Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--AskQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 22: {
  /* from SPARQL.bgen, line 264
   * AskQuery: ASK DataSetClauseList WhereClause
   */
  yyval = PyObject_CallMethod(Query, "AskQuery", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--AskQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 23: {
  /* from SPARQL.bgen, line 277
   * SelectQuery: SELECT VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOO", value_ptr[2],Py_None,value_ptr[3],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 24: {
  /* from SPARQL.bgen, line 287
   * SelectQuery: SELECT VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOO", value_ptr[2],value_ptr[3],value_ptr[4],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 25: {
  /* from SPARQL.bgen, line 297
   * SelectQuery: SELECT DISTINCT VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOOi", value_ptr[3],Py_None,value_ptr[4],value_ptr[5],1);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 26: {
  /* from SPARQL.bgen, line 308
   * SelectQuery: SELECT DISTINCT VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOOi", value_ptr[3],value_ptr[4],value_ptr[5],value_ptr[6],1);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 28: {
  /* from SPARQL.bgen, line 327
   * VAR_REFERENCES: ASTERISK
   */
  yyval = Py_None;
  if (self->verbose) {
    fprintf(stderr, "--VAR_REFERENCES(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 29: {
  /* from SPARQL.bgen, line 337
   * VariableReferenceList: Var
   */
        yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--VariableReferenceList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 30: {
  /* from SPARQL.bgen, line 345
   * VariableReferenceList: VariableReferenceList Var
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--VariableReferenceList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 31: {
  /* from SPARQL.bgen, line 361
   * IRIref: LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(IRIRef, "IRIRef", "O",value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--IRIref(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 33: {
  /* from SPARQL.bgen, line 384
   * PrefixedName: PNAME_NS
   */
  yyval = PyObject_CallMethod(QName, "QName", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixedName(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 34: {
  /* from SPARQL.bgen, line 390
   * PrefixedName: PNAME_LN
   */
  yyval = PyObject_CallMethod(QName, "QName", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixedName(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 35: {
  /* from SPARQL.bgen, line 400
   * DataSetClauseList: DataSetClause
   */
                yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClauseList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 36: {
  /* from SPARQL.bgen, line 408
   * DataSetClauseList: DataSetClauseList DataSetClause
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--DataSetClauseList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 37: {
  /* from SPARQL.bgen, line 422
   * DataSetClause: FROM IRIref
   */
  yyval = PyObject_CallMethod(IRIRef, "RemoteGraph", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 38: {
  /* from SPARQL.bgen, line 429
   * DataSetClause: FROM NAMED IRIref
   */
  yyval = PyObject_CallMethod(IRIRef, "NamedGraph", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 39: {
  /* from SPARQL.bgen, line 442
   * WhereClause: WHERE GroupGraphPattern
   */
  yyval = PyObject_CallMethod(Query, "WhereClause", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--WhereClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 40: {
  /* from SPARQL.bgen, line 449
   * WhereClause: GroupGraphPattern
   */
  yyval = PyObject_CallMethod(Query, "WhereClause", "O", value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--WhereClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 41: {
  /* from SPARQL.bgen, line 461
   * SolutionModifier:
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "");
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 42: {
  /* from SPARQL.bgen, line 466
   * SolutionModifier: OrderClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 43: {
  /* from SPARQL.bgen, line 472
   * SolutionModifier: OrderClause LimitClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OO",value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 44: {
  /* from SPARQL.bgen, line 479
   * SolutionModifier: OrderClause LimitClause OffsetClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 45: {
  /* from SPARQL.bgen, line 487
   * SolutionModifier: OrderClause OffsetClause LimitClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 46: {
  /* from SPARQL.bgen, line 495
   * SolutionModifier: LimitClause OffsetClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 47: {
  /* from SPARQL.bgen, line 503
   * SolutionModifier: OrderClause OffsetClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 48: {
  /* from SPARQL.bgen, line 511
   * SolutionModifier: OffsetClause
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,Py_None,value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 49: {
  /* from SPARQL.bgen, line 519
   * SolutionModifier: LimitClause
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,value_ptr[1],Py_None);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 50: {
  /* from SPARQL.bgen, line 532
   * OrderClause: ORDER BY OrderConditionList
   */
  yyval = value_ptr[3];
  Py_INCREF(value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--OrderClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 51: {
  /* from SPARQL.bgen, line 545
   * OrderConditionList: OrderCondition
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--OrderConditionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 52: {
  /* from SPARQL.bgen, line 553
   * OrderConditionList: OrderConditionList OrderCondition
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--OrderConditionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 53: {
  /* from SPARQL.bgen, line 569
   * OrderCondition: ASC LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "ASCENDING_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[3],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 54: {
  /* from SPARQL.bgen, line 580
   * OrderCondition: DESC LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "DESCENDING_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[3],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 57: {
  /* from SPARQL.bgen, line 597
   * OrderCondition: LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "UNSPECIFIED_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[2],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 59: {
  /* from SPARQL.bgen, line 615
   * LimitClause: LIMIT NumericLiteral
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--LimitClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 60: {
  /* from SPARQL.bgen, line 628
   * OffsetClause: OFFSET NumericLiteral
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--OffsetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 61: {
  /* from SPARQL.bgen, line 645
   * GroupGraphPattern: LEFT_CURLY RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 62: {
  /* from SPARQL.bgen, line 653
   * GroupGraphPattern: LEFT_CURLY Triples GraphPatternList RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 63: {
  /* from SPARQL.bgen, line 662
   * GroupGraphPattern: LEFT_CURLY Triples RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",value_ptr[2],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 64: {
  /* from SPARQL.bgen, line 671
   * GroupGraphPattern: LEFT_CURLY GraphPatternList RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",Py_None,value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 65: {
  /* from SPARQL.bgen, line 684
   * GraphPatternList: GraphPattern
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 66: {
  /* from SPARQL.bgen, line 692
   * GraphPatternList: GraphPatternList GraphPattern
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 67: {
  /* from SPARQL.bgen, line 739
   * GraphPattern: Filter Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 68: {
  /* from SPARQL.bgen, line 747
   * GraphPattern: Filter DOT Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],value_ptr[3]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 69: {
  /* from SPARQL.bgen, line 756
   * GraphPattern: Filter DOT
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 70: {
  /* from SPARQL.bgen, line 764
   * GraphPattern: Filter
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 71: {
  /* from SPARQL.bgen, line 771
   * GraphPattern: GraphPatternNotTriples Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 72: {
  /* from SPARQL.bgen, line 779
   * GraphPattern: GraphPatternNotTriples DOT Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,value_ptr[3]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 73: {
  /* from SPARQL.bgen, line 788
   * GraphPattern: GraphPatternNotTriples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 74: {
  /* from SPARQL.bgen, line 795
   * GraphPattern: GraphPatternNotTriples DOT
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 75: {
  /* from SPARQL.bgen, line 847
   * GraphPatternNotTriples: OPTIONAL GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedOptionalGraphPattern", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 76: {
  /* from SPARQL.bgen, line 854
   * GraphPatternNotTriples: GroupGraphPattern
   */
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 77: {
  /* from SPARQL.bgen, line 860
   * GraphPatternNotTriples: GroupGraphPattern AlternativeGroupGraphPatterns
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedAlternativeGraphPattern", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 78: {
  /* from SPARQL.bgen, line 867
   * GraphPatternNotTriples: GRAPH Var GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 79: {
  /* from SPARQL.bgen, line 875
   * GraphPatternNotTriples: GRAPH BlankNode GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 80: {
  /* from SPARQL.bgen, line 883
   * GraphPatternNotTriples: GRAPH IRIref GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 81: {
  /* from SPARQL.bgen, line 898
   * AlternativeGroupGraphPatterns: UNION GroupGraphPattern
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--AlternativeGroupGraphPatterns(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 82: {
  /* from SPARQL.bgen, line 907
   * AlternativeGroupGraphPatterns: AlternativeGroupGraphPatterns UNION GroupGraphPattern
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--AlternativeGroupGraphPatterns(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 84: {
  /* from SPARQL.bgen, line 934
   * ConditionalOrExpression: ConditionalAndExpression ConditionalAndExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedConditionalAndExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--ConditionalOrExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 85: {
  /* from SPARQL.bgen, line 946
   * ConditionalAndExpressionList: DOUBLE_PIPE ConditionalAndExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 86: {
  /* from SPARQL.bgen, line 955
   * ConditionalAndExpressionList: ConditionalAndExpressionList DOUBLE_PIPE ConditionalAndExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 87: {
  /* from SPARQL.bgen, line 970
   * ConditionalAndExpression: RelationalExpression ValueLogicalList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedRelationalExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 89: {
  /* from SPARQL.bgen, line 987
   * ValueLogicalList: DOUBLE_AMPERSAND RelationalExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--ValueLogicalList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 90: {
  /* from SPARQL.bgen, line 996
   * ValueLogicalList: ValueLogicalList DOUBLE_AMPERSAND RelationalExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ValueLogicalList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 92: {
  /* from SPARQL.bgen, line 1024
   * RelationalExpression: AdditiveExpression EQUALITY_OP AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "EqualityOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 93: {
  /* from SPARQL.bgen, line 1032
   * RelationalExpression: AdditiveExpression NOT_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "NotEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 94: {
  /* from SPARQL.bgen, line 1040
   * RelationalExpression: AdditiveExpression LESS_THAN AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "LessThanOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 95: {
  /* from SPARQL.bgen, line 1048
   * RelationalExpression: AdditiveExpression GREATER_THAN AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "GreaterThanOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 96: {
  /* from SPARQL.bgen, line 1056
   * RelationalExpression: AdditiveExpression LESS_THAN_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "LessThanOrEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 97: {
  /* from SPARQL.bgen, line 1064
   * RelationalExpression: AdditiveExpression GREATER_THAN_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "GreaterThanOrEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 99: {
  /* from SPARQL.bgen, line 1083
   * AdditiveExpression: MultiplicativeExpression MultiplicativeExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedAdditiveExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  /*yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]);*/
  if (self->verbose) {
    fprintf(stderr, "--AdditiveExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 100: {
  /* from SPARQL.bgen, line 1095
   * MultiplicativeExpressionList: PLUS MultiplicativeExpression
   */
  yyval = PyList_New(1);
  PyObject *mList = PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[1], value_ptr[2]);
  PyList_SET_ITEM(yyval, 0, mList);
  Py_INCREF(mList);
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 101: {
  /* from SPARQL.bgen, line 1105
   * MultiplicativeExpressionList: MINUS MultiplicativeExpression
   */
            yyval = PyList_New(1);
            PyObject *mList = PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[1], value_ptr[2]);
            PyList_SET_ITEM(yyval, 0, mList);
  Py_INCREF(mList);
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 102: {
  /* from SPARQL.bgen, line 1115
   * MultiplicativeExpressionList: MultiplicativeExpressionList MINUS MultiplicativeExpression
   */
  PyList_Append(value_ptr[1], PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[2], value_ptr[3]));
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 103: {
  /* from SPARQL.bgen, line 1125
   * MultiplicativeExpressionList: MultiplicativeExpressionList PLUS MultiplicativeExpression
   */
  PyList_Append(value_ptr[1], PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[2], value_ptr[3]));
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 105: {
  /* from SPARQL.bgen, line 1146
   * MultiplicativeExpression: UnaryExpression UnaryExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedMultiplicativeExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 106: {
  /* from SPARQL.bgen, line 1157
   * UnaryExpressionList: ASTERISK UnaryExpression
   */
            yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 107: {
  /* from SPARQL.bgen, line 1166
   * UnaryExpressionList: FORWARDSLASH UnaryExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 108: {
  /* from SPARQL.bgen, line 1175
   * UnaryExpressionList: UnaryExpressionList ASTERISK UnaryExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 109: {
  /* from SPARQL.bgen, line 1185
   * UnaryExpressionList: UnaryExpressionList FORWARDSLASH UnaryExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 110: {
  /* from SPARQL.bgen, line 1200
   * UnaryExpression: BANG PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "LogicalNegation", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 111: {
  /* from SPARQL.bgen, line 1207
   * UnaryExpression: PLUS PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "NumericPositive", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 112: {
  /* from SPARQL.bgen, line 1214
   * UnaryExpression: MINUS PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "NumericNegative", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 114: {
  /* from SPARQL.bgen, line 1241
   * BuiltInCall: STR LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "STR");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 115: {
  /* from SPARQL.bgen, line 1251
   * BuiltInCall: LANG LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "LANG");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 116: {
  /* from SPARQL.bgen, line 1261
   * BuiltInCall: LANGMATCHES LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "LANGMATCHES");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OOO", funcName,value_ptr[3],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 117: {
  /* from SPARQL.bgen, line 1273
   * BuiltInCall: DATATYPE LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "DATATYPE");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 118: {
  /* from SPARQL.bgen, line 1283
   * BuiltInCall: BOUND LEFT_PAREN Var RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "BOUND");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 119: {
  /* from SPARQL.bgen, line 1293
   * BuiltInCall: isIRI LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isIRI");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 120: {
  /* from SPARQL.bgen, line 1303
   * BuiltInCall: isURI LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isURI");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 121: {
  /* from SPARQL.bgen, line 1313
   * BuiltInCall: isBLANK LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isBLANK");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 122: {
  /* from SPARQL.bgen, line 1323
   * BuiltInCall: isLITERAL LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isLITERAL");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 124: {
  /* from SPARQL.bgen, line 1341
   * RegexExpression: REGEX LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "ParsedREGEXInvocation", "OO", value_ptr[3],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--RegexExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 125: {
  /* from SPARQL.bgen, line 1352
   * RegexExpression: REGEX LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "ParsedREGEXInvocation", "OOO", value_ptr[3],value_ptr[5],value_ptr[7]);
  if (self->verbose) {
    fprintf(stderr, "--RegexExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[7], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[8], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  Py_DECREF(value_ptr[7]);
  Py_DECREF(value_ptr[8]);
  break;
}
case 126: {
  /* from SPARQL.bgen, line 1370
   * FunctionCall: IRIref LEFT_PAREN ArgumentList RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "FunctionCall", "OO", value_ptr[1], value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--FunctionCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 127: {
  /* from SPARQL.bgen, line 1379
   * FunctionCall: IRIref NIL
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "FunctionCall", "OO", value_ptr[1], PyList_New(0));
  if (self->verbose) {
    fprintf(stderr, "--FunctionCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 128: {
  /* from SPARQL.bgen, line 1396
   * ArgumentList: ConditionalOrExpression
   */
  yyval = PyList_New(1);
  /* Steals a reference */
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--ArgumentList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 129: {
  /* from SPARQL.bgen, line 1405
   * ArgumentList: ConditionalOrExpression COMMA ArgumentList
   */
  yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--ArgumentList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 130: {
  /* from SPARQL.bgen, line 1421
   * PrimaryExpression: LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--PrimaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 139: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 8
   * Filter: FILTER LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(Filter, "ParsedExpressionFilter", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 140: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 17
   * Filter: FILTER BuiltInCall
   */
  yyval = PyObject_CallMethod(Filter, "ParsedFunctionFilter", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 141: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 24
   * Filter: FILTER FunctionCall
   */
  yyval = PyObject_CallMethod(Filter, "ParsedFunctionFilter", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 142: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 40
   * Triples: Triples DOT TriplesSameSubject
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--Triples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 144: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 54
   * Triples: TriplesSameSubject
   */
  yyval = PyList_New(1);
  /* Steals a reference */
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--Triples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 145: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 80
   * TriplesSameSubject: Var PropertyListNotEmpty
   */
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 146: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 87
   * TriplesSameSubject: GraphTerm PropertyListNotEmpty
   */
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 147: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 94
   * TriplesSameSubject: LEFT_SQUARE PropertyListNotEmpty RIGHT_SQUARE PropertyList
   */
  yyval = PyObject_CallMethod(Resource, "TwiceReferencedBlankNode", "OO", value_ptr[2],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 148: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 103
   * TriplesSameSubject: Collection PropertyListNotEmpty
   */
  PyObject_CallMethod(value_ptr[1], "setPropertyValueList", "O", value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 151: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 127
   * PropertyList:
   */
  yyval = PyList_New(0);
  if (self->verbose) {
    fprintf(stderr, "--PropertyList(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 152: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 135
   * PropertyListNotEmpty: Verb ObjectList
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, PyObject_CallMethod(Triples, "PropertyValue", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--PropertyListNotEmpty(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 153: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 143
   * PropertyListNotEmpty: Verb ObjectList SEMICOLON PropertyList
   */
  yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", PyObject_CallMethod(Triples, "PropertyValue", "OO", value_ptr[1],value_ptr[2]),value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--PropertyListNotEmpty(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 154: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 159
   * ObjectList: GraphNode
   */
         yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--ObjectList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 155: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 167
   * ObjectList: ObjectList COMMA GraphNode
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ObjectList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 161: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 210
   * Verb: A
   */
  yyval = PyObject_GetAttrString(RDF, "type");
  if (self->verbose) {
    fprintf(stderr, "--Verb(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 163: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 228
   * TriplesNode: LEFT_SQUARE PropertyList RIGHT_SQUARE
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 164: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 244
   * Collection: LEFT_PAREN GraphNodeList RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(Resource, "ParsedCollection", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Collection(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 165: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 256
   * GraphNodeList: GraphNode
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--GraphNodeList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 166: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 264
   * GraphNodeList: GraphNodeList GraphNode
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphNodeList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 167: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 278
   * Var: VARNAME
   */
  PyObject *varName = PySequence_GetSlice(value_ptr[1], 1, PyString_GET_SIZE(value_ptr[1]));
  yyval = PyObject_CallMethod(rdflib, "Variable", "O", varName);
  Py_XDECREF(varName);
  if (self->verbose) {
    fprintf(stderr, "--Var(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 172: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 312
   * GraphTerm: MINUS NumericLiteral
   */
  PyObject *negNum = PyNumber_Negative(PyObject_CallMethod(value_ptr[2],"toPython",NULL));
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", negNum);
  Py_XDECREF(negNum);
  if (self->verbose) {
    fprintf(stderr, "--GraphTerm(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 176: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 340
   * NumericLiteral: INTEGER
   */
     PyObject *num = PyNumber_Int(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 177: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 349
   * NumericLiteral: DECIMAL
   */
     PyObject *num = PyNumber_Float(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 178: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 358
   * NumericLiteral: DOUBLE
   */
     PyObject *num = PyNumber_Float(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 179: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 371
   * RDFLiteral: String
   */
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 180: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 377
   * RDFLiteral: String LANGTAG
   */
  PyObject *lang = PySequence_GetSlice(value_ptr[2], 1, PyString_GET_SIZE(value_ptr[2]));
  yyval = PyObject_CallMethod(rdflib, "Literal", "OO", value_ptr[1], lang);
  Py_XDECREF(lang);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 181: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 386
   * RDFLiteral: String DOUBLE_HAT IRIref
   */
  yyval = PyObject_CallMethod(Expression, "ParsedDatatypedLiteral", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 184: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 413
   * String: STRING_LITERAL_DELIMETER_1 STRING_LITERAL1 STRING_LITERAL_DELIMETER_1
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 185: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 421
   * String: STRING_LITERAL_DELIMETER_3 STRING_LITERAL2 STRING_LITERAL_DELIMETER_3
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 186: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 429
   * String: STRING_LITERAL_DELIMETER_2 STRING_LITERAL_LONG1 STRING_LITERAL_DELIMETER_2
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 187: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 437
   * String: STRING_LITERAL_DELIMETER_4 STRING_LITERAL_LONG2 STRING_LITERAL_DELIMETER_4
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 188: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 446
   * String: STRING_LITERAL_DELIMETER_1 STRING_LITERAL_DELIMETER_1
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 189: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 453
   * String: STRING_LITERAL_DELIMETER_3 STRING_LITERAL_DELIMETER_3
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 190: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 460
   * String: STRING_LITERAL_DELIMETER_2 STRING_LITERAL_DELIMETER_2
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 191: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 467
   * String: STRING_LITERAL_DELIMETER_4 STRING_LITERAL_DELIMETER_4
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 192: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 480
   * BlankNode: ANON
   */
  yyval = PyObject_CallMethod(rdflib, "Variable", "O", PyObject_CallMethod(rdflib, "BNode",""));
  if (self->verbose) {
    fprintf(stderr, "--BlankNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 193: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 491
   * BlankNode: BLANK_NODE_LABEL
   */
  PyObject *lang = PySequence_GetSlice(value_ptr[1], 2, PyString_GET_SIZE(value_ptr[1]));
  yyval = PyObject_CallMethod(rdflib, "BNode", "O",lang);
  Py_XDECREF(lang);
  if (self->verbose) {
    fprintf(stderr, "--BlankNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
      }
      if (!yyval) {
        lexer_free(lexer);
        return NULL;
      }
      *++value_ptr = yyval;

      if (self->verbose) print_state_stack(state_stack, state_ptr);


      /* Now "shift" the result of the reduction. */
      /* Determine what state that goes to, based on the state
         we popped back to and the rule number reduced by. */

      yyn = derives[yyn] - YYNTBASE;
      yystate = goto_idx[yyn] + *state_ptr;
      if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *state_ptr) {
        yystate = yytable[yystate];
      } else {
        yystate = default_goto[yyn];
      }
      continue;
    } /* if (yyn == YYFLAG) */

    /* Not known => get a lookahead token if don't already have one. */

    /* yychar is either YYEMPTY, YYEOF or a valid token in external form */
    if (yychar == YYEMPTY) {
      TRACE("Reading a token: ");
      yychar = parser_yylex(self, lexer, &yylval);
    }

    /* Convert token to internal form (in yychar1) for indexing tables with */

    if (yychar <= 0) {
      if (yychar == YYERROR) {
        lexer_free(lexer);
        return NULL;
      }
      /* This means end-of-input. */
      yychar1 = 0;
      TRACE("Now at end of input.\n");
    } else {
      yychar1 = YYTRANSLATE(yychar);
      TRACE("Next token is %d (%s)\n", yychar, token_names[yychar1]);
      yyn += yychar1;
    }
    if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) {
      /* comes here after end of input */
      yyn = default_action[yystate];
      if (yyn == 0) {
        return report_error(yystate, NULL, lexer);
      }

      /* Do a reduction. yyn is the number of a rule to reduce with. */
      if (self->verbose) print_reduce(yyn);

      yylen = rhs_size[yyn];
      state_ptr -= yylen;
      value_ptr -= yylen;
      if (yylen > 0) yyval = value_ptr[1];

      /* Action routines */
      switch (yyn) {
case 1: {
  /* from SPARQL.bgen, line 41
   * Query: Prolog QueryTypes
   */
  yyval = PyObject_CallMethod(Query, "Query", "OO", value_ptr[1], value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Query(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 2: {
  /* from SPARQL.bgen, line 52
   * QueryTypes: SelectQuery
   */
  yyval = value_ptr[1];
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--QueryTypes(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 5: {
  /* from SPARQL.bgen, line 65
   * QueryTypes: AskQuery
   */
  yyval = value_ptr[1];
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--QueryTypes(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 6: {
  /* from SPARQL.bgen, line 78
   * DescribeQuery: DESCRIBE VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],value_ptr[3],value_ptr[4],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 7: {
  /* from SPARQL.bgen, line 88
   * DescribeQuery: DESCRIBE VAR_REFERENCES SolutionModifier
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],Py_None,Py_None,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 8: {
  /* from SPARQL.bgen, line 98
   * DescribeQuery: DESCRIBE VAR_REFERENCES DataSetClauseList SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],value_ptr[3],Py_None,value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 9: {
  /* from SPARQL.bgen, line 108
   * DescribeQuery: DESCRIBE VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],Py_None,value_ptr[3],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 10: {
  /* from SPARQL.bgen, line 123
   * ConstructQuery: CONSTRUCT LEFT_CURLY Triples RIGHT_CURLY DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "ConstructQuery", "OOOO", value_ptr[3],value_ptr[5],value_ptr[6],value_ptr[7]);
  if (self->verbose) {
    fprintf(stderr, "--ConstructQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[7], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  Py_DECREF(value_ptr[7]);
  break;
}
case 11: {
  /* from SPARQL.bgen, line 135
   * ConstructQuery: CONSTRUCT LEFT_CURLY Triples RIGHT_CURLY WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "ConstructQuery", "OOOO", value_ptr[3],Py_None,value_ptr[5],value_ptr[6]);
  if (self->verbose) {
    fprintf(stderr, "--ConstructQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 12: {
  /* from SPARQL.bgen, line 152
   * Prolog: BaseDecl PrefixDeclList
   */
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", value_ptr[1], value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 13: {
  /* from SPARQL.bgen, line 159
   * Prolog: BaseDecl
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", value_ptr[1], Py_None);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 14: {
  /* from SPARQL.bgen, line 166
   * Prolog: PrefixDeclList
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", Py_None, value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 15: {
  /* from SPARQL.bgen, line 173
   * Prolog:
   */
  yyval = Py_None;
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 16: {
  /* from SPARQL.bgen, line 192
   * PrefixDeclList: PrefixDecl
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDeclList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 17: {
  /* from SPARQL.bgen, line 200
   * PrefixDeclList: PrefixDeclList PrefixDecl
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--PrefixDeclList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 18: {
  /* from SPARQL.bgen, line 216
   * PrefixDecl: PREFIX PNAME_NS LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(Bindings, "PrefixDeclaration", "OO", value_ptr[2],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 19: {
  /* from SPARQL.bgen, line 226
   * PrefixDecl: PREFIX PNAME_NS LESS_THAN GREATER_THAN
   */
  PyObject *t = PyObject_GetAttrString(Bindings, "EMPTY_STRING");
  yyval = PyObject_CallMethod(Bindings, "PrefixDeclaration", "OO", value_ptr[2],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 20: {
  /* from SPARQL.bgen, line 242
   * BaseDecl: BASE LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(Bindings, "BaseDeclaration", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BaseDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 21: {
  /* from SPARQL.bgen, line 256
   * AskQuery: ASK WhereClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "AskQuery", "OO", Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--AskQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 22: {
  /* from SPARQL.bgen, line 264
   * AskQuery: ASK DataSetClauseList WhereClause
   */
  yyval = PyObject_CallMethod(Query, "AskQuery", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--AskQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 23: {
  /* from SPARQL.bgen, line 277
   * SelectQuery: SELECT VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOO", value_ptr[2],Py_None,value_ptr[3],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 24: {
  /* from SPARQL.bgen, line 287
   * SelectQuery: SELECT VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOO", value_ptr[2],value_ptr[3],value_ptr[4],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 25: {
  /* from SPARQL.bgen, line 297
   * SelectQuery: SELECT DISTINCT VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOOi", value_ptr[3],Py_None,value_ptr[4],value_ptr[5],1);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 26: {
  /* from SPARQL.bgen, line 308
   * SelectQuery: SELECT DISTINCT VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOOi", value_ptr[3],value_ptr[4],value_ptr[5],value_ptr[6],1);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 28: {
  /* from SPARQL.bgen, line 327
   * VAR_REFERENCES: ASTERISK
   */
  yyval = Py_None;
  if (self->verbose) {
    fprintf(stderr, "--VAR_REFERENCES(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 29: {
  /* from SPARQL.bgen, line 337
   * VariableReferenceList: Var
   */
        yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--VariableReferenceList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 30: {
  /* from SPARQL.bgen, line 345
   * VariableReferenceList: VariableReferenceList Var
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--VariableReferenceList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 31: {
  /* from SPARQL.bgen, line 361
   * IRIref: LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(IRIRef, "IRIRef", "O",value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--IRIref(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 33: {
  /* from SPARQL.bgen, line 384
   * PrefixedName: PNAME_NS
   */
  yyval = PyObject_CallMethod(QName, "QName", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixedName(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 34: {
  /* from SPARQL.bgen, line 390
   * PrefixedName: PNAME_LN
   */
  yyval = PyObject_CallMethod(QName, "QName", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixedName(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 35: {
  /* from SPARQL.bgen, line 400
   * DataSetClauseList: DataSetClause
   */
                yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClauseList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 36: {
  /* from SPARQL.bgen, line 408
   * DataSetClauseList: DataSetClauseList DataSetClause
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--DataSetClauseList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 37: {
  /* from SPARQL.bgen, line 422
   * DataSetClause: FROM IRIref
   */
  yyval = PyObject_CallMethod(IRIRef, "RemoteGraph", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 38: {
  /* from SPARQL.bgen, line 429
   * DataSetClause: FROM NAMED IRIref
   */
  yyval = PyObject_CallMethod(IRIRef, "NamedGraph", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 39: {
  /* from SPARQL.bgen, line 442
   * WhereClause: WHERE GroupGraphPattern
   */
  yyval = PyObject_CallMethod(Query, "WhereClause", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--WhereClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 40: {
  /* from SPARQL.bgen, line 449
   * WhereClause: GroupGraphPattern
   */
  yyval = PyObject_CallMethod(Query, "WhereClause", "O", value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--WhereClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 41: {
  /* from SPARQL.bgen, line 461
   * SolutionModifier:
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "");
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 42: {
  /* from SPARQL.bgen, line 466
   * SolutionModifier: OrderClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 43: {
  /* from SPARQL.bgen, line 472
   * SolutionModifier: OrderClause LimitClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OO",value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 44: {
  /* from SPARQL.bgen, line 479
   * SolutionModifier: OrderClause LimitClause OffsetClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 45: {
  /* from SPARQL.bgen, line 487
   * SolutionModifier: OrderClause OffsetClause LimitClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 46: {
  /* from SPARQL.bgen, line 495
   * SolutionModifier: LimitClause OffsetClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 47: {
  /* from SPARQL.bgen, line 503
   * SolutionModifier: OrderClause OffsetClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 48: {
  /* from SPARQL.bgen, line 511
   * SolutionModifier: OffsetClause
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,Py_None,value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 49: {
  /* from SPARQL.bgen, line 519
   * SolutionModifier: LimitClause
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,value_ptr[1],Py_None);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 50: {
  /* from SPARQL.bgen, line 532
   * OrderClause: ORDER BY OrderConditionList
   */
  yyval = value_ptr[3];
  Py_INCREF(value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--OrderClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 51: {
  /* from SPARQL.bgen, line 545
   * OrderConditionList: OrderCondition
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--OrderConditionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 52: {
  /* from SPARQL.bgen, line 553
   * OrderConditionList: OrderConditionList OrderCondition
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--OrderConditionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 53: {
  /* from SPARQL.bgen, line 569
   * OrderCondition: ASC LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "ASCENDING_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[3],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 54: {
  /* from SPARQL.bgen, line 580
   * OrderCondition: DESC LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "DESCENDING_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[3],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 57: {
  /* from SPARQL.bgen, line 597
   * OrderCondition: LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "UNSPECIFIED_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[2],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 59: {
  /* from SPARQL.bgen, line 615
   * LimitClause: LIMIT NumericLiteral
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--LimitClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 60: {
  /* from SPARQL.bgen, line 628
   * OffsetClause: OFFSET NumericLiteral
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--OffsetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 61: {
  /* from SPARQL.bgen, line 645
   * GroupGraphPattern: LEFT_CURLY RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 62: {
  /* from SPARQL.bgen, line 653
   * GroupGraphPattern: LEFT_CURLY Triples GraphPatternList RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 63: {
  /* from SPARQL.bgen, line 662
   * GroupGraphPattern: LEFT_CURLY Triples RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",value_ptr[2],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 64: {
  /* from SPARQL.bgen, line 671
   * GroupGraphPattern: LEFT_CURLY GraphPatternList RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",Py_None,value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 65: {
  /* from SPARQL.bgen, line 684
   * GraphPatternList: GraphPattern
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 66: {
  /* from SPARQL.bgen, line 692
   * GraphPatternList: GraphPatternList GraphPattern
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 67: {
  /* from SPARQL.bgen, line 739
   * GraphPattern: Filter Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 68: {
  /* from SPARQL.bgen, line 747
   * GraphPattern: Filter DOT Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],value_ptr[3]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 69: {
  /* from SPARQL.bgen, line 756
   * GraphPattern: Filter DOT
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 70: {
  /* from SPARQL.bgen, line 764
   * GraphPattern: Filter
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 71: {
  /* from SPARQL.bgen, line 771
   * GraphPattern: GraphPatternNotTriples Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 72: {
  /* from SPARQL.bgen, line 779
   * GraphPattern: GraphPatternNotTriples DOT Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,value_ptr[3]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 73: {
  /* from SPARQL.bgen, line 788
   * GraphPattern: GraphPatternNotTriples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 74: {
  /* from SPARQL.bgen, line 795
   * GraphPattern: GraphPatternNotTriples DOT
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 75: {
  /* from SPARQL.bgen, line 847
   * GraphPatternNotTriples: OPTIONAL GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedOptionalGraphPattern", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 76: {
  /* from SPARQL.bgen, line 854
   * GraphPatternNotTriples: GroupGraphPattern
   */
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 77: {
  /* from SPARQL.bgen, line 860
   * GraphPatternNotTriples: GroupGraphPattern AlternativeGroupGraphPatterns
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedAlternativeGraphPattern", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 78: {
  /* from SPARQL.bgen, line 867
   * GraphPatternNotTriples: GRAPH Var GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 79: {
  /* from SPARQL.bgen, line 875
   * GraphPatternNotTriples: GRAPH BlankNode GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 80: {
  /* from SPARQL.bgen, line 883
   * GraphPatternNotTriples: GRAPH IRIref GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 81: {
  /* from SPARQL.bgen, line 898
   * AlternativeGroupGraphPatterns: UNION GroupGraphPattern
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--AlternativeGroupGraphPatterns(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 82: {
  /* from SPARQL.bgen, line 907
   * AlternativeGroupGraphPatterns: AlternativeGroupGraphPatterns UNION GroupGraphPattern
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--AlternativeGroupGraphPatterns(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 84: {
  /* from SPARQL.bgen, line 934
   * ConditionalOrExpression: ConditionalAndExpression ConditionalAndExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedConditionalAndExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--ConditionalOrExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 85: {
  /* from SPARQL.bgen, line 946
   * ConditionalAndExpressionList: DOUBLE_PIPE ConditionalAndExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 86: {
  /* from SPARQL.bgen, line 955
   * ConditionalAndExpressionList: ConditionalAndExpressionList DOUBLE_PIPE ConditionalAndExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 87: {
  /* from SPARQL.bgen, line 970
   * ConditionalAndExpression: RelationalExpression ValueLogicalList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedRelationalExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 89: {
  /* from SPARQL.bgen, line 987
   * ValueLogicalList: DOUBLE_AMPERSAND RelationalExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--ValueLogicalList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 90: {
  /* from SPARQL.bgen, line 996
   * ValueLogicalList: ValueLogicalList DOUBLE_AMPERSAND RelationalExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ValueLogicalList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 92: {
  /* from SPARQL.bgen, line 1024
   * RelationalExpression: AdditiveExpression EQUALITY_OP AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "EqualityOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 93: {
  /* from SPARQL.bgen, line 1032
   * RelationalExpression: AdditiveExpression NOT_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "NotEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 94: {
  /* from SPARQL.bgen, line 1040
   * RelationalExpression: AdditiveExpression LESS_THAN AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "LessThanOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 95: {
  /* from SPARQL.bgen, line 1048
   * RelationalExpression: AdditiveExpression GREATER_THAN AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "GreaterThanOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 96: {
  /* from SPARQL.bgen, line 1056
   * RelationalExpression: AdditiveExpression LESS_THAN_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "LessThanOrEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 97: {
  /* from SPARQL.bgen, line 1064
   * RelationalExpression: AdditiveExpression GREATER_THAN_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "GreaterThanOrEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 99: {
  /* from SPARQL.bgen, line 1083
   * AdditiveExpression: MultiplicativeExpression MultiplicativeExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedAdditiveExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  /*yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]);*/
  if (self->verbose) {
    fprintf(stderr, "--AdditiveExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 100: {
  /* from SPARQL.bgen, line 1095
   * MultiplicativeExpressionList: PLUS MultiplicativeExpression
   */
  yyval = PyList_New(1);
  PyObject *mList = PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[1], value_ptr[2]);
  PyList_SET_ITEM(yyval, 0, mList);
  Py_INCREF(mList);
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 101: {
  /* from SPARQL.bgen, line 1105
   * MultiplicativeExpressionList: MINUS MultiplicativeExpression
   */
            yyval = PyList_New(1);
            PyObject *mList = PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[1], value_ptr[2]);
            PyList_SET_ITEM(yyval, 0, mList);
  Py_INCREF(mList);
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 102: {
  /* from SPARQL.bgen, line 1115
   * MultiplicativeExpressionList: MultiplicativeExpressionList MINUS MultiplicativeExpression
   */
  PyList_Append(value_ptr[1], PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[2], value_ptr[3]));
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 103: {
  /* from SPARQL.bgen, line 1125
   * MultiplicativeExpressionList: MultiplicativeExpressionList PLUS MultiplicativeExpression
   */
  PyList_Append(value_ptr[1], PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[2], value_ptr[3]));
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 105: {
  /* from SPARQL.bgen, line 1146
   * MultiplicativeExpression: UnaryExpression UnaryExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedMultiplicativeExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 106: {
  /* from SPARQL.bgen, line 1157
   * UnaryExpressionList: ASTERISK UnaryExpression
   */
            yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 107: {
  /* from SPARQL.bgen, line 1166
   * UnaryExpressionList: FORWARDSLASH UnaryExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 108: {
  /* from SPARQL.bgen, line 1175
   * UnaryExpressionList: UnaryExpressionList ASTERISK UnaryExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 109: {
  /* from SPARQL.bgen, line 1185
   * UnaryExpressionList: UnaryExpressionList FORWARDSLASH UnaryExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 110: {
  /* from SPARQL.bgen, line 1200
   * UnaryExpression: BANG PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "LogicalNegation", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 111: {
  /* from SPARQL.bgen, line 1207
   * UnaryExpression: PLUS PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "NumericPositive", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 112: {
  /* from SPARQL.bgen, line 1214
   * UnaryExpression: MINUS PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "NumericNegative", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 114: {
  /* from SPARQL.bgen, line 1241
   * BuiltInCall: STR LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "STR");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 115: {
  /* from SPARQL.bgen, line 1251
   * BuiltInCall: LANG LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "LANG");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 116: {
  /* from SPARQL.bgen, line 1261
   * BuiltInCall: LANGMATCHES LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "LANGMATCHES");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OOO", funcName,value_ptr[3],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 117: {
  /* from SPARQL.bgen, line 1273
   * BuiltInCall: DATATYPE LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "DATATYPE");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 118: {
  /* from SPARQL.bgen, line 1283
   * BuiltInCall: BOUND LEFT_PAREN Var RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "BOUND");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 119: {
  /* from SPARQL.bgen, line 1293
   * BuiltInCall: isIRI LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isIRI");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 120: {
  /* from SPARQL.bgen, line 1303
   * BuiltInCall: isURI LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isURI");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 121: {
  /* from SPARQL.bgen, line 1313
   * BuiltInCall: isBLANK LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isBLANK");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 122: {
  /* from SPARQL.bgen, line 1323
   * BuiltInCall: isLITERAL LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isLITERAL");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 124: {
  /* from SPARQL.bgen, line 1341
   * RegexExpression: REGEX LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "ParsedREGEXInvocation", "OO", value_ptr[3],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--RegexExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 125: {
  /* from SPARQL.bgen, line 1352
   * RegexExpression: REGEX LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "ParsedREGEXInvocation", "OOO", value_ptr[3],value_ptr[5],value_ptr[7]);
  if (self->verbose) {
    fprintf(stderr, "--RegexExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[7], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[8], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  Py_DECREF(value_ptr[7]);
  Py_DECREF(value_ptr[8]);
  break;
}
case 126: {
  /* from SPARQL.bgen, line 1370
   * FunctionCall: IRIref LEFT_PAREN ArgumentList RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "FunctionCall", "OO", value_ptr[1], value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--FunctionCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 127: {
  /* from SPARQL.bgen, line 1379
   * FunctionCall: IRIref NIL
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "FunctionCall", "OO", value_ptr[1], PyList_New(0));
  if (self->verbose) {
    fprintf(stderr, "--FunctionCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 128: {
  /* from SPARQL.bgen, line 1396
   * ArgumentList: ConditionalOrExpression
   */
  yyval = PyList_New(1);
  /* Steals a reference */
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--ArgumentList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 129: {
  /* from SPARQL.bgen, line 1405
   * ArgumentList: ConditionalOrExpression COMMA ArgumentList
   */
  yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--ArgumentList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 130: {
  /* from SPARQL.bgen, line 1421
   * PrimaryExpression: LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--PrimaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 139: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 8
   * Filter: FILTER LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(Filter, "ParsedExpressionFilter", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 140: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 17
   * Filter: FILTER BuiltInCall
   */
  yyval = PyObject_CallMethod(Filter, "ParsedFunctionFilter", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 141: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 24
   * Filter: FILTER FunctionCall
   */
  yyval = PyObject_CallMethod(Filter, "ParsedFunctionFilter", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 142: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 40
   * Triples: Triples DOT TriplesSameSubject
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--Triples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 144: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 54
   * Triples: TriplesSameSubject
   */
  yyval = PyList_New(1);
  /* Steals a reference */
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--Triples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 145: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 80
   * TriplesSameSubject: Var PropertyListNotEmpty
   */
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 146: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 87
   * TriplesSameSubject: GraphTerm PropertyListNotEmpty
   */
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 147: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 94
   * TriplesSameSubject: LEFT_SQUARE PropertyListNotEmpty RIGHT_SQUARE PropertyList
   */
  yyval = PyObject_CallMethod(Resource, "TwiceReferencedBlankNode", "OO", value_ptr[2],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 148: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 103
   * TriplesSameSubject: Collection PropertyListNotEmpty
   */
  PyObject_CallMethod(value_ptr[1], "setPropertyValueList", "O", value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 151: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 127
   * PropertyList:
   */
  yyval = PyList_New(0);
  if (self->verbose) {
    fprintf(stderr, "--PropertyList(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 152: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 135
   * PropertyListNotEmpty: Verb ObjectList
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, PyObject_CallMethod(Triples, "PropertyValue", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--PropertyListNotEmpty(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 153: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 143
   * PropertyListNotEmpty: Verb ObjectList SEMICOLON PropertyList
   */
  yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", PyObject_CallMethod(Triples, "PropertyValue", "OO", value_ptr[1],value_ptr[2]),value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--PropertyListNotEmpty(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 154: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 159
   * ObjectList: GraphNode
   */
         yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--ObjectList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 155: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 167
   * ObjectList: ObjectList COMMA GraphNode
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ObjectList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 161: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 210
   * Verb: A
   */
  yyval = PyObject_GetAttrString(RDF, "type");
  if (self->verbose) {
    fprintf(stderr, "--Verb(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 163: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 228
   * TriplesNode: LEFT_SQUARE PropertyList RIGHT_SQUARE
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 164: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 244
   * Collection: LEFT_PAREN GraphNodeList RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(Resource, "ParsedCollection", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Collection(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 165: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 256
   * GraphNodeList: GraphNode
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--GraphNodeList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 166: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 264
   * GraphNodeList: GraphNodeList GraphNode
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphNodeList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 167: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 278
   * Var: VARNAME
   */
  PyObject *varName = PySequence_GetSlice(value_ptr[1], 1, PyString_GET_SIZE(value_ptr[1]));
  yyval = PyObject_CallMethod(rdflib, "Variable", "O", varName);
  Py_XDECREF(varName);
  if (self->verbose) {
    fprintf(stderr, "--Var(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 172: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 312
   * GraphTerm: MINUS NumericLiteral
   */
  PyObject *negNum = PyNumber_Negative(PyObject_CallMethod(value_ptr[2],"toPython",NULL));
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", negNum);
  Py_XDECREF(negNum);
  if (self->verbose) {
    fprintf(stderr, "--GraphTerm(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 176: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 340
   * NumericLiteral: INTEGER
   */
     PyObject *num = PyNumber_Int(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 177: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 349
   * NumericLiteral: DECIMAL
   */
     PyObject *num = PyNumber_Float(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 178: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 358
   * NumericLiteral: DOUBLE
   */
     PyObject *num = PyNumber_Float(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 179: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 371
   * RDFLiteral: String
   */
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 180: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 377
   * RDFLiteral: String LANGTAG
   */
  PyObject *lang = PySequence_GetSlice(value_ptr[2], 1, PyString_GET_SIZE(value_ptr[2]));
  yyval = PyObject_CallMethod(rdflib, "Literal", "OO", value_ptr[1], lang);
  Py_XDECREF(lang);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 181: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 386
   * RDFLiteral: String DOUBLE_HAT IRIref
   */
  yyval = PyObject_CallMethod(Expression, "ParsedDatatypedLiteral", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 184: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 413
   * String: STRING_LITERAL_DELIMETER_1 STRING_LITERAL1 STRING_LITERAL_DELIMETER_1
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 185: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 421
   * String: STRING_LITERAL_DELIMETER_3 STRING_LITERAL2 STRING_LITERAL_DELIMETER_3
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 186: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 429
   * String: STRING_LITERAL_DELIMETER_2 STRING_LITERAL_LONG1 STRING_LITERAL_DELIMETER_2
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 187: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 437
   * String: STRING_LITERAL_DELIMETER_4 STRING_LITERAL_LONG2 STRING_LITERAL_DELIMETER_4
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 188: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 446
   * String: STRING_LITERAL_DELIMETER_1 STRING_LITERAL_DELIMETER_1
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 189: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 453
   * String: STRING_LITERAL_DELIMETER_3 STRING_LITERAL_DELIMETER_3
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 190: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 460
   * String: STRING_LITERAL_DELIMETER_2 STRING_LITERAL_DELIMETER_2
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 191: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 467
   * String: STRING_LITERAL_DELIMETER_4 STRING_LITERAL_DELIMETER_4
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 192: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 480
   * BlankNode: ANON
   */
  yyval = PyObject_CallMethod(rdflib, "Variable", "O", PyObject_CallMethod(rdflib, "BNode",""));
  if (self->verbose) {
    fprintf(stderr, "--BlankNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 193: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 491
   * BlankNode: BLANK_NODE_LABEL
   */
  PyObject *lang = PySequence_GetSlice(value_ptr[1], 2, PyString_GET_SIZE(value_ptr[1]));
  yyval = PyObject_CallMethod(rdflib, "BNode", "O",lang);
  Py_XDECREF(lang);
  if (self->verbose) {
    fprintf(stderr, "--BlankNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
      }
      if (!yyval) {
        lexer_free(lexer);
        return NULL;
      }
      *++value_ptr = yyval;

      if (self->verbose) print_state_stack(state_stack, state_ptr);

      /* Now "shift" the result of the reduction. */
      /* Determine what state that goes to, based on the state
         we popped back to and the rule number reduced by. */

      yyn = derives[yyn] - YYNTBASE;
      yystate = goto_idx[yyn] + *state_ptr;
      if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *state_ptr) {
        yystate = yytable[yystate];
      } else {
        yystate = default_goto[yyn];
      }
      continue;
    }

    yyn = yytable[yyn];

    /* yyn is what to do for this token type in this state.
       Negative => reduce, -yyn is rule number.
       Positive => shift, yyn is new state.
         New state is final state => don't bother to shift
         just return success.
       0, or max negative number => error. */

    if (yyn > YYFLAG && yyn < 0) {
      yyn = -yyn;

      /* Do a reduction. yyn is the number of a rule to reduce with. */
      if (self->verbose) print_reduce(yyn);

      yylen = rhs_size[yyn];
      state_ptr -= yylen;
      value_ptr -= yylen;
      if (yylen > 0) yyval = value_ptr[1];

      /* Action routines */
      switch (yyn) {
case 1: {
  /* from SPARQL.bgen, line 41
   * Query: Prolog QueryTypes
   */
  yyval = PyObject_CallMethod(Query, "Query", "OO", value_ptr[1], value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Query(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 2: {
  /* from SPARQL.bgen, line 52
   * QueryTypes: SelectQuery
   */
  yyval = value_ptr[1];
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--QueryTypes(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 5: {
  /* from SPARQL.bgen, line 65
   * QueryTypes: AskQuery
   */
  yyval = value_ptr[1];
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--QueryTypes(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 6: {
  /* from SPARQL.bgen, line 78
   * DescribeQuery: DESCRIBE VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],value_ptr[3],value_ptr[4],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 7: {
  /* from SPARQL.bgen, line 88
   * DescribeQuery: DESCRIBE VAR_REFERENCES SolutionModifier
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],Py_None,Py_None,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 8: {
  /* from SPARQL.bgen, line 98
   * DescribeQuery: DESCRIBE VAR_REFERENCES DataSetClauseList SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],value_ptr[3],Py_None,value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 9: {
  /* from SPARQL.bgen, line 108
   * DescribeQuery: DESCRIBE VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "DescribeQuery", "OOOO", value_ptr[2],Py_None,value_ptr[3],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--DescribeQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 10: {
  /* from SPARQL.bgen, line 123
   * ConstructQuery: CONSTRUCT LEFT_CURLY Triples RIGHT_CURLY DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "ConstructQuery", "OOOO", value_ptr[3],value_ptr[5],value_ptr[6],value_ptr[7]);
  if (self->verbose) {
    fprintf(stderr, "--ConstructQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[7], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  Py_DECREF(value_ptr[7]);
  break;
}
case 11: {
  /* from SPARQL.bgen, line 135
   * ConstructQuery: CONSTRUCT LEFT_CURLY Triples RIGHT_CURLY WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "ConstructQuery", "OOOO", value_ptr[3],Py_None,value_ptr[5],value_ptr[6]);
  if (self->verbose) {
    fprintf(stderr, "--ConstructQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 12: {
  /* from SPARQL.bgen, line 152
   * Prolog: BaseDecl PrefixDeclList
   */
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", value_ptr[1], value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 13: {
  /* from SPARQL.bgen, line 159
   * Prolog: BaseDecl
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", value_ptr[1], Py_None);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 14: {
  /* from SPARQL.bgen, line 166
   * Prolog: PrefixDeclList
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "Prolog", "OO", Py_None, value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 15: {
  /* from SPARQL.bgen, line 173
   * Prolog:
   */
  yyval = Py_None;
  if (self->verbose) {
    fprintf(stderr, "--Prolog(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 16: {
  /* from SPARQL.bgen, line 192
   * PrefixDeclList: PrefixDecl
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDeclList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 17: {
  /* from SPARQL.bgen, line 200
   * PrefixDeclList: PrefixDeclList PrefixDecl
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--PrefixDeclList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 18: {
  /* from SPARQL.bgen, line 216
   * PrefixDecl: PREFIX PNAME_NS LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(Bindings, "PrefixDeclaration", "OO", value_ptr[2],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 19: {
  /* from SPARQL.bgen, line 226
   * PrefixDecl: PREFIX PNAME_NS LESS_THAN GREATER_THAN
   */
  PyObject *t = PyObject_GetAttrString(Bindings, "EMPTY_STRING");
  yyval = PyObject_CallMethod(Bindings, "PrefixDeclaration", "OO", value_ptr[2],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--PrefixDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 20: {
  /* from SPARQL.bgen, line 242
   * BaseDecl: BASE LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(Bindings, "BaseDeclaration", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BaseDecl(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 21: {
  /* from SPARQL.bgen, line 256
   * AskQuery: ASK WhereClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "AskQuery", "OO", Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--AskQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 22: {
  /* from SPARQL.bgen, line 264
   * AskQuery: ASK DataSetClauseList WhereClause
   */
  yyval = PyObject_CallMethod(Query, "AskQuery", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--AskQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 23: {
  /* from SPARQL.bgen, line 277
   * SelectQuery: SELECT VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOO", value_ptr[2],Py_None,value_ptr[3],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 24: {
  /* from SPARQL.bgen, line 287
   * SelectQuery: SELECT VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOO", value_ptr[2],value_ptr[3],value_ptr[4],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 25: {
  /* from SPARQL.bgen, line 297
   * SelectQuery: SELECT DISTINCT VAR_REFERENCES WhereClause SolutionModifier
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOOi", value_ptr[3],Py_None,value_ptr[4],value_ptr[5],1);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  break;
}
case 26: {
  /* from SPARQL.bgen, line 308
   * SelectQuery: SELECT DISTINCT VAR_REFERENCES DataSetClauseList WhereClause SolutionModifier
   */
  yyval = PyObject_CallMethod(Query, "SelectQuery", "OOOOi", value_ptr[3],value_ptr[4],value_ptr[5],value_ptr[6],1);
  if (self->verbose) {
    fprintf(stderr, "--SelectQuery(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 28: {
  /* from SPARQL.bgen, line 327
   * VAR_REFERENCES: ASTERISK
   */
  yyval = Py_None;
  if (self->verbose) {
    fprintf(stderr, "--VAR_REFERENCES(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 29: {
  /* from SPARQL.bgen, line 337
   * VariableReferenceList: Var
   */
        yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--VariableReferenceList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 30: {
  /* from SPARQL.bgen, line 345
   * VariableReferenceList: VariableReferenceList Var
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--VariableReferenceList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 31: {
  /* from SPARQL.bgen, line 361
   * IRIref: LESS_THAN Q_IRI_CONTENT GREATER_THAN
   */
  yyval = PyObject_CallMethod(IRIRef, "IRIRef", "O",value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--IRIref(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 33: {
  /* from SPARQL.bgen, line 384
   * PrefixedName: PNAME_NS
   */
  yyval = PyObject_CallMethod(QName, "QName", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixedName(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 34: {
  /* from SPARQL.bgen, line 390
   * PrefixedName: PNAME_LN
   */
  yyval = PyObject_CallMethod(QName, "QName", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--PrefixedName(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 35: {
  /* from SPARQL.bgen, line 400
   * DataSetClauseList: DataSetClause
   */
                yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClauseList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 36: {
  /* from SPARQL.bgen, line 408
   * DataSetClauseList: DataSetClauseList DataSetClause
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--DataSetClauseList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 37: {
  /* from SPARQL.bgen, line 422
   * DataSetClause: FROM IRIref
   */
  yyval = PyObject_CallMethod(IRIRef, "RemoteGraph", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 38: {
  /* from SPARQL.bgen, line 429
   * DataSetClause: FROM NAMED IRIref
   */
  yyval = PyObject_CallMethod(IRIRef, "NamedGraph", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--DataSetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 39: {
  /* from SPARQL.bgen, line 442
   * WhereClause: WHERE GroupGraphPattern
   */
  yyval = PyObject_CallMethod(Query, "WhereClause", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--WhereClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 40: {
  /* from SPARQL.bgen, line 449
   * WhereClause: GroupGraphPattern
   */
  yyval = PyObject_CallMethod(Query, "WhereClause", "O", value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--WhereClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 41: {
  /* from SPARQL.bgen, line 461
   * SolutionModifier:
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "");
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 42: {
  /* from SPARQL.bgen, line 466
   * SolutionModifier: OrderClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "O",value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 43: {
  /* from SPARQL.bgen, line 472
   * SolutionModifier: OrderClause LimitClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OO",value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 44: {
  /* from SPARQL.bgen, line 479
   * SolutionModifier: OrderClause LimitClause OffsetClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 45: {
  /* from SPARQL.bgen, line 487
   * SolutionModifier: OrderClause OffsetClause LimitClause
   */
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 46: {
  /* from SPARQL.bgen, line 495
   * SolutionModifier: LimitClause OffsetClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 47: {
  /* from SPARQL.bgen, line 503
   * SolutionModifier: OrderClause OffsetClause
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",value_ptr[1],Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 48: {
  /* from SPARQL.bgen, line 511
   * SolutionModifier: OffsetClause
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,Py_None,value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 49: {
  /* from SPARQL.bgen, line 519
   * SolutionModifier: LimitClause
   */
  Py_INCREF(Py_None);
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(SolutionModifier, "SolutionModifier", "OOO",Py_None,value_ptr[1],Py_None);
  if (self->verbose) {
    fprintf(stderr, "--SolutionModifier(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 50: {
  /* from SPARQL.bgen, line 532
   * OrderClause: ORDER BY OrderConditionList
   */
  yyval = value_ptr[3];
  Py_INCREF(value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--OrderClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 51: {
  /* from SPARQL.bgen, line 545
   * OrderConditionList: OrderCondition
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--OrderConditionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 52: {
  /* from SPARQL.bgen, line 553
   * OrderConditionList: OrderConditionList OrderCondition
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--OrderConditionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 53: {
  /* from SPARQL.bgen, line 569
   * OrderCondition: ASC LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "ASCENDING_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[3],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 54: {
  /* from SPARQL.bgen, line 580
   * OrderCondition: DESC LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "DESCENDING_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[3],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 57: {
  /* from SPARQL.bgen, line 597
   * OrderCondition: LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *t = PyObject_GetAttrString(SolutionModifier, "UNSPECIFIED_ORDER");
  yyval = PyObject_CallMethod(SolutionModifier, "ParsedOrderConditionExpression", "OO",value_ptr[2],t);
  Py_XDECREF(t);
  if (self->verbose) {
    fprintf(stderr, "--OrderCondition(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 59: {
  /* from SPARQL.bgen, line 615
   * LimitClause: LIMIT NumericLiteral
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--LimitClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 60: {
  /* from SPARQL.bgen, line 628
   * OffsetClause: OFFSET NumericLiteral
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--OffsetClause(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 61: {
  /* from SPARQL.bgen, line 645
   * GroupGraphPattern: LEFT_CURLY RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 62: {
  /* from SPARQL.bgen, line 653
   * GroupGraphPattern: LEFT_CURLY Triples GraphPatternList RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 63: {
  /* from SPARQL.bgen, line 662
   * GroupGraphPattern: LEFT_CURLY Triples RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",value_ptr[2],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 64: {
  /* from SPARQL.bgen, line 671
   * GroupGraphPattern: LEFT_CURLY GraphPatternList RIGHT_CURLY
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGroupGraphPattern", "OO",Py_None,value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GroupGraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 65: {
  /* from SPARQL.bgen, line 684
   * GraphPatternList: GraphPattern
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 66: {
  /* from SPARQL.bgen, line 692
   * GraphPatternList: GraphPatternList GraphPattern
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 67: {
  /* from SPARQL.bgen, line 739
   * GraphPattern: Filter Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 68: {
  /* from SPARQL.bgen, line 747
   * GraphPattern: Filter DOT Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],value_ptr[3]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 69: {
  /* from SPARQL.bgen, line 756
   * GraphPattern: Filter DOT
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 70: {
  /* from SPARQL.bgen, line 764
   * GraphPattern: Filter
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",Py_None,value_ptr[1],Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 71: {
  /* from SPARQL.bgen, line 771
   * GraphPattern: GraphPatternNotTriples Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,value_ptr[2]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 72: {
  /* from SPARQL.bgen, line 779
   * GraphPattern: GraphPatternNotTriples DOT Triples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,value_ptr[3]);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 73: {
  /* from SPARQL.bgen, line 788
   * GraphPattern: GraphPatternNotTriples
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 74: {
  /* from SPARQL.bgen, line 795
   * GraphPattern: GraphPatternNotTriples DOT
   */
  yyval = PyObject_CallMethod(GraphPattern, "GraphPattern", "OOO",value_ptr[1],Py_None,Py_None);
  Py_INCREF(Py_None);
  if (self->verbose) {
    fprintf(stderr, "--GraphPattern(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 75: {
  /* from SPARQL.bgen, line 847
   * GraphPatternNotTriples: OPTIONAL GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedOptionalGraphPattern", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 76: {
  /* from SPARQL.bgen, line 854
   * GraphPatternNotTriples: GroupGraphPattern
   */
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 77: {
  /* from SPARQL.bgen, line 860
   * GraphPatternNotTriples: GroupGraphPattern AlternativeGroupGraphPatterns
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedAlternativeGraphPattern", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 78: {
  /* from SPARQL.bgen, line 867
   * GraphPatternNotTriples: GRAPH Var GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 79: {
  /* from SPARQL.bgen, line 875
   * GraphPatternNotTriples: GRAPH BlankNode GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 80: {
  /* from SPARQL.bgen, line 883
   * GraphPatternNotTriples: GRAPH IRIref GroupGraphPattern
   */
  yyval = PyObject_CallMethod(GraphPattern, "ParsedGraphGraphPattern", "OO", value_ptr[2],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--GraphPatternNotTriples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 81: {
  /* from SPARQL.bgen, line 898
   * AlternativeGroupGraphPatterns: UNION GroupGraphPattern
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--AlternativeGroupGraphPatterns(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 82: {
  /* from SPARQL.bgen, line 907
   * AlternativeGroupGraphPatterns: AlternativeGroupGraphPatterns UNION GroupGraphPattern
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--AlternativeGroupGraphPatterns(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 84: {
  /* from SPARQL.bgen, line 934
   * ConditionalOrExpression: ConditionalAndExpression ConditionalAndExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedConditionalAndExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--ConditionalOrExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 85: {
  /* from SPARQL.bgen, line 946
   * ConditionalAndExpressionList: DOUBLE_PIPE ConditionalAndExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 86: {
  /* from SPARQL.bgen, line 955
   * ConditionalAndExpressionList: ConditionalAndExpressionList DOUBLE_PIPE ConditionalAndExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 87: {
  /* from SPARQL.bgen, line 970
   * ConditionalAndExpression: RelationalExpression ValueLogicalList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedRelationalExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--ConditionalAndExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 89: {
  /* from SPARQL.bgen, line 987
   * ValueLogicalList: DOUBLE_AMPERSAND RelationalExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--ValueLogicalList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 90: {
  /* from SPARQL.bgen, line 996
   * ValueLogicalList: ValueLogicalList DOUBLE_AMPERSAND RelationalExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ValueLogicalList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 92: {
  /* from SPARQL.bgen, line 1024
   * RelationalExpression: AdditiveExpression EQUALITY_OP AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "EqualityOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 93: {
  /* from SPARQL.bgen, line 1032
   * RelationalExpression: AdditiveExpression NOT_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "NotEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 94: {
  /* from SPARQL.bgen, line 1040
   * RelationalExpression: AdditiveExpression LESS_THAN AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "LessThanOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 95: {
  /* from SPARQL.bgen, line 1048
   * RelationalExpression: AdditiveExpression GREATER_THAN AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "GreaterThanOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 96: {
  /* from SPARQL.bgen, line 1056
   * RelationalExpression: AdditiveExpression LESS_THAN_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "LessThanOrEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 97: {
  /* from SPARQL.bgen, line 1064
   * RelationalExpression: AdditiveExpression GREATER_THAN_EQUAL AdditiveExpression
   */
  yyval = PyObject_CallMethod(Operators, "GreaterThanOrEqualOperator", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RelationalExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 99: {
  /* from SPARQL.bgen, line 1083
   * AdditiveExpression: MultiplicativeExpression MultiplicativeExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedAdditiveExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  /*yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]);*/
  if (self->verbose) {
    fprintf(stderr, "--AdditiveExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 100: {
  /* from SPARQL.bgen, line 1095
   * MultiplicativeExpressionList: PLUS MultiplicativeExpression
   */
  yyval = PyList_New(1);
  PyObject *mList = PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[1], value_ptr[2]);
  PyList_SET_ITEM(yyval, 0, mList);
  Py_INCREF(mList);
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 101: {
  /* from SPARQL.bgen, line 1105
   * MultiplicativeExpressionList: MINUS MultiplicativeExpression
   */
            yyval = PyList_New(1);
            PyObject *mList = PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[1], value_ptr[2]);
            PyList_SET_ITEM(yyval, 0, mList);
  Py_INCREF(mList);
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 102: {
  /* from SPARQL.bgen, line 1115
   * MultiplicativeExpressionList: MultiplicativeExpressionList MINUS MultiplicativeExpression
   */
  PyList_Append(value_ptr[1], PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[2], value_ptr[3]));
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 103: {
  /* from SPARQL.bgen, line 1125
   * MultiplicativeExpressionList: MultiplicativeExpressionList PLUS MultiplicativeExpression
   */
  PyList_Append(value_ptr[1], PyObject_CallMethod(Expression, "ParsedPrefixedMultiplicativeExpressionList", "OO",value_ptr[2], value_ptr[3]));
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 105: {
  /* from SPARQL.bgen, line 1146
   * MultiplicativeExpression: UnaryExpression UnaryExpressionList
   */
  yyval = PyObject_CallMethod(Expression, "ParsedMultiplicativeExpressionList", "O", PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--MultiplicativeExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 106: {
  /* from SPARQL.bgen, line 1157
   * UnaryExpressionList: ASTERISK UnaryExpression
   */
            yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 107: {
  /* from SPARQL.bgen, line 1166
   * UnaryExpressionList: FORWARDSLASH UnaryExpression
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[2]);
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 108: {
  /* from SPARQL.bgen, line 1175
   * UnaryExpressionList: UnaryExpressionList ASTERISK UnaryExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 109: {
  /* from SPARQL.bgen, line 1185
   * UnaryExpressionList: UnaryExpressionList FORWARDSLASH UnaryExpression
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpressionList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 110: {
  /* from SPARQL.bgen, line 1200
   * UnaryExpression: BANG PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "LogicalNegation", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 111: {
  /* from SPARQL.bgen, line 1207
   * UnaryExpression: PLUS PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "NumericPositive", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 112: {
  /* from SPARQL.bgen, line 1214
   * UnaryExpression: MINUS PrimaryExpression
   */
  yyval = PyObject_CallMethod(Operators, "NumericNegative", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--UnaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 114: {
  /* from SPARQL.bgen, line 1241
   * BuiltInCall: STR LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "STR");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 115: {
  /* from SPARQL.bgen, line 1251
   * BuiltInCall: LANG LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "LANG");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 116: {
  /* from SPARQL.bgen, line 1261
   * BuiltInCall: LANGMATCHES LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "LANGMATCHES");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OOO", funcName,value_ptr[3],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 117: {
  /* from SPARQL.bgen, line 1273
   * BuiltInCall: DATATYPE LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "DATATYPE");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 118: {
  /* from SPARQL.bgen, line 1283
   * BuiltInCall: BOUND LEFT_PAREN Var RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "BOUND");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 119: {
  /* from SPARQL.bgen, line 1293
   * BuiltInCall: isIRI LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isIRI");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 120: {
  /* from SPARQL.bgen, line 1303
   * BuiltInCall: isURI LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isURI");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 121: {
  /* from SPARQL.bgen, line 1313
   * BuiltInCall: isBLANK LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isBLANK");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 122: {
  /* from SPARQL.bgen, line 1323
   * BuiltInCall: isLITERAL LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  PyObject *funcName = PyObject_GetAttrString(FunctionLibrary, "isLITERAL");
  yyval = PyObject_CallMethod(FunctionLibrary, "BuiltinFunctionCall", "OO", funcName,value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--BuiltInCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 124: {
  /* from SPARQL.bgen, line 1341
   * RegexExpression: REGEX LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "ParsedREGEXInvocation", "OO", value_ptr[3],value_ptr[5]);
  if (self->verbose) {
    fprintf(stderr, "--RegexExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  break;
}
case 125: {
  /* from SPARQL.bgen, line 1352
   * RegexExpression: REGEX LEFT_PAREN ConditionalOrExpression COMMA ConditionalOrExpression COMMA ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "ParsedREGEXInvocation", "OOO", value_ptr[3],value_ptr[5],value_ptr[7]);
  if (self->verbose) {
    fprintf(stderr, "--RegexExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[5], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[6], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[7], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[8], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  Py_DECREF(value_ptr[5]);
  Py_DECREF(value_ptr[6]);
  Py_DECREF(value_ptr[7]);
  Py_DECREF(value_ptr[8]);
  break;
}
case 126: {
  /* from SPARQL.bgen, line 1370
   * FunctionCall: IRIref LEFT_PAREN ArgumentList RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "FunctionCall", "OO", value_ptr[1], value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--FunctionCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 127: {
  /* from SPARQL.bgen, line 1379
   * FunctionCall: IRIref NIL
   */
  yyval = PyObject_CallMethod(FunctionLibrary, "FunctionCall", "OO", value_ptr[1], PyList_New(0));
  if (self->verbose) {
    fprintf(stderr, "--FunctionCall(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 128: {
  /* from SPARQL.bgen, line 1396
   * ArgumentList: ConditionalOrExpression
   */
  yyval = PyList_New(1);
  /* Steals a reference */
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--ArgumentList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 129: {
  /* from SPARQL.bgen, line 1405
   * ArgumentList: ConditionalOrExpression COMMA ArgumentList
   */
  yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--ArgumentList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 130: {
  /* from SPARQL.bgen, line 1421
   * PrimaryExpression: LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  yyval = value_ptr[2];
  Py_INCREF(value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--PrimaryExpression(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 139: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 8
   * Filter: FILTER LEFT_PAREN ConditionalOrExpression RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(Filter, "ParsedExpressionFilter", "O", value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 140: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 17
   * Filter: FILTER BuiltInCall
   */
  yyval = PyObject_CallMethod(Filter, "ParsedFunctionFilter", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 141: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 24
   * Filter: FILTER FunctionCall
   */
  yyval = PyObject_CallMethod(Filter, "ParsedFunctionFilter", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Filter(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 142: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 40
   * Triples: Triples DOT TriplesSameSubject
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--Triples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 144: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 54
   * Triples: TriplesSameSubject
   */
  yyval = PyList_New(1);
  /* Steals a reference */
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--Triples(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 145: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 80
   * TriplesSameSubject: Var PropertyListNotEmpty
   */
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 146: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 87
   * TriplesSameSubject: GraphTerm PropertyListNotEmpty
   */
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", value_ptr[1],value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 147: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 94
   * TriplesSameSubject: LEFT_SQUARE PropertyListNotEmpty RIGHT_SQUARE PropertyList
   */
  yyval = PyObject_CallMethod(Resource, "TwiceReferencedBlankNode", "OO", value_ptr[2],value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 148: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 103
   * TriplesSameSubject: Collection PropertyListNotEmpty
   */
  PyObject_CallMethod(value_ptr[1], "setPropertyValueList", "O", value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--TriplesSameSubject(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 151: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 127
   * PropertyList:
   */
  yyval = PyList_New(0);
  if (self->verbose) {
    fprintf(stderr, "--PropertyList(");
    fprintf(stderr, ")\n");
  }
  break;
}
case 152: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 135
   * PropertyListNotEmpty: Verb ObjectList
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, PyObject_CallMethod(Triples, "PropertyValue", "OO", value_ptr[1],value_ptr[2]));
  if (self->verbose) {
    fprintf(stderr, "--PropertyListNotEmpty(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 153: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 143
   * PropertyListNotEmpty: Verb ObjectList SEMICOLON PropertyList
   */
  yyval = PyObject_CallMethod(Util, "ListPrepend", "OO", PyObject_CallMethod(Triples, "PropertyValue", "OO", value_ptr[1],value_ptr[2]),value_ptr[4]);
  if (self->verbose) {
    fprintf(stderr, "--PropertyListNotEmpty(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[4], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  Py_DECREF(value_ptr[4]);
  break;
}
case 154: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 159
   * ObjectList: GraphNode
   */
         yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--ObjectList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 155: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 167
   * ObjectList: ObjectList COMMA GraphNode
   */
  PyList_Append(value_ptr[1], value_ptr[3]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--ObjectList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 161: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 210
   * Verb: A
   */
  yyval = PyObject_GetAttrString(RDF, "type");
  if (self->verbose) {
    fprintf(stderr, "--Verb(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 163: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 228
   * TriplesNode: LEFT_SQUARE PropertyList RIGHT_SQUARE
   */
  Py_INCREF(Py_None);
  yyval = PyObject_CallMethod(Resource, "Resource", "OO", Py_None,value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--TriplesNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 164: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 244
   * Collection: LEFT_PAREN GraphNodeList RIGHT_PAREN
   */
  yyval = PyObject_CallMethod(Resource, "ParsedCollection", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--Collection(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 165: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 256
   * GraphNodeList: GraphNode
   */
  yyval = PyList_New(1);
  PyList_SET_ITEM(yyval, 0, value_ptr[1]);
  Py_INCREF(value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--GraphNodeList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 166: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 264
   * GraphNodeList: GraphNodeList GraphNode
   */
  PyList_Append(value_ptr[1], value_ptr[2]);
  Py_INCREF(value_ptr[1]);
  yyval = value_ptr[1];
  if (self->verbose) {
    fprintf(stderr, "--GraphNodeList(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 167: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 278
   * Var: VARNAME
   */
  PyObject *varName = PySequence_GetSlice(value_ptr[1], 1, PyString_GET_SIZE(value_ptr[1]));
  yyval = PyObject_CallMethod(rdflib, "Variable", "O", varName);
  Py_XDECREF(varName);
  if (self->verbose) {
    fprintf(stderr, "--Var(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 172: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 312
   * GraphTerm: MINUS NumericLiteral
   */
  PyObject *negNum = PyNumber_Negative(PyObject_CallMethod(value_ptr[2],"toPython",NULL));
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", negNum);
  Py_XDECREF(negNum);
  if (self->verbose) {
    fprintf(stderr, "--GraphTerm(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 176: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 340
   * NumericLiteral: INTEGER
   */
     PyObject *num = PyNumber_Int(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 177: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 349
   * NumericLiteral: DECIMAL
   */
     PyObject *num = PyNumber_Float(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 178: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 358
   * NumericLiteral: DOUBLE
   */
     PyObject *num = PyNumber_Float(value_ptr[1]);
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", num);
     Py_XDECREF(num);
  if (self->verbose) {
    fprintf(stderr, "--NumericLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 179: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 371
   * RDFLiteral: String
   */
  yyval = PyObject_CallMethod(rdflib, "Literal", "O", value_ptr[1]);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 180: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 377
   * RDFLiteral: String LANGTAG
   */
  PyObject *lang = PySequence_GetSlice(value_ptr[2], 1, PyString_GET_SIZE(value_ptr[2]));
  yyval = PyObject_CallMethod(rdflib, "Literal", "OO", value_ptr[1], lang);
  Py_XDECREF(lang);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 181: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 386
   * RDFLiteral: String DOUBLE_HAT IRIref
   */
  yyval = PyObject_CallMethod(Expression, "ParsedDatatypedLiteral", "OO", value_ptr[1],value_ptr[3]);
  if (self->verbose) {
    fprintf(stderr, "--RDFLiteral(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 184: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 413
   * String: STRING_LITERAL_DELIMETER_1 STRING_LITERAL1 STRING_LITERAL_DELIMETER_1
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 185: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 421
   * String: STRING_LITERAL_DELIMETER_3 STRING_LITERAL2 STRING_LITERAL_DELIMETER_3
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 186: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 429
   * String: STRING_LITERAL_DELIMETER_2 STRING_LITERAL_LONG1 STRING_LITERAL_DELIMETER_2
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 187: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 437
   * String: STRING_LITERAL_DELIMETER_4 STRING_LITERAL_LONG2 STRING_LITERAL_DELIMETER_4
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "O", value_ptr[2]);
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[3], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  Py_DECREF(value_ptr[3]);
  break;
}
case 188: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 446
   * String: STRING_LITERAL_DELIMETER_1 STRING_LITERAL_DELIMETER_1
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 189: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 453
   * String: STRING_LITERAL_DELIMETER_3 STRING_LITERAL_DELIMETER_3
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 190: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 460
   * String: STRING_LITERAL_DELIMETER_2 STRING_LITERAL_DELIMETER_2
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 191: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 467
   * String: STRING_LITERAL_DELIMETER_4 STRING_LITERAL_DELIMETER_4
   */
  yyval = PyObject_CallMethod(Expression, "ParsedString", "");
  if (self->verbose) {
    fprintf(stderr, "--String(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ", ");
    PyObject_Print(value_ptr[2], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  Py_DECREF(value_ptr[2]);
  break;
}
case 192: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 480
   * BlankNode: ANON
   */
  yyval = PyObject_CallMethod(rdflib, "Variable", "O", PyObject_CallMethod(rdflib, "BNode",""));
  if (self->verbose) {
    fprintf(stderr, "--BlankNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
case 193: {
  /* from SPARQLTurtleSuperSet.bgen.frag, line 491
   * BlankNode: BLANK_NODE_LABEL
   */
  PyObject *lang = PySequence_GetSlice(value_ptr[1], 2, PyString_GET_SIZE(value_ptr[1]));
  yyval = PyObject_CallMethod(rdflib, "BNode", "O",lang);
  Py_XDECREF(lang);
  if (self->verbose) {
    fprintf(stderr, "--BlankNode(");
    PyObject_Print(value_ptr[1], stderr, Py_PRINT_RAW);
    fprintf(stderr, ")\n");
  }
  Py_DECREF(value_ptr[1]);
  break;
}
      }
      if (!yyval) {
        lexer_free(lexer);
        return NULL;
      }
      *++value_ptr = yyval;

      if (self->verbose) print_state_stack(state_stack, state_ptr);

      /* Now "shift" the result of the reduction. */
      /* Determine what state that goes to, based on the state
         we popped back to and the rule number reduced by. */

      yyn = derives[yyn] - YYNTBASE;
      yystate = goto_idx[yyn] + *state_ptr;
      if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *state_ptr) {
        yystate = yytable[yystate];
      } else {
        yystate = default_goto[yyn];
      }
      continue;
    } else if (yyn == YYFINAL) {
      /* Hooray!  Process complete. */
      lexer_free(lexer);
      return value_ptr[-1];
    } else if (yyn <= 0) {
      /* Now it is either 0 or YYFLAG */
      return report_error(yystate, yylval, lexer);
    }

    /* Shift the lookahead token. */

    TRACE("Shifting token %d (%s), ", yychar, token_names[yychar1]);

    if (yychar != YYEOF) {
      yychar = YYEMPTY;
    }

    *++value_ptr = yylval;

    yystate = yyn;
    continue;
  }

  /* should never get here */
  Py_INCREF(Py_None);
  lexer_free(lexer);
  return Py_None;
}

/** lexer routines ****************************************************/

static lexerobject *lexer_new(PyObject *text)
{
  lexerobject *lexer;

  lexer = PyMem_New(lexerobject, 1);
  if (lexer == NULL) {
    PyErr_NoMemory();
    return NULL;
  }

  /* attempt to coerce given object to unicode using default rules */
  lexer->text = PyUnicode_FromObject(text);
  if (lexer->text == NULL) {
    PyMem_Free(lexer);
    return NULL;
  }
  lexer->position = PyUnicode_AS_UNICODE(lexer->text);
  lexer->end = lexer->position + PyUnicode_GET_SIZE(lexer->text);
  lexer->state = LEXER_START_STATE;

  /* create initial backtracking stack */
  lexer->positions = PyMem_New(Py_UNICODE *, LEXER_INITIAL_BACKTRACKS);
  if (lexer->positions == NULL) {
    PyErr_NoMemory();
    Py_DECREF(lexer->text);
    PyMem_Free(lexer);
    return NULL;
  }
  lexer->allocated = LEXER_INITIAL_BACKTRACKS;
  lexer->backtracks = 0;
  return lexer;
}

static void lexer_free(lexerobject *lexer)
{
  PyMem_Free(lexer->positions);
  Py_DECREF(lexer->text);
  PyMem_Free(lexer);
}

static int lexer_save_position(lexerobject *lexer) {
  Py_UNICODE **positions;
  size_t new_allocated;
  int allocated, newsize;

  /* Bypass realloc() when a previous overallocation is large enough
     to accommodate the newsize.
  */
  newsize = lexer->backtracks + 1;
  allocated = lexer->allocated;
  positions = lexer->positions;
  if (newsize >= allocated) {
    /* This over-allocates proportional to the list size, making room
     * for additional growth.  The over-allocation is mild, but is
     * enough to give linear-time amortized behavior over a long
     * sequence of appends() in the presence of a poorly-performing
     * system realloc().
     * The growth pattern is:  0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ...
     */
    new_allocated = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;
    if (PyMem_Resize(positions, Py_UNICODE *, new_allocated) == NULL) {
      PyErr_NoMemory();
      return -1;
    }
    lexer->allocated = new_allocated;
    lexer->positions = positions;
  }
  lexer->positions[lexer->backtracks] = lexer->position;
  lexer->backtracks = newsize;
  return 0;
}

static Py_UNICODE *lexer_restore_position(lexerobject *lexer) {
  assert(lexer->backtracks > 0);
  lexer->position = lexer->positions[--lexer->backtracks];
  return lexer->position;
}

static int lexer_charset(parserobject *self, Py_UCS4 *set, Py_UCS4 ch,
			 int ok)
{
  unsigned char *charset;

  /* check if character is a member of the given set */
  /* Note, the tests are stored sorted to allow for quick exits */

  for (;;) {
    switch (*set++) {

    case LEXER_CHARSET_LITERAL:
      /* <LITERAL> <code> */
      REGEX_TRACE("CHARSET_LITERAL, %d == %d\n", ch, set[0]);
      if (ch < set[0])
        return !ok;
      else if ((Py_UCS4)ch == set[0])
        return ok;
      set++;
      break;

    case LEXER_CHARSET_RANGE:
      /* <RANGE> <lower> <upper> */
      REGEX_TRACE("CHARSET_RANGE, %d <= %d <= %d\n", set[0], ch, set[1]);
      if (ch < set[0])
        return !ok;
      else if (ch <= set[1])
        return ok;
      set += 2;
      break;

    case LEXER_CHARSET_SMALL:
      /* <SMALL> <charset index> */
      REGEX_TRACE("CHARSET_SMALL, index=%d\n", set[0]);
      charset = lexer_charsets[*set++];
      if (ch < 256 && (charset[ch >> 3] & (1 << (ch & 7))))
        return ok;
      break;

    case LEXER_CHARSET_BIG:
      /* <BIG> <blockmap index> */
      REGEX_TRACE("CHARSET_BIG, index=%d\n", set[0]);
      charset = lexer_charsets[lexer_blockmaps[*set++][ch >> 8]];
      if (ch < 65536 && charset[(ch & 255) >> 3] & (1 << (ch & 7)))
        return ok;
      break;

    case LEXER_CHARSET_FAILURE:
      /* nothing matched in charset */
      REGEX_TRACE("CHARSET_FAILURE\n");
      return !ok;

    default:
      REGEX_TRACE("**INTERNAL CHARSET ERROR**\n");
      return -1;
    }
  }
}

/* return values:
   1 -> sucessful match,
   0 -> no match,
   -1 -> error,
*/

#ifdef Py_UNICODE_WIDE
#define GET_CHAR_AND_ADVANCE() ch = *ptr++;
#else
#define GET_CHAR_AND_ADVANCE()                                          \
  if ((0xD800 <= ptr[0] && ptr[0] <= 0xDBFF) &&                         \
      (0xDC00 <= ptr[1] && ptr[1] <= 0xDFFF)) {                         \
    ch = (((ptr[0] & 0x03FF) << 10) | (ptr[1] & 0x03FF)) + 0x00010000;  \
    ptr += 2;                                                           \
  } else {                                                              \
    ch = *ptr++;                                                        \
  }
#endif  
    
static int lexer_match(parserobject *self, lexerobject *lexer, 
		       Py_UCS4 *pattern)
{
  Py_UNICODE *ptr = lexer->position;
  Py_UNICODE *end;
  Py_UCS4 ch;
  int i, count;

  REGEX_TRACE("LEXER_MATCH, position %d\n",
              lexer->position - PyUnicode_AS_UNICODE(lexer->text));

  while (1) {
    switch (*pattern++) {

    case LEXER_OP_FAILURE:
      /* immediate failure */
      REGEX_TRACE("OP_FAILURE\n");
      return 0;

    case LEXER_OP_SUCCESS:
      /* end of pattern */
      REGEX_TRACE("OP_SUCCESS\n");
      lexer->position = ptr;
      return 1;
        
    case LEXER_OP_BOL:
      /* beginning of line */
      /* <BOL> */
      REGEX_TRACE("OP_BOL\n");
      if (ptr == PyUnicode_AS_UNICODE(lexer->text) || ptr[-1] == '\n') 
        break;
      return 0;

    case LEXER_OP_EOL:
      /* end of line */
      /* <EOL> */
      REGEX_TRACE("OP_EOL\n");
      if (ptr >= lexer->end || ptr[0] == '\n') break;
      return 0;
            
    case LEXER_OP_EOF:
      /* end of file */
      /* <EOF> */
      REGEX_TRACE("OP_EOF\n");
      if (ptr >= lexer->end) break;
      return 0;

    case LEXER_OP_ANY:
      /* match anything (except a newline) */
      /* <ANY> */
      REGEX_TRACE("OP_ANY\n");
      if (ptr >= lexer->end || ptr[0] == '\n')
        return 0;
      ptr++;
      break;

    case LEXER_OP_LITERAL:
      /* match literal character */
      /* <LITERAL> <code> */
      if (ptr >= lexer->end)
        return 0;
      GET_CHAR_AND_ADVANCE();
      REGEX_TRACE("OP_LITERAL, %d == %d\n", ch, pattern[0]);
      if (ch != pattern[0])
        return 0;
      pattern++;
      break;

    case LEXER_OP_NOT_LITERAL:
      /* match anything that is not literal character */
      /* <NOT_LITERAL> <code> */
      if (ptr >= lexer->end)
        return 0;
      GET_CHAR_AND_ADVANCE();
      REGEX_TRACE("OP_NOT_LITERAL, %d != %d\n", ch, pattern[0]);
      if (ch == pattern[0])
        return 0;
      pattern++;
      break;

    case LEXER_OP_CHARSET:
      /* match set member */
      /* <CHARSET> <skip> <set> */
      if (ptr >= lexer->end)
        return 0;
      GET_CHAR_AND_ADVANCE();
      REGEX_TRACE("OP_CHARSET, skip %d\n", pattern[0]);
      i = lexer_charset(self, pattern + 1, ch, 1);
      if (i <= 0)
        return i;

      pattern += pattern[0];
      break;
            
    case LEXER_OP_NOT_CHARSET:
      /* match set non-member */
      /* <NOT_CHARSET> <skip> <set> */
      if (ptr >= lexer->end)
        return 0;
      GET_CHAR_AND_ADVANCE();
      REGEX_TRACE("OP_NOT_CHARSET, skip %d\n", pattern[0]);
      i = lexer_charset(self, pattern + 1, ch, 0);
      if (i <= 0)
        return i;

      pattern += pattern[0];
      break;
            
    case LEXER_OP_ASSERT:
      /* lookahead assertion */
      /* <ASSERT> <skip> <pattern> */
      REGEX_TRACE("OP_ASSERT, skip %d\n", pattern[0]);
      lexer->position = ptr;
      i = lexer_match(self, lexer, pattern + 1);
      if (i <= 0)
        return i;

      pattern += pattern[0];
      break;

    case LEXER_OP_BRANCH:
      /* alternation */
      /* <BRANCH> <skip0> <code0> <skip1> <code1> ... <NULL> */

      end = NULL;
      count = 0;
      while (pattern[0]) {
        /* reset start position each time through */
	REGEX_TRACE("OP_BRANCH %d, skip %d\n", count++, pattern[0]);
        lexer->position = ptr;
        
        i = lexer_match(self, lexer, pattern + 1);
        if (i < 0)
          return i;
        else if (i && lexer->position > end) 
          /* successful match which is longer than the current best matched */
          end = lexer->position;
        
        /* advance to the next pattern */
        pattern += pattern[0];
      }

      /* advance pattern past NULL */
      pattern++;

      /* advance to the best matching position if there was a match */
      if (end) {
        lexer->position = ptr = end;
        break;
      }

      return 0;

    case LEXER_OP_REPEAT:
      /* repetition */
      /* <REPEAT> <skip> <1=min> item */
      {
        Py_UCS4 *item = pattern + 2;
        Py_UCS4 *next = pattern + pattern[0];
        int minimum = pattern[1];
        int backtracks;

        lexer->position = ptr;
        for (count = 0, i = 1; i == 1 && count < minimum; count++) {
          REGEX_TRACE("OP_REPEAT<stage 1>, min %d, now %d\n",
                      minimum, count);
          i = lexer_match(self, lexer, item);
        }
        
        /* either internal error or failed minimum matches */
        if (i <= 0) 
          return i;

        backtracks = lexer->backtracks;

        /* match as many items as possible */
        for (; i == 1; count++) {
          REGEX_TRACE("OP_REPEAT<stage 2>, now %d\n", count);
          if (lexer_save_position(lexer) < 0)
            return -1;
          i = lexer_match(self, lexer, item);
        }
          
        if (i < 0) {
          /* internal error */
          lexer->backtracks = backtracks;
          return i;
        }
          
        /* backtracking assert of tail match until success */
        do {
          REGEX_TRACE("OP_REPEAT<stage 3>, now %d\n", count);
          /* update position to previous successful match */
          ptr = lexer_restore_position(lexer);
          if (ptr == NULL)
            return -1;
          i = lexer_match(self, lexer, next);
        } while (i == 0 && --count > minimum);

        /* discard remaining backtrack positions */
        lexer->backtracks = backtracks;

        if (i <= 0) {
          return i;
        }
        pattern = next;
      }
      break;

    case LEXER_OP_REPEAT_RANGE:
      /* repetition */
      /* <REPEAT_RANGE> <skip> <1=min> <2=max> item */
      {
        Py_UCS4 *item = pattern + 3;
        Py_UCS4 *next = pattern + pattern[0];
        int minimum = pattern[1];
        int maximum = pattern[2];
        int backtracks;

        lexer->position = ptr;
        for (count = 0, i = 1; i == 1 && count < minimum; count++) {
          REGEX_TRACE("OP_REPEAT_RANGE<stage 1>, min %d, now %d\n",
                      minimum, count);
          i = lexer_match(self, lexer, item);
        }
        
        /* either internal error or failed minimum matches */
        if (i <= 0) 
          return i;

        backtracks = lexer->backtracks;

        /* consume up to 'maximum' matches */
        for (; i == 1 && count < maximum; count++) {
          REGEX_TRACE("OP_REPEAT_RANGE<stage 2>, max %d, now %d\n",
                      maximum, count);
          if (lexer_save_position(lexer) < 0)
            return -1;
          i = lexer_match(self, lexer, item);
        }

        if (i < 0) {
          /* internal error */
          lexer->backtracks = backtracks;
          return i;
        }

        /* maximum matches reached, update saved position */
        if (i == 1)
          ptr = lexer->position;

        /* backtracking assert of tail match until success */
        do {
          REGEX_TRACE("OP_REPEAT_RANGE<stage 3>, now %d\n", count);
          if (i == 0) {
            /* update position to last successful match */
            ptr = lexer_restore_position(lexer);
            if (ptr == NULL)
              return -1;
          }
          i = lexer_match(self, lexer, next);
        } while (i == 0 && --count > minimum);

        /* discard remaining backtrack positions */
        lexer->backtracks = backtracks;

        if (i <= 0)
          return i;

        pattern = next;
      }
      break;

    default:
      REGEX_TRACE("**INTERNAL MATCH ERROR**\n");
      return -1;
    }
  }
}

static int parser_yylex(parserobject *self, lexerobject *lexer,
			PyObject **yylval)
{
  int yychar = YYEMPTY;
  int yylen;
  Py_UNICODE *yytext = lexer->position;
  
  while (yytext < lexer->end && yychar == YYEMPTY) {
    Py_UNICODE *best_end = NULL;
    int yyaccept = 0;
    int i;
    Py_UCS4 **patterns = (Py_UCS4 **)lexer_patterns[lexer->state];
    const int *actions = lexer_actions[lexer->state];

    REGEX_TRACE("Using patterns from lexer state %d\n", lexer->state);
    for (i = 0; patterns[i]; i++) {
      int matched;
      /* reset position each time through */
      lexer->position = yytext;

      REGEX_TRACE("--- pattern %d...\n", i);
      matched = lexer_match(self, lexer, patterns[i]);
      
      if (matched > 0 && lexer->position > best_end) {
        /* successful match which is longer than the current best matched */
        best_end = lexer->position;
        yyaccept = i;
      } else if (matched < 0) {
        /* internal error */
	REGEX_TRACE("--- pattern %d internal error\n", i);
        PyErr_SetString(PyExc_RuntimeError,
                        "internal error in regular expression engine");
        return -1;
      }
      REGEX_TRACE("--- pattern %d %s\n", i, matched ? "success" : "failed");
    }
      
    if (best_end == NULL) {
      /* no matches */
      lexer->position = yytext;
      lexer_error(lexer);
      return -1;
    }

    lexer->position = best_end;
    yylen = best_end - yytext;

    /* get the action block for this match */
    switch (actions[yyaccept]) {
case 0: {
  /* from SPARQLLexerPatterns.bgen.frag, line 70 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[70], ");
  lexer->state = LEXER_INITIAL;
  TRACE("switching to start condition INITIAL, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = GREATER_THAN;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 1: {
  /* from SPARQLLexerPatterns.bgen.frag, line 74 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[74], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = Q_IRI_CONTENT;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 2: {
  /* from SPARQLLexerPatterns.bgen.frag, line 77 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[77], ");
  lexer->state = LEXER_INITIAL;
  TRACE("switching to start condition INITIAL, ");
  break;
}
case 3: {
  /* from SPARQLLexerPatterns.bgen.frag, line 13 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[13], ");
  lexer->state = LEXER_STRING_MODE_SHORT_1;
  TRACE("switching to start condition STRING_MODE_SHORT_1, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_1;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 4: {
  /* from SPARQLLexerPatterns.bgen.frag, line 17 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[17], ");
  lexer->state = LEXER_STRING_MODE_LONG_1;
  TRACE("switching to start condition STRING_MODE_LONG_1, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_2;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 5: {
  /* from SPARQLLexerPatterns.bgen.frag, line 21 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[21], ");
  lexer->state = LEXER_STRING_MODE_SHORT_2;
  TRACE("switching to start condition STRING_MODE_SHORT_2, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_3;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 6: {
  /* from SPARQLLexerPatterns.bgen.frag, line 25 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[25], ");
  lexer->state = LEXER_STRING_MODE_LONG_2;
  TRACE("switching to start condition STRING_MODE_LONG_2, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_4;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 7: {
  /* from SPARQLLexerPatterns.bgen.frag, line 29 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[29], ");
  lexer->state = LEXER_IRI_MODE;
  TRACE("switching to start condition IRI_MODE, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LESS_THAN;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 8: {
  /* from SPARQLLexerPatterns.bgen.frag, line 34 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[34], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LANGTAG;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 9: {
  /* from SPARQLLexerPatterns.bgen.frag, line 37 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[37], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = NIL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 10: {
  /* from SPARQLLexerPatterns.bgen.frag, line 40 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[40], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = ANON;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 11: {
  /* from SPARQLLexerPatterns.bgen.frag, line 43 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[43], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = PNAME_LN;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 12: {
  /* from SPARQLLexerPatterns.bgen.frag, line 46 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[46], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = PNAME_NS;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 13: {
  /* from SPARQLLexerPatterns.bgen.frag, line 49 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[49], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = BLANK_NODE_LABEL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 14: {
  /* from SPARQLLexerPatterns.bgen.frag, line 52 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[52], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = VARNAME;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 15: {
  /* from SPARQLLexerPatterns.bgen.frag, line 56 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[56], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LANGTAG;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 16: {
  /* from SPARQLLexerPatterns.bgen.frag, line 59 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[59], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = INTEGER;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 17: {
  /* from SPARQLLexerPatterns.bgen.frag, line 62 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[62], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DECIMAL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 18: {
  /* from SPARQLLexerPatterns.bgen.frag, line 65 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[65], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DOUBLE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 19: {
  /* from SPARQLLexerPatterns.bgen.frag, line 121 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[121], ");
  /* skip over the matched text */
  yytext = lexer->position;
  break;
}
case 20: {
  /* from SPARQLLexerPatterns.bgen.frag, line 123 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[123], ");
  /* skip over the matched text */
  yytext = lexer->position;
  break;
}
case 21: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 3 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[3], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = UNION;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 22: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 6 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[6], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = ASTERISK;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 23: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 9 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[9], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = BASE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 24: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 12 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[12], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = PREFIX;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 25: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 15 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[15], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = SELECT;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 26: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 18 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[18], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DISTINCT;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 27: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 21 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[21], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = FROM;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 28: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 24 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[24], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = NAMED;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 29: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 27 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[27], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = OPTIONAL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 30: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 30 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[30], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = FILTER;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 31: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 33 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[33], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = GRAPH;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 32: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 36 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[36], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = WHERE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 33: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 39 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[39], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = ORDER;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 34: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 42 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[42], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = BY;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 35: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 45 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[45], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = ASC;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 36: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 48 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[48], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = ASK;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 37: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 51 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[51], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = CONSTRUCT;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 38: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 54 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[54], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DESCRIBE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 39: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 57 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[57], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DESC;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 40: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 60 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[60], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LIMIT;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 41: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 63 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[63], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = OFFSET;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 42: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 66 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[66], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STR;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 43: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 69 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[69], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LANG;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 44: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 72 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[72], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LANGMATCHES;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 45: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 75 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[75], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DATATYPE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 46: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 78 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[78], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = isIRI;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 47: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 81 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[81], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = isURI;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 48: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 84 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[84], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = isBLANK;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 49: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 87 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[87], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = isLITERAL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 50: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 90 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[90], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = BOUND;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 51: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 93 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[93], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = REGEX;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 52: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 96 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[96], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = TRUE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 53: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 99 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[99], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = FALSE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 54: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 102 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[102], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = A;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 55: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 105 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[105], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = MINUS;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 56: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 108 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[108], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = PLUS;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 57: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 111 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[111], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DOUBLE_AMPERSAND;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 58: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 114 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[114], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DOUBLE_PIPE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 59: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 117 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[117], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = BANG;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 60: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 120 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[120], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DOUBLE_HAT;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 61: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 123 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[123], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = COMMA;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 62: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 126 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[126], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = COLON;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 63: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 129 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[129], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = QUESTION_MARK;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 64: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 132 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[132], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DOLLAR;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 65: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 135 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[135], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = FORWARDSLASH;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 66: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 138 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[138], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LEFT_PAREN;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 67: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 141 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[141], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = RIGHT_PAREN;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 68: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 144 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[144], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LEFT_SQUARE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 69: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 147 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[147], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = RIGHT_SQUARE;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 70: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 150 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[150], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = EQUALITY_OP;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 71: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 153 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[153], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = NOT_EQUAL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 72: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 156 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[156], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LESS_THAN;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 73: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 159 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[159], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = GREATER_THAN;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 74: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 162 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[162], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LESS_THAN_EQUAL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 75: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 165 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[165], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = GREATER_THAN_EQUAL;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 76: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 168 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[168], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = SEMICOLON;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 77: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 171 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[171], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = LEFT_CURLY;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 78: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 174 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[174], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = RIGHT_CURLY;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 79: {
  /* from SPARQLLiteralLexerPatterns.bgen.frag, line 177 */
  TRACE("using rule from SPARQLLiteralLexerPatterns.bgen.frag[177], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = DOT;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 80: {
  /* from SPARQLLexerPatterns.bgen.frag, line 92 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[92], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL2;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 81: {
  /* from SPARQLLexerPatterns.bgen.frag, line 95 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[95], ");
  lexer->state = LEXER_INITIAL;
  TRACE("switching to start condition INITIAL, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_3;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 82: {
  /* from SPARQLLexerPatterns.bgen.frag, line 83 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[83], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL1;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 83: {
  /* from SPARQLLexerPatterns.bgen.frag, line 86 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[86], ");
  lexer->state = LEXER_INITIAL;
  TRACE("switching to start condition INITIAL, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_1;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 84: {
  /* from SPARQLLexerPatterns.bgen.frag, line 111 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[111], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_LONG2;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 85: {
  /* from SPARQLLexerPatterns.bgen.frag, line 114 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[114], ");
  lexer->state = LEXER_INITIAL;
  TRACE("switching to start condition INITIAL, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_4;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 86: {
  /* from SPARQLLexerPatterns.bgen.frag, line 102 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[102], ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_LONG1;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
case 87: {
  /* from SPARQLLexerPatterns.bgen.frag, line 105 */
  TRACE("using rule from SPARQLLexerPatterns.bgen.frag[105], ");
  lexer->state = LEXER_INITIAL;
  TRACE("switching to start condition INITIAL, ");
  /* create the Python object for the matched text */
  *yylval = PyUnicode_FromUnicode(yytext, yylen);
  if (*yylval == NULL) {
    PyErr_NoMemory();
    return -1;
  }

  yychar = STRING_LITERAL_DELIMETER_2;

  if (self->verbose) {
    char *repr = unicode_escape(yytext, yylen);
    TRACE("accepting '%s' (%d)\n", repr, yychar);
    PyMem_Del(repr);
  }

  /* update the saved position */
  yytext = lexer->position;
  break;
}
    }
  }

  if (yychar == YYEMPTY) {
    /* Reached end of input */
    yychar = YYEOF;
  }

  return yychar;
}

/** Type Object *******************************************************/

static int parser_traverse(parserobject *self, visitproc visit, void *arg)
{
  int rv;

  if (self->dict) {
    rv = visit(self->dict, arg);
    if (rv != 0) return rv;
  }
  return 0;
}

static int parser_clear(parserobject *self)
{
  PyObject *tmp;

  if (self->dict) {
    tmp = self->dict;
    self->dict = NULL;
    Py_DECREF(tmp);
  }
  return 0;
}

static void parser_dealloc(parserobject *self)
{
  parser_clear(self);
  self->ob_type->tp_free((PyObject *) self);
}

static int parser_init(parserobject *self, PyObject *args, PyObject *kwds)
{
  PyObject *debug=NULL;
  static char *kwlist[] = { "debug", NULL };

  if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:" PARSER_NAME, kwlist,
                                   &debug))
    return -1;

  if (debug) {
    self->verbose = PyObject_IsTrue(debug);
  }

  return 0;
}

static PyObject *parser_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
  parserobject *self;

  self = (parserobject *) type->tp_alloc(type, 0);
  if (self != NULL) {
    self->dict = PyDict_New();
    if (self->dict == NULL) {
      Py_DECREF(self);
      return NULL;
    }
    self->verbose = 0;
  }
  return (PyObject *) self;
}

static PyMethodDef parser_methods[] = {
  { "parse", (PyCFunction) parser_parse, METH_O, parse_doc },
  { NULL, NULL }
};

static PyMemberDef parser_members[] = {
  { "debug", T_INT, offsetof(parserobject, verbose) },
  { NULL }
};

static char parser_doc[] = PARSER_NAME "\
([debug]) -> parser\n\
Create a new parser object.\n\
\n\
The optional debug argument, when true, enables the builtin trace facility.\n\
The trace facility uses stderr to display each step taken by the parser.";

static PyTypeObject Parser_Type = {
  /* PyObject_HEAD     */ PyObject_HEAD_INIT(NULL)
  /* ob_size           */ 0,
  /* tp_name           */ PROJECT_NAME "." PARSER_NAME,
  /* tp_basicsize      */ sizeof(parserobject),
  /* tp_itemsize       */ 0,
  /* tp_dealloc        */ (destructor) parser_dealloc,
  /* tp_print          */ (printfunc) 0,
  /* tp_getattr        */ (getattrfunc) 0,
  /* tp_setattr        */ (setattrfunc) 0,
  /* tp_compare        */ (cmpfunc) 0,
  /* tp_repr           */ (reprfunc) 0,
  /* tp_as_number      */ (PyNumberMethods *) 0,
  /* tp_as_sequence    */ (PySequenceMethods *) 0,
  /* tp_as_mapping     */ (PyMappingMethods *) 0,
  /* tp_hash           */ (hashfunc) 0,
  /* tp_call           */ (ternaryfunc) 0,
  /* tp_str            */ (reprfunc) 0,
  /* tp_getattro       */ (getattrofunc) 0,
  /* tp_setattro       */ (setattrofunc) 0,
  /* tp_as_buffer      */ (PyBufferProcs *) 0,
  /* tp_flags          */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
  /* tp_doc            */ (char *) parser_doc,
  /* tp_traverse       */ (traverseproc) parser_traverse,
  /* tp_clear          */ (inquiry) parser_clear,
  /* tp_richcompare    */ (richcmpfunc) 0,
  /* tp_weaklistoffset */ 0,
  /* tp_iter           */ (getiterfunc) 0,
  /* tp_iternext       */ (iternextfunc) 0,
  /* tp_methods        */ (PyMethodDef *) parser_methods,
  /* tp_members        */ (PyMemberDef *) parser_members,
  /* tp_getset         */ (PyGetSetDef *) 0,
  /* tp_base           */ (PyTypeObject *) 0,
  /* tp_dict           */ (PyObject *) 0,
  /* tp_descr_get      */ (descrgetfunc) 0,
  /* tp_descr_set      */ (descrsetfunc) 0,
  /* tp_dictoffset     */ offsetof(parserobject, dict),
  /* tp_init           */ (initproc) parser_init,
  /* tp_alloc          */ (allocfunc) 0,
  /* tp_new            */ (newfunc) parser_new,
  /* tp_free           */ 0,
};

/* Helper functions */

/* caller is responsible for releasing the memory */
static char *unicode_escape(Py_UNICODE *s, int len)
{
  static const char *hexdigit = "0123456789ABCDEF";
  char *repr, *p;
  int i, size;

  /* Do one pass to get the repr'ed size */
  size = 1;  /* zero terminator */
  for (i = 0; i < len; i++) {
#ifdef Py_UNICODE_WIDE
    if (s[i] >= 65536) size += 10;  /* \UHHHHHHHH */
    else
#endif
    if (s[i] >= 256) size += 6;  /* \uHHHH */
    else if (s[i] == 9 || s[i] == 10 || s[i] == 13) size += 2;  /* \t \n \r */
    else if (s[i] < 32 || s[i] >= 128) size += 4;  /* \xHH */
    else size++; /* printable US-ASCII */
  }
  
  repr = p = PyMem_New(char, size + 1);
  if (repr == NULL) return NULL;

  while (len-- > 0) {
    Py_UNICODE ch = *s++;
#ifdef Py_UNICODE_WIDE
    /* Map 32-bit characters to '\Uxxxxxxxx' */
    if (ch >= 65536) {
      *p++ = '\\';
      *p++ = 'U';
      *p++ = hexdigit[(ch >> 28) & 0xf];
      *p++ = hexdigit[(ch >> 24) & 0xf];
      *p++ = hexdigit[(ch >> 20) & 0xf];
      *p++ = hexdigit[(ch >> 16) & 0xf];
      *p++ = hexdigit[(ch >> 12) & 0xf];
      *p++ = hexdigit[(ch >> 8) & 0xf];
      *p++ = hexdigit[(ch >> 4) & 0xf];
      *p++ = hexdigit[ch & 15];
    }
    /* Map 16-bit characters to '\uxxxx' */
    else 
#endif
    if (ch >= 256) {
      *p++ = '\\';
      *p++ = 'u';
      *p++ = hexdigit[(ch >> 12) & 0xf];
      *p++ = hexdigit[(ch >> 8) & 0xf];
      *p++ = hexdigit[(ch >> 4) & 0xf];
      *p++ = hexdigit[ch & 15];
    }
    /* Map special whitespace to '\t', \n', '\r' */
    else if (ch == 9) {
      *p++ = '\\';
      *p++ = 't';
    }
    else if (ch == 10) {
      *p++ = '\\';
      *p++ = 'n';
    }
    else if (ch == 13) {
      *p++ = '\\';
      *p++ = 'r';
    }
    /* Map non-printable US ASCII to '\xhh' */
    else if (ch < 32 || ch >= 128) {
      *p++ = '\\';
      *p++ = 'x';
      *p++ = hexdigit[(ch >> 4) & 0xf];
      *p++ = hexdigit[ch & 15];
    }
    /* Copy everything else as-is */
    else
      *p++ = (char) ch;
  }

  *p = '\0';

  return repr;
}

static void calculate_position(lexerobject *lexer, int *line, int *column) {
  /* Determine line and column numbers */
  Py_UNICODE *p;

  *line = 1;
  *column = 1;

  for (p = PyUnicode_AS_UNICODE(lexer->text); p < lexer->end; p++) {
    if ((char)*p == '\n') {
      *line += 1;
      *column = 1;
    } else {
      *column += 1;
    }
  }
}

static const char error_format_str[] = "parse error at line %d, column %d: matched '%s'";
static const char error_format_eof_str[] = "parse error at line %d, column %d: reached end-of-input";

static PyObject *report_error(int state, PyObject* lval, lexerobject *lexer) {
  int line, column;
  int ruleno = action_idx[state];
  char *matched = NULL;

  if (lval) {
    matched = unicode_escape(PyUnicode_AS_UNICODE(lval), 
                             PyUnicode_GET_SIZE(lval));
    if (matched == NULL) return NULL;
  }

  calculate_position(lexer, &line, &column);
  Py_DECREF(lexer->text);

  if (ruleno > YYFLAG && ruleno < YYLAST) {
    /* There are expected tokens */
    int x, count;
    int size = 60;  /* Initial format string */
    char *msg;

    /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
    for (x = (ruleno < 0 ? -ruleno : 0);
         x < (sizeof(token_names) / sizeof(char *)); x++) {
      if (yycheck[x + ruleno] == x) {
        size += strlen(token_names[x]) + 15;
      }
    }

    msg = PyMem_New(char, size);
    if (msg == NULL) {
      PyMem_Del(matched);
      return NULL;
    }

    if (lval) {
      strcpy(msg, error_format_str);
    } else {
      strcpy(msg, error_format_eof_str);
    }

    count = 0;
    for (x = (ruleno < 0 ? -ruleno : 0);
         x < (sizeof(token_names) / sizeof(char *)); x++) {
      if (yycheck[x + ruleno] == x) {
        strcat(msg, count == 0 ? ", expecting '" : " or '");
        strcat(msg, token_names[x]);
        strcat(msg, "'");
        count++;
      }
    }
    if (matched) {
      PyErr_Format(PyExc_SyntaxError, msg, line, column, matched);
    } else {
      PyErr_Format(PyExc_SyntaxError, msg, line, column);
    }
    PyMem_Del(msg);
  } else {
    if (matched) {
      PyErr_Format(PyExc_SyntaxError, error_format_str, line, column, matched);
    } else {
      PyErr_Format(PyExc_SyntaxError, error_format_eof_str, line, column);
    }
  }

  if (matched) {
    PyMem_Del(matched);
  }

  return NULL;
}

static const char lexer_error_str[] = "lexical error at line %d, column %d: no action found for '%s'";

static void lexer_error(lexerobject *lexer)
{
  int line, column;
  char *repr = unicode_escape(lexer->position, (lexer->end - lexer->position));
  if (repr == NULL) return;

  calculate_position(lexer, &line, &column);

  PyErr_Format(PyExc_SyntaxError, lexer_error_str, line, column, repr);

  PyMem_Del(repr);
  return;
}

static void print_reduce(int ruleno) {
  int count;
  const int *token;

  PySys_WriteStderr("Reducing via rule %d (%s), ", ruleno, rule_info[ruleno]);
  /* print the symbols being reduced and their result. */

  count = ruleno;
  token = rhs_tokens;
  while (--count) while (*++token);

  while (*++token) {
    PySys_WriteStderr("%s ", token_names[*token]);
  }
  PySys_WriteStderr("-> %s\n", token_names[derives[ruleno]]);
}

static void print_state_stack(int *stack, int *end) {
  int *curr = stack;

  PySys_WriteStderr("state stack now");
  while (curr <= end) {
    PySys_WriteStderr(" %d", *curr++);
  }
  PySys_WriteStderr("\n");
}

/** Interactive parser ************************************************/

#define CONSOLE_NAME PARSER_NAME "Console"

typedef struct {
  PyObject_HEAD
  parserobject *parser;
  PyObject *dict;
} consoleobject;

static PyObject *console_new(PyTypeObject *type, PyObject *args,
			     PyObject *kwds)
{
  consoleobject *self;

  self = (consoleobject *) type->tp_alloc(type, 0);
  if (self != NULL) {
    PyObject *args = Py_BuildValue("(i)", 1);
    if (args == NULL) {
      Py_DECREF(self);
      return NULL;
    }
    self->parser = (parserobject *) parser_new(&Parser_Type, args, NULL);
    Py_DECREF(args);
    if (self->parser == NULL) {
      Py_DECREF(self);
      return NULL;
    }
  }
  return (PyObject *) self;
}

static int console_init(consoleobject *self, PyObject *args, PyObject *kwds)
{
  PyObject *bases, *base, *result;
  int size, i;

  if (!PyArg_ParseTuple(args, ":" CONSOLE_NAME)) return -1;

  bases = self->ob_type->tp_bases;
  size = PyTuple_GET_SIZE(bases);
  for (i = 0; i < size; i++) {
    base = PyTuple_GET_ITEM(bases, i);
    result = PyObject_CallMethod(base, "__init__", "O", (PyObject *) self);
    if (result == NULL) return -1;
    Py_DECREF(result);
  }
  return 0;
}

static void console_dealloc(consoleobject *self)
{
  Py_XDECREF(self->parser);
  self->ob_type->tp_free((PyObject *) self);
}

static PyObject *console_cmdloop(consoleobject *self, PyObject *args)
{
  PyObject *result=NULL, *builtins=NULL, *readline=NULL, *old_completer=NULL;
  int stop;

  builtins = PyImport_ImportModule("__builtin__");
  if (builtins == NULL) goto exit;

  readline = PyImport_ImportModule("readline");
  if (readline == NULL) {
    if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto exit;
    PyErr_Clear();
  } else {
#if PY_VERSION_HEX > 0x02030000
    /* old_completer = readline.get_completer() */
    old_completer = PyObject_CallMethod(readline, "get_completer", NULL);
    if (old_completer == NULL) goto exit;
#endif
    /* readline.set_completer(self.complete) */
    result = PyObject_GetAttrString((PyObject *) self, "complete");
    if (result == NULL) goto exit;
    result = PyObject_CallMethod(readline, "set_completer", "N", result);
    if (result == NULL) goto exit;
    Py_DECREF(result);
    /* readline.parse_and_bind("tab: complete") */
    result = PyObject_CallMethod(readline, "parse_and_bind", "s",
				 "tab: complete");
    if (result == NULL) goto exit;
    Py_DECREF(result);
  }

  stop = 0;
  do {
    result = PyObject_GetAttrString((PyObject *) self, "prompt");
    if (result == NULL) goto finally;
    result = PyObject_CallMethod(builtins, "raw_input", "N", result);
    if (result == NULL) {
      if (PyErr_ExceptionMatches(PyExc_EOFError) ||
	  PyErr_ExceptionMatches(PyExc_KeyboardInterrupt)) {
	PyErr_Clear();
	PySys_WriteStdout("\n");
	Py_INCREF(Py_None);
	result = Py_None;
      }
      goto finally;
    }
    result = PyObject_CallMethod((PyObject *) self, "onecmd", "N", result);
    if (result == NULL) goto finally;
    stop = PyObject_IsTrue(result);
    Py_DECREF(result);
  } while (!stop);

  Py_INCREF(Py_None);
  result = Py_None;

 finally:
#if PY_VERSION_HEX > 0x02030000
  if (readline != NULL && old_completer != NULL) {
    PyObject *rv;
    rv = PyObject_CallMethod(readline, "set_completer", "O", old_completer);
    if (rv == NULL) {
      Py_XDECREF(result);
      result = rv;
    } else {
      Py_DECREF(rv);
    }
  }
#endif
 exit:
  Py_XDECREF(old_completer);
  Py_XDECREF(readline);
  Py_XDECREF(builtins);
  return result;
}

static PyObject *console_emptyline(consoleobject *self, PyObject *noarg)
{
  Py_INCREF(Py_None);
  return Py_None;
}

static char console_exit_doc[] = "terminate the console";

static PyObject *console_exit(consoleobject *self, PyObject *arg)
{
  Py_INCREF(Py_True);
  return Py_True;
}

static char console_debug_doc[] = "sets or displays the debug level";

static PyObject *console_debug(consoleobject *self, PyObject *arg)
{
  PyObject *verbose;

  if (PyObject_IsTrue(arg)) {
    if ((verbose = PyNumber_Int(arg)) == NULL) {
      if (PyErr_ExceptionMatches(PyExc_ValueError)) {
	PyErr_Clear();
	PySys_WriteStdout("usage: debug <level>\n");
	Py_INCREF(Py_None);
	return Py_None;
      }
      return NULL;
    }
    self->parser->verbose = PyInt_AsLong(verbose);
    Py_DECREF(verbose);
  }
  PySys_WriteStdout("debug level is %d\n", self->parser->verbose);
  Py_INCREF(Py_None);
  return Py_None;
}

static char console_parse_doc[] = "parses an expression";

static PyObject *console_parse(consoleobject *self, PyObject *arg)
{
  PyObject *result, *value;

  result = parser_parse(self->parser, arg);
  if (result == NULL) {
    PyObject *exc, *tb;
    if (!PyErr_ExceptionMatches(PyExc_SyntaxError)) return NULL;
    PyErr_Fetch(&exc, &value, &tb);
    if (value && value != Py_None) {
      result = PyObject_Str(value);
    }
    Py_XDECREF(exc);
    Py_XDECREF(value);
    Py_XDECREF(tb);
    if (result == NULL) return NULL;
  }

  value = PyObject_Str(result);
  Py_DECREF(result);
  if (value == NULL) return NULL;

  PySys_WriteStdout("%s\n", PyString_AsString(value));
  Py_DECREF(value);

  Py_INCREF(Py_None);
  return Py_None;
}

static PyMethodDef console_methods[] = {
  { "cmdloop", (PyCFunction) console_cmdloop, METH_O },
  { "emptyline", (PyCFunction) console_emptyline, METH_NOARGS },
  { "do_exit", (PyCFunction) console_exit, METH_O, console_exit_doc },
  { "do_quit", (PyCFunction) console_exit, METH_O, console_exit_doc },
  { "do_debug", (PyCFunction) console_debug, METH_O, console_debug_doc },
  { "do_parse", (PyCFunction) console_parse, METH_O, console_parse_doc },
  { NULL }
};

static PyTypeObject Console_Type = {
  /* PyObject_HEAD     */ PyObject_HEAD_INIT(NULL)
  /* ob_size           */ 0,
  /* tp_name           */ "Console",
  /* tp_basicsize      */ sizeof(consoleobject),
  /* tp_itemsize       */ 0,
  /* tp_dealloc        */ (destructor) console_dealloc,
  /* tp_print          */ (printfunc) 0,
  /* tp_getattr        */ (getattrfunc) 0,
  /* tp_setattr        */ (setattrfunc) 0,
  /* tp_compare        */ (cmpfunc) 0,
  /* tp_repr           */ (reprfunc) 0,
  /* tp_as_number      */ (PyNumberMethods *) 0,
  /* tp_as_sequence    */ (PySequenceMethods *) 0,
  /* tp_as_mapping     */ (PyMappingMethods *) 0,
  /* tp_hash           */ (hashfunc) 0,
  /* tp_call           */ (ternaryfunc) 0,
  /* tp_str            */ (reprfunc) 0,
  /* tp_getattro       */ (getattrofunc) 0,
  /* tp_setattro       */ (setattrofunc) 0,
  /* tp_as_buffer      */ (PyBufferProcs *) 0,
  /* tp_flags          */ Py_TPFLAGS_DEFAULT,
  /* tp_doc            */ (char *) 0,
  /* tp_traverse       */ (traverseproc) 0,
  /* tp_clear          */ (inquiry) 0,
  /* tp_richcompare    */ (richcmpfunc) 0,
  /* tp_weaklistoffset */ 0,
  /* tp_iter           */ (getiterfunc) 0,
  /* tp_iternext       */ (iternextfunc) 0,
  /* tp_methods        */ (PyMethodDef *) console_methods,
  /* tp_members        */ (PyMemberDef *) 0,
  /* tp_getset         */ (PyGetSetDef *) 0,
  /* tp_base           */ (PyTypeObject *) 0,
  /* tp_dict           */ (PyObject *) 0,
  /* tp_descr_get      */ (descrgetfunc) 0,
  /* tp_descr_set      */ (descrsetfunc) 0,
  /* tp_dictoffset     */ offsetof(consoleobject, dict),
  /* tp_init           */ (initproc) console_init,
  /* tp_alloc          */ (allocfunc) 0,
  /* tp_new            */ (newfunc) console_new,
  /* tp_free           */ 0,
};

static char console_doc[] = CONSOLE_NAME "\
()\n\
Starts an interactive parser console.";

static PyObject *module_console(PyObject *module, PyObject *args)
{
  PyObject *console, *result;

  args = PyTuple_New(0);
  if (args == NULL) return NULL;

  console = PyObject_Call((PyObject *) &Console_Type, args, NULL);
  if (console == NULL) {
    Py_DECREF(args);
    return NULL;
  }
  result = console_cmdloop((consoleobject *) console, args);
  Py_DECREF(args);
  Py_DECREF(console);
  return result;
}

static PyMethodDef module_methods[] = {
  { CONSOLE_NAME, module_console, METH_NOARGS, console_doc },
  { NULL }
};

static void import_modules(void);

#ifndef PyMODINIT_FUNC
#define PyMODINIT_FUNC DL_EXPORT(void)
#endif

PyMODINIT_FUNC MODULE_INITFUNC(void) {
  PyObject *import, *class, *item, *module;
  
  if (PyType_Ready(&Parser_Type) < 0) return;

  /* Setup the console type's base classes */
  import = PyImport_ImportModule("cmd");
  if (import == NULL) return;
  class = PyObject_GetAttrString(import, "Cmd");
  Py_DECREF(import);
  if (class == NULL) return;
  Console_Type.tp_base = &PyBaseObject_Type;
  Console_Type.tp_bases = Py_BuildValue("(ON)", class, &PyBaseObject_Type);
  if (Console_Type.tp_bases == NULL) return;
  if (PyType_Ready(&Console_Type) < 0) return;

  item = PyString_FromString(PARSER_NAME "> ");
  if (PyDict_SetItemString(Console_Type.tp_dict, "prompt", item) < 0) return;
  Py_DECREF(item);

  module = Py_InitModule(PARSER_NAME "c", module_methods);
  if (module == NULL) return;
  
  Py_INCREF(&Parser_Type);
  PyModule_AddObject(module, "new", (PyObject *) &Parser_Type);
  Py_INCREF(&Parser_Type);
  PyModule_AddObject(module, PARSER_NAME, (PyObject *) &Parser_Type);

  /* import the modules required for action routines */
  import_modules();
}

static PyObject *import_from(char *modulename, char *fromname) {
  PyObject *fromlist, *name, *module;

  fromlist = PyTuple_New(1);
  if (fromlist == NULL) return NULL;

  name = PyString_FromString(fromname);
  if (name == NULL) {
    Py_DECREF(fromlist);
    return NULL;
  }
  Py_INCREF(name);
  PyTuple_SET_ITEM(fromlist, 0, name);

  module = PyImport_ImportModuleEx(modulename, NULL, NULL, fromlist);
  Py_DECREF(fromlist);
  if (module == NULL) {
    Py_DECREF(name);
    return NULL;
  }

  fromlist = PyObject_GetAttr(module, name);
  Py_DECREF(module);
  Py_DECREF(name);
  return fromlist;
}

static void import_modules(void) {
  /* from rdflib.sparql.bison import IRIRef */
  IRIRef = import_from("rdflib.sparql.bison", "IRIRef");
  if (IRIRef == NULL) return;

  /* from rdflib.sparql.bison import Bindings */
  Bindings = import_from("rdflib.sparql.bison", "Bindings");
  if (Bindings == NULL) return;

  /* from rdflib.sparql.bison import Query */
  Query = import_from("rdflib.sparql.bison", "Query");
  if (Query == NULL) return;

  /* from rdflib.sparql.bison import QName */
  QName = import_from("rdflib.sparql.bison", "QName");
  if (QName == NULL) return;

  /* from rdflib.sparql.bison import GraphPattern */
  GraphPattern = import_from("rdflib.sparql.bison", "GraphPattern");
  if (GraphPattern == NULL) return;

  /* from rdflib.sparql.bison import FunctionLibrary */
  FunctionLibrary = import_from("rdflib.sparql.bison", "FunctionLibrary");
  if (FunctionLibrary == NULL) return;

  /* from rdflib.sparql.bison import Operators */
  Operators = import_from("rdflib.sparql.bison", "Operators");
  if (Operators == NULL) return;

  /* from rdflib.sparql.bison import Triples */
  Triples = import_from("rdflib.sparql.bison", "Triples");
  if (Triples == NULL) return;

  /* from rdflib.sparql.bison import Resource */
  Resource = import_from("rdflib.sparql.bison", "Resource");
  if (Resource == NULL) return;

  /* from rdflib.sparql.bison import Filter */
  Filter = import_from("rdflib.sparql.bison", "Filter");
  if (Filter == NULL) return;

  /* from rdflib.sparql.bison import Util */
  Util = import_from("rdflib.sparql.bison", "Util");
  if (Util == NULL) return;

  /* from rdflib.sparql.bison import Expression */
  Expression = import_from("rdflib.sparql.bison", "Expression");
  if (Expression == NULL) return;

  /* from rdflib.sparql.bison import SolutionModifier */
  SolutionModifier = import_from("rdflib.sparql.bison", "SolutionModifier");
  if (SolutionModifier == NULL) return;

  /* import rdflib */
  rdflib = PyImport_ImportModule("rdflib");
  if (rdflib == NULL) return;

  /* from rdflib import RDF */
  RDF = import_from("rdflib", "RDF");
  if (RDF == NULL) return;

}
