Logo Search packages:      
Sourcecode: rasqal version File versions  Download package

rdql_parser.c

/* A Bison parser, made by GNU Bison 1.875c.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* Written by Richard Stallman by simplifying the original so called
   ``semantic'' parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 1

/* Using locations.  */
#define YYLSP_NEEDED 0

/* If NAME_PREFIX is specified substitute the variables and functions
   names.  */
#define yyparse rdql_parser_parse
#define yylex   rdql_parser_lex
#define yyerror rdql_parser_error
#define yylval  rdql_parser_lval
#define yychar  rdql_parser_char
#define yydebug rdql_parser_debug
#define yynerrs rdql_parser_nerrs


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     SELECT = 258,
     SOURCE = 259,
     FROM = 260,
     WHERE = 261,
     AND = 262,
     FOR = 263,
     USING = 264,
     SC_AND = 265,
     SC_OR = 266,
     STR_NMATCH = 267,
     STR_MATCH = 268,
     STR_NE = 269,
     STR_EQ = 270,
     GE = 271,
     LE = 272,
     GT = 273,
     LT = 274,
     NEQ = 275,
     EQ = 276,
     FLOATING_POINT_LITERAL = 277,
     STRING_LITERAL = 278,
     PATTERN_LITERAL = 279,
     INTEGER_LITERAL = 280,
     BOOLEAN_LITERAL = 281,
     NULL_LITERAL = 282,
     URI_LITERAL = 283,
     QNAME_LITERAL = 284,
     IDENTIFIER = 285
   };
#endif
#define SELECT 258
#define SOURCE 259
#define FROM 260
#define WHERE 261
#define AND 262
#define FOR 263
#define USING 264
#define SC_AND 265
#define SC_OR 266
#define STR_NMATCH 267
#define STR_MATCH 268
#define STR_NE 269
#define STR_EQ 270
#define GE 271
#define LE 272
#define GT 273
#define LT 274
#define NEQ 275
#define EQ 276
#define FLOATING_POINT_LITERAL 277
#define STRING_LITERAL 278
#define PATTERN_LITERAL 279
#define INTEGER_LITERAL 280
#define BOOLEAN_LITERAL 281
#define NULL_LITERAL 282
#define URI_LITERAL 283
#define QNAME_LITERAL 284
#define IDENTIFIER 285




/* Copy the first part of user declarations.  */
#line 28 "./rdql_parser.y"

#ifdef HAVE_CONFIG_H
#include <rasqal_config.h>
#endif

#ifdef WIN32
#include <win32_rasqal_config.h>
#endif

#include <stdio.h>
#include <stdarg.h>

#include <rasqal.h>
#include <rasqal_internal.h>

#include <rdql_parser.h>

#define YY_DECL int rdql_lexer_lex (YYSTYPE *rdql_parser_lval, yyscan_t yyscanner)
#define YY_NO_UNISTD_H 1
#include <rdql_lexer.h>

#include <rdql_common.h>


/* Make verbose error messages for syntax errors */
/*
#ifdef RASQAL_DEBUG
#define YYERROR_VERBOSE 1
#endif
*/
#define YYERROR_VERBOSE 1

/* Slow down the grammar operation and watch it work */
#if RASQAL_DEBUG > 2
#define YYDEBUG 1
#endif

/* the lexer does not seem to track this */
#undef RASQAL_RDQL_USE_ERROR_COLUMNS

/* Missing rdql_lexer.c/h prototypes */
int rdql_lexer_get_column(yyscan_t yyscanner);
/* Not used here */
/* void rdql_lexer_set_column(int  column_no , yyscan_t yyscanner);*/


/* What the lexer wants */
extern int rdql_lexer_lex (YYSTYPE *rdql_parser_lval, yyscan_t scanner);
#define YYLEX_PARAM ((rasqal_rdql_query_engine*)(((rasqal_query*)rq)->context))->scanner

/* Pure parser argument (a void*) */
#define YYPARSE_PARAM rq

/* Make the yyerror below use the rdf_parser */
#undef yyerror
#define yyerror(message) rdql_query_error((rasqal_query*)rq, message)

/* Make lex/yacc interface as small as possible */
#undef yylex
#define yylex rdql_lexer_lex


static int rdql_parse(rasqal_query* rq, const unsigned char *string);
static int rdql_query_error(rasqal_query* rq, const char *message);



/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 103 "./rdql_parser.y"
typedef union YYSTYPE {
  raptor_sequence *seq;
  rasqal_variable *variable;
  rasqal_literal *literal;
  rasqal_triple *triple;
  rasqal_expression *expr;
  double floating;
  raptor_uri *uri;
  unsigned char *name;
} YYSTYPE;
/* Line 191 of yacc.c.  */
#line 223 "rdql_parser.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif



/* Copy the second part of user declarations.  */


/* Line 214 of yacc.c.  */
#line 235 "rdql_parser.c"

#if ! defined (yyoverflow) || YYERROR_VERBOSE

# ifndef YYFREE
#  define YYFREE free
# endif
# ifndef YYMALLOC
#  define YYMALLOC malloc
# endif

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   define YYSTACK_ALLOC alloca
#  endif
# else
#  if defined (alloca) || defined (_ALLOCA_H)
#   define YYSTACK_ALLOC alloca
#  else
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning. */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
#  if defined (__STDC__) || defined (__cplusplus)
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   define YYSIZE_T size_t
#  endif
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */


#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
       || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
  };

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))                   \
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined (__GNUC__) && 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)        \
      do                            \
      {                             \
        register YYSIZE_T yyi;            \
        for (yyi = 0; yyi < (Count); yyi++)     \
          (To)[yyi] = (From)[yyi];        \
      }                             \
      while (0)
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)                            \
    do                                                      \
      {                                                     \
      YYSIZE_T yynewbytes;                                  \
      YYCOPY (&yyptr->Stack, Stack, yysize);                      \
      Stack = &yyptr->Stack;                                \
      yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
      yyptr += yynewbytes / sizeof (*yyptr);                      \
      }                                                     \
    while (0)

#endif

#if defined (__STDC__) || defined (__cplusplus)
   typedef signed char yysigned_char;
#else
   typedef short yysigned_char;
#endif

/* YYFINAL -- State number of the termination state. */
#define YYFINAL  9
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   145

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  42
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  28
/* YYNRULES -- Number of rules. */
#define YYNRULES  77
/* YYNRULES -- Number of states. */
#define YYNSTATES  129

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   285

#define YYTRANSLATE(YYX)                                    \
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const unsigned char yytranslate[] =
{
       0,     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,    32,     2,     2,     2,    30,     2,     2,
      10,    11,    28,    26,     9,    27,     2,    29,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    12,     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,    31,     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,     2,     3,     4,
       5,     6,     7,     8,    13,    14,    15,    16,    17,    18,
      19,    20,    21,    22,    23,    24,    25,    33,    34,    35,
      36,    37,    38,    39,    40,    41
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned char yyprhs[] =
{
       0,     0,     3,     5,    13,    17,    20,    22,    24,    26,
      29,    32,    33,    37,    40,    42,    50,    57,    64,    70,
      73,    74,    78,    82,    84,    87,    88,    94,    99,   103,
     107,   109,   113,   115,   119,   123,   127,   131,   133,   137,
     141,   143,   147,   151,   155,   159,   161,   163,   167,   171,
     173,   177,   181,   185,   187,   190,   193,   195,   198,   201,
     203,   205,   209,   211,   213,   215,   217,   219,   222,   224,
     226,   228,   230,   232,   234,   236,   238,   242
};

/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] =
{
      43,     0,    -1,    44,    -1,     3,    46,    47,     6,    48,
      50,    52,    -1,    45,     9,    66,    -1,    45,    66,    -1,
      66,    -1,    45,    -1,    28,    -1,     4,    69,    -1,     5,
      69,    -1,    -1,    48,     9,    49,    -1,    48,    49,    -1,
      49,    -1,    10,    64,     9,    64,     9,    65,    11,    -1,
      10,    64,    64,     9,    65,    11,    -1,    10,    64,     9,
      64,    65,    11,    -1,    10,    64,    64,    65,    11,    -1,
       7,    51,    -1,    -1,    51,     9,    54,    -1,    51,     7,
      54,    -1,    54,    -1,    13,    53,    -1,    -1,    41,     8,
      39,     9,    53,    -1,    41,     8,    39,    53,    -1,    41,
       8,    39,    -1,    55,    15,    54,    -1,    55,    -1,    56,
      14,    55,    -1,    56,    -1,    57,    19,    57,    -1,    57,
      18,    57,    -1,    57,    17,    67,    -1,    57,    16,    67,
      -1,    57,    -1,    58,    25,    58,    -1,    58,    24,    58,
      -1,    58,    -1,    59,    23,    59,    -1,    59,    22,    59,
      -1,    59,    21,    59,    -1,    59,    20,    59,    -1,    59,
      -1,    60,    -1,    61,    26,    60,    -1,    61,    27,    60,
      -1,    61,    -1,    62,    28,    61,    -1,    62,    29,    61,
      -1,    62,    30,    61,    -1,    62,    -1,    26,    62,    -1,
      27,    62,    -1,    63,    -1,    31,    62,    -1,    32,    62,
      -1,    66,    -1,    68,    -1,    10,    54,    11,    -1,    66,
      -1,    39,    -1,    40,    -1,    66,    -1,    68,    -1,    12,
      41,    -1,    35,    -1,    39,    -1,    36,    -1,    33,    -1,
      34,    -1,    37,    -1,    38,    -1,    40,    -1,    39,     9,
      69,    -1,    39,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short yyrline[] =
{
       0,   174,   174,   178,   201,   206,   211,   220,   224,   231,
     235,   240,   249,   254,   259,   272,   276,   280,   284,   295,
     300,   305,   310,   315,   324,   329,   334,   339,   344,   352,
     356,   362,   367,   373,   377,   381,   385,   389,   395,   399,
     403,   409,   413,   417,   421,   425,   431,   438,   442,   446,
     452,   456,   460,   464,   470,   474,   478,   484,   488,   492,
     497,   501,   507,   511,   515,   521,   525,   531,   537,   543,
     547,   551,   555,   559,   563,   566,   573,   578
};
#endif

#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "SELECT", "SOURCE", "FROM", "WHERE",
  "AND", "FOR", "','", "'('", "')'", "'?'", "USING", "SC_AND", "SC_OR",
  "STR_NMATCH", "STR_MATCH", "STR_NE", "STR_EQ", "GE", "LE", "GT", "LT",
  "NEQ", "EQ", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'!'",
  "FLOATING_POINT_LITERAL", "STRING_LITERAL", "PATTERN_LITERAL",
  "INTEGER_LITERAL", "BOOLEAN_LITERAL", "NULL_LITERAL", "URI_LITERAL",
  "QNAME_LITERAL", "IDENTIFIER", "$accept", "Document", "Query", "VarList",
  "SelectClause", "SourceClause", "TriplePatternList", "TriplePattern",
  "ConstraintClause", "CommaAndConstraintClause", "UsingClause",
  "PrefixDeclList", "Expression", "ConditionalAndExpression",
  "ValueLogical", "EqualityExpression", "RelationalExpression",
  "NumericExpression", "AdditiveExpression", "MultiplicativeExpression",
  "UnaryExpression", "UnaryExpressionNotPlusMinus", "VarOrURI",
  "VarOrLiteral", "Var", "PatternLiteral", "Literal", "URIList", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,    44,
      40,    41,    63,   264,   265,   266,   267,   268,   269,   270,
     271,   272,   273,   274,   275,   276,    43,    45,    42,    47,
      37,   126,    33,   277,   278,   279,   280,   281,   282,   283,
     284,   285
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    42,    43,    44,    45,    45,    45,    46,    46,    47,
      47,    47,    48,    48,    48,    49,    49,    49,    49,    50,
      50,    51,    51,    51,    52,    52,    53,    53,    53,    54,
      54,    55,    55,    56,    56,    56,    56,    56,    57,    57,
      57,    58,    58,    58,    58,    58,    59,    60,    60,    60,
      61,    61,    61,    61,    62,    62,    62,    63,    63,    63,
      63,    63,    64,    64,    64,    65,    65,    66,    67,    68,
      68,    68,    68,    68,    68,    68,    69,    69
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const unsigned char yyr2[] =
{
       0,     2,     1,     7,     3,     2,     1,     1,     1,     2,
       2,     0,     3,     2,     1,     7,     6,     6,     5,     2,
       0,     3,     3,     1,     2,     0,     5,     4,     3,     3,
       1,     3,     1,     3,     3,     3,     3,     1,     3,     3,
       1,     3,     3,     3,     3,     1,     1,     3,     3,     1,
       3,     3,     3,     1,     2,     2,     1,     2,     2,     1,
       1,     3,     1,     1,     1,     1,     1,     2,     1,     1,
       1,     1,     1,     1,     1,     1,     3,     1
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const unsigned char yydefact[] =
{
       0,     0,     0,     2,     0,     8,     7,    11,     6,     1,
      67,     0,     5,     0,     0,     0,     4,    77,     9,    10,
       0,     0,     0,    20,    14,    76,    63,    64,     0,    62,
       0,     0,    13,    25,     0,     0,     0,     0,     0,     0,
       0,    71,    72,    70,    73,    74,    69,    75,    19,    23,
      30,    32,    37,    40,    45,    46,    49,    53,    56,    59,
      60,    12,     0,     3,     0,     0,     0,    65,    66,     0,
      54,    55,    57,    58,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    24,     0,     0,     0,    18,    61,
      22,    21,    29,    31,    68,    36,    35,    34,    33,    39,
      38,    44,    43,    42,    41,    47,    48,    50,    51,    52,
       0,     0,    17,    16,    28,    15,     0,    27,    26
};

/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
      -1,     2,     3,     6,     7,    15,    23,    24,    33,    48,
      63,    94,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    58,    28,    66,    59,   105,    60,    18
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -59
static const short yypact[] =
{
      32,   -10,    19,   -59,     5,   -59,    16,     9,   -59,   -59,
     -59,    43,   -59,    23,    23,    61,   -59,    63,   -59,   -59,
      94,    23,    26,   106,   -59,   -59,   -59,   -59,     0,   -59,
      59,    94,   -59,    62,    26,    11,    59,    59,    59,    59,
      59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,    17,   -59,
      99,   108,    65,    96,    80,   -59,    97,    89,   -59,   -59,
     -59,   -59,    86,   -59,    20,    40,   121,   -59,   -59,   122,
     -59,   -59,   -59,   -59,    59,    59,    59,    59,   100,   100,
      59,    59,    59,    59,    59,    59,    59,    59,    59,    59,
      59,    59,    59,   126,   -59,    40,   125,   127,   -59,   -59,
     -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,
     -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,
      98,   128,   -59,   -59,    -5,   -59,    86,   -59,   -59
};

/* YYPGOTO[NTERM-NUM].  */
static const yysigned_char yypgoto[] =
{
     -59,   -59,   -59,   -59,   -59,   -59,   -59,   -15,   -59,   -59,
     -59,   -56,   -33,    64,   -59,    45,    46,    21,    42,    -3,
      72,   -59,   -17,   -58,    -1,    66,   -34,     1
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -1
static const unsigned char yytable[] =
{
       8,    68,     4,    69,   126,    12,    96,    97,    32,    34,
      16,    35,     4,    13,    14,    19,    61,    64,     5,     9,
      65,    29,    25,     4,    74,    11,    75,    29,     4,    95,
      68,    68,     4,    29,    67,     1,    93,   121,     4,    26,
      27,   100,   101,   102,    41,    42,    10,    43,    44,    45,
      46,    47,     4,    41,    42,     4,    43,    44,    45,    46,
      47,    68,    17,    67,    67,    26,    27,    20,   127,    36,
     128,     4,    21,    41,    42,    62,    43,    44,    45,    46,
      47,    78,    79,    80,    81,    37,    38,   117,   118,   119,
      39,    40,    41,    42,    67,    43,    44,    45,    46,    47,
      84,    85,    86,    87,    22,   111,   112,   113,   114,    70,
      71,    72,    73,    30,    76,    31,    22,    90,    91,    92,
      82,    83,    77,    88,    89,   107,   108,    93,   109,   110,
     115,   116,    98,    99,   120,   104,   122,   124,   123,   125,
       0,   103,     0,     0,     0,   106
};

static const yysigned_char yycheck[] =
{
       1,    35,    12,    36,     9,     6,    64,    65,    23,     9,
      11,    28,    12,     4,     5,    14,    31,    34,    28,     0,
       9,    22,    21,    12,     7,     9,     9,    28,    12,     9,
      64,    65,    12,    34,    35,     3,    41,    95,    12,    39,
      40,    74,    75,    76,    33,    34,    41,    36,    37,    38,
      39,    40,    12,    33,    34,    12,    36,    37,    38,    39,
      40,    95,    39,    64,    65,    39,    40,     6,   124,    10,
     126,    12,     9,    33,    34,    13,    36,    37,    38,    39,
      40,    16,    17,    18,    19,    26,    27,    90,    91,    92,
      31,    32,    33,    34,    95,    36,    37,    38,    39,    40,
      20,    21,    22,    23,    10,    84,    85,    86,    87,    37,
      38,    39,    40,     7,    15,     9,    10,    28,    29,    30,
      24,    25,    14,    26,    27,    80,    81,    41,    82,    83,
      88,    89,    11,    11,     8,    35,    11,    39,    11,    11,
      -1,    77,    -1,    -1,    -1,    79
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,     3,    43,    44,    12,    28,    45,    46,    66,     0,
      41,     9,    66,     4,     5,    47,    66,    39,    69,    69,
       6,     9,    10,    48,    49,    69,    39,    40,    64,    66,
       7,     9,    49,    50,     9,    64,    10,    26,    27,    31,
      32,    33,    34,    36,    37,    38,    39,    40,    51,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    66,
      68,    49,    13,    52,    64,     9,    65,    66,    68,    54,
      62,    62,    62,    62,     7,     9,    15,    14,    16,    17,
      18,    19,    24,    25,    20,    21,    22,    23,    26,    27,
      28,    29,    30,    41,    53,     9,    65,    65,    11,    11,
      54,    54,    54,    55,    35,    67,    67,    57,    57,    58,
      58,    59,    59,    59,    59,    60,    60,    61,    61,    61,
       8,    65,    11,    11,    39,    11,     9,    53,    53
};

#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif

#define yyerrok         (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY         (-2)
#define YYEOF           0

#define YYACCEPT  goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */

#define YYFAIL          goto yyerrlab

#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                              \
do                                              \
  if (yychar == YYEMPTY && yylen == 1)                      \
    {                                           \
      yychar = (Token);                               \
      yylval = (Value);                               \
      yytoken = YYTRANSLATE (yychar);                       \
      YYPOPSTACK;                               \
      goto yybackup;                                  \
    }                                           \
  else                                                \
    {                                                 \
      yyerror ("syntax error: cannot back up");\
      YYERROR;                                        \
    }                                           \
while (0)

#define YYTERROR  1
#define YYERRCODE 256

/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)        \
   ((Current).first_line   = (Rhs)[1].first_line,     \
    (Current).first_column = (Rhs)[1].first_column,   \
    (Current).last_line    = (Rhs)[N].last_line,      \
    (Current).last_column  = (Rhs)[N].last_column)
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
# define YYLEX yylex (&yylval)
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                  \
do {                                \
  if (yydebug)                            \
    YYFPRINTF Args;                       \
} while (0)

# define YYDSYMPRINT(Args)                \
do {                                \
  if (yydebug)                            \
    yysymprint Args;                      \
} while (0)

# define YYDSYMPRINTF(Title, Token, Value, Location)        \
do {                                            \
  if (yydebug)                                        \
    {                                           \
      YYFPRINTF (stderr, "%s ", Title);                     \
      yysymprint (stderr,                             \
                  Token, Value);    \
      YYFPRINTF (stderr, "\n");                             \
    }                                           \
} while (0)

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
    short *bottom;
    short *top;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (/* Nothing. */; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                        \
do {                                            \
  if (yydebug)                                        \
    yy_stack_print ((Bottom), (Top));                       \
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
    int yyrule;
#endif
{
  int yyi;
  unsigned int yylno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylno);
  /* Print the symbols being reduced, and their result.  */
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
}

# define YY_REDUCE_PRINT(Rule)            \
do {                          \
  if (yydebug)                      \
    yy_reduce_print (Rule);         \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef     YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif



#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
{
  register const char *yys = yystr;

  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

#endif /* !YYERROR_VERBOSE */



#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
#else
static void
yysymprint (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
    }
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
}

#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yytype, yyvaluep)
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  switch (yytype)
    {

      default:
        break;
    }
}


/* Prevent warnings from -Wmissing-prototypes.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */






/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{
  /* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;

  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  short     yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;



#define YYPOPSTACK   (yyvsp--, yyssp--)

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;


  /* When reducing, the number of symbols on the RHS of the reduced
     rule.  */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;           /* Cause a token to be read.  */

  /* 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.  */

  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
      /* Give user a chance to reallocate the stack. Use copies of
         these so that the &'s don't force the real ones into
         memory.  */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;


      /* Each stack pointer address is followed by the size of the
         data in use in that stack, in bytes.  This used to be a
         conditional around just the two extra args, but that might
         be undefined if yyoverflow is a macro.  */
      yyoverflow ("parser stack overflow",
                &yyss1, yysize * sizeof (*yyssp),
                &yyvs1, yysize * sizeof (*yyvsp),

                &yystacksize);

      yyss = yyss1;
      yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
      goto yyoverflowlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
      yystacksize = YYMAXDEPTH;

      {
      short *yyss1 = yyss;
      union yyalloc *yyptr =
        (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
      if (! yyptr)
        goto yyoverflowlab;
      YYSTACK_RELOCATE (yyss);
      YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
      if (yyss1 != yyssa)
        YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;


      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
              (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
      YYABORT;
    }

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

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

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

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

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

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
      goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;


  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  yystate = yyn;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 3:
#line 179 "./rdql_parser.y"
    {
  ((rasqal_query*)rq)->selects=yyvsp[-5].seq;
  ((rasqal_query*)rq)->verb=RASQAL_QUERY_VERB_SELECT;

  if(yyvsp[-4].seq) {
    int i;
    
    for(i=0; i < raptor_sequence_size(yyvsp[-4].seq); i++) {
      raptor_uri* uri=(raptor_uri*)raptor_sequence_get_at(yyvsp[-4].seq, i);
      rasqal_query_add_data_graph((rasqal_query*)rq, uri, NULL, RASQAL_DATA_GRAPH_BACKGROUND);
    }
    raptor_free_sequence(yyvsp[-4].seq);
  }

  /* ignoring $5 sequence, set in TriplePatternList to
   * ((rasqal_query*)rq)->triples=$5; 
   */

  /* ignoring $6 sequence, set in ConstraintClause */
}
    break;

  case 4:
#line 202 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[-2].seq;
  raptor_sequence_push(yyval.seq, yyvsp[0].variable);
}
    break;

  case 5:
#line 207 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[-1].seq;
  raptor_sequence_push(yyval.seq, yyvsp[0].variable);
}
    break;

  case 6:
#line 212 "./rdql_parser.y"
    {
  /* The variables are freed from the rasqal_query field variables */
  yyval.seq=raptor_new_sequence(NULL, (raptor_sequence_print_handler*)rasqal_variable_print);
  raptor_sequence_push(yyval.seq, yyvsp[0].variable);
}
    break;

  case 7:
#line 221 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[0].seq;
}
    break;

  case 8:
#line 225 "./rdql_parser.y"
    {
  yyval.seq=NULL;
  ((rasqal_query*)rq)->wildcard=1;
}
    break;

  case 9:
#line 232 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[0].seq;
}
    break;

  case 10:
#line 236 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[0].seq;
}
    break;

  case 11:
#line 240 "./rdql_parser.y"
    {
  yyval.seq=NULL;
}
    break;

  case 12:
#line 250 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[-2].seq;
  raptor_sequence_push(yyval.seq, yyvsp[0].triple);
}
    break;

  case 13:
#line 255 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[-1].seq;
  raptor_sequence_push(yyval.seq, yyvsp[0].triple);
}
    break;

  case 14:
#line 260 "./rdql_parser.y"
    {
  yyval.seq=((rasqal_query*)rq)->triples;
  raptor_sequence_push(yyval.seq, yyvsp[0].triple);
}
    break;

  case 15:
#line 273 "./rdql_parser.y"
    {
  yyval.triple=rasqal_new_triple(yyvsp[-5].literal, yyvsp[-3].literal, yyvsp[-1].literal);
}
    break;

  case 16:
#line 277 "./rdql_parser.y"
    {
  yyval.triple=rasqal_new_triple(yyvsp[-4].literal, yyvsp[-3].literal, yyvsp[-1].literal);
}
    break;

  case 17:
#line 281 "./rdql_parser.y"
    {
  yyval.triple=rasqal_new_triple(yyvsp[-4].literal, yyvsp[-2].literal, yyvsp[-1].literal);
}
    break;

  case 18:
#line 285 "./rdql_parser.y"
    {
  yyval.triple=rasqal_new_triple(yyvsp[-3].literal, yyvsp[-2].literal, yyvsp[-1].literal);
}
    break;

  case 19:
#line 296 "./rdql_parser.y"
    {
  yyval.seq=NULL;
}
    break;

  case 20:
#line 300 "./rdql_parser.y"
    {
  yyval.seq=NULL;
}
    break;

  case 21:
#line 306 "./rdql_parser.y"
    {
  raptor_sequence_push(((rasqal_query*)rq)->constraints_sequence, yyvsp[0].expr);
  yyval.seq=NULL;
}
    break;

  case 22:
#line 311 "./rdql_parser.y"
    {
  raptor_sequence_push(((rasqal_query*)rq)->constraints_sequence, yyvsp[0].expr);
  yyval.seq=NULL;
}
    break;

  case 23:
#line 316 "./rdql_parser.y"
    {
  raptor_sequence_push(((rasqal_query*)rq)->constraints_sequence, yyvsp[0].expr);
  yyval.seq=NULL;
}
    break;

  case 24:
#line 325 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[0].seq;
}
    break;

  case 25:
#line 329 "./rdql_parser.y"
    {
  yyval.seq=NULL;
}
    break;

  case 26:
#line 335 "./rdql_parser.y"
    {
  yyval.seq=((rasqal_query*)rq)->prefixes;
  raptor_sequence_shift(yyval.seq, rasqal_new_prefix(yyvsp[-4].name, yyvsp[-2].uri));
}
    break;

  case 27:
#line 340 "./rdql_parser.y"
    {
  yyval.seq=((rasqal_query*)rq)->prefixes;
  raptor_sequence_shift(yyval.seq, rasqal_new_prefix(yyvsp[-3].name, yyvsp[-1].uri));
}
    break;

  case 28:
#line 345 "./rdql_parser.y"
    {
  yyval.seq=((rasqal_query*)rq)->prefixes;
  raptor_sequence_push(yyval.seq, rasqal_new_prefix(yyvsp[-2].name, yyvsp[0].uri));
}
    break;

  case 29:
#line 353 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_OR, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 30:
#line 357 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 31:
#line 363 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_AND, yyvsp[-2].expr, yyvsp[0].expr);
;
}
    break;

  case 32:
#line 368 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 33:
#line 374 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_STR_EQ, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 34:
#line 378 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_STR_NEQ, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 35:
#line 382 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_string_op_expression(RASQAL_EXPR_STR_MATCH, yyvsp[-2].expr, yyvsp[0].literal);
}
    break;

  case 36:
#line 386 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_string_op_expression(RASQAL_EXPR_STR_NMATCH, yyvsp[-2].expr, yyvsp[0].literal);
}
    break;

  case 37:
#line 390 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 38:
#line 396 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_EQ, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 39:
#line 400 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_NEQ, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 40:
#line 404 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 41:
#line 410 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_LT, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 42:
#line 414 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_GT, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 43:
#line 418 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_LE, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 44:
#line 422 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_GE, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 45:
#line 426 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 46:
#line 432 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 47:
#line 439 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_PLUS, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 48:
#line 443 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_MINUS, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 49:
#line 447 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 50:
#line 453 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_STAR, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 51:
#line 457 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_SLASH, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 52:
#line 461 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_2op_expression(RASQAL_EXPR_REM, yyvsp[-2].expr, yyvsp[0].expr);
}
    break;

  case 53:
#line 465 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 54:
#line 471 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 55:
#line 475 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_1op_expression(RASQAL_EXPR_UMINUS, yyvsp[0].expr);
}
    break;

  case 56:
#line 479 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[0].expr;
}
    break;

  case 57:
#line 485 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_1op_expression(RASQAL_EXPR_TILDE, yyvsp[0].expr);
}
    break;

  case 58:
#line 489 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_1op_expression(RASQAL_EXPR_BANG, yyvsp[0].expr);
}
    break;

  case 59:
#line 493 "./rdql_parser.y"
    {
  rasqal_literal *l=rasqal_new_variable_literal(yyvsp[0].variable);
  yyval.expr=rasqal_new_literal_expression(l);
}
    break;

  case 60:
#line 498 "./rdql_parser.y"
    {
  yyval.expr=rasqal_new_literal_expression(yyvsp[0].literal);
}
    break;

  case 61:
#line 502 "./rdql_parser.y"
    {
  yyval.expr=yyvsp[-1].expr;
}
    break;

  case 62:
#line 508 "./rdql_parser.y"
    {
  yyval.literal=rasqal_new_variable_literal(yyvsp[0].variable);
}
    break;

  case 63:
#line 512 "./rdql_parser.y"
    {
  yyval.literal=rasqal_new_uri_literal(yyvsp[0].uri);
}
    break;

  case 64:
#line 516 "./rdql_parser.y"
    {
  yyval.literal=rasqal_new_simple_literal(RASQAL_LITERAL_QNAME, yyvsp[0].name);
}
    break;

  case 65:
#line 522 "./rdql_parser.y"
    {
  yyval.literal=rasqal_new_variable_literal(yyvsp[0].variable);
}
    break;

  case 66:
#line 526 "./rdql_parser.y"
    {
  yyval.literal=yyvsp[0].literal;
}
    break;

  case 67:
#line 532 "./rdql_parser.y"
    {
  yyval.variable=rasqal_new_variable((rasqal_query*)rq, yyvsp[0].name, NULL);
}
    break;

  case 68:
#line 538 "./rdql_parser.y"
    {
  yyval.literal=yyvsp[0].literal;
}
    break;

  case 69:
#line 544 "./rdql_parser.y"
    {
  yyval.literal=rasqal_new_uri_literal(yyvsp[0].uri);
}
    break;

  case 70:
#line 548 "./rdql_parser.y"
    {
  yyval.literal=yyvsp[0].literal;
}
    break;

  case 71:
#line 552 "./rdql_parser.y"
    {
  yyval.literal=yyvsp[0].literal;
}
    break;

  case 72:
#line 556 "./rdql_parser.y"
    {
  yyval.literal=yyvsp[0].literal;
}
    break;

  case 73:
#line 560 "./rdql_parser.y"
    {
  yyval.literal=yyvsp[0].literal;
}
    break;

  case 74:
#line 564 "./rdql_parser.y"
    {
  yyval.literal=yyvsp[0].literal;
}
    break;

  case 75:
#line 567 "./rdql_parser.y"
    {
  yyval.literal=rasqal_new_simple_literal(RASQAL_LITERAL_QNAME, yyvsp[0].name);
}
    break;

  case 76:
#line 574 "./rdql_parser.y"
    {
  yyval.seq=yyvsp[0].seq;
  raptor_sequence_shift(yyval.seq, yyvsp[-2].uri);
}
    break;

  case 77:
#line 579 "./rdql_parser.y"
    {
  yyval.seq=raptor_new_sequence((raptor_sequence_free_handler*)raptor_free_uri, (raptor_sequence_print_handler*)raptor_sequence_print_uri);
  raptor_sequence_push(yyval.seq, yyvsp[0].uri);
}
    break;


    }

/* Line 1000 of yacc.c.  */
#line 1802 "rdql_parser.c"

  yyvsp -= yylen;
  yyssp -= yylen;


  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;


  /* 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 = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (YYPACT_NINF < yyn && yyn < YYLAST)
      {
        YYSIZE_T yysize = 0;
        int yytype = YYTRANSLATE (yychar);
        const char* yyprefix;
        char *yymsg;
        int yyx;

        /* Start YYX at -YYN if negative to avoid negative indexes in
           YYCHECK.  */
        int yyxbegin = yyn < 0 ? -yyn : 0;

        /* Stay within bounds of both yycheck and yytname.  */
        int yychecklim = YYLAST - yyn;
        int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
        int yycount = 0;

        yyprefix = ", expecting ";
        for (yyx = yyxbegin; yyx < yyxend; ++yyx)
          if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
            {
            yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
            yycount += 1;
            if (yycount == 5)
              {
                yysize = 0;
                break;
              }
            }
        yysize += (sizeof ("syntax error, unexpected ")
                 + yystrlen (yytname[yytype]));
        yymsg = (char *) YYSTACK_ALLOC (yysize);
        if (yymsg != 0)
          {
            char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
            yyp = yystpcpy (yyp, yytname[yytype]);

            if (yycount < 5)
            {
              yyprefix = ", expecting ";
              for (yyx = yyxbegin; yyx < yyxend; ++yyx)
                if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
                  {
                  yyp = yystpcpy (yyp, yyprefix);
                  yyp = yystpcpy (yyp, yytname[yyx]);
                  yyprefix = " or ";
                  }
            }
            yyerror (yymsg);
            YYSTACK_FREE (yymsg);
          }
        else
          yyerror ("syntax error; also virtual memory exhausted");
      }
      else
#endif /* YYERROR_VERBOSE */
      yyerror ("syntax error");
    }



  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
       error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* If at end of input, pop the error token,
           then the rest of the stack, then return failure.  */
        if (yychar == YYEOF)
           for (;;)
             {
             YYPOPSTACK;
             if (yyssp == yyss)
               YYABORT;
             YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
             yydestruct (yystos[*yyssp], yyvsp);
             }
        }
      else
      {
        YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
        yydestruct (yytoken, &yylval);
        yychar = YYEMPTY;

      }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

#ifdef __GNUC__
  /* Pacify GCC when the user code never invokes YYERROR and the label
     yyerrorlab therefore never appears in user code.  */
  if (0)
     goto yyerrorlab;
#endif

  yyvsp -= yylen;
  yyssp -= yylen;
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
      {
        yyn += YYTERROR;
        if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
          {
            yyn = yytable[yyn];
            if (0 < yyn)
            break;
          }
      }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
      YYABORT;

      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
      yydestruct (yystos[yystate], yyvsp);
      YYPOPSTACK;
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;


  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here.  |
`----------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}


#line 585 "./rdql_parser.y"



/* Support functions */


/* This is declared in rdql_lexer.h but never used, so we always get
 * a warning unless this dummy code is here.  Used once below in an error case.
 */
static int yy_init_globals (yyscan_t yyscanner ) { return 0; };



/**
 * rasqal_rdql_query_engine_init - Initialise the RDQL query engine
 *
 * Return value: non 0 on failure
 **/
static int
rasqal_rdql_query_engine_init(rasqal_query* rdf_query, const char *name) {
  /* rasqal_rdql_query_engine* rdql=(rasqal_rdql_query_engine*)rdf_query->context; */

  /* Initialise rdf, rdfs, owl and xsd prefixes and namespaces */
  raptor_namespaces_start_namespace_full(rdf_query->namespaces, 
                                         (const unsigned char*)"rdf",
                                         (const unsigned char*)RAPTOR_RDF_MS_URI,0);
  raptor_namespaces_start_namespace_full(rdf_query->namespaces, 
                                         (const unsigned char*)"rdfs", 
                                         (const unsigned char*)RAPTOR_RDF_SCHEMA_URI,0);
  raptor_namespaces_start_namespace_full(rdf_query->namespaces,
                                         (const unsigned char*)"xsd",
                                         (const unsigned char*)RAPTOR_XMLSCHEMA_DATATYPES_URI, 0);
  raptor_namespaces_start_namespace_full(rdf_query->namespaces,
                                         (const unsigned char*)"owl",
                                         (const unsigned char*)RAPTOR_OWL_URI, 0);

  return 0;
}


/**
 * rasqal_rdql_query_engine_terminate - Free the RDQL query engine
 *
 * Return value: non 0 on failure
 **/
static void
rasqal_rdql_query_engine_terminate(rasqal_query* rdf_query) {
  rasqal_rdql_query_engine* rdql=(rasqal_rdql_query_engine*)rdf_query->context;

  if(rdql->scanner_set) {
    rdql_lexer_lex_destroy(rdql->scanner);
    rdql->scanner_set=0;
  }

}


static int
rasqal_rdql_query_engine_prepare(rasqal_query* rdf_query) {
  /* rasqal_rdql_query_engine* rdql=(rasqal_rdql_query_engine*)rdf_query->context; */
  int rc;
  rasqal_graph_pattern *gp;
  
  if(!rdf_query->query_string)
    return 1;

  /* for RDQL only, before the graph pattern is made */
  rdf_query->constraints_sequence=raptor_new_sequence(NULL, (raptor_sequence_print_handler*)rasqal_expression_print);
  
  rc=rdql_parse(rdf_query, rdf_query->query_string);
  if(rc)
    return rc;

  gp=rasqal_new_graph_pattern_from_triples(rdf_query,
                                           rdf_query->triples,
                                           0, raptor_sequence_size(rdf_query->triples)-1,
                                           RASQAL_GRAPH_PATTERN_OPERATOR_BASIC);

  rdf_query->query_graph_pattern=gp;

  /* Now assign the constraints to the graph pattern */
  while(raptor_sequence_size(rdf_query->constraints_sequence)) {
    rasqal_expression* e=(rasqal_expression*)raptor_sequence_pop(rdf_query->constraints_sequence);
    rasqal_graph_pattern_add_constraint(gp, e);
  }
  raptor_free_sequence(rdf_query->constraints_sequence);

  /* Only now can we handle the prefixes and qnames */
  if(rasqal_engine_declare_prefixes(rdf_query) ||
     rasqal_engine_expand_triple_qnames(rdf_query) ||
     rasqal_engine_expand_query_constraints_qnames(rdf_query))
    return 1;

  return rasqal_engine_prepare(rdf_query);
}


static int
rasqal_rdql_query_engine_execute(rasqal_query* rdf_query, 
                                 rasqal_query_results* results) 
{
  /* rasqal_rdql_query_engine* rdql=(rasqal_rdql_query_engine*)rdf_query->context; */
  
  /* FIXME: not implemented */
  return 0;
}


static int
rdql_parse(rasqal_query* rq, const unsigned char *string) {
  rasqal_rdql_query_engine* rqe=(rasqal_rdql_query_engine*)rq->context;
  raptor_locator *locator=&rq->locator;
  char *buf=NULL;
  size_t len;
  void *buffer;
  
  if(!string || !*string)
    return yy_init_globals(NULL); /* 0 but a way to use yy_init_globals */

  locator->line=1;
  locator->column= -1; /* No column info */
  locator->byte= -1; /* No bytes info */

#if RASQAL_DEBUG > 2
  rdql_parser_debug=1;
#endif

  rqe->lineno=1;

  rdql_lexer_lex_init(&rqe->scanner);
  rqe->scanner_set=1;

  rdql_lexer_set_extra(((rasqal_query*)rq), rqe->scanner);

  /* This
   *   buffer= rdql_lexer__scan_string((const char*)string, rqe->scanner);
   * is replaced by the code below.  
   * 
   * The extra space appended to the buffer is the least-pain
   * workaround to the lexer crashing by reading EOF twice in
   * rdql_copy_regex_token; at least as far as I can diagnose.  The
   * fix here costs little to add as the above function does
   * something very similar to this anyway.
   */
  len= strlen((const char*)string);
  buf= (char *)RASQAL_MALLOC(cstring, len+3);
  strncpy(buf, (const char*)string, len);
  buf[len]= ' ';
  buf[len+1]= buf[len+2]='\0'; /* YY_END_OF_BUFFER_CHAR; */
  buffer= rdql_lexer__scan_buffer(buf, len+3, rqe->scanner);

  rdql_parser_parse(rq);

  if(buf)
    RASQAL_FREE(cstring, buf);

  rdql_lexer_lex_destroy(rqe->scanner);
  rqe->scanner_set=0;

  /* Parsing failed */
  if(rq->failed)
    return 1;
  
  return 0;
}


int
rdql_query_error(rasqal_query *rq, const char *msg) {
  rasqal_rdql_query_engine* rqe=(rasqal_rdql_query_engine*)rq->context;

  rq->locator.line=rqe->lineno;
#ifdef RASQAL_RDQL_USE_ERROR_COLUMNS
  /*  rq->locator.column=rdql_lexer_get_column(yyscanner);*/
#endif

  rasqal_query_error(rq, "%s", msg);

  return 0;
}


int
rdql_syntax_error(rasqal_query *rq, const char *message, ...)
{
  rasqal_rdql_query_engine *rqe=(rasqal_rdql_query_engine*)rq->context;
  va_list arguments;

  rq->locator.line=rqe->lineno;
#ifdef RASQAL_RDQL_USE_ERROR_COLUMNS
  /*  rp->locator.column=rdql_lexer_get_column(yyscanner);*/
#endif

  va_start(arguments, message);
  rasqal_query_error_varargs(rq, message, arguments);
  va_end(arguments);

  return (0);
}


int
rdql_syntax_warning(rasqal_query *rq, const char *message, ...)
{
  rasqal_rdql_query_engine *rqe=(rasqal_rdql_query_engine*)rq->context;
  va_list arguments;

  rq->locator.line=rqe->lineno;
#ifdef RASQAL_RDQL_USE_ERROR_COLUMNS
  /*  rq->locator.column=rdql_lexer_get_column(yyscanner);*/
#endif

  va_start(arguments, message);
  rasqal_query_warning_varargs(rq, message, arguments);
  va_end(arguments);

   return (0);
}


static void
rasqal_rdql_query_engine_register_factory(rasqal_query_engine_factory *factory)
{
  factory->context_length = sizeof(rasqal_rdql_query_engine);

  factory->init      = rasqal_rdql_query_engine_init;
  factory->terminate = rasqal_rdql_query_engine_terminate;
  factory->prepare   = rasqal_rdql_query_engine_prepare;
  factory->execute   = rasqal_rdql_query_engine_execute;
}


void
rasqal_init_query_engine_rdql (void) {
  /* http://www.w3.org/Submission/2004/SUBM-RDQL-20040109/ */

  rasqal_query_engine_register_factory("rdql", 
                                       "RDF Data Query Language (RDQL)",
                                       NULL,
                                       (const unsigned char*)"http://jena.hpl.hp.com/2003/07/query/RDQL",
                                       &rasqal_rdql_query_engine_register_factory);
}



#ifdef STANDALONE
#include <stdio.h>
#include <locale.h>

#define RDQL_FILE_BUF_SIZE 2048

int
main(int argc, char *argv[]) 
{
  const char *program=rasqal_basename(argv[0]);
  char query_string[RDQL_FILE_BUF_SIZE];
  rasqal_query *query;
  FILE *fh;
  int rc;
  char *filename=NULL;
  raptor_uri* base_uri=NULL;
  unsigned char *uri_string;

#if RASQAL_DEBUG > 2
  rdql_parser_debug=1;
#endif

  if(argc > 1) {
    filename=argv[1];
    fh = fopen(argv[1], "r");
    if(!fh) {
      fprintf(stderr, "%s: Cannot open file %s - %s\n", program, filename,
              strerror(errno));
      exit(1);
    }
  } else {
    filename="<stdin>";
    fh = stdin;
  }

  memset(query_string, 0, RDQL_FILE_BUF_SIZE);
  fread(query_string, RDQL_FILE_BUF_SIZE, 1, fh);
  
  if(argc>1)
    fclose(fh);

  rasqal_init();

  query=rasqal_new_query("rdql", NULL);

  uri_string=raptor_uri_filename_to_uri_string(filename);
  base_uri=raptor_new_uri(uri_string);
  
  rc=rasqal_query_prepare(query, (const unsigned char*)query_string, base_uri);

  rasqal_query_print(query, stdout);

  rasqal_free_query(query);

  raptor_free_uri(base_uri);

  raptor_free_memory(uri_string);

  rasqal_finish();

  return rc;
}
#endif


Generated by  Doxygen 1.6.0   Back to index