diff -Nru rasqal-0.9.31/autogen.sh rasqal-0.9.32/autogen.sh --- rasqal-0.9.31/autogen.sh 2013-04-08 02:28:37.000000000 +0000 +++ rasqal-0.9.32/autogen.sh 2014-01-15 16:13:13.000000000 +0000 @@ -363,10 +363,12 @@ fi fi - if test ! -f NEWS; then - echo "$program: Creating empty NEWS file to allow configure to work" - $DRYRUN touch -t 200001010000 NEWS - fi + for docs in NEWS README; do + if test ! -f $docs; then + echo "$program: Creating empty $docs file to allow configure to work" + $DRYRUN touch -t 200001010000 $docs + fi + done echo "$program: Running $aclocal $aclocal_args" $DRYRUN $aclocal $aclocal_args diff -Nru rasqal-0.9.31/ChangeLog rasqal-0.9.32/ChangeLog --- rasqal-0.9.31/ChangeLog 2013-12-13 15:05:55.000000000 +0000 +++ rasqal-0.9.32/ChangeLog 2014-02-23 16:38:56.000000000 +0000 @@ -1,4 +1,239 @@ -2013-12-13 Dave Beckett +2014-02-23 Dave Beckett + + * Snapshotted rasqal_0_9_32 for 0.9.32 release (GIT cdb85abbfe2dc7c740970a92399b734be544cc1c) + +2014-02-22 Dave Beckett + + * tests/algebra/Makefile.am: Restore t:path with current dir so + that convert_graph_pattern is found + + * tests/algebra/Makefile.am, tests/sparql/Expr1/Makefile.am, + tests/sparql/Expr2/Makefile.am, + tests/sparql/ExprBuiltins/Makefile.am, + tests/sparql/ExprEquals/Makefile.am, + tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am, + tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am, + tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am, + tests/sparql/SyntaxFull/Makefile.am, + tests/sparql/ValueTesting/Makefile.am, + tests/sparql/aggregate/Makefile.am, + tests/sparql/bound/Makefile.am, tests/sparql/bugs/Makefile.am, + tests/sparql/examples/Makefile.am, tests/sparql/part1/Makefile.am, + tests/sparql/regex/Makefile.am, tests/sparql/simple/Makefile.am, + tests/sparql/sort/Makefile.am, tests/sparql/survey/Makefile.am, + tests/sparql/syntax/Makefile.am, + tests/sparql/warnings/Makefile.am: No need for manifest ttl + t:precondition now that XML::DOM is not needed + + * INSTALL.html: No need for XML::DOM check + + * src/rasqal_expr_numerics.c: Fix OSSP UUID include + + * configure.ac, tests/sparql/Expr1/Makefile.am, + tests/sparql/Expr2/Makefile.am, + tests/sparql/ExprBuiltins/Makefile.am, + tests/sparql/ExprEquals/Makefile.am, + tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am, + tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am, + tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am, + tests/sparql/SyntaxFull/Makefile.am, + tests/sparql/ValueTesting/Makefile.am, + tests/sparql/aggregate/Makefile.am, + tests/sparql/bound/Makefile.am, tests/sparql/bugs/Makefile.am, + tests/sparql/examples/Makefile.am, tests/sparql/part1/Makefile.am, + tests/sparql/regex/Makefile.am, tests/sparql/simple/Makefile.am, + tests/sparql/sort/Makefile.am, tests/sparql/survey/Makefile.am, + tests/sparql/syntax/Makefile.am, + tests/sparql/warnings/Makefile.am: Remove use of rapper, + RAPPER_PATH and t:path in test ttl config + + * tests/improve, tests/sparql/check-sparql: Make improve and + check-sparql use to-ntriples instead of rapper + + * utils/.gitignore, utils/Makefile.am, utils/to-ntriples.c: Add + to-ntriples utility for use by test scripts + + * tests/improve: Make improve not use undefined array references + + * configure.ac: Reword raptor version message since + RAPTOR_MIN_VERSION is a minimum (>=) + + * configure.ac: Improve raptor2 check to distinguish raptor too + old from not present. + + * src/sparql_parser.y: Alter SPARQL disabled feature messages to + point to SPARQL 1.1 + + * src/sparql_common.h, src/sparql_parser.y: Adjust SPARQL 1.0 and + SPARQL 1.1 feature flags + + Fixes Issue #0000558 + http://bugs.librdf.org/mantis/view.php?id=558 + +2014-02-19 Dave Beckett + + * src/sparql_parser.y: + (rasqal_sparql_query_language_init): Handle NULL name + + Fixes Issue #0000567 + http://bugs.librdf.org/mantis/view.php?id=567 + +2014-02-18 Dave Beckett + + * ChangeLog, NEWS.html, RELEASE.html: 0.9.32 + +2014-02-08 Dave Beckett + + * src/rasqal_algebra.c, src/rasqal_datetime.c, + src/rasqal_decimal.c, src/rasqal_expr.c, src/rasqal_literal.c, + src/rasqal_random.c, src/rasqal_regex.c, + src/rasqal_row_compatible.c, src/rasqal_rowsource.c, + src/rasqal_rowsource_aggregation.c, src/rasqal_rowsource_empty.c, + src/rasqal_rowsource_groupby.c, src/rasqal_rowsource_join.c, + src/rasqal_rowsource_project.c, + src/rasqal_rowsource_rowsequence.c, + src/rasqal_rowsource_service.c, src/rasqal_rowsource_triples.c, + src/rasqal_rowsource_union.c, src/rasqal_variable.c, + src/rasqal_xsd_datatypes.c, src/sparql_lexer.l, + src/sparql_parser.y, src/strcasecmp.c: Add STANDALONE if/ifndef + STANDALONE ... endif comments + + * src/rasqal_decimal.c: Wrap more xsd_decimal code for internal + use, not in test runner + + * src/rasqal_decimal.c: Rewrite test code to use usual xsd decimal + constructor / destructors + + * src/rasqal_xsd_datatypes.c: Add STANDALONE wrappers to prevent + 'main' symbol appearing in library + + Make rasqal_xsd_check_double_format an internal non-static symbol + + Fixes Issue #0000564 + http://bugs.librdf.org/mantis/view.php?id=564 + + * src/strcasecmp.c: Protect rasqal_strcasecmp* from appearing in + standalone compile + +2014-01-26 Dave Beckett + + * libsv: update libsv + + * configure.ac: Reverting "Make libsv into a config subdir" + + Revert "Make libsv into a config subdir" This reverts commit + a453c53656de630709a9b61854b90f8aa6d1c32b. + + * configure.ac: Make libsv into a config subdir + +2014-01-25 Dave Beckett + + * tests/sparql/check-sparql: Tidy redirect syntax + +2014-01-22 Dave Beckett + + * INSTALL.html, LICENSE.html, NEWS.html, README.html, + RELEASE.html, TODO.html: 2014 + +2014-01-19 Dave Beckett + + * libsv: Update libsv + +2014-01-15 Dave Beckett + + * autogen.sh: Create NEWS and README + +2014-01-14 Dave Beckett + + * libmtwist, libsv: Update submodules + + * Makefile.am: Fix HTML rules + +2014-01-12 Dave Beckett + + * .travis.yml: travis CI + +2014-01-07 Dave Beckett + + * NEWS.html, RELEASE.html: 0.9.32 + + * configure.ac: Make ossp work as a uuid library option + + --with-uuid-library=ossp and automatic discovery of ossp UUID now + work + + * configure.ac: Use AC_CHECK_PROGS to find pcre-config and + libgcrypt-config + + AC_CHECK_PROG doesn't default to setting it as found! + +2014-01-04 Dave Beckett + + * src/rasqal_general.c, src/sparql_lexer.l, src/sparql_parser.y: + 2014 + + * src/sparql_parser.y: Remove lots of (rasqal_query*)rq casts no + longer needed + + * src/sparql_lexer.l: docs + + * src/sparql_lexer.l: Remove YY_NO_INPUT - do need yyinput() / + input() + + * src/sparql_lexer.l: Set YY_NO_INPUT + + * src/sparql_lexer.l: + Add missing get/set column prototypes. + + debian flex 2.5.35-10.1 added these column header prototypes in + re-entrant mode. standard flex omits them + +2014-01-03 Dave Beckett + + * configure.ac, src/Makefile.am, src/sparql_lexer.l, + src/sparql_parser.y: + Update to use Bison 3.0 + + Update configure check to accept only Bison (not yacc) 3.0.0 or + newer + + Updated sparql parser with 3.0 directives + + Updated sparql lexer to add bison bridge + +2013-12-21 Dave Beckett + + * configure.ac: + Set RAPPER_PATH so rapper can be found from + pkg-config + + Fixes Issue #0000561 + http://bugs.librdf.org/mantis/view.php?id=561 + + * INSTALL.html: Mention libmtwist near --with-random-approach + Suggested by Issue #0000560 + + * configure.ac: + Make --with-libgcrypt-config work same way as + --with-pcre-config + + * configure.ac: + Make --with-pcre-config work + + Fixes Issue#0000560 + http://bugs.librdf.org/mantis/view.php?id=560 + +2013-12-13 Dave Beckett + + * configure.ac: Fix noisy mhash_dir addition error. + + It always added the cflags and includes even when mhash_dir was + blank. + + * RELEASE.html: word + + * NEWS.html, RELEASE.html, configure.ac: + Bumped version to 0.9.32 * Snapshotted rasqal_0_9_31 for 0.9.31 release (GIT fbef8580f666de2cd99eed102fe21422773672a0) diff -Nru rasqal-0.9.31/configure rasqal-0.9.32/configure --- rasqal-0.9.31/configure 2013-12-09 17:12:28.000000000 +0000 +++ rasqal-0.9.32/configure 2014-02-23 15:22:13.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Rasqal RDF Query Library 0.9.31. +# Generated by GNU Autoconf 2.69 for Rasqal RDF Query Library 0.9.32. # # Report bugs to . # @@ -566,6 +566,66 @@ SHELL=${CONFIG_SHELL-/bin/sh} +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' test -n "$DJDIR" || exec 7<&0 &1 @@ -590,8 +650,8 @@ # Identity of this package. PACKAGE_NAME='Rasqal RDF Query Library' PACKAGE_TARNAME='rasqal' -PACKAGE_VERSION='0.9.31' -PACKAGE_STRING='Rasqal RDF Query Library 0.9.31' +PACKAGE_VERSION='0.9.32' +PACKAGE_STRING='Rasqal RDF Query Library 0.9.32' PACKAGE_BUGREPORT='http://bugs.librdf.org/' PACKAGE_URL='' @@ -667,7 +727,6 @@ STANDARD_CFLAGS MEM_LIBS MEM -RAPPER_PATH RASQAL_INTERNAL_LIBS RASQAL_INTERNAL_CPPFLAGS RASQAL_EXTERNAL_LIBS @@ -711,8 +770,7 @@ RECHO PERL TAR -YFLAGS -YACC +BISON LEXLIB LEX_OUTPUT_ROOT LEX @@ -841,10 +899,10 @@ with_sysroot enable_libtool_lock enable_pcre -with_pcre +with_pcre_config with_regex_library with_mhash -with_libgcrypt +with_libgcrypt_config with_digest_library with_uuid_library enable_xml2 @@ -871,8 +929,6 @@ LIBS CPPFLAGS CPP -YACC -YFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1422,7 +1478,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Rasqal RDF Query Library 0.9.31 to adapt to many kinds of systems. +\`configure' configures Rasqal RDF Query Library 0.9.32 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1492,7 +1548,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Rasqal RDF Query Library 0.9.31:";; + short | recursive ) echo "Configuration of Rasqal RDF Query Library 0.9.32:";; esac cat <<\_ACEOF @@ -1551,12 +1607,6 @@ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. - YFLAGS The list of arguments that will be passed by default to $YACC. - This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -1639,7 +1689,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Rasqal RDF Query Library configure 0.9.31 +Rasqal RDF Query Library configure 0.9.32 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2008,7 +2058,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Rasqal RDF Query Library $as_me 0.9.31, which was +It was created by Rasqal RDF Query Library $as_me 0.9.32, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,7 +2877,7 @@ # Define the identity of the package. PACKAGE='rasqal' - VERSION='0.9.31' + VERSION='0.9.32' cat >>confdefs.h <<_ACEOF @@ -12760,17 +12810,18 @@ fi -for ac_prog in 'bison -y' byacc +BISON_MIN_VERSION=3.0.0 +for ac_prog in bison3 bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_YACC+:} false; then : +if ${ac_cv_prog_BISON+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. + if test -n "$BISON"; then + ac_cv_prog_BISON="$BISON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -12779,7 +12830,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_YACC="$ac_prog" + ac_cv_prog_BISON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12789,68 +12840,54 @@ fi fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } +BISON=$ac_cv_prog_BISON +if test -n "$BISON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 +$as_echo "$BISON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$YACC" && break + test -n "$BISON" && break done -test -n "$YACC" || YACC="yacc" -BISON_MIN_VERSION=2.0 -BISON_REC_VERSION=2.6 -BISON_VERSION_DEC=0000 if test "$USE_MAINTAINER_MODE" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU bison" >&5 $as_echo_n "checking for GNU bison... " >&6; } # Match these styles of versions # GNU Bison version 1.28 # bison (GNU Bison) 1.875 - BISON_VERSION=`$YACC bison --version 2>&1 | grep "GNU Bison" | head -1 | awk '{print $NF}'` - BISON_VERSION_DEC=`echo $BISON_VERSION | $AWK -F. '{printf("%d\n", 100*$1 + $2)};'` + BISON_VERSION=`$BISON --version 2>&1 | sed -ne 's/^.*GNU Bison[^0-9]*//p'` + if test "X$BISON_VERSION" != X; then + BISON_VERSION_DEC=`echo $BISON_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` - BISON_MIN_VERSION_DEC=`echo $BISON_MIN_VERSION | $AWK -F. '{printf("%d\n", 100*$1 + $2)};'` + BISON_MIN_VERSION_DEC=`echo $BISON_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` - if test "X$BISON_VERSION" != X; then if test $BISON_VERSION_DEC -ge $BISON_MIN_VERSION_DEC; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_VERSION - OK" >&5 $as_echo "$BISON_VERSION - OK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: version $BISON_VERSION - too old" >&5 -$as_echo "version $BISON_VERSION - too old" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: version $BISON_VERSION is too old" >&5 +$as_echo "version $BISON_VERSION is too old" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get GNU Bison from http://www.gnu.org/software/bison/" >&5 $as_echo "$as_me: WARNING: Please get GNU Bison from http://www.gnu.org/software/bison/" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $BISON_MIN_VERSION ($BISON_REC_VERSION recommended)" >&5 -$as_echo "$as_me: WARNING: version $BISON_MIN_VERSION ($BISON_REC_VERSION recommended)" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $BISON_MIN_VERSION or newer" >&5 +$as_echo "$as_me: WARNING: version $BISON_MIN_VERSION or newer" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Bison too old +as_fn_error $? "GNU Bison too old See \`config.log' for more details" "$LINENO" 5; } fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present or $YACC is not GNU Bison" >&5 -$as_echo "not present or $YACC is not GNU Bison" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get GNU Bison from http://www.gnu.org/software/bison/" >&5 -$as_echo "$as_me: WARNING: Please get GNU Bison from http://www.gnu.org/software/bison/" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $BISON_MIN_VERSION ($BISON_REC_VERSION recommended)" >&5 -$as_echo "$as_me: WARNING: version $BISON_MIN_VERSION ($BISON_REC_VERSION recommended)" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Bison not present +as_fn_error $? "$BISON is not GNU bison See \`config.log' for more details" "$LINENO" 5; } fi fi -cat >>confdefs.h <<_ACEOF -#define BISON_VERSION $BISON_VERSION_DEC -_ACEOF - for ac_prog in awk gawk nawk do @@ -14003,12 +14040,12 @@ pkg_cv_RAPTOR2_CFLAGS="$RAPTOR2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"raptor2 >= \$RAPTOR_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "raptor2 >= $RAPTOR_MIN_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"raptor2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "raptor2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_RAPTOR2_CFLAGS=`$PKG_CONFIG --cflags "raptor2 >= $RAPTOR_MIN_VERSION" 2>/dev/null` + pkg_cv_RAPTOR2_CFLAGS=`$PKG_CONFIG --cflags "raptor2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -14020,12 +14057,12 @@ pkg_cv_RAPTOR2_LIBS="$RAPTOR2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"raptor2 >= \$RAPTOR_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "raptor2 >= $RAPTOR_MIN_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"raptor2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "raptor2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_RAPTOR2_LIBS=`$PKG_CONFIG --libs "raptor2 >= $RAPTOR_MIN_VERSION" 2>/dev/null` + pkg_cv_RAPTOR2_LIBS=`$PKG_CONFIG --libs "raptor2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -14046,21 +14083,21 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - RAPTOR2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "raptor2 >= $RAPTOR_MIN_VERSION" 2>&1` + RAPTOR2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "raptor2" 2>&1` else - RAPTOR2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "raptor2 >= $RAPTOR_MIN_VERSION" 2>&1` + RAPTOR2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "raptor2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$RAPTOR2_PKG_ERRORS" >&5 - as_fn_error $? "Raptor is not installed - see http://librdf.org/raptor/ to get a version newer than $RAPTOR_MIN_VERSION" "$LINENO" 5 + as_fn_error $? "Raptor is not installed - see http://librdf.org/raptor/ to get $RAPTOR_MIN_VERSION or newer" "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "Raptor is not installed - see http://librdf.org/raptor/ to get a version newer than $RAPTOR_MIN_VERSION" "$LINENO" 5 + as_fn_error $? "Raptor is not installed - see http://librdf.org/raptor/ to get $RAPTOR_MIN_VERSION or newer" "$LINENO" 5 else RAPTOR2_CFLAGS=$pkg_cv_RAPTOR2_CFLAGS @@ -14069,6 +14106,23 @@ $as_echo "yes" >&6; } RAPTOR_VERSION=`$PKG_CONFIG raptor2 --modversion 2>/dev/null` + raptor_too_old=0 + as_arg_v1=$RAPTOR_VERSION +as_arg_v2=$RAPTOR_MIN_VERSION +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + raptor_too_old="1" ;; #( + 0) : + ;; #( + 2) : + ;; #( + *) : + ;; +esac + if test $raptor_too_old = 1; then + as_fn_error $? "Raptor $RAPTOR_VERSION is too old - see http://librdf.org/raptor/ to get a $RAPTOR_MIN_VERSION or newer" "$LINENO" 5 + fi fi @@ -14078,7 +14132,6 @@ - have_regex_pcre=0 have_regex_posix=0 need_regex_pcre=0 @@ -14094,67 +14147,30 @@ if test "x$enable_pcre" != "xno" ; then - # Extract the first word of "pcre-config", so it can be a program name with args. -set dummy pcre-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PCRE_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PCRE_CONFIG"; then - ac_cv_prog_PCRE_CONFIG="$PCRE_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PCRE_CONFIG="pcre-config" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -PCRE_CONFIG=$ac_cv_prog_PCRE_CONFIG -if test -n "$PCRE_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_CONFIG" >&5 -$as_echo "$PCRE_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -# Check whether --with-pcre was given. -if test "${with_pcre+set}" = set; then : - withval=$with_pcre; pcre_config="$withval" +# Check whether --with-pcre-config was given. +if test "${with_pcre_config+set}" = set; then : + withval=$with_pcre_config; pcre_config="$withval" else pcre_config="" fi - if test "X$pcre_config" != "X" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pcre_config" >&5 + if test "X$pcre_config" != "Xno" ; then + if test "X$pcre_config" != "X" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pcre_config" >&5 $as_echo_n "checking for $pcre_config... " >&6; } - if test -f $pcre_config ; then - PCRE_CONFIG=$pcre_config - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + if test -x $pcre_config ; then + PCRE_CONFIG=$pcre_config + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - searching PATH" >&5 -$as_echo "no - searching PATH" >&6; } + else + as_fn_error $? "pcre-config not found at specified path $pcre_config" "$LINENO" 5 + fi fi - fi - if test "X$PCRE_CONFIG" = "X"; then - for ac_prog in pcre-config + if test "X$PCRE_CONFIG" = "X" ; then + for ac_prog in pcre-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -14196,9 +14212,9 @@ test -n "$PCRE_CONFIG" && break done + fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre" >&5 $as_echo_n "checking for pcre... " >&6; } PCRE_VERSION=`$PCRE_CONFIG --version 2>/dev/null` @@ -14404,67 +14420,29 @@ LIBS="$oLIBS" -# Extract the first word of "libgcrypt-config", so it can be a program name with args. -set dummy libgcrypt-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIBGCRYPT_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIBGCRYPT_CONFIG"; then - ac_cv_prog_LIBGCRYPT_CONFIG="$LIBGCRYPT_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIBGCRYPT_CONFIG="libgcrypt-config" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIBGCRYPT_CONFIG=$ac_cv_prog_LIBGCRYPT_CONFIG -if test -n "$LIBGCRYPT_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPT_CONFIG" >&5 -$as_echo "$LIBGCRYPT_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Check whether --with-libgcrypt was given. -if test "${with_libgcrypt+set}" = set; then : - withval=$with_libgcrypt; libgcrypt_config="$withval" +# Check whether --with-libgcrypt-config was given. +if test "${with_libgcrypt_config+set}" = set; then : + withval=$with_libgcrypt_config; libgcrypt_config="$withval" else libgcrypt_config="" fi - -if test "X$libgcrypt_config" != "X" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $libgcrypt_config" >&5 +if test "X$libgcrypt_config" != "Xno" ; then + if test "X$libgcrypt_config" != "X" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $libgcrypt_config" >&5 $as_echo_n "checking for $libgcrypt_config... " >&6; } - if test -f $libgcrypt_config ; then - GCRYPT_CONFIG=$libgcrypt_config - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + if test -x $libgcrypt_config ; then + LIBGCRYPT_CONFIG=$libgcrypt_config + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - searching PATH" >&5 -$as_echo "no - searching PATH" >&6; } + else + as_fn_error $? "libgcrypt-config not found at specified path $libgcrypt_config" "$LINENO" 5 + fi fi -fi -if test "X$LIBGCRYPT_CONFIG" = "X"; then - for ac_prog in libgcrypt-config + if test "X$LIBGCRYPT_CONFIG" = "X" ; then + for ac_prog in libgcrypt-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -14506,6 +14484,7 @@ test -n "$LIBGCRYPT_CONFIG" && break done + fi fi for ac_header in gcrypt.h @@ -14882,7 +14861,7 @@ fi -for uuid_library_name in $uuid_library libuuid libc internal; do +for uuid_library_name in $uuid_library libuuid ossp libc internal; do case $uuid_library_name in libuuid) if test $have_uuid_libuuid = yes; then @@ -15150,7 +15129,7 @@ RASQAL_INTERNAL_CPPFLAGS="$RASQAL_INTERNAL_CPPFLAGS $RAPTOR2_CFLAGS" RASQAL_EXTERNAL_LIBS="$RASQAL_EXTERNAL_LIBS $RAPTOR2_LIBS" -RAPPER_PATH="" + if test $need_regex_pcre = 1; then C=`$PCRE_CONFIG --cflags` @@ -15168,7 +15147,7 @@ if test $need_digest_mhash = yes; then C="" L="-lmhash" - if test "Xmhash_dir" != "X" ; then + if test "X$mhash_dir" != "X" ; then C="-I$mhash_dir/include" L="-L$mhash_dir/lib $L" fi @@ -15779,7 +15758,6 @@ - RASQAL_LIBTOOLLIBS=librasqal.la @@ -16744,7 +16722,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Rasqal RDF Query Library $as_me 0.9.31, which was +This file was extended by Rasqal RDF Query Library $as_me 0.9.32, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16810,7 +16788,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Rasqal RDF Query Library config.status 0.9.31 +Rasqal RDF Query Library config.status 0.9.32 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru rasqal-0.9.31/configure.ac rasqal-0.9.32/configure.ac --- rasqal-0.9.31/configure.ac 2013-12-09 17:12:17.000000000 +0000 +++ rasqal-0.9.32/configure.ac 2014-02-23 15:22:04.000000000 +0000 @@ -23,7 +23,7 @@ AC_PREREQ([2.62]) -AC_INIT([Rasqal RDF Query Library],[0.9.31],[http://bugs.librdf.org/],[rasqal]) +AC_INIT([Rasqal RDF Query Library],[0.9.32],[http://bugs.librdf.org/],[rasqal]) AC_CONFIG_SRCDIR([src/rasqal_general.c]) AC_CONFIG_HEADERS([src/rasqal_config.h]) AC_CONFIG_AUX_DIR(build) @@ -113,37 +113,35 @@ fi -AC_PROG_YACC -BISON_MIN_VERSION=2.0 -BISON_REC_VERSION=2.6 -BISON_VERSION_DEC=0000 +BISON_MIN_VERSION=3.0.0 +AC_CHECK_PROGS(BISON, bison3 bison) if test "$USE_MAINTAINER_MODE" = yes; then AC_MSG_CHECKING(for GNU bison) # Match these styles of versions # GNU Bison version 1.28 # bison (GNU Bison) 1.875 - BISON_VERSION=`$YACC bison --version 2>&1 | grep "GNU Bison" | head -1 | awk '{print $NF}'` - BISON_VERSION_DEC=`echo $BISON_VERSION | $AWK -F. '{printf("%d\n", 100*$1 + $2)};'` +dnl need to change quotes to allow square brackets +changequote(<<, >>)dnl + BISON_VERSION=`$BISON --version 2>&1 | sed -ne 's/^.*GNU Bison[^0-9]*//p'` +changequote([, ])dnl + if test "X$BISON_VERSION" != X; then + BISON_VERSION_DEC=`echo $BISON_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` - BISON_MIN_VERSION_DEC=`echo $BISON_MIN_VERSION | $AWK -F. '{printf("%d\n", 100*$1 + $2)};'` + BISON_MIN_VERSION_DEC=`echo $BISON_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` - if test "X$BISON_VERSION" != X; then if test $BISON_VERSION_DEC -ge $BISON_MIN_VERSION_DEC; then AC_MSG_RESULT($BISON_VERSION - OK) else - AC_MSG_RESULT(version $BISON_VERSION - too old) + AC_MSG_RESULT(version $BISON_VERSION is too old) AC_MSG_WARN(Please get GNU Bison from http://www.gnu.org/software/bison/) - AC_MSG_WARN(version $BISON_MIN_VERSION ($BISON_REC_VERSION recommended)) - AC_MSG_FAILURE(Bison too old) + AC_MSG_WARN(version $BISON_MIN_VERSION or newer) + AC_MSG_FAILURE(GNU Bison too old) fi else - AC_MSG_RESULT(not present or $YACC is not GNU Bison) - AC_MSG_WARN(Please get GNU Bison from http://www.gnu.org/software/bison/) - AC_MSG_WARN(version $BISON_MIN_VERSION ($BISON_REC_VERSION recommended)) - AC_MSG_FAILURE(Bison not present) + AC_MSG_FAILURE($BISON is not GNU bison) fi fi -AC_DEFINE_UNQUOTED(BISON_VERSION, $BISON_VERSION_DEC, [Bison version as a decimal]) +AC_SUBST(BISON) AC_CHECK_PROGS(AWK, awk gawk nawk) # Find a tar command for 'make dist' @@ -420,10 +418,15 @@ PKG_PROG_PKG_CONFIG -PKG_CHECK_MODULES([RAPTOR2],[raptor2 >= $RAPTOR_MIN_VERSION],[ +PKG_CHECK_MODULES([RAPTOR2],[raptor2],[ RAPTOR_VERSION=`$PKG_CONFIG raptor2 --modversion 2>/dev/null` + raptor_too_old=0 + AS_VERSION_COMPARE([$RAPTOR_VERSION], $RAPTOR_MIN_VERSION, raptor_too_old="1") + if test $raptor_too_old = 1; then + AC_MSG_ERROR(Raptor $RAPTOR_VERSION is too old - see http://librdf.org/raptor/ to get a $RAPTOR_MIN_VERSION or newer) + fi ],[ - AC_MSG_ERROR(Raptor is not installed - see http://librdf.org/raptor/ to get a version newer than $RAPTOR_MIN_VERSION) + AC_MSG_ERROR(Raptor is not installed - see http://librdf.org/raptor/ to get $RAPTOR_MIN_VERSION or newer) ]) AC_SUBST(RAPTOR2_CFLAGS) AC_SUBST(RAPTOR2_LIBS) @@ -432,7 +435,6 @@ AC_SUBST(RAPTOR_VERSION_DEC) AC_SUBST(RAPTOR_MIN_VERSION) - dnl Checks for regex libraries have_regex_pcre=0 have_regex_posix=0 @@ -445,23 +447,23 @@ if test "x$enable_pcre" != "xno" ; then - AC_CHECK_PROG(PCRE_CONFIG, pcre-config, pcre-config) - AC_ARG_WITH(pcre, [ --with-pcre-config=PATH Location of PCRE pcre-config (auto)], pcre_config="$withval", pcre_config="") - - if test "X$pcre_config" != "X" ; then - AC_MSG_CHECKING(for $pcre_config) + AC_ARG_WITH(pcre-config, [ --with-pcre-config=PATH Location of PCRE pcre-config (auto)], pcre_config="$withval", pcre_config="") - if test -f $pcre_config ; then - PCRE_CONFIG=$pcre_config - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no - searching PATH) + if test "X$pcre_config" != "Xno" ; then + if test "X$pcre_config" != "X" ; then + AC_MSG_CHECKING(for $pcre_config) + + if test -x $pcre_config ; then + PCRE_CONFIG=$pcre_config + AC_MSG_RESULT(yes) + else + AC_MSG_ERROR([pcre-config not found at specified path $pcre_config]) + fi + fi + if test "X$PCRE_CONFIG" = "X" ; then + AC_CHECK_PROGS(PCRE_CONFIG, pcre-config) fi fi - if test "X$PCRE_CONFIG" = "X"; then - AC_CHECK_PROGS(PCRE_CONFIG, pcre-config) - fi - AC_MSG_CHECKING(for pcre) PCRE_VERSION=`$PCRE_CONFIG --version 2>/dev/null` @@ -591,21 +593,21 @@ LIBS="$oLIBS" -AC_CHECK_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, libgcrypt-config) -AC_ARG_WITH(libgcrypt, [ --with-libgcrypt-config=PATH Location of GCRYPT libgcrypt-config (auto)], libgcrypt_config="$withval", libgcrypt_config="") - -if test "X$libgcrypt_config" != "X" ; then - AC_MSG_CHECKING(for $libgcrypt_config) - - if test -f $libgcrypt_config ; then - GCRYPT_CONFIG=$libgcrypt_config - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no - searching PATH) +AC_ARG_WITH(libgcrypt-config, [ --with-libgcrypt-config=PATH Location of GCRYPT libgcrypt-config (auto)], libgcrypt_config="$withval", libgcrypt_config="") +if test "X$libgcrypt_config" != "Xno" ; then + if test "X$libgcrypt_config" != "X" ; then + AC_MSG_CHECKING(for $libgcrypt_config) + + if test -x $libgcrypt_config ; then + LIBGCRYPT_CONFIG=$libgcrypt_config + AC_MSG_RESULT(yes) + else + AC_MSG_ERROR([libgcrypt-config not found at specified path $libgcrypt_config]) + fi + fi + if test "X$LIBGCRYPT_CONFIG" = "X" ; then + AC_CHECK_PROGS(LIBGCRYPT_CONFIG, libgcrypt-config) fi -fi -if test "X$LIBGCRYPT_CONFIG" = "X"; then - AC_CHECK_PROGS(LIBGCRYPT_CONFIG, libgcrypt-config) fi AC_CHECK_HEADERS(gcrypt.h) @@ -743,7 +745,7 @@ AC_ARG_WITH(uuid-library, [ --with-uuid-library=NAME Use UUID library - libuuid, libc (auto)], uuid_library="$withval", uuid_library="") -for uuid_library_name in $uuid_library libuuid libc internal; do +for uuid_library_name in $uuid_library libuuid ossp libc internal; do case $uuid_library_name in libuuid) if test $have_uuid_libuuid = yes; then @@ -900,7 +902,7 @@ RASQAL_INTERNAL_CPPFLAGS="$RASQAL_INTERNAL_CPPFLAGS $RAPTOR2_CFLAGS" RASQAL_EXTERNAL_LIBS="$RASQAL_EXTERNAL_LIBS $RAPTOR2_LIBS" -RAPPER_PATH="" + if test $need_regex_pcre = 1; then C=`$PCRE_CONFIG --cflags` @@ -918,7 +920,7 @@ if test $need_digest_mhash = yes; then C="" L="-lmhash" - if test "Xmhash_dir" != "X" ; then + if test "X$mhash_dir" != "X" ; then C="-I$mhash_dir/include" L="-L$mhash_dir/lib $L" fi @@ -1305,7 +1307,6 @@ AC_SUBST(RASQAL_INTERNAL_CPPFLAGS) AC_SUBST(RASQAL_INTERNAL_LIBS) -AC_SUBST(RAPPER_PATH) AC_SUBST(MEM) AC_SUBST(MEM_LIBS) diff -Nru rasqal-0.9.31/data/Makefile.in rasqal-0.9.32/data/Makefile.in --- rasqal-0.9.31/data/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/data/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -88,6 +88,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -160,7 +161,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -189,8 +189,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/debian/changelog rasqal-0.9.32/debian/changelog --- rasqal-0.9.31/debian/changelog 2014-01-26 19:08:18.000000000 +0000 +++ rasqal-0.9.32/debian/changelog 2014-02-24 17:33:12.000000000 +0000 @@ -1,3 +1,9 @@ +rasqal (0.9.32-1) unstable; urgency=low + + * New upstream release + + -- Dave Beckett Mon, 24 Feb 2014 09:32:58 -0800 + rasqal (0.9.31-3) unstable; urgency=low * Convert to dh-autoreconf in order to update libtool.m4 for new diff -Nru rasqal-0.9.31/debian/copyright rasqal-0.9.32/debian/copyright --- rasqal-0.9.31/debian/copyright 2012-05-14 15:54:02.000000000 +0000 +++ rasqal-0.9.32/debian/copyright 2014-02-24 17:33:25.000000000 +0000 @@ -4,12 +4,12 @@ Source: http://download.librdf.org/source/ Files: * -Copyright: 2000-2012 David Beckett +Copyright: 2000-2014 David Beckett 2000-2005 University of Bristol License: LGPL-2.1+ or GPL-2+ or Apache-2.0+ License: LGPL-2.1+ - Copyright (C) 2000-2012 David Beckett + Copyright (C) 2000-2014 David Beckett Copyright (C) 2000-2005 University of Bristol. All Rights Reserved. . This package is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ License V2 can be found in /usr/share/common-licenses/GPL-2 file. License: Apache-2.0+ - Copyright (C) 2000-2012 David Beckett + Copyright (C) 2000-2014 David Beckett Copyright (C) 2000-2005 University of Bristol. . Licensed under the Apache License, Version 2.0 (the "License"); you may diff -Nru rasqal-0.9.31/docs/html/indexes.html rasqal-0.9.32/docs/html/indexes.html --- rasqal-0.9.31/docs/html/indexes.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/indexes.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,13 +6,13 @@ - + - + diff -Nru rasqal-0.9.31/docs/html/index.html rasqal-0.9.32/docs/html/index.html --- rasqal-0.9.31/docs/html/index.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/index.html 2014-02-23 16:39:59.000000000 +0000 @@ -22,12 +22,12 @@   http://www.dajobe.org/

-

Manual for Rasqal 0.9.31 +

Manual for Rasqal 0.9.32

-

+

This documentation is Free Software / Open Source - you can redistribute it and/or modify it under the same licenses as Rasqal. @@ -109,25 +109,6 @@

API Changes
Introduction
-
Changes between Rasqal 0.9.30 and 0.9.31
-
New functions, types and enums
-
Changes between Rasqal 0.9.29 and 0.9.30
-
New functions, types and enums
-
Changes between Rasqal 0.9.28 and 0.9.29
-
-
New functions, types and enums
-
Changed functions and types
-
-
Changes between Rasqal 0.9.26 and 0.9.27
-
New functions, types and enums
-
Changes between Rasqal 0.9.25 and 0.9.26
-
New functions, types and enums
-
Changes between Rasqal 0.9.24 and 0.9.25
-
New functions, types and enums
-
Changes between Rasqal 0.9.23 and 0.9.24
-
New functions, types and enums
-
Changes between Rasqal 0.9.22 and 0.9.23
-
New functions, types and enums
Changes between Rasqal 0.9.21 and 0.9.22
New functions, types and enums
@@ -135,6 +116,25 @@
Renamed function and enums
Changed functions and types
+
Changes between Rasqal 0.9.22 and 0.9.23
+
New functions, types and enums
+
Changes between Rasqal 0.9.23 and 0.9.24
+
New functions, types and enums
+
Changes between Rasqal 0.9.25 and 0.9.26
+
New functions, types and enums
+
Changes between Rasqal 0.9.26 and 0.9.27
+
New functions, types and enums
+
Changes between Rasqal 0.9.28 and 0.9.29
+
+
New functions, types and enums
+
Changed functions and types
+
+
Changes between Rasqal 0.9.29 and 0.9.30
+
New functions, types and enums
+
Changes between Rasqal 0.9.30 and 0.9.31
+
New functions, types and enums
+
Changes between Rasqal 0.9.24 and 0.9.25
+
New functions, types and enums
Index
diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-21-to-0-9-22.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-21-to-0-9-22.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-21-to-0-9-22.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-21-to-0-9-22.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + +
- + - +

@@ -105,7 +105,7 @@

Renamed function and enums

- +
@@ -131,7 +131,7 @@

Changed functions and types

-
+
@@ -187,7 +187,7 @@
- +
diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-22-to-0-9-23.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-22-to-0-9-23.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-22-to-0-9-23.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-22-to-0-9-23.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + +
- + - +

diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-23-to-0-9-24.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-23-to-0-9-24.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-23-to-0-9-24.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-23-to-0-9-24.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + + - + - +

diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-24-to-0-9-25.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-24-to-0-9-25.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-24-to-0-9-25.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-24-to-0-9-25.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + + - + - +

diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-25-to-0-9-26.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-25-to-0-9-26.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-25-to-0-9-26.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-25-to-0-9-26.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + + - + - +

diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-26-to-0-9-27.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-26-to-0-9-27.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-26-to-0-9-27.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-26-to-0-9-27.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + + - + - +

diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-28-to-0-9-29.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-28-to-0-9-29.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-28-to-0-9-29.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-28-to-0-9-29.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + + - + - +

@@ -49,7 +49,7 @@

Changed functions and types

- +
diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-29-to-0-9-30.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-29-to-0-9-30.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-29-to-0-9-30.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-29-to-0-9-30.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + +
- + - +

diff -Nru rasqal-0.9.31/docs/html/rasqal-changes-0-9-30-to-0-9-31.html rasqal-0.9.32/docs/html/rasqal-changes-0-9-30-to-0-9-31.html --- rasqal-0.9.31/docs/html/rasqal-changes-0-9-30-to-0-9-31.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes-0-9-30-to-0-9-31.html 2014-02-23 16:39:59.000000000 +0000 @@ -6,18 +6,18 @@ - - + + - + - +

diff -Nru rasqal-0.9.31/docs/html/rasqal-changes.html rasqal-0.9.32/docs/html/rasqal-changes.html --- rasqal-0.9.31/docs/html/rasqal-changes.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-changes.html 2014-02-23 16:39:59.000000000 +0000 @@ -7,7 +7,7 @@ - + @@ -17,32 +17,13 @@ Up Home Rasqal RDF Query Library Manual -Next +Next

API Changes

This chapter describes the API changes for Rasqal.

diff -Nru rasqal-0.9.31/docs/html/rasqal.devhelp2 rasqal-0.9.32/docs/html/rasqal.devhelp2 --- rasqal-0.9.31/docs/html/rasqal.devhelp2 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal.devhelp2 2014-02-23 16:39:59.000000000 +0000 @@ -24,37 +24,37 @@ - - + + + + + - - + + + + + + + + + + + - - + + - - + + - - - - - - - - - - - - diff -Nru rasqal-0.9.31/docs/html/rasqal-section-general.html rasqal-0.9.32/docs/html/rasqal-section-general.html --- rasqal-0.9.31/docs/html/rasqal-section-general.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/rasqal-section-general.html 2014-02-23 16:39:59.000000000 +0000 @@ -964,7 +964,7 @@

RASQAL_VERSION

-
#define RASQAL_VERSION 931
+
#define RASQAL_VERSION 932
 

Rasqal library version number @@ -994,7 +994,7 @@


RASQAL_VERSION_RELEASE

-
#define RASQAL_VERSION_RELEASE 31
+
#define RASQAL_VERSION_RELEASE 32
 

Rasqal library release @@ -1003,7 +1003,7 @@


RASQAL_VERSION_STRING

-
#define RASQAL_VERSION_STRING "0.9.31"
+
#define RASQAL_VERSION_STRING "0.9.32"
 

Rasqal library version string @@ -1012,7 +1012,7 @@


RASQAL_RAPTOR_VERSION

-
#define RASQAL_RAPTOR_VERSION 20011
+
#define RASQAL_RAPTOR_VERSION 20012
 

Version of Raptor that Rasqal was configured against. diff -Nru rasqal-0.9.31/docs/html/reference-manual.html rasqal-0.9.32/docs/html/reference-manual.html --- rasqal-0.9.31/docs/html/reference-manual.html 2013-12-13 15:06:35.000000000 +0000 +++ rasqal-0.9.32/docs/html/reference-manual.html 2014-02-23 16:39:59.000000000 +0000 @@ -87,25 +87,6 @@

API Changes
Introduction
-
Changes between Rasqal 0.9.30 and 0.9.31
-
New functions, types and enums
-
Changes between Rasqal 0.9.29 and 0.9.30
-
New functions, types and enums
-
Changes between Rasqal 0.9.28 and 0.9.29
-
-
New functions, types and enums
-
Changed functions and types
-
-
Changes between Rasqal 0.9.26 and 0.9.27
-
New functions, types and enums
-
Changes between Rasqal 0.9.25 and 0.9.26
-
New functions, types and enums
-
Changes between Rasqal 0.9.24 and 0.9.25
-
New functions, types and enums
-
Changes between Rasqal 0.9.23 and 0.9.24
-
New functions, types and enums
-
Changes between Rasqal 0.9.22 and 0.9.23
-
New functions, types and enums
Changes between Rasqal 0.9.21 and 0.9.22
New functions, types and enums
@@ -113,6 +94,25 @@
Renamed function and enums
Changed functions and types
+
Changes between Rasqal 0.9.22 and 0.9.23
+
New functions, types and enums
+
Changes between Rasqal 0.9.23 and 0.9.24
+
New functions, types and enums
+
Changes between Rasqal 0.9.25 and 0.9.26
+
New functions, types and enums
+
Changes between Rasqal 0.9.26 and 0.9.27
+
New functions, types and enums
+
Changes between Rasqal 0.9.28 and 0.9.29
+
+
New functions, types and enums
+
Changed functions and types
+
+
Changes between Rasqal 0.9.29 and 0.9.30
+
New functions, types and enums
+
Changes between Rasqal 0.9.30 and 0.9.31
+
New functions, types and enums
+
Changes between Rasqal 0.9.24 and 0.9.25
+
New functions, types and enums
diff -Nru rasqal-0.9.31/docs/Makefile.in rasqal-0.9.32/docs/Makefile.in --- rasqal-0.9.31/docs/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/docs/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -149,6 +149,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -221,7 +222,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -250,8 +250,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/docs/version.xml rasqal-0.9.32/docs/version.xml --- rasqal-0.9.31/docs/version.xml 2013-12-13 15:06:28.000000000 +0000 +++ rasqal-0.9.32/docs/version.xml 2014-02-23 16:39:47.000000000 +0000 @@ -1 +1 @@ -0.9.31 +0.9.32 diff -Nru rasqal-0.9.31/getopt/Makefile.in rasqal-0.9.32/getopt/Makefile.in --- rasqal-0.9.31/getopt/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/getopt/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -123,6 +123,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -195,7 +196,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -224,8 +224,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/INSTALL.html rasqal-0.9.32/INSTALL.html --- rasqal-0.9.31/INSTALL.html 2013-01-22 19:26:51.000000000 +0000 +++ rasqal-0.9.32/INSTALL.html 2014-02-23 15:22:04.000000000 +0000 @@ -215,12 +215,12 @@
--with-random-approach=ALGO

Pick the random number generator approach to use from the -choices of mtwist (the default), gmp (when GMP is -available and used for decimals), random_r (glibc -initstate_r and random_r), rand_r (POSIX -rand_r), random (BSD initstate and random) and rand -(POSIX srand and rand). -

+choices of mtwist (the default - this is bundled with rasqal +and can be used without any additional installs), gmp (when +GMP is available and used for decimals), random_r (glibc +initstate_r and random_r), rand_r (POSIX rand_r), +random (BSD initstate and random) and rand (POSIX +srand and rand).

--with-regex-library=NAME

Pick a regex library to use - either pcre (default) @@ -294,11 +294,6 @@ or decimal tests that fail if no POSIX regex library or multiple precision numeric library was available when Rasqal was compiled.

-

NOTE: if the system perl program XML:DOM package is not installed, -some of the test suite perl scripts will fail. This will be fixed in -a future release. -

-

2.6 Installing

@@ -349,7 +344,7 @@
-

Copyright (C) 2003-2013 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

+

Copyright (C) 2003-2014 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

diff -Nru rasqal-0.9.31/libmtwist/Makefile.in rasqal-0.9.32/libmtwist/Makefile.in --- rasqal-0.9.31/libmtwist/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/libmtwist/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -131,6 +131,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -203,7 +204,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -232,8 +232,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/libsv/ChangeLog rasqal-0.9.32/libsv/ChangeLog --- rasqal-0.9.31/libsv/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ rasqal-0.9.32/libsv/ChangeLog 2014-01-26 20:21:42.000000000 +0000 @@ -0,0 +1,316 @@ +2014-01-19 Dave Beckett + + * Update dist rules to package svtest and autostuff + + * Do not build example by default + + * (sv_parse_line): Fix double quoted quotes + Use a lookahead for doubling quotes + + * Fix quote tests 12, 13 and 14 + + * svtest: Add optional test index arg to run just one + (svtest_run_test): Pulled out of main + + * GNU configureize + +2014-01-17 Dave Beckett + + * (sv_set_option_vararg): sv_line_callback cast for C++ + +2014-01-15 Dave Beckett + + * test missing final newlines on header line, data lines + + * Call sv_parse_chunk() a second time for final line processing + + * (sv_parse_chunk_line): handle being called with/without final NL + + * Call sv_parse_chunk at end of input for final line + + * (sv_parse_chunk): Parse final line only if buffer is not empty. + + * (sv_parse_chunk): Given NULL buffer or 0 length, handle final line + + * Move fields_count from sv_parse_chunk_line arg + (sv_parse_chunk_line): Lose fields_count_p arg; make it a local. + + (sv_parse_chunk): Lose var and remove it from call + + * (sv_parse_chunk_line): Added pulled out of sv_parse_chunk + + * Give all the structs and vars svtest_ prefix names + + * remove junk in test data + + * Use line callback to emit lines seen before parsing + + * Move line_callback to sv_parse_chunk so it is done once. + + * fix + + * Update GNUMakefile for newer code + +2014-01-12 Dave Beckett + + * Clean EXTRA_PROGRAMS + + * Add sv2c to convert data to C (approx) + + * Add tests from test1.csv + + * Use my_sv_line_callback() to save line for better error messages + + * Add SV_OPTION_LINE_CALLBACK to set a callback per line + + * less debug + + * script + + * Fix make + + * Travis CI + +2014-01-11 Dave Beckett + + * (sv_init_fields): malloc corect size array [clang] + + * Add SV_OPTION_QUOTE_CHAR + + * Add SV_OPTION_QUOTE_CHAR to set quote char (default is ") + + * Add SV_OPTION_STRIP_WHITESPACE whitespace removal test + + * Terminate after whitespace removal. + + * cast + + * debug + + * Add check target + + * Add test suite + + * Add SV_OPTION_STRIP_WHITESPACE to strip whitespace around fields + +2013-12-03 Dave Beckett + + * README into markdown + +2013-12-01 Dave Beckett + + * Now libsv repo + +2013-11-29 Dave Beckett + + * Add option to control quoting fields between separators + sv_option_t gains SV_OPTION_QUOTED_FIELDS + + (sv_init): Set quoted fields default on. + + (sv_set_option_vararg): Parse SV_OPTION_QUOTED_FIELDS into internal + flag. + + (sv_parse_line): Add conditions around doing quoting + +2013-11-27 Dave Beckett + + * Make all status returns be sv_status_t + (sv_set_option): Returns sv_status_t + + (sv_init_fields, sv_ensure_fields_buffer_size, sv_set_option_vararg): + Internal functions return sv_status_t + +2013-11-26 Dave Beckett + + * Support \n, \r, \r\n + + * Switch init flags to a call to sv_set_option + sv_option_t: Added + + (sv_set_option): Added. + + * tests + + * \ + + * add test1.csv + + * Tidy status and returns + + * code style + + * Return sv_status_t from calls and use SV_STATUS_LINE_FIELDS + + * Add SV_STATUS_LINE_FIELDS + + * Guess sep + + * sv_parse_line label + + * Handle quoting more robustly. + Tidy debug messages + Error lines are now not fatal unless flag SV_FLAGS_BAD_DATA_ERROR + is set. + Rename skip -> skip_line + + * Add bad records count + + * Add flag SV_FLAGS_BAD_DATA_ERROR + +2013-11-25 Dave Beckett + + * (sv_dump_buffer): Added for debugging + + * Start line numbers at 1 + + * Print filename + + * Fix empty line support and line numbers + + * debug output + + * header is not a record + + * zero.tsv with no data + + * Use and report headers seen + + * Improve header decoding + Add header fields callback. + Set header widths + + (sv_init): Gains header_callback arg + + * Add one.tsv + +2013-11-24 Dave Beckett + + * (sv_init) check + + * Add field_sep arg to sv_init + + * sv + + * Add example + + * libsv + + * Cleanups + + * Use #if defined + + * No test yet + + * Remove Makefile from repo + + * Ignore more + + * GNUMakefile for old makefile + + * automake pieces + +2013-07-31 Dave Beckett + + * More tests + +2009-05-29 Dave Beckett + + * Add more quote test cases and make some corner cases work better + + * Ignore tarballs + + * Ignore stuff + +2009-05-28 Dave Beckett + + * Added readme + + * Added makefile + + * Added package bits and pieces - copyright docs and header. Added + example with test file + +2009-05-26 Dave Beckett + + * h + + * *** empty log message *** + + * Update for TSV status + + * Added tsv_status for error results + + * casts for C++ + + * Use pointinpoly.h + + * Use pointinpoly.h + + * Added pointinpoly.h + + * Added header + + * unsigned/signed stuff + +2009-05-24 Dave Beckett + + * fix warnings + + * Add lots of warnings + + * abort callback + + * end lines on error + + * (tsv_parse_chunk): Return 1 on failure from callback + + * style + + * print tags shorter + + * Use flickcurl_photo_as_page_uri + +2009-05-23 Dave Beckett + + * Uses flickcurl API to search for photos by WOEID of countries + seen and get at most 1 photo, print the tags + +2009-05-22 Dave Beckett + + * Update to new init and use headers when verbose. + + * Added flags arg to tsv_init to allow saving of header. Added + const char* tsv_get_header(tsv *t, unsigned int i, size_t + *width_p); to return them. + + * use memmove for overlap copy + + * code depends on tsv + + * adjust tsv_init call + + * remove unused FH + + * remove unused FH + + * save a memcpy + + * Move fields_buffer to tsv structure and grow only when needed + + * Count records + + * Allocate fields, fields_widths for first line only, save lots of + per-line malloc/frees + + * Add verbose flag + + * Added tsv parsing module and use with file + + * internal header + + * use internal.h + + * srcs + + * Initial import diff -Nru rasqal-0.9.31/libsv/example.c rasqal-0.9.32/libsv/example.c --- rasqal-0.9.31/libsv/example.c 2013-12-01 22:23:29.000000000 +0000 +++ rasqal-0.9.32/libsv/example.c 2014-01-26 20:21:42.000000000 +0000 @@ -46,6 +46,7 @@ { const char* filename; int count; + char* line; } myc; @@ -53,6 +54,25 @@ static sv_status_t +my_sv_line_callback(sv *t, void *user_data, const char* line, size_t length) +{ + myc *c = (myc*)user_data; + + if(c->line) + free(c->line); + c->line = (char*)malloc(length + 1); + if(c->line) + memcpy(c->line, line, length + 1); + + fprintf(stdout, "%s:%d: Line >>>%s<<<\n", c->filename, sv_get_line(t), line); + + /* This code always succeeds */ + return SV_STATUS_OK; +} + + + +static sv_status_t my_sv_header_callback(sv *t, void *user_data, char** fields, size_t *widths, size_t count) { @@ -126,9 +146,10 @@ goto tidy; } - memset(&c, sizeof(c), '\0'); + memset(&c, '\0', sizeof(c)); c.filename = data_file; c.count = 0; + c.line = NULL; data_file_len = strlen(data_file); @@ -146,6 +167,8 @@ rc = 1; goto tidy; } + + sv_set_option(t, SV_OPTION_LINE_CALLBACK, my_sv_line_callback); while(!feof(fh)) { char buffer[1024]; @@ -156,10 +179,16 @@ } fclose(fh); fh = NULL; + + /* Record EOF */ + sv_parse_chunk(t, NULL, 0); fprintf(stderr, "%s: Saw %d records\n", program, c.count); tidy: + if(c.line) + free(c.line); + if(t) sv_free(t); diff -Nru rasqal-0.9.31/libsv/.last-cl-gen rasqal-0.9.32/libsv/.last-cl-gen --- rasqal-0.9.31/libsv/.last-cl-gen 1970-01-01 00:00:00.000000000 +0000 +++ rasqal-0.9.32/libsv/.last-cl-gen 2014-01-26 20:21:42.000000000 +0000 @@ -0,0 +1 @@ +3f899e2b2f752670b9d4a6871ccfb69f30fa24fd diff -Nru rasqal-0.9.31/libsv/Makefile.am rasqal-0.9.32/libsv/Makefile.am --- rasqal-0.9.31/libsv/Makefile.am 2013-12-01 22:23:29.000000000 +0000 +++ rasqal-0.9.32/libsv/Makefile.am 2014-01-26 20:21:42.000000000 +0000 @@ -11,7 +11,6 @@ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \ $(ANALYZE_FLAGS) -noinst_PROGRAMS = example noinst_LTLIBRARIES = libsv.la AM_CPPFLAGS = -DSV_CONFIG -I$(top_srcdir)/src @@ -19,19 +18,32 @@ sv.c \ sv.h -example_SOURCES = example.c -example_LDADD = libsv.la - EXTRA_DIST = \ test1.csv \ zero.tsv \ one.tsv \ test1.tsv -CLEANFILES= \ -example \ + +TESTS=svtest$(EXEEXT) + +check_PROGRAMS=svtest$(EXEEXT) + +EXTRA_PROGRAMS=example$(EXEEXT) sv2c$(EXEEXT) + +CLEANFILES=$(EXTRA_PROGRAMS) \ *.plist +svtest_SOURCES = svtest.c +svtest_LDADD = $(builddir)/libsv.la + +example_SOURCES = example.c +example_LDADD = $(builddir)/libsv.la + +sv2c_SOURCES = sv2c.c +sv2c_LDADD = $(builddir)/libsv.la + + if MAINTAINER_MODE # Run Clang static analyzer over sources. @@ -50,3 +62,29 @@ done; \ set -e; exit $$result endif + +# Some people need a little help ;-) +test: check + +if MAINTAINER_MODE + +.PHONY: update-ChangeLog + +# Requires gitlog-to-changelog from +# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/gitlog-to-changelog +update-ChangeLog: + if test -d $(srcdir)/.git; then \ + gitlog-to-changelog \ + --format='* %s%n%b%n' \ + --strip-tab --strip-cherry-pick \ + -- $$(cat $(srcdir)/.last-cl-gen).. \ + >ChangeLog.tmp \ + && git rev-list -n 1 HEAD >.last-cl-gen.tmp \ + && (echo; cat $(srcdir)/ChangeLog) >>ChangeLog.tmp \ + && mv -f ChangeLog.tmp $(srcdir)/ChangeLog \ + && mv -f .last-cl-gen.tmp $(srcdir)/.last-cl-gen \ + && rm -f ChangeLog.tmp; \ + fi +endif + +EXTRA_DIST += .last-cl-gen diff -Nru rasqal-0.9.31/libsv/Makefile.in rasqal-0.9.32/libsv/Makefile.in --- rasqal-0.9.31/libsv/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/libsv/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -20,7 +20,6 @@ # Makefile for libsv convienience library # - VPATH = @srcdir@ am__make_dryrun = \ { \ @@ -57,10 +56,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -noinst_PROGRAMS = example$(EXEEXT) subdir = libsv -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - COPYING COPYING.LIB +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING \ + COPYING.LIB ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ @@ -82,10 +80,15 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent -PROGRAMS = $(noinst_PROGRAMS) am_example_OBJECTS = example.$(OBJEXT) example_OBJECTS = $(am_example_OBJECTS) -example_DEPENDENCIES = libsv.la +example_DEPENDENCIES = $(builddir)/libsv.la +am_sv2c_OBJECTS = sv2c.$(OBJEXT) +sv2c_OBJECTS = $(am_sv2c_OBJECTS) +sv2c_DEPENDENCIES = $(builddir)/libsv.la +am_svtest_OBJECTS = svtest.$(OBJEXT) +svtest_OBJECTS = $(am_svtest_OBJECTS) +svtest_DEPENDENCIES = $(builddir)/libsv.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles @@ -112,8 +115,10 @@ AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libsv_la_SOURCES) $(example_SOURCES) -DIST_SOURCES = $(libsv_la_SOURCES) $(example_SOURCES) +SOURCES = $(libsv_la_SOURCES) $(example_SOURCES) $(sv2c_SOURCES) \ + $(svtest_SOURCES) +DIST_SOURCES = $(libsv_la_SOURCES) $(example_SOURCES) $(sv2c_SOURCES) \ + $(svtest_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -121,6 +126,8 @@ esac ETAGS = etags CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -130,6 +137,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -202,7 +210,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -231,8 +238,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -299,18 +304,19 @@ sv.c \ sv.h -example_SOURCES = example.c -example_LDADD = libsv.la -EXTRA_DIST = \ -test1.csv \ -zero.tsv \ -one.tsv \ -test1.tsv - -CLEANFILES = \ -example \ +EXTRA_DIST = test1.csv zero.tsv one.tsv test1.tsv .last-cl-gen +TESTS = svtest$(EXEEXT) +check_PROGRAMS = svtest$(EXEEXT) +EXTRA_PROGRAMS = example$(EXEEXT) sv2c$(EXEEXT) +CLEANFILES = $(EXTRA_PROGRAMS) \ *.plist +svtest_SOURCES = svtest.c +svtest_LDADD = $(builddir)/libsv.la +example_SOURCES = example.c +example_LDADD = $(builddir)/libsv.la +sv2c_SOURCES = sv2c.c +sv2c_LDADD = $(builddir)/libsv.la all: all-am .SUFFIXES: @@ -357,8 +363,8 @@ libsv.la: $(libsv_la_OBJECTS) $(libsv_la_DEPENDENCIES) $(EXTRA_libsv_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libsv_la_OBJECTS) $(libsv_la_LIBADD) $(LIBS) -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -368,6 +374,12 @@ example$(EXEEXT): $(example_OBJECTS) $(example_DEPENDENCIES) $(EXTRA_example_DEPENDENCIES) @rm -f example$(EXEEXT) $(AM_V_CCLD)$(LINK) $(example_OBJECTS) $(example_LDADD) $(LIBS) +sv2c$(EXEEXT): $(sv2c_OBJECTS) $(sv2c_DEPENDENCIES) $(EXTRA_sv2c_DEPENDENCIES) + @rm -f sv2c$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sv2c_OBJECTS) $(sv2c_LDADD) $(LIBS) +svtest$(EXEEXT): $(svtest_OBJECTS) $(svtest_DEPENDENCIES) $(EXTRA_svtest_DEPENDENCIES) + @rm -f svtest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(svtest_OBJECTS) $(svtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -377,6 +389,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sv2c.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svtest.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -457,6 +471,99 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -488,8 +595,10 @@ fi; \ done check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -524,8 +633,8 @@ @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -593,18 +702,18 @@ uninstall-am: -.MAKE: install-am install-strip +.MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am @@ -626,6 +735,27 @@ @MAINTAINER_MODE_TRUE@ done; \ @MAINTAINER_MODE_TRUE@ set -e; exit $$result +# Some people need a little help ;-) +test: check + +@MAINTAINER_MODE_TRUE@.PHONY: update-ChangeLog + +# Requires gitlog-to-changelog from +# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/gitlog-to-changelog +@MAINTAINER_MODE_TRUE@update-ChangeLog: +@MAINTAINER_MODE_TRUE@ if test -d $(srcdir)/.git; then \ +@MAINTAINER_MODE_TRUE@ gitlog-to-changelog \ +@MAINTAINER_MODE_TRUE@ --format='* %s%n%b%n' \ +@MAINTAINER_MODE_TRUE@ --strip-tab --strip-cherry-pick \ +@MAINTAINER_MODE_TRUE@ -- $$(cat $(srcdir)/.last-cl-gen).. \ +@MAINTAINER_MODE_TRUE@ >ChangeLog.tmp \ +@MAINTAINER_MODE_TRUE@ && git rev-list -n 1 HEAD >.last-cl-gen.tmp \ +@MAINTAINER_MODE_TRUE@ && (echo; cat $(srcdir)/ChangeLog) >>ChangeLog.tmp \ +@MAINTAINER_MODE_TRUE@ && mv -f ChangeLog.tmp $(srcdir)/ChangeLog \ +@MAINTAINER_MODE_TRUE@ && mv -f .last-cl-gen.tmp $(srcdir)/.last-cl-gen \ +@MAINTAINER_MODE_TRUE@ && rm -f ChangeLog.tmp; \ +@MAINTAINER_MODE_TRUE@ fi + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru rasqal-0.9.31/libsv/README rasqal-0.9.32/libsv/README --- rasqal-0.9.31/libsv/README 2013-12-01 22:23:29.000000000 +0000 +++ rasqal-0.9.32/libsv/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -libsv - a simple Separated Values (CSV, TSV) library in ANSI C. - -License: LGPL 2.1+ or GPL 2+ or Apache 2+ - -Home: http://github.com/dajobe/libsv/tree/master -Source: git clone git://github.com/dajobe/libsv.git - -See example.c for API use. - -Dave Beckett -http://www.dajobe.org/ diff -Nru rasqal-0.9.31/libsv/sv2c.c rasqal-0.9.32/libsv/sv2c.c --- rasqal-0.9.31/libsv/sv2c.c 1970-01-01 00:00:00.000000000 +0000 +++ rasqal-0.9.32/libsv/sv2c.c 2014-01-26 20:21:42.000000000 +0000 @@ -0,0 +1,229 @@ +/* -*- Mode: c; c-basic-offset: 2 -*- + * + * sv2c.c - Turn CSV/TSV into C data + * + * Copyright (C) 2014, David Beckett http://www.dajobe.org/ + * + * This package is Free Software + * + * It is licensed under the following three licenses as alternatives: + * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version + * 2. GNU General Public License (GPL) V2 or any newer version + * 3. Apache License, V2.0 or any newer version + * + * You may not use this file except in compliance with at least one of + * the above three licenses. + * + * See LICENSE.txt at the top of this package for the + * complete terms and further detail along with the license texts for + * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. + * + */ + + +#ifdef SV_CONFIG +#include +#endif + +#include +#include + +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_ERRNO_H +#include +#endif + +#include + + +/* structure used for user data callback */ +typedef struct +{ + const char* filename; + int sep; + int count; + char* line; + size_t line_len; + FILE* out; +} sv2c_data; + + +const char* program; + + +static sv_status_t +sv2c_line_callback(sv *t, void *user_data, const char* line, size_t length) +{ + sv2c_data *c = (sv2c_data*)user_data; + + if(c->line) + free(c->line); + c->line = (char*)malloc(length + 1); + if(c->line) + memcpy(c->line, line, length + 1); + + /* This code always succeeds */ + return SV_STATUS_OK; +} + + + +static void +sv2c_print_c_quoted_string(FILE* fh, const char* str, char quote) +{ + int ch; + + fputc(quote, fh); + while((ch = *str++)) { + if(ch == '\t') + fputs("\\t", fh); + else if(ch == '\r') + fputs("\\r", fh); + else if(ch == '\n') + fputs("\\n", fh); + else if(ch == quote) { + fputc('\\', fh); + fputc(ch, fh); + } else + fputc(ch, fh); + } + fputc(quote, fh); +} + + +static sv_status_t +sv2c_fields_callback(sv *t, void *user_data, + char** fields, size_t *widths, size_t count) +{ + unsigned int i; + sv2c_data *c = (sv2c_data*)user_data; + FILE* out = c->out; + + if(c->line[0] != '#' && + strcmp(c->line, ",,\n") && strcmp(c->line, "\t\t\n")) { + c->count++; + + fprintf(out, "\n\nstatic const char* const expected_%d[%ld] = {", + c->count, 2 * count); + for(i = 0; i < count; i++) { + if(i > 0 && i < count) { + fputc(c->sep, out); + fputc(' ', out); + } + fputc('"', out); + fputs(sv_get_header(t, i, NULL), out); + fputc('"', out); + } + for(i = 0; i < count; i++) { + if(i < count) { + fputc(c->sep, out); + fputc(' ', out); + } + sv2c_print_c_quoted_string(out, fields[i], '"'); + } + fprintf(out, " };\n\n { '%c', 0, \"", c->sep); + for(i = 0; i < count; i++) { + if(i > 0 && i < count) + fputc(',', out); + fputs(sv_get_header(t, i, NULL), out); + } + fputs("\\n\" ", out); + sv2c_print_c_quoted_string(out, c->line, '"'); + fprintf(out, ", (const char** const)expected_%d, %ld, %d },\n", + c->count, count, 1); + } + + /* This code always succeeds */ + return SV_STATUS_OK; +} + + +int +main(int argc, char *argv[]) +{ + int rc = 0; + const char* data_file = NULL; + FILE *fh = NULL; + sv *t = NULL; + sv2c_data c; + size_t data_file_len; + char sep = '\t'; /* default is TSV */ + + program = "example"; + + if(argc != 2) { + fprintf(stderr, "USAGE: %s [SV FILE]\n", program); + rc = 1; + goto tidy; + } + + data_file = (const char*)argv[1]; + if(access(data_file, R_OK)) { + fprintf(stderr, "%s: Failed to find data file %s\n", + program, data_file); + rc = 1; + goto tidy; + } + + fh = fopen(data_file, "r"); + if(!fh) { + fprintf(stderr, "%s: Failed to read data file %s: %s\n", + program, data_file, strerror(errno)); + rc = 1; + goto tidy; + } + + memset(&c, '\0', sizeof(c)); + c.filename = data_file; + c.count = 0; + c.line = NULL; + c.out = stdout; + + data_file_len = strlen(data_file); + + if(data_file_len > 4) { + if(!strcmp(data_file + data_file_len - 3, "csv")) + sep = ','; + else if(!strcmp(data_file + data_file_len - 3, "tsv")) + sep = '\t'; + } + c.sep = sep; + + t = sv_init(&c, NULL, sv2c_fields_callback, sep); + if(!t) { + fprintf(stderr, "%s: Failed to init SV library", program); + rc = 1; + goto tidy; + } + + sv_set_option(t, SV_OPTION_LINE_CALLBACK, sv2c_line_callback); + + while(!feof(fh)) { + char buffer[1024]; + size_t len = fread(buffer, 1, sizeof(buffer), fh); + + if(sv_parse_chunk(t, buffer, len)) + break; + } + fclose(fh); + fh = NULL; + + if(c.line) + free(c.line); + + tidy: + if(t) + sv_free(t); + + if(fh) { + fclose(fh); + fh = NULL; + } + + return rc; +} diff -Nru rasqal-0.9.31/libsv/sv.c rasqal-0.9.32/libsv/sv.c --- rasqal-0.9.31/libsv/sv.c 2013-12-01 22:23:29.000000000 +0000 +++ rasqal-0.9.32/libsv/sv.c 2014-01-20 05:20:10.000000000 +0000 @@ -2,7 +2,7 @@ * * sv.c - Parse separated-values (CSV, TSV) files * - * Copyright (C) 2009-2013, David Beckett http://www.dajobe.org/ + * Copyright (C) 2009-2014, David Beckett http://www.dajobe.org/ * * This package is Free Software * @@ -28,6 +28,7 @@ #include #include #include +#include #ifdef HAVE_STDLIB_H #include @@ -41,6 +42,8 @@ #define SV_FLAGS_BAD_DATA_ERROR (1<<1) /* allow fields to be quoted */ #define SV_FLAGS_QUOTED_FIELDS (1<<2) +/* strip (non-separator) whitespace around fields */ +#define SV_FLAGS_STRIP_WHITESPACE (1<<3) struct sv_s { @@ -83,6 +86,11 @@ int bad_records; char last_char; + + char quote_char; + + /* called with the line (before parsing) */ + sv_line_callback line_callback; }; @@ -131,6 +139,8 @@ t->last_char = '\0'; + t->quote_char = '"'; + return t; } @@ -142,7 +152,7 @@ if(!t->fields) goto failed; - t->fields_widths = (size_t*)malloc(sizeof(size_t*) * (t->fields_count+1)); + t->fields_widths = (size_t*)malloc(sizeof(size_t) * (t->fields_count+1)); if(!t->fields_widths) goto failed; @@ -150,7 +160,7 @@ if(!t->headers) goto failed; - t->headers_widths = (size_t*)malloc(sizeof(size_t*) * (t->fields_count+1)); + t->headers_widths = (size_t*)malloc(sizeof(size_t) * (t->fields_count+1)); if(!t->headers_widths) goto failed; @@ -294,7 +304,7 @@ } -#if defined(SV_DEBUG) +#if defined(SV_DEBUG) && SV_DEBUG > 1 static void sv_dump_buffer(FILE* fh, const char* label, const char* buffer, size_t len) { @@ -315,7 +325,6 @@ sv_parse_line(sv *t, char *line, size_t len, unsigned int* field_count_p) { unsigned int column; - int quote_count = 0; int field_width = 0; int field_offset = 0; char* current_field = NULL; @@ -325,7 +334,7 @@ sv_status_t status; int field_is_quoted = 0; -#if defined(SV_DEBUG) +#if defined(SV_DEBUG) && SV_DEBUG > 1 if(fields) sv_dump_buffer(stderr, "(sv_parse_line): Parsing line", line, len); #endif @@ -355,13 +364,20 @@ c = line[column]; if(t->flags & SV_FLAGS_QUOTED_FIELDS) { - if(c == '"') { - if(!field_width) { + if(c == t->quote_char) { + if(!field_width && !field_is_quoted) { field_is_quoted = 1; #if defined(SV_DEBUG) && SV_DEBUG > 1 fprintf(stderr, "Field is quoted\n"); #endif continue; + } else if(column < len && line[column+1] == t->quote_char) { + #if defined(SV_DEBUG) && SV_DEBUG > 1 + fprintf(stderr, "Doubled quote %c absorbed\n", t->quote_char); + #endif + column++; + /* skip repeated quote - so it just replaces ""... with " */ + goto skip; } else if(column == len-1 || line[column+1] == t->field_sep) { #if defined(SV_DEBUG) && SV_DEBUG > 1 fprintf(stderr, "Field ended on quote + sep\n"); @@ -369,23 +385,7 @@ field_ended = 1; expect_sep = 1; goto do_last; - } else { - #if defined(SV_DEBUG) && SV_DEBUG > 1 - fprintf(stderr, "Inner quote\n"); - #endif - /* inner quote */ - quote_count++; } - } else - quote_count = 0; - - if(quote_count == 2) { - #if defined(SV_DEBUG) && SV_DEBUG > 1 - fprintf(stderr, "Double quote absorbed\n"); - #endif - quote_count = 0; - /* skip repeated quote - so it just replaces ""... with " */ - goto skip; } } @@ -402,16 +402,16 @@ *p++ = '\0'; if(fields) { - /* Remove quotes around quoted field */ - if(field_width > 1 && - field_is_quoted && - current_field[0] == '"' && - current_field[field_width-1] == '"') { - field_width -= 2; - - /* save a memcpy: move the start of the field forward a byte */ - /* memcpy(¤t_field[0], ¤t_field[1], field_width); */ - current_field++; + + if(t->flags & SV_FLAGS_STRIP_WHITESPACE) { + /* Remove whitespace around a field */ + while(field_width > 0 && isspace(current_field[0])) { + current_field++; + field_width--; + } + + while(field_width > 0 && isspace(current_field[field_width - 1])) + field_width--; current_field[field_width] = '\0'; } @@ -436,7 +436,6 @@ break; /* otherwise got a tab so reset for next field */ - quote_count = 0; field_width = 0; field_is_quoted = 0; @@ -460,27 +459,130 @@ } -sv_status_t -sv_parse_chunk(sv *t, char *buffer, size_t len) +static sv_status_t +sv_parse_chunk_line(sv* t, size_t line_len, int has_nl) { - unsigned int offset = 0; + size_t move_len = line_len; sv_status_t status = SV_STATUS_OK; - - status = sv_ensure_line_buffer_size(t, len); + unsigned int fields_count = 0; + + if(!line_len) + goto skip_line; + + if(t->line_callback) { + char c = t->buffer[line_len]; + + t->buffer[line_len] = '\0'; + status = t->line_callback(t, t->callback_user_data, t->buffer, line_len); + t->buffer[line_len] = c; + if(status != SV_STATUS_OK) + return status; + } + + if(!t->fields_count) { + /* First line in the file - calculate number of fields */ + status = sv_parse_line(t, t->buffer, line_len, &t->fields_count); + if(status) + return status; + + /* initialise arrays of size t->fields_count */ + status = sv_init_fields(t); + if(status) + return status; + } + + status = sv_parse_line(t, t->buffer, line_len, &fields_count); if(status) return status; - - /* add new buffer */ - memcpy(t->buffer + t->len, buffer, len); - /* always ensure it is NUL terminated even if input chunk was not */ - t->len += len; - t->buffer[t->len] = '\0'; + if(fields_count != t->fields_count) { + t->bad_records++; + if(t->flags & SV_FLAGS_BAD_DATA_ERROR) { +#if defined(SV_DEBUG) && SV_DEBUG > 1 + fprintf(stderr, "Error in line %d: saw %d fields expected %d\n", + t->line, fields_count, t->fields_count); +#endif + status = SV_STATUS_LINE_FIELDS; + return status; + } +#if defined(SV_DEBUG) && SV_DEBUG > 1 + fprintf(stderr, "Ignoring line %d: saw %d fields expected %d\n", + t->line, fields_count, t->fields_count); +#endif + /* Otherwise skip the line */ + goto skip_line; + } + + if(t->line == 1 && (t->flags & SV_FLAGS_SAVE_HEADER)) { + /* first line and header: turn fields into headers */ + unsigned int i; + + for(i = 0; i < t->fields_count; i++) { + char *s = (char*)malloc(t->fields_widths[i]+1); + memcpy(s, t->fields[i], t->fields_widths[i]+1); + t->headers[i] = s; + t->headers_widths[i] = t->fields_widths[i]; + } + + if(t->header_callback) { + /* got header fields - return them to user */ + status = t->header_callback(t, t->callback_user_data, t->headers, + t->headers_widths, t->fields_count); + } + } else { + /* data */ + + if(t->data_callback) { + /* got data fields - return them to user */ + status = t->data_callback(t, t->callback_user_data, t->fields, + t->fields_widths, t->fields_count); + } + } + + skip_line: + + if(has_nl) + move_len++; + + /* adjust buffer - remove 'line_len+1' bytes from start of buffer */ + t->len -= move_len; + + /* this is an overlapping move */ + memmove(t->buffer, &t->buffer[move_len], t->len); + + /* This is not needed: guaranteed above */ + /* t->buffer[t->len] = '\0' */ + + t->line++; + + return status; +} + + +sv_status_t +sv_parse_chunk(sv *t, char *buffer, size_t len) +{ + size_t offset = 0; + sv_status_t status = SV_STATUS_OK; + /* End of input if either of these is NULL */ + int is_end = (!buffer || !len); + + if(!is_end) { + /* add new data to existing buffer */ + status = sv_ensure_line_buffer_size(t, len); + if(status) + return status; + + /* add new buffer */ + memcpy(t->buffer + t->len, buffer, len); + + /* always ensure it is NUL terminated even if input chunk was not */ + t->len += len; + t->buffer[t->len] = '\0'; + } /* look for an end of line to do some work */ for(offset = 0; offset < t->len; offset++) { - size_t line_len = 0; - unsigned int fields_count = 0; char c = t->buffer[offset]; /* skip \n when just seen \r - i.e. \r\n or CR LF */ @@ -509,89 +611,20 @@ #endif /* found a line */ - fields_count = 0; - line_len = offset; - - if(!line_len) - goto skip_line; - - if(!t->fields_count) { - /* First line in the file - calculate number of fields */ - status = sv_parse_line(t, t->buffer, line_len, &t->fields_count); - if(status) - goto tidy; - - /* initialise arrays of size t->fields_count */ - status = sv_init_fields(t); - if(status) - goto tidy; - } - - status = sv_parse_line(t, t->buffer, line_len, &fields_count); - if(status) - goto tidy; - - if(fields_count != t->fields_count) { - t->bad_records++; - if(t->flags & SV_FLAGS_BAD_DATA_ERROR) { -#if defined(SV_DEBUG) - fprintf(stderr, "Error in line %d: saw %d fields expected %d\n", - t->line, fields_count, t->fields_count); -#endif - status = SV_STATUS_LINE_FIELDS; - goto tidy; - } -#if defined(SV_DEBUG) - fprintf(stderr, "Ignoring line %d: saw %d fields expected %d\n", - t->line, fields_count, t->fields_count); -#endif - /* Otherwise skip the line */ - goto skip_line; - } - - - if(t->line == 1 && (t->flags & SV_FLAGS_SAVE_HEADER)) { - /* first line and header: turn fields into headers */ - unsigned int i; - - for(i = 0; i < t->fields_count; i++) { - char *s = (char*)malloc(t->fields_widths[i]+1); - memcpy(s, t->fields[i], t->fields_widths[i]+1); - t->headers[i] = s; - t->headers_widths[i] = t->fields_widths[i]; - } - - if(t->header_callback) { - /* got header fields - return them to user */ - status = t->header_callback(t, t->callback_user_data, t->headers, - t->headers_widths, t->fields_count); - } - } else { - /* data */ - - if(t->data_callback) { - /* got data fields - return them to user */ - status = t->data_callback(t, t->callback_user_data, t->fields, - t->fields_widths, t->fields_count); - } - } - - skip_line: - - /* adjust buffer - remove 'line_len+1' bytes from start of buffer */ - t->len -= line_len+1; - - /* this is an overlapping move */ - memmove(t->buffer, &t->buffer[line_len+1], t->len); - - /* This is not needed: guaranteed above */ - /* t->buffer[t->len] = '\0' */ + status = sv_parse_chunk_line(t, offset, 1); + if(status != SV_STATUS_OK) + break; - t->line++; offset = -1; /* so for loop starts at 0 */ } - -tidy: + + if(is_end && status == SV_STATUS_OK) { + /* If end of input and there is a non-empty buffer left, try to + * parse it all as the last line. It will NOT contain newlines. + */ + if(t->len) + status = sv_parse_chunk_line(t, t->len, 0); + } return status; } @@ -621,6 +654,26 @@ t->flags |= SV_FLAGS_QUOTED_FIELDS; break; + case SV_OPTION_STRIP_WHITESPACE: + t->flags &= ~SV_FLAGS_STRIP_WHITESPACE; + if(va_arg(arg, long)) + t->flags |= SV_FLAGS_STRIP_WHITESPACE; + break; + + case SV_OPTION_QUOTE_CHAR: + if(1) { + int c = va_arg(arg, int); + if(c != t->field_sep) + t->quote_char = c; + } + break; + + case SV_OPTION_LINE_CALLBACK: + if(1) { + sv_line_callback cb = (sv_line_callback)va_arg(arg, void*); + t->line_callback = cb; + } + default: case SV_OPTION_NONE: status = SV_STATUS_FAILED; diff -Nru rasqal-0.9.31/libsv/sv.h rasqal-0.9.32/libsv/sv.h --- rasqal-0.9.31/libsv/sv.h 2013-12-01 22:23:29.000000000 +0000 +++ rasqal-0.9.32/libsv/sv.h 2014-01-20 05:20:10.000000000 +0000 @@ -30,12 +30,16 @@ typedef struct sv_s sv; typedef sv_status_t (*sv_fields_callback)(sv *t, void *user_data, char** fields, size_t *widths, size_t count); +typedef sv_status_t (*sv_line_callback)(sv *t, void *user_data, const char* line, size_t length); typedef enum { SV_OPTION_NONE = 0, SV_OPTION_SAVE_HEADER, SV_OPTION_BAD_DATA_ERROR, - SV_OPTION_QUOTED_FIELDS + SV_OPTION_QUOTED_FIELDS, + SV_OPTION_STRIP_WHITESPACE, + SV_OPTION_QUOTE_CHAR, + SV_OPTION_LINE_CALLBACK } sv_option_t; sv* sv_init(void *user_data, sv_fields_callback header_callback, sv_fields_callback data_callback, char field_sep); diff -Nru rasqal-0.9.31/libsv/svtest.c rasqal-0.9.32/libsv/svtest.c --- rasqal-0.9.31/libsv/svtest.c 1970-01-01 00:00:00.000000000 +0000 +++ rasqal-0.9.32/libsv/svtest.c 2014-01-20 05:20:10.000000000 +0000 @@ -0,0 +1,328 @@ +/* -*- Mode: c; c-basic-offset: 2 -*- + * + * svtest.c - SV tests + * + * Copyright (C) 2014, David Beckett http://www.dajobe.org/ + * + * This package is Free Software + * + * It is licensed under the following three licenses as alternatives: + * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version + * 2. GNU General Public License (GPL) V2 or any newer version + * 3. Apache License, V2.0 or any newer version + * + * You may not use this file except in compliance with at least one of + * the above three licenses. + * + * See LICENSE.txt at the top of this package for the + * complete terms and further detail along with the license texts for + * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. + * + */ + + +#ifdef SV_CONFIG +#include +#endif + +#include +#include + +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_ERRNO_H +#include +#endif + +#include + + +char* program; + + +typedef struct +{ + char sep; + unsigned int option; + const char* data; + const char** const expected; + int columns_count; + int rows_count; +} svtest_data_set; + + +/* structure used for user data callback */ +typedef struct +{ + int test_index; + /* expected results */ + const svtest_data_set *expected; + + /* raw line */ + char* line; + size_t line_len; + /* processed counts */ + int columns_count; + int rows_count; + /* errors seen */ + int header_errors; + int data_errors; +} svtest_context; + + +#define N_TESTS 20 +static const char* const expected_0[4] = {"a", "b", "1", "2" }; +static const char* const expected_1[4] = {"c", "d", "3", "4" }; +static const char* const expected_2[4] = {"e", "f", "5", "6" }; + +/* test.csv */ +static const char* const expected_3[6] = {"a", "b", "c", "cat", "sat", "mat" }; +static const char* const expected_4[6] = {"a", "b", "c", "", "sat", "mat" }; +static const char* const expected_5[6] = {"a", "b", "c", "this is", "a", "test" }; +static const char* const expected_6[6] = {"a", "b", "c", "this", "is a", "test" }; +static const char* const expected_7[6] = {"a", "b", "c", "this", "is", "a test" }; +static const char* const expected_8[6] = {"a", "b", "c", "this,is", "a", "test" }; +static const char* const expected_9[6] = {"a", "b", "c", "this", "is,a", "test" }; +static const char* const expected_10[6] = {"a", "b", "c", "this", "is", "a,test" }; +static const char* const expected_11[6] = {"a", "b", "c", "\"", "\"", "\"" }; +static const char* const expected_12[6] = {"a", "b", "c", "\"\"", "\"\"", "\"\"" }; +static const char* const expected_13[6] = {"a", "b", "c", "\"\"\"", "\"\"\"", "\"\"\"" }; +static const char* const expected_14[6] = {"a", "b", "c", "quoting", "can \"be\"", "fun" }; + +static const svtest_data_set svtest_data[N_TESTS + 1] = { + { ',', 0, "a,b\n", (const char** const)expected_0, 2, 0 }, + { '\t', 0, "a\tb", (const char** const)expected_0, 2, 0 }, + { ',', 0, "a,b\n1,2\n", (const char** const)expected_0, 2, 1 }, + { '\t', 0, "a\tb\n1\t2", (const char** const)expected_0, 2, 1 }, + { '\t', 0, "c\td\n3\t4\n", (const char** const)expected_1, 2, 1 }, + { ',', SV_OPTION_STRIP_WHITESPACE, " e\t , \tf \n 5\t , \t 6\n", (const char** const)expected_2, 2, 1 }, + { '\t', 0, "c\td\n\n\n3\t4\n\n\n", (const char** const)expected_1, 2, 1 }, + { ',', 0, "c,d\n3,4", (const char** const)expected_1, 2, 1 }, + + /* test.csv */ + { ',', 0, "a,b,c\ncat,sat,mat\n", (const char** const)expected_3, 3, 1 }, + { ',', 0, "a,b,c\n,sat,mat\n", (const char** const)expected_4, 3, 1 }, + { ',', 0, "a,b,c\n\"this is\",a,test\n", (const char** const)expected_5, 3, 1 }, + { ',', 0, "a,b,c\nthis,\"is a\",test\n", (const char** const)expected_6, 3, 1 }, + { ',', 0, "a,b,c\nthis,is,\"a test\"\n", (const char** const)expected_7, 3, 1 }, + { ',', 0, "a,b,c\n\"this,is\",a,test\n", (const char** const)expected_8, 3, 1 }, + { ',', 0, "a,b,c\nthis,\"is,a\",test\n", (const char** const)expected_9, 3, 1 }, + { ',', 0, "a,b,c\nthis,is,\"a,test\"\n", (const char** const)expected_10, 3, 1 }, + { ',', 0, "a,b,c\n\"\"\"\",\"\"\"\",\"\"\"\"\n", (const char** const)expected_11, 3, 1 }, + { ',', 0, "a,b,c\n\"\"\"\"\"\",\"\"\"\"\"\",\"\"\"\"\"\"\n", (const char** const)expected_12, 3, 1 }, + { ',', 0, "a,b,c\n\"\"\"\"\"\"\"\",\"\"\"\"\"\"\"\",\"\"\"\"\"\"\"\"\n", (const char** const)expected_13, 3, 1 }, + { ',', 0, "a,b,c\nquoting,\"can \"\"be\"\"\",fun\n\"\n", (const char** const)expected_14, 3, 1 }, + + { '\0', 0, NULL, NULL, 0, 0 } +}; + + +#define EXPECTED_HEADER_IX(col) (col) +#define EXPECTED_DATA_IX(row, col) (((1+row) * c->expected->columns_count) + col) + + +static sv_status_t +svtest_line_callback(sv *t, void *user_data, const char* line, size_t length) +{ + svtest_context *c = (svtest_context*)user_data; + + if(c->line) + free(c->line); + c->line = (char*)malloc(length + 1); + if(c->line) + memcpy(c->line, line, length + 1); + + /* This code always succeeds */ + return SV_STATUS_OK; +} + + + +static sv_status_t +svtest_header_callback(sv *t, void *user_data, + char** fields, size_t *widths, size_t count) +{ + unsigned int column_i; + svtest_context *c = (svtest_context*)user_data; + + c->columns_count = count; + + for(column_i = 0; column_i < count; column_i++) { + const char* header = fields[column_i]; + unsigned int ix = EXPECTED_HEADER_IX(column_i); + const char* expected_header = c->expected->expected[ix]; + + if(strcmp(header, expected_header)) { + fprintf(stderr, + "%s: Test %d FAIL '%s' - got header '%s' expected '%s'\n", + program, c->test_index, c->line, header, expected_header); + c->header_errors++; + } + } + + return SV_STATUS_OK; +} + + +static sv_status_t +svtest_fields_callback(sv *t, void *user_data, + char** fields, size_t *widths, size_t count) +{ + unsigned int column_i; + svtest_context *c = (svtest_context*)user_data; + + for(column_i = 0; column_i < count; column_i++) { + const char* data = fields[column_i]; + unsigned int ix = EXPECTED_DATA_IX(c->rows_count, column_i); + const char* expected_data = c->expected->expected[ix]; + unsigned int header_ix = EXPECTED_HEADER_IX(column_i); + const char* expected_header = c->expected->expected[header_ix]; + + if(strcmp(data, expected_data)) { + fprintf(stderr, + "%s: Test %d FAIL '%s' row %d got %s value >>>%s<<< expected >>>%s<<<\n", + program, c->test_index, c->line, c->rows_count, + expected_header, + data, expected_data); + c->data_errors++; + } + } + + c->rows_count++; + + /* This code always succeeds */ + return SV_STATUS_OK; +} + + +static int +svtest_run_test(unsigned int test_index) +{ + svtest_context c; + size_t data_len; + sv *t = NULL; + const svtest_data_set *test = &svtest_data[test_index]; + sv_status_t status; + int rc = 0; + + memset(&c, '\0', sizeof(c)); + c.test_index = test_index; + c.columns_count = 0; + c.rows_count = 0; + c.expected = test; + c.line = NULL; + + data_len = strlen(test->data); + + t = sv_init(&c, svtest_header_callback, svtest_fields_callback, test->sep); + if(!t) { + fprintf(stderr, "%s: Failed to init SV library", program); + rc = 1; + return rc; + } + + sv_set_option(t, SV_OPTION_LINE_CALLBACK, svtest_line_callback); + + if(test->option != 0) + sv_set_option(t, (sv_option_t)test->option, 1L); + + status = sv_parse_chunk(t, (char*)test->data, data_len); + if(status != SV_STATUS_OK) { + fprintf(stderr, "%s: Test %d FAIL - sv_parse_chunk() returned %d\n", + program, test_index, (int)status); + rc = 1; + goto end_test; + } + + status = sv_parse_chunk(t, NULL, 0); + if(status != SV_STATUS_OK) { + fprintf(stderr, "%s: Test %d FAIL - final sv_parse_chunk() returned %d\n", + program, test_index, (int)status); + rc = 1; + goto end_test; + } + + if(c.header_errors) { + fprintf(stderr, "%s: Test %d FAIL '%s' - header errors\n", + program, test_index, test->data); + rc = 1; + } else if(c.data_errors) { + fprintf(stderr, "%s: Test %d FAIL '%s' - data errors\n", + program, test_index, test->data); + rc = 1; + } else if(test->rows_count != c.rows_count) { + fprintf(stderr, "%s: Test %d FAIL '%s' - saw %d records - expected %d\n", + program, test_index, test->data, c.rows_count, test->rows_count); + rc = 1; + } else { + fprintf(stderr, "%s: Test %d OK\n", + program, test_index); + } + + end_test: + if(c.line) + free(c.line); + + sv_free(t); + + return rc; +} + + +#define MAX_TEST_INDEX (N_TESTS-1) + +int +main(int argc, char *argv[]) +{ + char *p; + int rc = 0; + unsigned int test_index; + + program = argv[0]; + if((p = strrchr(program, '/'))) + program = p + 1; + else if((p = strrchr(program, '\\'))) + program = p + 1; + argv[0] = program; + + if(argc < 1 || argc > 2) { + fprintf(stderr, "USAGE: %s [TEST-INDEX 1..%d]\n", program, MAX_TEST_INDEX); + rc = 1; + goto tidy; + } + + if(argc == 2) { + test_index = atoi(argv[1]); + if(test_index < 1 || test_index > MAX_TEST_INDEX) { + fprintf(stderr, "%s: Test arg '%s' not in range 1..%d\n", program, + argv[1], MAX_TEST_INDEX); + rc = 1; + goto tidy; + } + rc = svtest_run_test(test_index); + } else { + /* run all tests */ + + for(test_index = 0; test_index < N_TESTS; test_index++) { + int test_rc; + + test_rc = svtest_run_test(test_index); + if(test_rc > 0) { + /* error */ + rc++; + } else if (test_rc < 0) { + /* failure; do not run any more tests */ + rc = 1; + break; + } + } + } + + tidy: + + return rc; +} diff -Nru rasqal-0.9.31/LICENSE.html rasqal-0.9.32/LICENSE.html --- rasqal-0.9.31/LICENSE.html 2013-01-22 19:26:51.000000000 +0000 +++ rasqal-0.9.32/LICENSE.html 2014-01-25 04:55:09.000000000 +0000 @@ -19,7 +19,7 @@
-

Copyright (C) 2000-2013 David Beckett
+

Copyright (C) 2000-2014 David Beckett
Copyright (C) 2000-2005 University of Bristol. All Rights Reserved.

@@ -58,7 +58,7 @@
-

Copyright (C) 2000-2013 David Beckett
+

Copyright (C) 2000-2014 David Beckett
Copyright (C) 2000-2005 University of Bristol.

Licensed under the Apache License, Version 2.0 (the "License"); @@ -80,7 +80,7 @@


-

Copyright (C) 2003-2013 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

+

Copyright (C) 2003-2014 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

diff -Nru rasqal-0.9.31/LICENSE.txt rasqal-0.9.32/LICENSE.txt --- rasqal-0.9.31/LICENSE.txt 2013-01-23 02:37:15.000000000 +0000 +++ rasqal-0.9.32/LICENSE.txt 2014-01-26 20:34:57.000000000 +0000 @@ -10,7 +10,7 @@ COPYING.LIB for the full license text. __________________________________________________________________ - Copyright (C) 2000-2013 David Beckett + Copyright (C) 2000-2014 David Beckett Copyright (C) 2000-2005 University of Bristol. All Rights Reserved. This package is free software; you can redistribute it and/or modify @@ -41,7 +41,7 @@ See LICENSE-2.0.txt for the full license text. - Copyright (C) 2000-2013 David Beckett + Copyright (C) 2000-2014 David Beckett Copyright (C) 2000-2005 University of Bristol. Licensed under the Apache License, Version 2.0 (the "License"); you @@ -60,5 +60,5 @@ section 4(d) of the Apache License, Version 2.0. __________________________________________________________________ - Copyright (C) 2003-2013 Dave Beckett + Copyright (C) 2003-2014 Dave Beckett Copyright (C) 2003-2005 University of Bristol diff -Nru rasqal-0.9.31/Makefile.am rasqal-0.9.32/Makefile.am --- rasqal-0.9.31/Makefile.am 2013-11-27 20:13:24.000000000 +0000 +++ rasqal-0.9.32/Makefile.am 2014-01-15 06:54:06.000000000 +0000 @@ -55,6 +55,8 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc +if MAINTAINER_MODE + # Create some text files from HTML sources LYNX=lynx HTML_TO_TEXT=TERM=vt100 $(LYNX) -dump -nolist @@ -64,8 +66,13 @@ .html.txt: $(HTML_TO_TEXT) $< > $@ -README: README.html +$(srcdir)/README: $(srcdir)/README.html $(HTML_TO_TEXT) $< > $@ -NEWS: NEWS.html +$(srcdir)/NEWS: $(srcdir)/NEWS.html $(HTML_TO_TEXT) $< > $@ + +endif + +# Some people need a little help ;-) +test: check diff -Nru rasqal-0.9.31/Makefile.in rasqal-0.9.32/Makefile.in --- rasqal-0.9.31/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -207,6 +207,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -279,7 +280,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -308,8 +308,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -386,9 +384,9 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc # Create some text files from HTML sources -LYNX = lynx -HTML_TO_TEXT = TERM=vt100 $(LYNX) -dump -nolist -SUFFIXES = .html .txt +@MAINTAINER_MODE_TRUE@LYNX = lynx +@MAINTAINER_MODE_TRUE@HTML_TO_TEXT = TERM=vt100 $(LYNX) -dump -nolist +@MAINTAINER_MODE_TRUE@SUFFIXES = .html .txt all: all-recursive .SUFFIXES: @@ -923,14 +921,17 @@ uninstall uninstall-am uninstall-pkgconfigDATA -.html.txt: - $(HTML_TO_TEXT) $< > $@ +@MAINTAINER_MODE_TRUE@.html.txt: +@MAINTAINER_MODE_TRUE@ $(HTML_TO_TEXT) $< > $@ -README: README.html - $(HTML_TO_TEXT) $< > $@ +@MAINTAINER_MODE_TRUE@$(srcdir)/README: $(srcdir)/README.html +@MAINTAINER_MODE_TRUE@ $(HTML_TO_TEXT) $< > $@ -NEWS: NEWS.html - $(HTML_TO_TEXT) $< > $@ +@MAINTAINER_MODE_TRUE@$(srcdir)/NEWS: $(srcdir)/NEWS.html +@MAINTAINER_MODE_TRUE@ $(HTML_TO_TEXT) $< > $@ + +# Some people need a little help ;-) +test: check # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru rasqal-0.9.31/NEWS rasqal-0.9.32/NEWS --- rasqal-0.9.31/NEWS 2013-12-13 15:06:29.000000000 +0000 +++ rasqal-0.9.32/NEWS 2014-02-23 16:39:50.000000000 +0000 @@ -1,5 +1,18 @@ Rasqal RDF Query Library - News +2014-02-23 Rasqal Version 0.9.32 Released + + SPARQL parser now uses and requires Bison 3.0 (for maintainer) + Fixed SPARQL 1.0 vs SPARQL 1.1 syntax feature checking + Make ossp work as a UUID library option. + Fixed configure searching for libgcrypt-config and pcre-config. + Made --with-libgcrypt-config and --with-pcre-config work again. + Made other fixes and improvements including fixing reported issues: + 0000558, 0000560, 0000561, 0000564 and 0000567. + + See the Rasqal 0.9.32 Release Notes for the full details of the + changes. + 2013-12-13 Rasqal Version 0.9.31 Released roqet with new -t mode can now read query results formats and act as a @@ -427,5 +440,5 @@ Initial web site created. Nothing actually released. __________________________________________________________________ - Copyright (C) 2003-2013 Dave Beckett + Copyright (C) 2003-2014 Dave Beckett Copyright (C) 2003-2005 University of Bristol diff -Nru rasqal-0.9.31/NEWS.html rasqal-0.9.32/NEWS.html --- rasqal-0.9.31/NEWS.html 2013-12-13 15:05:55.000000000 +0000 +++ rasqal-0.9.32/NEWS.html 2014-02-23 16:33:44.000000000 +0000 @@ -9,6 +9,25 @@

Rasqal RDF Query Library - News

+

2014-02-23 Rasqal Version 0.9.32 Released

+ +

SPARQL parser now uses and requires Bison 3.0 (for maintainer)
+Fixed SPARQL 1.0 vs SPARQL 1.1 syntax feature checking
+Make ossp work as a UUID library option.
+Fixed configure searching for libgcrypt-config and pcre-config.
+Made --with-libgcrypt-config and --with-pcre-config work again.
+Made other fixes and improvements including fixing reported issues: +0000558, +0000560, +0000561, +0000564 and +0000567. +

+ +

See the Rasqal 0.9.32 Release Notes +for the full details of the changes.

+ +

2013-12-13 Rasqal Version 0.9.31 Released

roqet with new -t mode can now read @@ -570,7 +589,7 @@


-

Copyright (C) 2003-2013 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

+

Copyright (C) 2003-2014 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

diff -Nru rasqal-0.9.31/README rasqal-0.9.32/README --- rasqal-0.9.31/README 2013-12-09 06:09:55.000000000 +0000 +++ rasqal-0.9.32/README 2014-01-26 20:34:57.000000000 +0000 @@ -143,5 +143,5 @@ and Redland as well as future plans and announcement of releases. __________________________________________________________________ - Copyright (C) 2003-2013 Dave Beckett + Copyright (C) 2003-2014 Dave Beckett Copyright (C) 2003-2005 University of Bristol diff -Nru rasqal-0.9.31/README.html rasqal-0.9.32/README.html --- rasqal-0.9.31/README.html 2013-12-04 16:39:11.000000000 +0000 +++ rasqal-0.9.32/README.html 2014-01-25 04:55:09.000000000 +0000 @@ -200,7 +200,7 @@
-

Copyright (C) 2003-2013 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

+

Copyright (C) 2003-2014 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

diff -Nru rasqal-0.9.31/RELEASE.html rasqal-0.9.32/RELEASE.html --- rasqal-0.9.31/RELEASE.html 2013-12-13 15:05:55.000000000 +0000 +++ rasqal-0.9.32/RELEASE.html 2014-02-23 15:22:04.000000000 +0000 @@ -8,6 +8,88 @@

Rasqal RDF Query Library - Release Notes

+

Rasqal 0.9.32 changes

+ +

Issues Fixed:

+
    +
  • 0000558: sparql11-update causes fallback to sparql10
  • +
  • 0000560: "--with-pcre-config" documented but not supported
  • +
  • 0000561: 'make check' fails; possibly because raptor2 built in separate directory
  • +
  • 0000564: Rasqal fails with linker error for armv7 cross-compilation: duplicate symbol _main
  • +
  • 0000567: Segfault based on documentation recommendation
  • +
+ +

SPARQL changes

+ +

Fixed the SPARQL 1.0 and SPARQL 1.1 syntax feature checking so +that language sparql11-update allows all SPARQL 1.1 +syntax features to be used. +Fixes Issue #0000558 +

+ +

Updated the SPARQL parser to use and require Bison 3.0 (for +maintainer, building from GIT sources). +

+ +

Updated the SPARQL lexer for Bison 3.0. +

+ + +

API changes

+ +

Made rasqal_new_query() match the documentation in +accepting a NULL name. +Fixes Issue #0000567 +

+ + +

Configuration changes

+ +

Make ossp work as a UUID library option. +--with-uuid-library=ossp and automatic discovery of ossp +UUID now work. Fixed the inclusion of OSSP's uuid.h header.

+ +

Fix the searching for the pcre-config and libgcrypt-config +configuration utilities. This probably never worked unless the +envariables form (PCRE_CONFIG and +LIBGCRYPT_CONFIG) were set. +

+ +

Added a new internal to-ntriples utility to remove all +use of rapper(1) so that the raptor utilities do not +need to be available for running tests with 'make check'. +Fixes Issue #0000561 +

+ +

Make --with-libgcrypt-config work. +

+ +

Make --with-pcre-config work. +Fixes Issue# 0000560 +

+ +

Fix noisy mhash_dir addition error; it was always added the cflags +and includes even when mhash_dir was blank.

+ +

Improve raptor missing / too old error message.

+ +

Other changes

+ +

Mention libmtwist near --with-random-approach. +Fixes Issue #0000561 +

+ +

Internal changes

+ +

Add more STANDALONE if/ifndef STANDALONE blocks around internal +code or functions used in tests.

+ +

Make rasqal_xsd_check_double_format() an internal +non-static symbol. +Fixes Issue #0000564 +

+ +

Rasqal 0.9.31 changes

Issues Fixed:

@@ -27,7 +109,7 @@ format. This means it can be used to convert result formats. Use this mode with the -t RESULT-FILE major option and -R INPUT-RESULT-FORMAT to set the input format. --r OUTPUT-RESULT-FORMAT can be used to set the ouutput +-r OUTPUT-RESULT-FORMAT can be used to set the output format.

   # Convert a SPARQL TSV result to XML
@@ -4969,7 +5051,7 @@
 
 
-

Copyright (C) 2004-2013 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

+

Copyright (C) 2004-2014 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

diff -Nru rasqal-0.9.31/scripts/Makefile.in rasqal-0.9.32/scripts/Makefile.in --- rasqal-0.9.31/scripts/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/scripts/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/src/Makefile.am rasqal-0.9.32/src/Makefile.am --- rasqal-0.9.31/src/Makefile.am 2013-11-30 16:11:22.000000000 +0000 +++ rasqal-0.9.32/src/Makefile.am 2014-01-04 19:36:57.000000000 +0000 @@ -202,10 +202,13 @@ mv sparql_lexer.t $@ sparql_parser.c: $(srcdir)/sparql_parser.y $(srcdir)/../scripts/fix-bison - $(YACC) -b sparql_parser -p sparql_parser_ -d -v $(srcdir)/sparql_parser.y + $(BISON) $(srcdir)/sparql_parser.y $(PERL) $(srcdir)/../scripts/fix-bison sparql_parser.tab.c > $@ mv sparql_parser.tab.h sparql_parser.h rm -f sparql_parser.tab.c + +sparql_parser.h: sparql_parser.c ; @exit 0 + endif diff -Nru rasqal-0.9.31/src/Makefile.in rasqal-0.9.32/src/Makefile.in --- rasqal-0.9.31/src/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/src/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -404,6 +404,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -476,7 +477,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -505,8 +505,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -647,6 +645,7 @@ rasqal_query_test.c \ mtwist_config.h +YACC = @YACC@ # Create some text files from HTML sources LYNX = lynx @@ -1794,11 +1793,13 @@ @MAINTAINER_MODE_TRUE@ mv sparql_lexer.t $@ @MAINTAINER_MODE_TRUE@sparql_parser.c: $(srcdir)/sparql_parser.y $(srcdir)/../scripts/fix-bison -@MAINTAINER_MODE_TRUE@ $(YACC) -b sparql_parser -p sparql_parser_ -d -v $(srcdir)/sparql_parser.y +@MAINTAINER_MODE_TRUE@ $(BISON) $(srcdir)/sparql_parser.y @MAINTAINER_MODE_TRUE@ $(PERL) $(srcdir)/../scripts/fix-bison sparql_parser.tab.c > $@ @MAINTAINER_MODE_TRUE@ mv sparql_parser.tab.h sparql_parser.h @MAINTAINER_MODE_TRUE@ rm -f sparql_parser.tab.c +@MAINTAINER_MODE_TRUE@sparql_parser.h: sparql_parser.c ; @exit 0 + $(top_builddir)/../raptor/src/libraptor.la: cd $(top_builddir)/../raptor/src && $(MAKE) $(AM_MAKEFLAGS) libraptor.la diff -Nru rasqal-0.9.31/src/rasqal_algebra.c rasqal-0.9.32/src/rasqal_algebra.c --- rasqal-0.9.31/src/rasqal_algebra.c 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_algebra.c 2014-02-20 05:00:40.000000000 +0000 @@ -1630,7 +1630,7 @@ rasqal_algebra_node_print(node, stderr); fputc('\n', stderr); } -#endif +#endif /* not STANDALONE */ return node; } @@ -2875,4 +2875,5 @@ return failures; } -#endif +#endif /* STANDALONE */ + diff -Nru rasqal-0.9.31/src/rasqal_config.h.in rasqal-0.9.32/src/rasqal_config.h.in --- rasqal-0.9.31/src/rasqal_config.h.in 2013-12-09 17:12:39.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_config.h.in 2014-02-23 15:22:21.000000000 +0000 @@ -3,9 +3,6 @@ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD -/* Bison version as a decimal */ -#undef BISON_VERSION - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H diff -Nru rasqal-0.9.31/src/rasqal_datetime.c rasqal-0.9.32/src/rasqal_datetime.c --- rasqal-0.9.31/src/rasqal_datetime.c 2013-11-16 19:25:22.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_datetime.c 2014-02-20 05:00:40.000000000 +0000 @@ -545,7 +545,8 @@ return rc; } -#endif +#endif /* STANDALONE */ + /** @@ -2248,4 +2249,5 @@ return 0; } -#endif +#endif /* STANDALONE */ + diff -Nru rasqal-0.9.31/src/rasqal_decimal.c rasqal-0.9.32/src/rasqal_decimal.c --- rasqal-0.9.31/src/rasqal_decimal.c 2012-06-27 02:37:11.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_decimal.c 2014-02-20 05:00:40.000000000 +0000 @@ -48,11 +48,11 @@ #include "rasqal.h" #include "rasqal_internal.h" - +#ifndef STANDALONE /* prototypes */ static void rasqal_xsd_decimal_init(rasqal_xsd_decimal* dec); static void rasqal_xsd_decimal_clear(rasqal_xsd_decimal* dec); - +#endif /* not STANDALONE */ #ifdef RASQAL_DECIMAL_C99 /* C99 Decimal @@ -106,6 +106,8 @@ }; +#ifndef STANDALONE + /** * rasqal_new_xsd_decimal: * @world: rasqal world object @@ -896,6 +898,7 @@ return rc; } +#endif /* not STANDALONE */ #ifdef STANDALONE @@ -907,8 +910,8 @@ main(int argc, char *argv[]) { char const *program=rasqal_basename(*argv); int failures=0; - rasqal_xsd_decimal a; - rasqal_xsd_decimal b; + rasqal_xsd_decimal *a; + rasqal_xsd_decimal *b; rasqal_xsd_decimal *result; rasqal_xsd_decimal *result2; double result_d; @@ -949,8 +952,8 @@ #define FAIL failures++; goto tidy #endif - rasqal_xsd_decimal_init(&a); - rasqal_xsd_decimal_init(&b); + a = rasqal_new_xsd_decimal(world); + b = rasqal_new_xsd_decimal(world); result = rasqal_new_xsd_decimal(world); result2 = rasqal_new_xsd_decimal(world); @@ -959,23 +962,23 @@ FAIL; } - rasqal_xsd_decimal_set_long(&a, a_long); - rasqal_xsd_decimal_set_string(&b, b_string); + rasqal_xsd_decimal_set_long(a, a_long); + rasqal_xsd_decimal_set_string(b, b_string); - result_d=rasqal_xsd_decimal_get_double(&a); + result_d=rasqal_xsd_decimal_get_double(a); if(!rasqal_double_approximately_equal(result_d, a_double)) { fprintf(stderr, "FAILED: a=%f expected %f\n", result_d, a_double); FAIL; } - result_s=rasqal_xsd_decimal_as_string(&b); + result_s=rasqal_xsd_decimal_as_string(b); if(strcmp(result_s, b_string)) { fprintf(stderr, "FAILED: b=%s expected %s\n", result_s, b_string); FAIL; } /* result = a+b */ - rasqal_xsd_decimal_add(result, &a, &b); + rasqal_xsd_decimal_add(result, a, b); result_s=rasqal_xsd_decimal_as_string(result); if(strcmp(result_s, expected_a_plus_b)) { @@ -985,7 +988,7 @@ } /* result2 = result-b */ - rasqal_xsd_decimal_subtract(result2, result, &b); + rasqal_xsd_decimal_subtract(result2, result, b); result_s=rasqal_xsd_decimal_as_string(result2); if(strcmp(result_s, expected_a_plus_b_minus_b)) { @@ -995,7 +998,7 @@ } /* result = result2-a */ - rasqal_xsd_decimal_subtract(result, result2, &a); + rasqal_xsd_decimal_subtract(result, result2, a); result_s=rasqal_xsd_decimal_as_string(result); if(strcmp(result_s, expected_a_plus_b_minus_b_minus_a)) { @@ -1004,7 +1007,7 @@ FAIL; } - result_i=rasqal_xsd_decimal_compare(&a, &b); + result_i=rasqal_xsd_decimal_compare(a, b); if((expected_a_compare_b < 0 && result_i >= 0) || (expected_a_compare_b > 0 && result_i <= 0) || (expected_a_compare_b == 0 && result_i != 0)) @@ -1014,7 +1017,7 @@ FAIL; } - result_i=rasqal_xsd_decimal_equals(&a, &b); + result_i=rasqal_xsd_decimal_equals(a, b); if(result_i != expected_a_equals_b) { fprintf(stderr, "FAILED: a equals b = %d expected %d\n", result_i, expected_a_equals_b); @@ -1022,7 +1025,7 @@ } /* result2 = -b */ - rasqal_xsd_decimal_negate(result, &b); + rasqal_xsd_decimal_negate(result, b); result_s=rasqal_xsd_decimal_as_string(result); if(strcmp(result_s, expected_negative_b)) { @@ -1033,8 +1036,10 @@ FAIL_LABEL - rasqal_xsd_decimal_clear(&a); - rasqal_xsd_decimal_clear(&b); + if(a) + rasqal_free_xsd_decimal(a); + if(b) + rasqal_free_xsd_decimal(b); if(result) rasqal_free_xsd_decimal(result); if(result2) @@ -1050,4 +1055,5 @@ return failures; #endif } -#endif + +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_expr.c rasqal-0.9.32/src/rasqal_expr.c --- rasqal-0.9.31/src/rasqal_expr.c 2012-05-15 04:33:58.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_expr.c 2014-02-20 05:00:40.000000000 +0000 @@ -2538,4 +2538,4 @@ return error; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_expr_numerics.c rasqal-0.9.32/src/rasqal_expr_numerics.c --- rasqal-0.9.31/src/rasqal_expr_numerics.c 2013-11-16 19:25:22.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_expr_numerics.c 2014-02-23 15:22:04.000000000 +0000 @@ -41,7 +41,7 @@ #include "rasqal_internal.h" #if defined(RASQAL_UUID_OSSP) -#include +#include #endif #if defined(RASQAL_UUID_LIBUUID) #include diff -Nru rasqal-0.9.31/src/rasqal_expr_strings.c rasqal-0.9.32/src/rasqal_expr_strings.c --- rasqal-0.9.31/src/rasqal_expr_strings.c 2012-05-14 02:23:12.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_expr_strings.c 2014-02-23 15:22:04.000000000 +0000 @@ -807,7 +807,7 @@ const unsigned char *needle; size_t haystack_len; size_t needle_len; - char *ptr; + const char *ptr; unsigned char* result; size_t result_len; diff -Nru rasqal-0.9.31/src/rasqal_general.c rasqal-0.9.32/src/rasqal_general.c --- rasqal-0.9.31/src/rasqal_general.c 2013-11-30 16:11:22.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_general.c 2014-01-04 19:36:57.000000000 +0000 @@ -2,7 +2,7 @@ * * rasqal_general.c - Rasqal library startup, shutdown and factories * - * Copyright (C) 2004-2012, David Beckett http://www.dajobe.org/ + * Copyright (C) 2004-2014, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ @@ -51,9 +51,9 @@ /* statics */ -const char * const rasqal_short_copyright_string = "Copyright 2003-2013 David Beckett. Copyright 2003-2005 University of Bristol"; +const char * const rasqal_short_copyright_string = "Copyright 2003-2014 David Beckett. Copyright 2003-2005 University of Bristol"; -const char * const rasqal_copyright_string = "Copyright (C) 2003-2013 David Beckett - http://www.dajobe.org/\nCopyright (C) 2003-2005 University of Bristol - http://www.bristol.ac.uk/"; +const char * const rasqal_copyright_string = "Copyright (C) 2003-2014 David Beckett - http://www.dajobe.org/\nCopyright (C) 2003-2005 University of Bristol - http://www.bristol.ac.uk/"; const char * const rasqal_license_string = "LGPL 2.1 or newer, GPL 2 or newer, Apache 2.0 or newer.\nSee http://librdf.org/rasqal/LICENSE.html for full terms."; diff -Nru rasqal-0.9.31/src/rasqal_literal.c rasqal-0.9.32/src/rasqal_literal.c --- rasqal-0.9.31/src/rasqal_literal.c 2013-12-09 06:07:29.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_literal.c 2014-02-20 05:00:40.000000000 +0000 @@ -4926,4 +4926,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_query_results.c rasqal-0.9.32/src/rasqal_query_results.c --- rasqal-0.9.31/src/rasqal_query_results.c 2013-11-24 20:18:26.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_query_results.c 2014-02-23 16:33:44.000000000 +0000 @@ -1075,7 +1075,7 @@ static unsigned char* -rasqal_prefix_id(int prefix_id, unsigned char *string) +rasqal_prefix_id(int prefix_id, const unsigned char *string) { int tmpid = prefix_id; unsigned char* buffer; @@ -1118,7 +1118,7 @@ * blank node value so make a new one every result, not every triple */ nodeid = rasqal_prefix_id(query_results->result_count, - RASQAL_GOOD_CAST(unsigned char*, nodel->string)); + nodel->string); } else { nodeid = RASQAL_MALLOC(unsigned char*, nodel->string_len + 1); if(nodeid) diff -Nru rasqal-0.9.31/src/rasqal_random.c rasqal-0.9.32/src/rasqal_random.c --- rasqal-0.9.31/src/rasqal_random.c 2013-11-16 19:25:22.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_random.c 2014-02-20 05:00:40.000000000 +0000 @@ -336,8 +336,7 @@ } - -#endif +#endif /* not STANDALONE */ #ifdef STANDALONE @@ -403,4 +402,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_regex.c rasqal-0.9.32/src/rasqal_regex.c --- rasqal-0.9.31/src/rasqal_regex.c 2012-05-15 04:33:58.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_regex.c 2014-02-20 05:00:40.000000000 +0000 @@ -778,7 +778,7 @@ return result_s; } -#endif +#endif /* not STANDALONE */ #ifdef STANDALONE @@ -853,4 +853,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_row_compatible.c rasqal-0.9.32/src/rasqal_row_compatible.c --- rasqal-0.9.31/src/rasqal_row_compatible.c 2013-11-16 19:25:22.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_row_compatible.c 2014-02-20 05:00:40.000000000 +0000 @@ -39,6 +39,8 @@ #include "rasqal_internal.h" +#ifndef STANDALONE + rasqal_row_compatible* rasqal_new_row_compatible(rasqal_variables_table* vt, rasqal_rowsource *first_rowsource, @@ -206,6 +208,9 @@ } } +#endif /* not STANDALONE */ + + #ifdef STANDALONE @@ -390,4 +395,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_aggregation.c rasqal-0.9.32/src/rasqal_rowsource_aggregation.c --- rasqal-0.9.31/src/rasqal_rowsource_aggregation.c 2013-11-16 19:25:22.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_aggregation.c 2014-02-20 05:00:40.000000000 +0000 @@ -902,7 +902,7 @@ return NULL; } -#endif +#endif /* not STANDALONE */ @@ -1405,4 +1405,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource.c rasqal-0.9.32/src/rasqal_rowsource.c --- rasqal-0.9.31/src/rasqal_rowsource.c 2013-11-24 20:18:26.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource.c 2014-02-20 05:00:40.000000000 +0000 @@ -827,7 +827,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -960,4 +960,4 @@ return(0); } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_empty.c rasqal-0.9.32/src/rasqal_rowsource_empty.c --- rasqal-0.9.31/src/rasqal_rowsource_empty.c 2012-05-09 01:59:10.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_empty.c 2014-02-20 05:00:40.000000000 +0000 @@ -145,7 +145,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -245,4 +245,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_groupby.c rasqal-0.9.32/src/rasqal_rowsource_groupby.c --- rasqal-0.9.31/src/rasqal_rowsource_groupby.c 2013-12-09 06:05:48.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_groupby.c 2014-02-20 05:00:40.000000000 +0000 @@ -518,7 +518,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -911,4 +911,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_join.c rasqal-0.9.32/src/rasqal_rowsource_join.c --- rasqal-0.9.31/src/rasqal_rowsource_join.c 2012-05-06 02:59:18.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_join.c 2014-02-20 05:00:40.000000000 +0000 @@ -616,7 +616,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -833,4 +833,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_project.c rasqal-0.9.32/src/rasqal_rowsource_project.c --- rasqal-0.9.31/src/rasqal_rowsource_project.c 2012-07-30 01:34:24.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_project.c 2014-02-20 05:00:40.000000000 +0000 @@ -283,7 +283,7 @@ -#endif +#endif /* not STANDALONE */ @@ -451,4 +451,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_rowsequence.c rasqal-0.9.32/src/rasqal_rowsource_rowsequence.c --- rasqal-0.9.31/src/rasqal_rowsource_rowsequence.c 2013-12-09 06:05:48.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_rowsequence.c 2014-02-20 05:00:40.000000000 +0000 @@ -253,7 +253,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -466,4 +466,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_service.c rasqal-0.9.32/src/rasqal_rowsource_service.c --- rasqal-0.9.31/src/rasqal_rowsource_service.c 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_service.c 2014-02-20 05:00:40.000000000 +0000 @@ -219,7 +219,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -326,4 +326,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_triples.c rasqal-0.9.32/src/rasqal_rowsource_triples.c --- rasqal-0.9.31/src/rasqal_rowsource_triples.c 2013-11-16 19:25:22.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_triples.c 2014-02-20 05:00:40.000000000 +0000 @@ -442,7 +442,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -616,4 +616,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_rowsource_union.c rasqal-0.9.32/src/rasqal_rowsource_union.c --- rasqal-0.9.31/src/rasqal_rowsource_union.c 2012-02-16 05:54:24.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_rowsource_union.c 2014-02-20 05:00:40.000000000 +0000 @@ -418,7 +418,7 @@ } -#endif +#endif /* not STANDALONE */ @@ -613,4 +613,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_variable.c rasqal-0.9.32/src/rasqal_variable.c --- rasqal-0.9.31/src/rasqal_variable.c 2013-04-20 19:30:13.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_variable.c 2014-02-20 05:00:40.000000000 +0000 @@ -806,4 +806,4 @@ return rc; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/rasqal_xsd_datatypes.c rasqal-0.9.32/src/rasqal_xsd_datatypes.c --- rasqal-0.9.31/src/rasqal_xsd_datatypes.c 2013-07-16 04:53:26.000000000 +0000 +++ rasqal-0.9.32/src/rasqal_xsd_datatypes.c 2014-02-20 05:00:40.000000000 +0000 @@ -46,6 +46,11 @@ #include "rasqal.h" #include "rasqal_internal.h" +/* local prototypes */ +int rasqal_xsd_check_double_format(const unsigned char* string, int flags); + + +#ifndef STANDALONE /* * @@ -199,7 +204,7 @@ * * Return value: non-0 if the string is valid */ -static int +int rasqal_xsd_check_double_format(const unsigned char* string, int flags) { const char *p = RASQAL_GOOD_CAST(const char*, string); @@ -714,6 +719,10 @@ return RASQAL_LITERAL_UNKNOWN; } +#endif /* not STANDALONE */ + + +#ifdef STANDALONE #include int main(int argc, char *argv[]); @@ -795,3 +804,4 @@ return failures; } +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/sparql_common.h rasqal-0.9.32/src/sparql_common.h --- rasqal-0.9.31/src/sparql_common.h 2011-02-15 05:17:51.000000000 +0000 +++ rasqal-0.9.32/src/sparql_common.h 2014-02-22 20:28:15.000000000 +0000 @@ -47,18 +47,12 @@ /* SPARQL query language language features supported */ - /* querying in general (SELECT, CONSTRUCT, DESCRIBE, ASK ) */ - int sparql_query : 1; - - /* SPARQL 1.0 query language features */ - int sparql10 : 1; + /* querying with SELECT, CONSTRUCT, DESCRIBE, ASK */ + int sparql_scda : 1; /* SPARQL 1.1 query language features (e.g. SELECT (expr AS var) ) */ int sparql11_query : 1; - /* SPARQL 1.1 aggregate functions */ - int sparql11_aggregates : 1; - /* SPARQL 1.1 property path querying */ int sparql11_property_paths : 1; @@ -66,7 +60,9 @@ * INSERT, DELETE, MODIFY ) */ int sparql11_update : 1; - int experimental : 1; /* laqrs */ + + /* laqrs */ + int experimental : 1; /* count of errors in current query parse */ int error_count; diff -Nru rasqal-0.9.31/src/sparql_lexer.c rasqal-0.9.32/src/sparql_lexer.c --- rasqal-0.9.31/src/sparql_lexer.c 2013-12-01 22:23:57.000000000 +0000 +++ rasqal-0.9.32/src/sparql_lexer.c 2014-02-22 20:28:58.000000000 +0000 @@ -1256,7 +1256,7 @@ * * sparql_lexer.l - Rasqal SPARQL lexer - making tokens for sparql grammar generator * - * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ + * Copyright (C) 2004-2014, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ @@ -1301,9 +1301,14 @@ /* Never use yyunput */ /* Supply our own alloc/realloc/free functions */ /* Re-entrant scanner */ +/* Makes sparql_lexer_get_lval() sparql_lexer_set_lval() functions + * and yylval macro appear + */ +/* Makes yyget_lloc() yyset_lloc() and yylloc appear */ +/* %option bison-locations */ /* definitions */ -#line 78 "./sparql_lexer.l" +#line 87 "./sparql_lexer.l" /* NOTE: These headers are NOT included here. They are inserted by fix-flex * since otherwise it appears far too late in the generated C @@ -1330,10 +1335,7 @@ #include #include -/* Pure parser argument (a void*) */ -#define YYPARSE_PARAM rq #include - #include @@ -1386,22 +1388,23 @@ const char * sparql_token_print(rasqal_world* world, int token, YYSTYPE *lval); #endif -int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t yyscanner); -#define YY_DECL int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t yyscanner) - #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif -/* Remove the re-fill function since it should never be called */ -#define YY_INPUT(buf,result,max_size) { return YY_NULL; } - +/* debian flex 2.5.35-10.1 added these column header prototypes in + * re-entrant mode. standard flex omits them + */ +void sparql_lexer_set_column(int column_no, yyscan_t yyscanner); +int sparql_lexer_get_column(yyscan_t yyscanner); -/* flex version 2.5.36 released 2012-07-20 added the column header prototypes */ static void sparql_lexer_cleanup(yyscan_t yyscanner); +/* Remove the re-fill function since it should never be called */ +#define YY_INPUT(buf,result,max_size) { return YY_NULL; } + /* Log error handler wrapper */ static void sparql_lexer_log_error(yyconst char *msg, raptor_log_level level, yyscan_t yyscanner); @@ -1431,6 +1434,7 @@ sparql_lexer_log_error(msg, RAPTOR_LOG_LEVEL_ERROR, yyscanner); \ yyterminate(); \ } while(0) + /* * rq23 is http://www.w3.org/2001/sw/DataAccess/rq23/ * CVS ID 1.420 2005/07/12 15:38:40 @@ -1491,7 +1495,7 @@ /* The initial char conditions are to ensure this doesn't grab < or <= * as operators. starting with <_: is caught by BNAME2 above. **/ -#line 1495 "sparql_lexer.c" +#line 1499 "sparql_lexer.c" #define INITIAL 0 #define ID 1 @@ -1510,9 +1514,7 @@ #endif #endif -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif +#define YY_EXTRA_TYPE rasqal_query* /* Holds the entire state of the reentrant scanner. */ struct yyguts_t @@ -1546,10 +1548,16 @@ int yy_more_flag; int yy_more_len; + YYSTYPE * yylval_r; + }; /* end struct yyguts_t */ static int yy_init_globals (yyscan_t yyscanner ); + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + int sparql_lexer_lex_init (yyscan_t* scanner); int sparql_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); @@ -1587,6 +1595,10 @@ void sparql_lexer_set_column (int column_no ,yyscan_t yyscanner ); +YYSTYPE * sparql_lexer_get_lval (yyscan_t yyscanner ); + +void sparql_lexer_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -1697,9 +1709,11 @@ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int sparql_lexer_lex (yyscan_t yyscanner); +extern int sparql_lexer_lex \ + (YYSTYPE * yylval_param ,yyscan_t yyscanner); -#define YY_DECL int sparql_lexer_lex (yyscan_t yyscanner) +#define YY_DECL int sparql_lexer_lex \ + (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -1726,7 +1740,7 @@ register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 303 "./sparql_lexer.l" +#line 311 "./sparql_lexer.l" /* rules */ @@ -1746,7 +1760,9 @@ -#line 1750 "sparql_lexer.c" +#line 1764 "sparql_lexer.c" + + yylval = yylval_param; if ( !yyg->yy_init ) { @@ -1828,14 +1844,14 @@ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 322 "./sparql_lexer.l" +#line 330 "./sparql_lexer.l" { /* C++ comment */ rqe->lineno++; } YY_BREAK case 2: YY_RULE_SETUP -#line 326 "./sparql_lexer.l" +#line 334 "./sparql_lexer.l" { int lines = sparql_skip_c_comment(rq); if(lines < 0) yyterminate(); @@ -1845,660 +1861,660 @@ case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 332 "./sparql_lexer.l" +#line 340 "./sparql_lexer.l" { rqe->lineno++; } YY_BREAK case 4: YY_RULE_SETUP -#line 334 "./sparql_lexer.l" +#line 342 "./sparql_lexer.l" { /* eat up other whitespace */ ; } YY_BREAK case 5: YY_RULE_SETUP -#line 338 "./sparql_lexer.l" +#line 346 "./sparql_lexer.l" { return SELECT; } YY_BREAK case 6: YY_RULE_SETUP -#line 339 "./sparql_lexer.l" +#line 347 "./sparql_lexer.l" { return FROM; } YY_BREAK case 7: YY_RULE_SETUP -#line 340 "./sparql_lexer.l" +#line 348 "./sparql_lexer.l" { return WHERE; } YY_BREAK case 8: YY_RULE_SETUP -#line 341 "./sparql_lexer.l" +#line 349 "./sparql_lexer.l" { BEGIN(PREF); return PREFIX; } YY_BREAK case 9: YY_RULE_SETUP -#line 343 "./sparql_lexer.l" +#line 351 "./sparql_lexer.l" { return DESCRIBE; } YY_BREAK case 10: YY_RULE_SETUP -#line 344 "./sparql_lexer.l" +#line 352 "./sparql_lexer.l" { return CONSTRUCT; } YY_BREAK case 11: YY_RULE_SETUP -#line 345 "./sparql_lexer.l" +#line 353 "./sparql_lexer.l" { return ASK; } YY_BREAK case 12: YY_RULE_SETUP -#line 346 "./sparql_lexer.l" +#line 354 "./sparql_lexer.l" { return DISTINCT; } YY_BREAK case 13: YY_RULE_SETUP -#line 347 "./sparql_lexer.l" +#line 355 "./sparql_lexer.l" { return REDUCED; } YY_BREAK case 14: YY_RULE_SETUP -#line 348 "./sparql_lexer.l" +#line 356 "./sparql_lexer.l" { return LIMIT; } YY_BREAK case 15: YY_RULE_SETUP -#line 349 "./sparql_lexer.l" +#line 357 "./sparql_lexer.l" { return UNION; } YY_BREAK case 16: YY_RULE_SETUP -#line 350 "./sparql_lexer.l" +#line 358 "./sparql_lexer.l" { return OPTIONAL; } YY_BREAK case 17: YY_RULE_SETUP -#line 351 "./sparql_lexer.l" +#line 359 "./sparql_lexer.l" { return BASE; } YY_BREAK case 18: YY_RULE_SETUP -#line 352 "./sparql_lexer.l" +#line 360 "./sparql_lexer.l" { return BOUND; } YY_BREAK case 19: YY_RULE_SETUP -#line 353 "./sparql_lexer.l" +#line 361 "./sparql_lexer.l" { return STRLANG; } YY_BREAK case 20: YY_RULE_SETUP -#line 354 "./sparql_lexer.l" +#line 362 "./sparql_lexer.l" { return STRDT; } YY_BREAK case 21: YY_RULE_SETUP -#line 355 "./sparql_lexer.l" +#line 363 "./sparql_lexer.l" { return STR; } YY_BREAK case 22: YY_RULE_SETUP -#line 356 "./sparql_lexer.l" +#line 364 "./sparql_lexer.l" { return LANG; } YY_BREAK case 23: YY_RULE_SETUP -#line 357 "./sparql_lexer.l" +#line 365 "./sparql_lexer.l" { return DATATYPE; } YY_BREAK case 24: YY_RULE_SETUP -#line 358 "./sparql_lexer.l" +#line 366 "./sparql_lexer.l" { return ISURI; } /* isURI and isIRI */ YY_BREAK case 25: YY_RULE_SETUP -#line 359 "./sparql_lexer.l" +#line 367 "./sparql_lexer.l" { return ISBLANK; } YY_BREAK case 26: YY_RULE_SETUP -#line 360 "./sparql_lexer.l" +#line 368 "./sparql_lexer.l" { return ISLITERAL; } YY_BREAK case 27: YY_RULE_SETUP -#line 361 "./sparql_lexer.l" +#line 369 "./sparql_lexer.l" { return GRAPH; } YY_BREAK case 28: YY_RULE_SETUP -#line 362 "./sparql_lexer.l" +#line 370 "./sparql_lexer.l" { return NAMED; } YY_BREAK case 29: YY_RULE_SETUP -#line 363 "./sparql_lexer.l" +#line 371 "./sparql_lexer.l" { return FILTER; } YY_BREAK case 30: YY_RULE_SETUP -#line 364 "./sparql_lexer.l" +#line 372 "./sparql_lexer.l" { return OFFSET; } YY_BREAK case 31: YY_RULE_SETUP -#line 365 "./sparql_lexer.l" +#line 373 "./sparql_lexer.l" { return ORDER; } YY_BREAK case 32: YY_RULE_SETUP -#line 366 "./sparql_lexer.l" +#line 374 "./sparql_lexer.l" { return BY; } YY_BREAK case 33: YY_RULE_SETUP -#line 367 "./sparql_lexer.l" +#line 375 "./sparql_lexer.l" { return REGEX; } YY_BREAK case 34: YY_RULE_SETUP -#line 368 "./sparql_lexer.l" +#line 376 "./sparql_lexer.l" { return ASC; } YY_BREAK case 35: YY_RULE_SETUP -#line 369 "./sparql_lexer.l" +#line 377 "./sparql_lexer.l" { return DESC; } YY_BREAK case 36: YY_RULE_SETUP -#line 370 "./sparql_lexer.l" +#line 378 "./sparql_lexer.l" { return LANGMATCHES; } YY_BREAK case 37: YY_RULE_SETUP -#line 371 "./sparql_lexer.l" +#line 379 "./sparql_lexer.l" { return EXPLAIN; } YY_BREAK case 38: YY_RULE_SETUP -#line 372 "./sparql_lexer.l" +#line 380 "./sparql_lexer.l" { return GROUP; } YY_BREAK case 39: YY_RULE_SETUP -#line 373 "./sparql_lexer.l" +#line 381 "./sparql_lexer.l" { return HAVING; } YY_BREAK case 40: YY_RULE_SETUP -#line 374 "./sparql_lexer.l" +#line 382 "./sparql_lexer.l" { return COUNT; } YY_BREAK case 41: YY_RULE_SETUP -#line 375 "./sparql_lexer.l" +#line 383 "./sparql_lexer.l" { return SUM; } YY_BREAK case 42: YY_RULE_SETUP -#line 376 "./sparql_lexer.l" +#line 384 "./sparql_lexer.l" { return AVG; } YY_BREAK case 43: YY_RULE_SETUP -#line 377 "./sparql_lexer.l" +#line 385 "./sparql_lexer.l" { return MIN; } YY_BREAK case 44: YY_RULE_SETUP -#line 378 "./sparql_lexer.l" +#line 386 "./sparql_lexer.l" { return MAX; } YY_BREAK case 45: YY_RULE_SETUP -#line 379 "./sparql_lexer.l" +#line 387 "./sparql_lexer.l" { BEGIN(SPID); return AS; } YY_BREAK case 46: YY_RULE_SETUP -#line 380 "./sparql_lexer.l" +#line 388 "./sparql_lexer.l" { return DELETE; } YY_BREAK case 47: YY_RULE_SETUP -#line 381 "./sparql_lexer.l" +#line 389 "./sparql_lexer.l" { return INSERT; } YY_BREAK case 48: YY_RULE_SETUP -#line 382 "./sparql_lexer.l" +#line 390 "./sparql_lexer.l" { return SAMETERM; } YY_BREAK case 49: YY_RULE_SETUP -#line 383 "./sparql_lexer.l" +#line 391 "./sparql_lexer.l" { return LET; } YY_BREAK case 50: YY_RULE_SETUP -#line 384 "./sparql_lexer.l" +#line 392 "./sparql_lexer.l" { return COALESCE; } YY_BREAK case 51: YY_RULE_SETUP -#line 385 "./sparql_lexer.l" +#line 393 "./sparql_lexer.l" { return WITH; } YY_BREAK case 52: YY_RULE_SETUP -#line 386 "./sparql_lexer.l" +#line 394 "./sparql_lexer.l" { return CLEAR; } YY_BREAK case 53: YY_RULE_SETUP -#line 387 "./sparql_lexer.l" +#line 395 "./sparql_lexer.l" { return CREATE; } YY_BREAK case 54: YY_RULE_SETUP -#line 388 "./sparql_lexer.l" +#line 396 "./sparql_lexer.l" { return SILENT; } YY_BREAK case 55: YY_RULE_SETUP -#line 389 "./sparql_lexer.l" +#line 397 "./sparql_lexer.l" { return DATA; } YY_BREAK case 56: YY_RULE_SETUP -#line 390 "./sparql_lexer.l" +#line 398 "./sparql_lexer.l" { return DROP; } YY_BREAK case 57: YY_RULE_SETUP -#line 391 "./sparql_lexer.l" +#line 399 "./sparql_lexer.l" { return LOAD; } YY_BREAK case 58: YY_RULE_SETUP -#line 392 "./sparql_lexer.l" +#line 400 "./sparql_lexer.l" { return INTO; } YY_BREAK case 59: YY_RULE_SETUP -#line 393 "./sparql_lexer.l" +#line 401 "./sparql_lexer.l" { return IF; } YY_BREAK case 60: YY_RULE_SETUP -#line 394 "./sparql_lexer.l" +#line 402 "./sparql_lexer.l" { return IRI; } YY_BREAK case 61: YY_RULE_SETUP -#line 395 "./sparql_lexer.l" +#line 403 "./sparql_lexer.l" { return URI; } YY_BREAK case 62: YY_RULE_SETUP -#line 396 "./sparql_lexer.l" +#line 404 "./sparql_lexer.l" { return BNODE; } YY_BREAK case 63: YY_RULE_SETUP -#line 397 "./sparql_lexer.l" +#line 405 "./sparql_lexer.l" { return DEFAULT; } YY_BREAK case 64: YY_RULE_SETUP -#line 398 "./sparql_lexer.l" +#line 406 "./sparql_lexer.l" { return NOT; } YY_BREAK case 65: YY_RULE_SETUP -#line 399 "./sparql_lexer.l" +#line 407 "./sparql_lexer.l" { return IN; } YY_BREAK case 66: YY_RULE_SETUP -#line 400 "./sparql_lexer.l" +#line 408 "./sparql_lexer.l" { return GROUP_CONCAT; } YY_BREAK case 67: YY_RULE_SETUP -#line 401 "./sparql_lexer.l" +#line 409 "./sparql_lexer.l" { return SEPARATOR; } YY_BREAK case 68: YY_RULE_SETUP -#line 402 "./sparql_lexer.l" +#line 410 "./sparql_lexer.l" { return BIND; } YY_BREAK case 69: YY_RULE_SETUP -#line 403 "./sparql_lexer.l" +#line 411 "./sparql_lexer.l" { return BINDINGS; } YY_BREAK case 70: YY_RULE_SETUP -#line 404 "./sparql_lexer.l" +#line 412 "./sparql_lexer.l" { return UNDEF; } YY_BREAK case 71: YY_RULE_SETUP -#line 405 "./sparql_lexer.l" +#line 413 "./sparql_lexer.l" { return SERVICE; } YY_BREAK case 72: YY_RULE_SETUP -#line 406 "./sparql_lexer.l" +#line 414 "./sparql_lexer.l" { return MINUS; } YY_BREAK case 73: YY_RULE_SETUP -#line 407 "./sparql_lexer.l" +#line 415 "./sparql_lexer.l" { return ISNUMERIC; } YY_BREAK case 74: YY_RULE_SETUP -#line 408 "./sparql_lexer.l" +#line 416 "./sparql_lexer.l" { return SAMPLE; } YY_BREAK case 75: YY_RULE_SETUP -#line 409 "./sparql_lexer.l" +#line 417 "./sparql_lexer.l" { return YEAR; } YY_BREAK case 76: YY_RULE_SETUP -#line 410 "./sparql_lexer.l" +#line 418 "./sparql_lexer.l" { return MONTH; } YY_BREAK case 77: YY_RULE_SETUP -#line 411 "./sparql_lexer.l" +#line 419 "./sparql_lexer.l" { return DAY; } YY_BREAK case 78: YY_RULE_SETUP -#line 412 "./sparql_lexer.l" +#line 420 "./sparql_lexer.l" { return HOURS; } YY_BREAK case 79: YY_RULE_SETUP -#line 413 "./sparql_lexer.l" +#line 421 "./sparql_lexer.l" { return MINUTES; } YY_BREAK case 80: YY_RULE_SETUP -#line 414 "./sparql_lexer.l" +#line 422 "./sparql_lexer.l" { return SECONDS; } YY_BREAK case 81: YY_RULE_SETUP -#line 415 "./sparql_lexer.l" +#line 423 "./sparql_lexer.l" { return TIMEZONE; } YY_BREAK case 82: YY_RULE_SETUP -#line 416 "./sparql_lexer.l" +#line 424 "./sparql_lexer.l" { return CURRENT_DATETIME; } YY_BREAK case 83: YY_RULE_SETUP -#line 417 "./sparql_lexer.l" +#line 425 "./sparql_lexer.l" { return NOW; } YY_BREAK case 84: YY_RULE_SETUP -#line 418 "./sparql_lexer.l" +#line 426 "./sparql_lexer.l" { return FROM_UNIXTIME; } YY_BREAK case 85: YY_RULE_SETUP -#line 419 "./sparql_lexer.l" +#line 427 "./sparql_lexer.l" { return TO_UNIXTIME; } YY_BREAK case 86: YY_RULE_SETUP -#line 420 "./sparql_lexer.l" +#line 428 "./sparql_lexer.l" { return CONCAT; } YY_BREAK case 87: YY_RULE_SETUP -#line 421 "./sparql_lexer.l" +#line 429 "./sparql_lexer.l" { return STRLEN; } YY_BREAK case 88: YY_RULE_SETUP -#line 422 "./sparql_lexer.l" +#line 430 "./sparql_lexer.l" { return SUBSTR; } YY_BREAK case 89: YY_RULE_SETUP -#line 423 "./sparql_lexer.l" +#line 431 "./sparql_lexer.l" { return UCASE; } YY_BREAK case 90: YY_RULE_SETUP -#line 424 "./sparql_lexer.l" +#line 432 "./sparql_lexer.l" { return LCASE; } YY_BREAK case 91: YY_RULE_SETUP -#line 425 "./sparql_lexer.l" +#line 433 "./sparql_lexer.l" { return STRSTARTS; } YY_BREAK case 92: YY_RULE_SETUP -#line 426 "./sparql_lexer.l" +#line 434 "./sparql_lexer.l" { return STRENDS; } YY_BREAK case 93: YY_RULE_SETUP -#line 427 "./sparql_lexer.l" +#line 435 "./sparql_lexer.l" { return CONTAINS; } YY_BREAK case 94: YY_RULE_SETUP -#line 428 "./sparql_lexer.l" +#line 436 "./sparql_lexer.l" { return ENCODE_FOR_URI; } YY_BREAK case 95: YY_RULE_SETUP -#line 429 "./sparql_lexer.l" +#line 437 "./sparql_lexer.l" { return TO; } YY_BREAK case 96: YY_RULE_SETUP -#line 430 "./sparql_lexer.l" +#line 438 "./sparql_lexer.l" { return ADD; } YY_BREAK case 97: YY_RULE_SETUP -#line 431 "./sparql_lexer.l" +#line 439 "./sparql_lexer.l" { return MOVE; } YY_BREAK case 98: YY_RULE_SETUP -#line 432 "./sparql_lexer.l" +#line 440 "./sparql_lexer.l" { return COPY; } YY_BREAK case 99: YY_RULE_SETUP -#line 433 "./sparql_lexer.l" +#line 441 "./sparql_lexer.l" { return ALL; } YY_BREAK case 100: YY_RULE_SETUP -#line 434 "./sparql_lexer.l" +#line 442 "./sparql_lexer.l" { return TZ; } YY_BREAK case 101: YY_RULE_SETUP -#line 435 "./sparql_lexer.l" +#line 443 "./sparql_lexer.l" { return RAND; } YY_BREAK case 102: YY_RULE_SETUP -#line 436 "./sparql_lexer.l" +#line 444 "./sparql_lexer.l" { return ABS; } YY_BREAK case 103: YY_RULE_SETUP -#line 437 "./sparql_lexer.l" +#line 445 "./sparql_lexer.l" { return ROUND; } YY_BREAK case 104: YY_RULE_SETUP -#line 438 "./sparql_lexer.l" +#line 446 "./sparql_lexer.l" { return CEIL; } YY_BREAK case 105: YY_RULE_SETUP -#line 439 "./sparql_lexer.l" +#line 447 "./sparql_lexer.l" { return FLOOR; } YY_BREAK case 106: YY_RULE_SETUP -#line 440 "./sparql_lexer.l" +#line 448 "./sparql_lexer.l" { return MD5; } YY_BREAK case 107: YY_RULE_SETUP -#line 441 "./sparql_lexer.l" +#line 449 "./sparql_lexer.l" { return SHA1; } YY_BREAK case 108: YY_RULE_SETUP -#line 442 "./sparql_lexer.l" +#line 450 "./sparql_lexer.l" { return SHA224; } YY_BREAK case 109: YY_RULE_SETUP -#line 443 "./sparql_lexer.l" +#line 451 "./sparql_lexer.l" { return SHA256; } YY_BREAK case 110: YY_RULE_SETUP -#line 444 "./sparql_lexer.l" +#line 452 "./sparql_lexer.l" { return SHA384; } YY_BREAK case 111: YY_RULE_SETUP -#line 445 "./sparql_lexer.l" +#line 453 "./sparql_lexer.l" { return SHA512; } YY_BREAK case 112: YY_RULE_SETUP -#line 446 "./sparql_lexer.l" +#line 454 "./sparql_lexer.l" { return STRBEFORE; } YY_BREAK case 113: YY_RULE_SETUP -#line 447 "./sparql_lexer.l" +#line 455 "./sparql_lexer.l" { return STRAFTER; } YY_BREAK case 114: YY_RULE_SETUP -#line 448 "./sparql_lexer.l" +#line 456 "./sparql_lexer.l" { return REPLACE; } YY_BREAK case 115: YY_RULE_SETUP -#line 449 "./sparql_lexer.l" +#line 457 "./sparql_lexer.l" { return UUID; } YY_BREAK case 116: YY_RULE_SETUP -#line 450 "./sparql_lexer.l" +#line 458 "./sparql_lexer.l" { return STRUUID; } YY_BREAK case 117: YY_RULE_SETUP -#line 451 "./sparql_lexer.l" +#line 459 "./sparql_lexer.l" { return VALUES; } YY_BREAK case 118: YY_RULE_SETUP -#line 453 "./sparql_lexer.l" +#line 461 "./sparql_lexer.l" { return A; } YY_BREAK case 119: YY_RULE_SETUP -#line 455 "./sparql_lexer.l" +#line 463 "./sparql_lexer.l" { return ','; } YY_BREAK case 120: YY_RULE_SETUP -#line 456 "./sparql_lexer.l" +#line 464 "./sparql_lexer.l" { return '('; } YY_BREAK case 121: YY_RULE_SETUP -#line 457 "./sparql_lexer.l" +#line 465 "./sparql_lexer.l" { return ')'; } YY_BREAK case 122: YY_RULE_SETUP -#line 458 "./sparql_lexer.l" +#line 466 "./sparql_lexer.l" { return '['; } YY_BREAK case 123: YY_RULE_SETUP -#line 459 "./sparql_lexer.l" +#line 467 "./sparql_lexer.l" { return ']'; } YY_BREAK case 124: YY_RULE_SETUP -#line 460 "./sparql_lexer.l" +#line 468 "./sparql_lexer.l" { BEGIN(ID); return '?'; } YY_BREAK case 125: YY_RULE_SETUP -#line 461 "./sparql_lexer.l" +#line 469 "./sparql_lexer.l" { BEGIN(ID); return '$'; } YY_BREAK case 126: YY_RULE_SETUP -#line 462 "./sparql_lexer.l" +#line 470 "./sparql_lexer.l" { return '{'; } YY_BREAK case 127: YY_RULE_SETUP -#line 463 "./sparql_lexer.l" +#line 471 "./sparql_lexer.l" { return '}'; } YY_BREAK case 128: YY_RULE_SETUP -#line 464 "./sparql_lexer.l" +#line 472 "./sparql_lexer.l" { return '.'; } YY_BREAK case 129: YY_RULE_SETUP -#line 465 "./sparql_lexer.l" +#line 473 "./sparql_lexer.l" { return ';'; } YY_BREAK case 130: YY_RULE_SETUP -#line 467 "./sparql_lexer.l" +#line 475 "./sparql_lexer.l" { return SC_OR; } YY_BREAK case 131: YY_RULE_SETUP -#line 468 "./sparql_lexer.l" +#line 476 "./sparql_lexer.l" { return SC_AND; } YY_BREAK case 132: YY_RULE_SETUP -#line 470 "./sparql_lexer.l" +#line 478 "./sparql_lexer.l" { return EQ; } YY_BREAK case 133: YY_RULE_SETUP -#line 471 "./sparql_lexer.l" +#line 479 "./sparql_lexer.l" { return NEQ; } YY_BREAK case 134: @@ -2507,75 +2523,75 @@ yyg->yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 472 "./sparql_lexer.l" +#line 480 "./sparql_lexer.l" { return LT; } YY_BREAK case 135: YY_RULE_SETUP -#line 473 "./sparql_lexer.l" +#line 481 "./sparql_lexer.l" { return GT; } YY_BREAK case 136: YY_RULE_SETUP -#line 474 "./sparql_lexer.l" +#line 482 "./sparql_lexer.l" { return LE; } YY_BREAK case 137: YY_RULE_SETUP -#line 475 "./sparql_lexer.l" +#line 483 "./sparql_lexer.l" { return GE; } YY_BREAK case 138: YY_RULE_SETUP -#line 477 "./sparql_lexer.l" +#line 485 "./sparql_lexer.l" { return '*'; } YY_BREAK case 139: YY_RULE_SETUP -#line 478 "./sparql_lexer.l" +#line 486 "./sparql_lexer.l" { return '/'; } YY_BREAK case 140: YY_RULE_SETUP -#line 479 "./sparql_lexer.l" +#line 487 "./sparql_lexer.l" { return '!'; } YY_BREAK case 141: YY_RULE_SETUP -#line 481 "./sparql_lexer.l" +#line 489 "./sparql_lexer.l" { return ASSIGN; } YY_BREAK case 142: YY_RULE_SETUP -#line 483 "./sparql_lexer.l" +#line 491 "./sparql_lexer.l" { - sparql_parser_lval->name = RASQAL_MALLOC(unsigned char*, yyleng); - if(!sparql_parser_lval->name) + yylval->name = RASQAL_MALLOC(unsigned char*, yyleng); + if(!yylval->name) YY_REPORT_ERROR_EOF("Out of memory"); - memcpy(sparql_parser_lval->name, yytext + 1, yyleng - 1); - sparql_parser_lval->name[yyleng - 1] = '\0'; + memcpy(yylval->name, yytext + 1, yyleng - 1); + yylval->name[yyleng - 1] = '\0'; return LANGTAG; } YY_BREAK case 143: YY_RULE_SETUP -#line 493 "./sparql_lexer.l" +#line 501 "./sparql_lexer.l" { return HATHAT; } YY_BREAK case 144: YY_RULE_SETUP -#line 496 "./sparql_lexer.l" +#line 504 "./sparql_lexer.l" { c = *yytext; - sparql_parser_lval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_INTEGER, RASQAL_GOOD_CAST(const unsigned char*, yytext)); - if(!sparql_parser_lval->literal) + yylval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_INTEGER, RASQAL_GOOD_CAST(const unsigned char*, yytext)); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_typed_literal failed"); return (c=='+' ? INTEGER_POSITIVE_LITERAL : (c == '-' ? INTEGER_NEGATIVE_LITERAL : INTEGER_LITERAL)); } YY_BREAK case 145: YY_RULE_SETUP -#line 503 "./sparql_lexer.l" +#line 511 "./sparql_lexer.l" { c = *yytext; @@ -2583,58 +2599,58 @@ sparql_syntax_error(rq, "SPARQL syntax error - Illegal decimal constant %s", yytext); yyterminate(); } - sparql_parser_lval->literal = rasqal_new_decimal_literal(rq->world, RASQAL_GOOD_CAST(const unsigned char*, yytext)); - if(!sparql_parser_lval->literal) + yylval->literal = rasqal_new_decimal_literal(rq->world, RASQAL_GOOD_CAST(const unsigned char*, yytext)); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_decimal_literal failed"); return (c=='+' ? DECIMAL_POSITIVE_LITERAL : (c == '-' ? DECIMAL_NEGATIVE_LITERAL : DECIMAL_LITERAL)); } YY_BREAK case 146: YY_RULE_SETUP -#line 516 "./sparql_lexer.l" +#line 524 "./sparql_lexer.l" { c = *yytext; if(!rasqal_xsd_datatype_check(RASQAL_LITERAL_DOUBLE, RASQAL_GOOD_CAST(const unsigned char*, yytext), 0)) { sparql_syntax_error(rq, "SPARQL syntax error - Illegal double constant %s", yytext); yyterminate(); } - sparql_parser_lval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_DOUBLE, RASQAL_GOOD_CAST(const unsigned char*, yytext)); - if(!sparql_parser_lval->literal) + yylval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_DOUBLE, RASQAL_GOOD_CAST(const unsigned char*, yytext)); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_typed_literal failed"); return (c=='+' ? DOUBLE_POSITIVE_LITERAL : (c == '-' ? DOUBLE_NEGATIVE_LITERAL : DOUBLE_LITERAL)); } YY_BREAK case 147: YY_RULE_SETUP -#line 528 "./sparql_lexer.l" +#line 536 "./sparql_lexer.l" { return '+'; } YY_BREAK case 148: YY_RULE_SETUP -#line 529 "./sparql_lexer.l" +#line 537 "./sparql_lexer.l" { return '-'; } YY_BREAK case 149: YY_RULE_SETUP -#line 531 "./sparql_lexer.l" +#line 539 "./sparql_lexer.l" { /*' */ - sparql_parser_lval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '\''); - if(!sparql_parser_lval->name) + yylval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '\''); + if(!yylval->name) YY_REPORT_ERROR_EOF("sparql_copy_string_token failed"); return STRING; } YY_BREAK case 150: YY_RULE_SETUP -#line 537 "./sparql_lexer.l" +#line 545 "./sparql_lexer.l" { /* " */ - sparql_parser_lval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '"'); - if(!sparql_parser_lval->name) + yylval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '"'); + if(!yylval->name) YY_REPORT_ERROR_EOF("sparql_copy_string_token failed"); return STRING; } YY_BREAK case 151: YY_RULE_SETUP -#line 543 "./sparql_lexer.l" +#line 551 "./sparql_lexer.l" { BEGIN(LITERAL); rqe->sb = raptor_new_stringbuffer(); if(!rqe->sb) @@ -2643,19 +2659,19 @@ YY_BREAK case 152: YY_RULE_SETUP -#line 549 "./sparql_lexer.l" +#line 557 "./sparql_lexer.l" { size_t len; BEGIN(INITIAL); len = raptor_stringbuffer_length(rqe->sb); - sparql_parser_lval->name = RASQAL_MALLOC(unsigned char*, len + 1); - if(!sparql_parser_lval->name) + yylval->name = RASQAL_MALLOC(unsigned char*, len + 1); + if(!yylval->name) YY_REPORT_ERROR_EOF("Out of memory"); raptor_stringbuffer_copy_to_string(rqe->sb, - RASQAL_GOOD_CAST(unsigned char*, sparql_parser_lval->name), len); - sparql_parser_lval->name[len] = '\0'; + RASQAL_GOOD_CAST(unsigned char*, yylval->name), len); + yylval->name[len] = '\0'; raptor_free_stringbuffer(rqe->sb); rqe->sb = NULL; @@ -2664,7 +2680,7 @@ case 153: /* rule 153 can match eol */ YY_RULE_SETUP -#line 566 "./sparql_lexer.l" +#line 574 "./sparql_lexer.l" { char *p; @@ -2692,7 +2708,7 @@ YY_BREAK case 154: YY_RULE_SETUP -#line 591 "./sparql_lexer.l" +#line 599 "./sparql_lexer.l" { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ sparql_syntax_error(rq, "End of file in middle of literal"); @@ -2700,7 +2716,7 @@ YY_BREAK case 155: YY_RULE_SETUP -#line 596 "./sparql_lexer.l" +#line 604 "./sparql_lexer.l" { BEGIN(LITERAL2); rqe->sb = raptor_new_stringbuffer(); if(!rqe->sb) { @@ -2711,18 +2727,18 @@ YY_BREAK case 156: YY_RULE_SETUP -#line 604 "./sparql_lexer.l" +#line 612 "./sparql_lexer.l" { size_t len; BEGIN(INITIAL); len = raptor_stringbuffer_length(rqe->sb); - sparql_parser_lval->name = RASQAL_MALLOC(unsigned char*, len + 1); - if(!sparql_parser_lval->name) + yylval->name = RASQAL_MALLOC(unsigned char*, len + 1); + if(!yylval->name) YY_REPORT_ERROR_EOF("Out of memory"); - raptor_stringbuffer_copy_to_string(rqe->sb, RASQAL_GOOD_CAST(unsigned char*, sparql_parser_lval->name), len); - sparql_parser_lval->name[len] = '\0'; + raptor_stringbuffer_copy_to_string(rqe->sb, RASQAL_GOOD_CAST(unsigned char*, yylval->name), len); + yylval->name[len] = '\0'; raptor_free_stringbuffer(rqe->sb); rqe->sb = NULL; @@ -2731,7 +2747,7 @@ case 157: /* rule 157 can match eol */ YY_RULE_SETUP -#line 620 "./sparql_lexer.l" +#line 628 "./sparql_lexer.l" { char *p; @@ -2759,7 +2775,7 @@ YY_BREAK case 158: YY_RULE_SETUP -#line 645 "./sparql_lexer.l" +#line 653 "./sparql_lexer.l" { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ sparql_syntax_error(rq, "End of file in middle of ''' literal"); @@ -2767,25 +2783,25 @@ YY_BREAK case 159: YY_RULE_SETUP -#line 652 "./sparql_lexer.l" -{ sparql_parser_lval->literal = rasqal_new_boolean_literal(rq->world, 1); - if(!sparql_parser_lval->literal) +#line 660 "./sparql_lexer.l" +{ yylval->literal = rasqal_new_boolean_literal(rq->world, 1); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_boolean_literal failed"); return BOOLEAN_LITERAL; } YY_BREAK case 160: YY_RULE_SETUP -#line 657 "./sparql_lexer.l" -{ sparql_parser_lval->literal = rasqal_new_boolean_literal(rq->world, 0); - if(!sparql_parser_lval->literal) +#line 665 "./sparql_lexer.l" +{ yylval->literal = rasqal_new_boolean_literal(rq->world, 0); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_boolean_literal failed"); return BOOLEAN_LITERAL; } YY_BREAK case 161: YY_RULE_SETUP -#line 662 "./sparql_lexer.l" -{ sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); - if(!sparql_parser_lval->name) +#line 670 "./sparql_lexer.l" +{ yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); + if(!yylval->name) yyterminate(); BEGIN(INITIAL); @@ -2794,7 +2810,7 @@ case 162: /* rule 162 can match eol */ YY_RULE_SETUP -#line 668 "./sparql_lexer.l" +#line 676 "./sparql_lexer.l" { BEGIN(INITIAL); sparql_syntax_error(rq, "SPARQL syntax error - missing variable name after ?"); yyterminate(); @@ -2802,30 +2818,30 @@ YY_BREAK case 163: YY_RULE_SETUP -#line 673 "./sparql_lexer.l" +#line 681 "./sparql_lexer.l" { /* eat up leading whitespace */ ; } YY_BREAK case 164: YY_RULE_SETUP -#line 677 "./sparql_lexer.l" +#line 685 "./sparql_lexer.l" { return '?'; } YY_BREAK case 165: YY_RULE_SETUP -#line 681 "./sparql_lexer.l" +#line 689 "./sparql_lexer.l" { return '$'; } YY_BREAK case 166: YY_RULE_SETUP -#line 685 "./sparql_lexer.l" -{ sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); - if(!sparql_parser_lval->name) +#line 693 "./sparql_lexer.l" +{ yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); + if(!yylval->name) yyterminate(); BEGIN(INITIAL); @@ -2834,7 +2850,7 @@ case 167: /* rule 167 can match eol */ YY_RULE_SETUP -#line 692 "./sparql_lexer.l" +#line 700 "./sparql_lexer.l" { BEGIN(INITIAL); sparql_syntax_error(rq, "SPARQL syntax error - missing variable name after ?"); yyterminate(); @@ -2842,30 +2858,30 @@ YY_BREAK case 168: YY_RULE_SETUP -#line 697 "./sparql_lexer.l" +#line 705 "./sparql_lexer.l" { /* eat up leading whitespace */ } YY_BREAK case 169: YY_RULE_SETUP -#line 698 "./sparql_lexer.l" +#line 706 "./sparql_lexer.l" { BEGIN(INITIAL); - sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng - 1, SPARQL_NAME_CHECK_PREFIX); - if(!sparql_parser_lval->name) + yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng - 1, SPARQL_NAME_CHECK_PREFIX); + if(!yylval->name) yyterminate(); return IDENTIFIER; } YY_BREAK case 170: YY_RULE_SETUP -#line 704 "./sparql_lexer.l" +#line 712 "./sparql_lexer.l" { BEGIN(INITIAL); - sparql_parser_lval->name = NULL; + yylval->name = NULL; return IDENTIFIER; } YY_BREAK case 171: /* rule 171 can match eol */ YY_RULE_SETUP -#line 708 "./sparql_lexer.l" +#line 716 "./sparql_lexer.l" { BEGIN(INITIAL); if(!*yytext) return EOF; @@ -2876,13 +2892,13 @@ YY_BREAK case 172: YY_RULE_SETUP -#line 716 "./sparql_lexer.l" +#line 724 "./sparql_lexer.l" { int have_brace = (yytext[yyleng-1]=='('); if(have_brace) yyleng--; - sparql_parser_lval->uri = sparql_copy_qname(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng); - if(!sparql_parser_lval->uri) + yylval->uri = sparql_copy_qname(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng); + if(!yylval->uri) yyterminate(); return have_brace ? URI_LITERAL_BRACE : URI_LITERAL; @@ -2890,9 +2906,9 @@ YY_BREAK case 173: YY_RULE_SETUP -#line 727 "./sparql_lexer.l" -{ sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 2, yyleng - 2, SPARQL_NAME_CHECK_NCNAME); - if(!sparql_parser_lval->name) +#line 735 "./sparql_lexer.l" +{ yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 2, yyleng - 2, SPARQL_NAME_CHECK_NCNAME); + if(!yylval->name) yyterminate(); return BLANK_LITERAL; @@ -2900,9 +2916,9 @@ YY_BREAK case 174: YY_RULE_SETUP -#line 734 "./sparql_lexer.l" -{ sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 3, yyleng - 4, SPARQL_NAME_CHECK_NCNAME); - if(!sparql_parser_lval->name) +#line 742 "./sparql_lexer.l" +{ yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 3, yyleng - 4, SPARQL_NAME_CHECK_NCNAME); + if(!yylval->name) yyterminate(); return BLANK_LITERAL; @@ -2911,13 +2927,13 @@ case 175: /* rule 175 can match eol */ YY_RULE_SETUP -#line 741 "./sparql_lexer.l" +#line 749 "./sparql_lexer.l" { int have_brace = (yytext[yyleng-1]=='('); if(have_brace) yyleng--; if(yyleng == 2) - sparql_parser_lval->uri = raptor_uri_copy(rq->base_uri); + yylval->uri = raptor_uri_copy(rq->base_uri); else { unsigned char* uri_string; @@ -2929,9 +2945,9 @@ if(!uri_string) YY_REPORT_ERROR_EOF("rasqal_escaped_name_to_utf8_string failed"); - sparql_parser_lval->uri = raptor_new_uri_relative_to_base(rq->world->raptor_world_ptr, rq->base_uri, uri_string); + yylval->uri = raptor_new_uri_relative_to_base(rq->world->raptor_world_ptr, rq->base_uri, uri_string); RASQAL_FREE(char*, uri_string); - if(!sparql_parser_lval->uri) + if(!yylval->uri) YY_REPORT_ERROR_EOF("raptor_new_uri_relative_to_base failed"); } return have_brace ? URI_LITERAL_BRACE : URI_LITERAL; } @@ -2939,14 +2955,14 @@ case 176: /* rule 176 can match eol */ YY_RULE_SETUP -#line 765 "./sparql_lexer.l" +#line 773 "./sparql_lexer.l" { /* # comment */ rqe->lineno++; } YY_BREAK case 177: YY_RULE_SETUP -#line 769 "./sparql_lexer.l" +#line 777 "./sparql_lexer.l" { if(!*yytext) return EOF; @@ -2956,10 +2972,10 @@ YY_BREAK case 178: YY_RULE_SETUP -#line 776 "./sparql_lexer.l" +#line 784 "./sparql_lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2963 "sparql_lexer.c" +#line 2979 "sparql_lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(ID): case YY_STATE_EOF(SPID): @@ -3898,6 +3914,18 @@ /* Accessor methods for yylval and yylloc */ +YYSTYPE * sparql_lexer_get_lval (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; +} + +void sparql_lexer_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; +} + /* User-visible API */ /* sparql_lexer_lex_init is special because it creates the scanner itself, so it is @@ -4053,7 +4081,7 @@ #define YYTABLES_NAME "yytables" -#line 776 "./sparql_lexer.l" +#line 784 "./sparql_lexer.l" /* user code */ @@ -4158,7 +4186,7 @@ #ifdef STANDALONE /* lexer test cannot declare namespaces - so just ignore expansion */ uri = raptor_new_uri_relative_to_base(rq->world->raptor_world_ptr, rq->base_uri, s); -#else +#else /* not */ if(!rq->namespaces) { sparql_syntax_error(rq, "SPARQL syntax error - no namespaces declared"); return NULL; @@ -4166,7 +4194,7 @@ uri = raptor_qname_string_to_uri(rq->namespaces, s, dest_len); -#endif +#endif /* STANDALONE */ RASQAL_FREE(char*, s); return uri; @@ -5257,5 +5285,5 @@ return 0; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/sparql_lexer.h rasqal-0.9.32/src/sparql_lexer.h --- rasqal-0.9.31/src/sparql_lexer.h 2013-12-01 22:23:57.000000000 +0000 +++ rasqal-0.9.32/src/sparql_lexer.h 2014-02-22 20:28:58.000000000 +0000 @@ -242,9 +242,7 @@ #include #endif -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif +#define YY_EXTRA_TYPE rasqal_query* int sparql_lexer_lex_init (yyscan_t* scanner); @@ -283,6 +281,10 @@ void sparql_lexer_set_column (int column_no ,yyscan_t yyscanner ); +YYSTYPE * sparql_lexer_get_lval (yyscan_t yyscanner ); + +void sparql_lexer_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -328,9 +330,11 @@ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int sparql_lexer_lex (yyscan_t yyscanner); +extern int sparql_lexer_lex \ + (YYSTYPE * yylval_param ,yyscan_t yyscanner); -#define YY_DECL int sparql_lexer_lex (yyscan_t yyscanner) +#define YY_DECL int sparql_lexer_lex \ + (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -347,9 +351,9 @@ #undef YY_DECL #endif -#line 776 "./sparql_lexer.l" +#line 784 "./sparql_lexer.l" -#line 354 "sparql_lexer.h" +#line 358 "sparql_lexer.h" #undef sparql_lexer_IN_HEADER #endif /* sparql_lexer_HEADER_H */ diff -Nru rasqal-0.9.31/src/sparql_lexer.l rasqal-0.9.32/src/sparql_lexer.l --- rasqal-0.9.31/src/sparql_lexer.l 2013-11-30 16:11:22.000000000 +0000 +++ rasqal-0.9.32/src/sparql_lexer.l 2014-02-20 05:00:40.000000000 +0000 @@ -2,7 +2,7 @@ * * sparql_lexer.l - Rasqal SPARQL lexer - making tokens for sparql grammar generator * - * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ + * Copyright (C) 2004-2014, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ @@ -69,6 +69,15 @@ /* Re-entrant scanner */ %option reentrant +%option extra-type="rasqal_query*" + +/* Makes sparql_lexer_get_lval() sparql_lexer_set_lval() functions + * and yylval macro appear + */ +%option bison-bridge +/* Makes yyget_lloc() yyset_lloc() and yylloc appear */ +/* %option bison-locations */ + %x ID SPID PREF LITERAL LITERAL2 @@ -101,10 +110,7 @@ #include #include -/* Pure parser argument (a void*) */ -#define YYPARSE_PARAM rq #include - #include @@ -157,22 +163,23 @@ const char * sparql_token_print(rasqal_world* world, int token, YYSTYPE *lval); #endif -int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t yyscanner); -#define YY_DECL int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t yyscanner) - #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif -/* Remove the re-fill function since it should never be called */ -#define YY_INPUT(buf,result,max_size) { return YY_NULL; } - +/* debian flex 2.5.35-10.1 added these column header prototypes in + * re-entrant mode. standard flex omits them + */ +void sparql_lexer_set_column(int column_no, yyscan_t yyscanner); +int sparql_lexer_get_column(yyscan_t yyscanner); -/* flex version 2.5.36 released 2012-07-20 added the column header prototypes */ static void sparql_lexer_cleanup(yyscan_t yyscanner); +/* Remove the re-fill function since it should never be called */ +#define YY_INPUT(buf,result,max_size) { return YY_NULL; } + /* Log error handler wrapper */ static void sparql_lexer_log_error(yyconst char *msg, raptor_log_level level, yyscan_t yyscanner); @@ -202,6 +209,7 @@ sparql_lexer_log_error(msg, RAPTOR_LOG_LEVEL_ERROR, yyscanner); \ yyterminate(); \ } while(0) + %} LANGTAG "@"[A-Za-z][-A-Z_a-z0-9]* @@ -481,12 +489,12 @@ ":=" { return ASSIGN; } {LANGTAG} { - sparql_parser_lval->name = RASQAL_MALLOC(unsigned char*, yyleng); - if(!sparql_parser_lval->name) + yylval->name = RASQAL_MALLOC(unsigned char*, yyleng); + if(!yylval->name) YY_REPORT_ERROR_EOF("Out of memory"); - memcpy(sparql_parser_lval->name, yytext + 1, yyleng - 1); - sparql_parser_lval->name[yyleng - 1] = '\0'; + memcpy(yylval->name, yytext + 1, yyleng - 1); + yylval->name[yyleng - 1] = '\0'; return LANGTAG; } @@ -494,8 +502,8 @@ [-+]?{INTEGER} { c = *yytext; - sparql_parser_lval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_INTEGER, RASQAL_GOOD_CAST(const unsigned char*, yytext)); - if(!sparql_parser_lval->literal) + yylval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_INTEGER, RASQAL_GOOD_CAST(const unsigned char*, yytext)); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_typed_literal failed"); return (c=='+' ? INTEGER_POSITIVE_LITERAL : (c == '-' ? INTEGER_NEGATIVE_LITERAL : INTEGER_LITERAL)); } @@ -507,8 +515,8 @@ sparql_syntax_error(rq, "SPARQL syntax error - Illegal decimal constant %s", yytext); yyterminate(); } - sparql_parser_lval->literal = rasqal_new_decimal_literal(rq->world, RASQAL_GOOD_CAST(const unsigned char*, yytext)); - if(!sparql_parser_lval->literal) + yylval->literal = rasqal_new_decimal_literal(rq->world, RASQAL_GOOD_CAST(const unsigned char*, yytext)); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_decimal_literal failed"); return (c=='+' ? DECIMAL_POSITIVE_LITERAL : (c == '-' ? DECIMAL_NEGATIVE_LITERAL : DECIMAL_LITERAL)); } @@ -519,8 +527,8 @@ sparql_syntax_error(rq, "SPARQL syntax error - Illegal double constant %s", yytext); yyterminate(); } - sparql_parser_lval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_DOUBLE, RASQAL_GOOD_CAST(const unsigned char*, yytext)); - if(!sparql_parser_lval->literal) + yylval->literal = rasqal_new_typed_literal(rq->world, RASQAL_LITERAL_DOUBLE, RASQAL_GOOD_CAST(const unsigned char*, yytext)); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_typed_literal failed"); return (c=='+' ? DOUBLE_POSITIVE_LITERAL : (c == '-' ? DOUBLE_NEGATIVE_LITERAL : DOUBLE_LITERAL)); } @@ -529,14 +537,14 @@ "-" { return '-'; } '([^'\\\n\r]|\\[^\n\r])*' { /*' */ - sparql_parser_lval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '\''); - if(!sparql_parser_lval->name) + yylval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '\''); + if(!yylval->name) YY_REPORT_ERROR_EOF("sparql_copy_string_token failed"); return STRING; } \"([^"\\\n\r]|\\[^\n\r])*\" { /* " */ - sparql_parser_lval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '"'); - if(!sparql_parser_lval->name) + yylval->name = sparql_copy_string_token(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 1, yyleng - 2, '"'); + if(!yylval->name) YY_REPORT_ERROR_EOF("sparql_copy_string_token failed"); return STRING; } @@ -551,13 +559,13 @@ BEGIN(INITIAL); len = raptor_stringbuffer_length(rqe->sb); - sparql_parser_lval->name = RASQAL_MALLOC(unsigned char*, len + 1); - if(!sparql_parser_lval->name) + yylval->name = RASQAL_MALLOC(unsigned char*, len + 1); + if(!yylval->name) YY_REPORT_ERROR_EOF("Out of memory"); raptor_stringbuffer_copy_to_string(rqe->sb, - RASQAL_GOOD_CAST(unsigned char*, sparql_parser_lval->name), len); - sparql_parser_lval->name[len] = '\0'; + RASQAL_GOOD_CAST(unsigned char*, yylval->name), len); + yylval->name[len] = '\0'; raptor_free_stringbuffer(rqe->sb); rqe->sb = NULL; @@ -606,12 +614,12 @@ BEGIN(INITIAL); len = raptor_stringbuffer_length(rqe->sb); - sparql_parser_lval->name = RASQAL_MALLOC(unsigned char*, len + 1); - if(!sparql_parser_lval->name) + yylval->name = RASQAL_MALLOC(unsigned char*, len + 1); + if(!yylval->name) YY_REPORT_ERROR_EOF("Out of memory"); - raptor_stringbuffer_copy_to_string(rqe->sb, RASQAL_GOOD_CAST(unsigned char*, sparql_parser_lval->name), len); - sparql_parser_lval->name[len] = '\0'; + raptor_stringbuffer_copy_to_string(rqe->sb, RASQAL_GOOD_CAST(unsigned char*, yylval->name), len); + yylval->name[len] = '\0'; raptor_free_stringbuffer(rqe->sb); rqe->sb = NULL; @@ -649,18 +657,18 @@ -[Tt][Rr][Uu][Ee] { sparql_parser_lval->literal = rasqal_new_boolean_literal(rq->world, 1); - if(!sparql_parser_lval->literal) +[Tt][Rr][Uu][Ee] { yylval->literal = rasqal_new_boolean_literal(rq->world, 1); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_boolean_literal failed"); return BOOLEAN_LITERAL; } -[Ff][Aa][Ll][Ss][Ee] { sparql_parser_lval->literal = rasqal_new_boolean_literal(rq->world, 0); - if(!sparql_parser_lval->literal) +[Ff][Aa][Ll][Ss][Ee] { yylval->literal = rasqal_new_boolean_literal(rq->world, 0); + if(!yylval->literal) YY_REPORT_ERROR_EOF("rasqal_new_boolean_literal failed"); return BOOLEAN_LITERAL; } -{VARNAME} { sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); - if(!sparql_parser_lval->name) +{VARNAME} { yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); + if(!yylval->name) yyterminate(); BEGIN(INITIAL); @@ -682,8 +690,8 @@ return '$'; } -{VARNAME} { sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); - if(!sparql_parser_lval->name) +{VARNAME} { yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng, SPARQL_NAME_CHECK_VARNAME); + if(!yylval->name) yyterminate(); BEGIN(INITIAL); @@ -696,13 +704,13 @@ [\ \t\v]+ { /* eat up leading whitespace */ } {NCNAME_PREFIX}":" { BEGIN(INITIAL); - sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng - 1, SPARQL_NAME_CHECK_PREFIX); - if(!sparql_parser_lval->name) + yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng - 1, SPARQL_NAME_CHECK_PREFIX); + if(!yylval->name) yyterminate(); return IDENTIFIER; } ":" { BEGIN(INITIAL); - sparql_parser_lval->name = NULL; + yylval->name = NULL; return IDENTIFIER; } (.|\n) { BEGIN(INITIAL); @@ -717,22 +725,22 @@ int have_brace = (yytext[yyleng-1]=='('); if(have_brace) yyleng--; - sparql_parser_lval->uri = sparql_copy_qname(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng); - if(!sparql_parser_lval->uri) + yylval->uri = sparql_copy_qname(rq, RASQAL_GOOD_CAST(const unsigned char*, yytext), yyleng); + if(!yylval->uri) yyterminate(); return have_brace ? URI_LITERAL_BRACE : URI_LITERAL; } -{BNAME} { sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 2, yyleng - 2, SPARQL_NAME_CHECK_NCNAME); - if(!sparql_parser_lval->name) +{BNAME} { yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 2, yyleng - 2, SPARQL_NAME_CHECK_NCNAME); + if(!yylval->name) yyterminate(); return BLANK_LITERAL; } -{BNAME2} { sparql_parser_lval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 3, yyleng - 4, SPARQL_NAME_CHECK_NCNAME); - if(!sparql_parser_lval->name) +{BNAME2} { yylval->name = sparql_copy_name(rq, RASQAL_GOOD_CAST(unsigned char*, yytext) + 3, yyleng - 4, SPARQL_NAME_CHECK_NCNAME); + if(!yylval->name) yyterminate(); return BLANK_LITERAL; @@ -743,7 +751,7 @@ if(have_brace) yyleng--; if(yyleng == 2) - sparql_parser_lval->uri = raptor_uri_copy(rq->base_uri); + yylval->uri = raptor_uri_copy(rq->base_uri); else { unsigned char* uri_string; @@ -755,9 +763,9 @@ if(!uri_string) YY_REPORT_ERROR_EOF("rasqal_escaped_name_to_utf8_string failed"); - sparql_parser_lval->uri = raptor_new_uri_relative_to_base(rq->world->raptor_world_ptr, rq->base_uri, uri_string); + yylval->uri = raptor_new_uri_relative_to_base(rq->world->raptor_world_ptr, rq->base_uri, uri_string); RASQAL_FREE(char*, uri_string); - if(!sparql_parser_lval->uri) + if(!yylval->uri) YY_REPORT_ERROR_EOF("raptor_new_uri_relative_to_base failed"); } return have_brace ? URI_LITERAL_BRACE : URI_LITERAL; } @@ -876,7 +884,7 @@ #ifdef STANDALONE /* lexer test cannot declare namespaces - so just ignore expansion */ uri = raptor_new_uri_relative_to_base(rq->world->raptor_world_ptr, rq->base_uri, s); -#else +#else /* not */ if(!rq->namespaces) { sparql_syntax_error(rq, "SPARQL syntax error - no namespaces declared"); return NULL; @@ -884,7 +892,7 @@ uri = raptor_qname_string_to_uri(rq->namespaces, s, dest_len); -#endif +#endif /* STANDALONE */ RASQAL_FREE(char*, s); return uri; @@ -1975,4 +1983,4 @@ return 0; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/sparql_parser.c rasqal-0.9.32/src/sparql_parser.c --- rasqal-0.9.31/src/sparql_parser.c 2013-11-16 19:26:51.000000000 +0000 +++ rasqal-0.9.32/src/sparql_parser.c 2014-02-22 20:28:58.000000000 +0000 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 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 3 of the License, 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, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,13 +44,13 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ -#define YYPURE 1 +#define YYPURE 2 /* Push parsers. */ #define YYPUSH 0 @@ -58,23 +58,17 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse sparql_parser_parse #define yylex sparql_parser_lex #define yyerror sparql_parser_error -#define yylval sparql_parser_lval -#define yychar sparql_parser_char #define yydebug sparql_parser_debug #define yynerrs sparql_parser_nerrs /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 28 "./sparql_parser.y" +#line 28 "./sparql_parser.y" /* yacc.c:339 */ #ifdef HAVE_CONFIG_H #include @@ -90,11 +84,8 @@ #include #include -/* Pure parser argument (a void*) */ -#define YYPARSE_PARAM rq #include -#define YY_DECL int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t yyscanner) #define YY_NO_UNISTD_H 1 #include @@ -129,31 +120,23 @@ /* the lexer does not seem to track this */ #undef RASQAL_SPARQL_USE_ERROR_COLUMNS -/* Missing sparql_lexer.c/h prototypes on Bison < 2.6 */ -#if defined(BISON_VERSION) && BISON_VERSION < 206 -int sparql_lexer_get_column(yyscan_t yyscanner); -#endif - -/* What the lexer wants */ -extern int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t scanner); -#define YYLEX_PARAM ((rasqal_sparql_query_language*)(((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) sparql_query_error((rasqal_query*)rq, message) +/* Prototypes */ +int sparql_parser_error(rasqal_query* rq, void* scanner, const char *msg); /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex sparql_lexer_lex +/* Make the yyerror below use the rdf_parser */ +#undef yyerror +#define yyerror(rq, scanner, message) sparql_query_error(rq, message) +/* Prototypes for local functions */ static int sparql_parse(rasqal_query* rq); static void sparql_query_error(rasqal_query* rq, const char *message); static void sparql_query_error_full(rasqal_query *rq, const char *message, ...) RASQAL_PRINTF_FORMAT(2, 3); + static sparql_uri_applies* new_uri_applies(raptor_uri* uri, rasqal_update_graph_applies applies) { @@ -181,14 +164,15 @@ +#line 168 "sparql_parser.c" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 187 "sparql_parser.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -198,315 +182,174 @@ # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "sparql_parser.tab.h". */ +#ifndef YY_SPARQL_PARSER_SPARQL_PARSER_TAB_H_INCLUDED +# define YY_SPARQL_PARSER_SPARQL_PARSER_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int sparql_parser_debug; #endif - -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - SELECT = 258, - FROM = 259, - WHERE = 260, - OPTIONAL = 261, - DESCRIBE = 262, - CONSTRUCT = 263, - ASK = 264, - DISTINCT = 265, - REDUCED = 266, - LIMIT = 267, - UNION = 268, - PREFIX = 269, - BASE = 270, - BOUND = 271, - GRAPH = 272, - NAMED = 273, - FILTER = 274, - OFFSET = 275, - ORDER = 276, - BY = 277, - REGEX = 278, - ASC = 279, - DESC = 280, - LANGMATCHES = 281, - A = 282, - STRLANG = 283, - STRDT = 284, - STR = 285, - IRI = 286, - URI = 287, - BNODE = 288, - LANG = 289, - DATATYPE = 290, - ISURI = 291, - ISBLANK = 292, - ISLITERAL = 293, - ISNUMERIC = 294, - SAMETERM = 295, - GROUP = 296, - HAVING = 297, - COUNT = 298, - SUM = 299, - AVG = 300, - MIN = 301, - MAX = 302, - GROUP_CONCAT = 303, - SAMPLE = 304, - SEPARATOR = 305, - DELETE = 306, - INSERT = 307, - WITH = 308, - CLEAR = 309, - CREATE = 310, - SILENT = 311, - DATA = 312, - DROP = 313, - LOAD = 314, - INTO = 315, - DEFAULT = 316, - TO = 317, - ADD = 318, - MOVE = 319, - COPY = 320, - ALL = 321, - COALESCE = 322, - AS = 323, - IF = 324, - NOT = 325, - IN = 326, - BINDINGS = 327, - UNDEF = 328, - SERVICE = 329, - MINUS = 330, - YEAR = 331, - MONTH = 332, - DAY = 333, - HOURS = 334, - MINUTES = 335, - SECONDS = 336, - TIMEZONE = 337, - TZ = 338, - STRLEN = 339, - SUBSTR = 340, - UCASE = 341, - LCASE = 342, - STRSTARTS = 343, - STRENDS = 344, - CONTAINS = 345, - ENCODE_FOR_URI = 346, - CONCAT = 347, - STRBEFORE = 348, - STRAFTER = 349, - REPLACE = 350, - BIND = 351, - ABS = 352, - ROUND = 353, - CEIL = 354, - FLOOR = 355, - RAND = 356, - MD5 = 357, - SHA1 = 358, - SHA224 = 359, - SHA256 = 360, - SHA384 = 361, - SHA512 = 362, - UUID = 363, - STRUUID = 364, - VALUES = 365, - EXPLAIN = 366, - LET = 367, - CURRENT_DATETIME = 368, - NOW = 369, - FROM_UNIXTIME = 370, - TO_UNIXTIME = 371, - HATHAT = 372, - SC_OR = 373, - SC_AND = 374, - EQ = 375, - NEQ = 376, - LT = 377, - GT = 378, - LE = 379, - GE = 380, - ASSIGN = 381, - STRING = 382, - LANGTAG = 383, - DOUBLE_LITERAL = 384, - DOUBLE_POSITIVE_LITERAL = 385, - DOUBLE_NEGATIVE_LITERAL = 386, - INTEGER_LITERAL = 387, - INTEGER_POSITIVE_LITERAL = 388, - INTEGER_NEGATIVE_LITERAL = 389, - DECIMAL_LITERAL = 390, - DECIMAL_POSITIVE_LITERAL = 391, - DECIMAL_NEGATIVE_LITERAL = 392, - BOOLEAN_LITERAL = 393, - URI_LITERAL = 394, - URI_LITERAL_BRACE = 395, - QNAME_LITERAL = 396, - QNAME_LITERAL_BRACE = 397, - BLANK_LITERAL = 398, - IDENTIFIER = 399 - }; -#endif -/* Tokens. */ -#define SELECT 258 -#define FROM 259 -#define WHERE 260 -#define OPTIONAL 261 -#define DESCRIBE 262 -#define CONSTRUCT 263 -#define ASK 264 -#define DISTINCT 265 -#define REDUCED 266 -#define LIMIT 267 -#define UNION 268 -#define PREFIX 269 -#define BASE 270 -#define BOUND 271 -#define GRAPH 272 -#define NAMED 273 -#define FILTER 274 -#define OFFSET 275 -#define ORDER 276 -#define BY 277 -#define REGEX 278 -#define ASC 279 -#define DESC 280 -#define LANGMATCHES 281 -#define A 282 -#define STRLANG 283 -#define STRDT 284 -#define STR 285 -#define IRI 286 -#define URI 287 -#define BNODE 288 -#define LANG 289 -#define DATATYPE 290 -#define ISURI 291 -#define ISBLANK 292 -#define ISLITERAL 293 -#define ISNUMERIC 294 -#define SAMETERM 295 -#define GROUP 296 -#define HAVING 297 -#define COUNT 298 -#define SUM 299 -#define AVG 300 -#define MIN 301 -#define MAX 302 -#define GROUP_CONCAT 303 -#define SAMPLE 304 -#define SEPARATOR 305 -#define DELETE 306 -#define INSERT 307 -#define WITH 308 -#define CLEAR 309 -#define CREATE 310 -#define SILENT 311 -#define DATA 312 -#define DROP 313 -#define LOAD 314 -#define INTO 315 -#define DEFAULT 316 -#define TO 317 -#define ADD 318 -#define MOVE 319 -#define COPY 320 -#define ALL 321 -#define COALESCE 322 -#define AS 323 -#define IF 324 -#define NOT 325 -#define IN 326 -#define BINDINGS 327 -#define UNDEF 328 -#define SERVICE 329 -#define MINUS 330 -#define YEAR 331 -#define MONTH 332 -#define DAY 333 -#define HOURS 334 -#define MINUTES 335 -#define SECONDS 336 -#define TIMEZONE 337 -#define TZ 338 -#define STRLEN 339 -#define SUBSTR 340 -#define UCASE 341 -#define LCASE 342 -#define STRSTARTS 343 -#define STRENDS 344 -#define CONTAINS 345 -#define ENCODE_FOR_URI 346 -#define CONCAT 347 -#define STRBEFORE 348 -#define STRAFTER 349 -#define REPLACE 350 -#define BIND 351 -#define ABS 352 -#define ROUND 353 -#define CEIL 354 -#define FLOOR 355 -#define RAND 356 -#define MD5 357 -#define SHA1 358 -#define SHA224 359 -#define SHA256 360 -#define SHA384 361 -#define SHA512 362 -#define UUID 363 -#define STRUUID 364 -#define VALUES 365 -#define EXPLAIN 366 -#define LET 367 -#define CURRENT_DATETIME 368 -#define NOW 369 -#define FROM_UNIXTIME 370 -#define TO_UNIXTIME 371 -#define HATHAT 372 -#define SC_OR 373 -#define SC_AND 374 -#define EQ 375 -#define NEQ 376 -#define LT 377 -#define GT 378 -#define LE 379 -#define GE 380 -#define ASSIGN 381 -#define STRING 382 -#define LANGTAG 383 -#define DOUBLE_LITERAL 384 -#define DOUBLE_POSITIVE_LITERAL 385 -#define DOUBLE_NEGATIVE_LITERAL 386 -#define INTEGER_LITERAL 387 -#define INTEGER_POSITIVE_LITERAL 388 -#define INTEGER_NEGATIVE_LITERAL 389 -#define DECIMAL_LITERAL 390 -#define DECIMAL_POSITIVE_LITERAL 391 -#define DECIMAL_NEGATIVE_LITERAL 392 -#define BOOLEAN_LITERAL 393 -#define URI_LITERAL 394 -#define URI_LITERAL_BRACE 395 -#define QNAME_LITERAL 396 -#define QNAME_LITERAL_BRACE 397 -#define BLANK_LITERAL 398 -#define IDENTIFIER 399 - - - + enum yytokentype + { + SELECT = 258, + FROM = 259, + WHERE = 260, + OPTIONAL = 261, + DESCRIBE = 262, + CONSTRUCT = 263, + ASK = 264, + DISTINCT = 265, + REDUCED = 266, + LIMIT = 267, + UNION = 268, + PREFIX = 269, + BASE = 270, + BOUND = 271, + GRAPH = 272, + NAMED = 273, + FILTER = 274, + OFFSET = 275, + ORDER = 276, + BY = 277, + REGEX = 278, + ASC = 279, + DESC = 280, + LANGMATCHES = 281, + A = 282, + STRLANG = 283, + STRDT = 284, + STR = 285, + IRI = 286, + URI = 287, + BNODE = 288, + LANG = 289, + DATATYPE = 290, + ISURI = 291, + ISBLANK = 292, + ISLITERAL = 293, + ISNUMERIC = 294, + SAMETERM = 295, + GROUP = 296, + HAVING = 297, + COUNT = 298, + SUM = 299, + AVG = 300, + MIN = 301, + MAX = 302, + GROUP_CONCAT = 303, + SAMPLE = 304, + SEPARATOR = 305, + DELETE = 306, + INSERT = 307, + WITH = 308, + CLEAR = 309, + CREATE = 310, + SILENT = 311, + DATA = 312, + DROP = 313, + LOAD = 314, + INTO = 315, + DEFAULT = 316, + TO = 317, + ADD = 318, + MOVE = 319, + COPY = 320, + ALL = 321, + COALESCE = 322, + AS = 323, + IF = 324, + NOT = 325, + IN = 326, + BINDINGS = 327, + UNDEF = 328, + SERVICE = 329, + MINUS = 330, + YEAR = 331, + MONTH = 332, + DAY = 333, + HOURS = 334, + MINUTES = 335, + SECONDS = 336, + TIMEZONE = 337, + TZ = 338, + STRLEN = 339, + SUBSTR = 340, + UCASE = 341, + LCASE = 342, + STRSTARTS = 343, + STRENDS = 344, + CONTAINS = 345, + ENCODE_FOR_URI = 346, + CONCAT = 347, + STRBEFORE = 348, + STRAFTER = 349, + REPLACE = 350, + BIND = 351, + ABS = 352, + ROUND = 353, + CEIL = 354, + FLOOR = 355, + RAND = 356, + MD5 = 357, + SHA1 = 358, + SHA224 = 359, + SHA256 = 360, + SHA384 = 361, + SHA512 = 362, + UUID = 363, + STRUUID = 364, + VALUES = 365, + EXPLAIN = 366, + LET = 367, + CURRENT_DATETIME = 368, + NOW = 369, + FROM_UNIXTIME = 370, + TO_UNIXTIME = 371, + HATHAT = 372, + SC_OR = 373, + SC_AND = 374, + EQ = 375, + NEQ = 376, + LT = 377, + GT = 378, + LE = 379, + GE = 380, + ASSIGN = 381, + STRING = 382, + LANGTAG = 383, + DOUBLE_LITERAL = 384, + DOUBLE_POSITIVE_LITERAL = 385, + DOUBLE_NEGATIVE_LITERAL = 386, + INTEGER_LITERAL = 387, + INTEGER_POSITIVE_LITERAL = 388, + INTEGER_NEGATIVE_LITERAL = 389, + DECIMAL_LITERAL = 390, + DECIMAL_POSITIVE_LITERAL = 391, + DECIMAL_NEGATIVE_LITERAL = 392, + BOOLEAN_LITERAL = 393, + URI_LITERAL = 394, + URI_LITERAL_BRACE = 395, + QNAME_LITERAL = 396, + QNAME_LITERAL_BRACE = 397, + BLANK_LITERAL = 398, + IDENTIFIER = 399 + }; +#endif +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 143 "./sparql_parser.y" +#line 156 "./sparql_parser.y" /* yacc.c:355 */ raptor_sequence *seq; rasqal_variable *variable; @@ -529,22 +372,21 @@ rasqal_bindings* bindings; sparql_uri_applies* uri_applies; - - -/* Line 293 of yacc.c */ -#line 536 "sparql_parser.c" -} YYSTYPE; +#line 376 "sparql_parser.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -/* Copy the second part of user declarations. */ +int sparql_parser_parse (rasqal_query* rq, void* yyscanner); + +#endif /* !YY_SPARQL_PARSER_SPARQL_PARSER_TAB_H_INCLUDED */ + +/* Copy the second part of user declarations. */ -/* Line 343 of yacc.c */ -#line 548 "sparql_parser.c" +#line 390 "sparql_parser.c" /* yacc.c:358 */ #ifdef short # undef short @@ -558,11 +400,8 @@ #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -582,8 +421,7 @@ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -597,39 +435,68 @@ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -647,9 +514,9 @@ # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -659,8 +526,8 @@ # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -676,7 +543,7 @@ # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -684,14 +551,12 @@ # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS # endif # endif # endif @@ -700,7 +565,7 @@ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -725,35 +590,35 @@ 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_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. 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))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -769,17 +634,19 @@ #define YYNNTS 157 /* YYNRULES -- Number of rules. */ #define YYNRULES 393 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 812 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 399 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -825,234 +692,53 @@ }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 7, 12, 14, 15, 17, 19, - 21, 23, 27, 30, 32, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 53, 56, 59, 60, 65, - 66, 71, 76, 80, 84, 87, 89, 91, 94, 98, - 100, 102, 108, 110, 112, 114, 116, 118, 120, 122, - 124, 125, 127, 129, 135, 141, 147, 153, 159, 164, - 165, 169, 171, 178, 184, 190, 198, 204, 210, 213, - 217, 219, 223, 226, 229, 232, 236, 242, 248, 252, - 254, 260, 266, 268, 270, 273, 275, 279, 285, 291, - 303, 311, 319, 327, 329, 331, 333, 335, 338, 342, - 344, 346, 347, 351, 355, 359, 362, 364, 366, 368, - 370, 372, 374, 378, 384, 390, 396, 402, 405, 407, - 409, 410, 412, 415, 417, 420, 422, 424, 425, 430, - 433, 435, 438, 439, 441, 443, 448, 450, 454, 455, - 457, 460, 462, 465, 466, 469, 472, 474, 476, 477, - 481, 482, 485, 487, 490, 493, 495, 497, 499, 501, - 504, 507, 510, 511, 513, 514, 517, 519, 521, 522, - 525, 527, 531, 534, 537, 539, 541, 544, 548, 552, - 554, 556, 558, 560, 562, 566, 570, 573, 575, 576, - 579, 581, 582, 586, 588, 590, 592, 593, 597, 599, - 601, 603, 605, 607, 609, 611, 613, 615, 618, 622, - 627, 634, 637, 639, 641, 646, 648, 649, 656, 658, - 661, 665, 667, 671, 673, 680, 683, 685, 687, 689, - 691, 692, 699, 703, 706, 710, 714, 716, 717, 721, - 723, 724, 728, 730, 733, 736, 740, 743, 744, 746, - 747, 750, 753, 754, 756, 758, 760, 762, 764, 768, - 772, 775, 777, 779, 781, 783, 785, 787, 789, 792, - 795, 797, 800, 803, 805, 807, 809, 811, 813, 815, - 818, 820, 824, 826, 830, 832, 836, 840, 844, 848, - 852, 856, 860, 865, 867, 871, 875, 878, 881, 883, - 887, 891, 893, 896, 899, 902, 904, 906, 908, 910, - 912, 914, 916, 920, 925, 930, 937, 942, 947, 952, - 957, 962, 966, 970, 975, 980, 985, 990, 995, 1000, - 1005, 1010, 1015, 1020, 1024, 1028, 1030, 1032, 1041, 1048, - 1055, 1062, 1067, 1072, 1077, 1082, 1084, 1086, 1088, 1093, - 1100, 1109, 1114, 1119, 1126, 1133, 1140, 1145, 1150, 1157, - 1164, 1173, 1184, 1191, 1200, 1205, 1210, 1215, 1220, 1225, - 1230, 1235, 1240, 1244, 1248, 1253, 1258, 1260, 1262, 1264, - 1266, 1268, 1270, 1272, 1274, 1276, 1278, 1280, 1282, 1284, - 1286, 1288, 1290, 1292 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 162, 0, -1, 163, -1, 166, -1, 169, 164, 165, - 236, -1, 111, -1, -1, 172, -1, 190, -1, 191, - -1, 193, -1, 169, 168, 167, -1, 158, 166, -1, - 158, -1, -1, 196, -1, 201, -1, 202, -1, 204, - -1, 206, -1, 207, -1, 211, -1, 212, -1, 213, - -1, 214, -1, 170, 171, -1, 15, 152, -1, -1, - 171, 14, 157, 152, -1, -1, 174, 216, 220, 222, - -1, 174, 220, 222, 236, -1, 3, 10, 175, -1, - 3, 11, 175, -1, 3, 175, -1, 176, -1, 137, - -1, 176, 177, -1, 176, 117, 177, -1, 177, -1, - 293, -1, 118, 297, 68, 295, 119, -1, 181, -1, - 182, -1, 183, -1, 184, -1, 185, -1, 188, -1, - 189, -1, 10, -1, -1, 297, -1, 137, -1, 43, - 118, 179, 180, 119, -1, 44, 118, 179, 297, 119, - -1, 45, 118, 179, 297, 119, -1, 46, 118, 179, - 297, 119, -1, 47, 118, 179, 297, 119, -1, 158, - 50, 129, 140, -1, -1, 187, 117, 297, -1, 297, - -1, 48, 118, 179, 187, 186, 119, -1, 49, 118, - 179, 297, 119, -1, 8, 275, 216, 220, 222, -1, - 8, 216, 5, 122, 277, 123, 222, -1, 7, 192, - 216, 221, 222, -1, 7, 137, 216, 221, 222, -1, - 192, 292, -1, 192, 117, 292, -1, 292, -1, 9, - 216, 220, -1, 4, 217, -1, 4, 218, -1, 17, - 152, -1, 51, 215, 221, -1, 51, 122, 200, 123, - 220, -1, 51, 57, 122, 197, 123, -1, 51, 5, - 245, -1, 252, -1, 17, 152, 122, 252, 123, -1, - 17, 292, 122, 277, 123, -1, 277, -1, 198, -1, - 200, 199, -1, 199, -1, 52, 215, 221, -1, 52, - 122, 200, 123, 221, -1, 52, 57, 122, 197, 123, - -1, 53, 152, 51, 122, 200, 123, 52, 122, 200, - 123, 221, -1, 53, 152, 51, 122, 200, 123, 221, - -1, 53, 152, 52, 122, 200, 123, 221, -1, 53, - 152, 52, 57, 122, 197, 123, -1, 195, -1, 61, - -1, 18, -1, 66, -1, 17, 61, -1, 54, 205, - 203, -1, 54, -1, 56, -1, -1, 55, 205, 152, - -1, 55, 205, 195, -1, 58, 205, 203, -1, 208, - 152, -1, 152, -1, 61, -1, 152, -1, 195, -1, - 152, -1, 61, -1, 59, 205, 152, -1, 59, 205, - 208, 60, 210, -1, 63, 205, 209, 62, 209, -1, - 64, 205, 209, 62, 209, -1, 65, 205, 209, 62, - 209, -1, 215, 194, -1, 194, -1, 215, -1, -1, - 219, -1, 18, 219, -1, 316, -1, 5, 245, -1, - 245, -1, 220, -1, -1, 226, 229, 231, 230, -1, - 223, 225, -1, 225, -1, 68, 293, -1, -1, 306, - -1, 271, -1, 118, 297, 224, 119, -1, 293, -1, - 41, 22, 223, -1, -1, 269, -1, 228, 227, -1, - 227, -1, 42, 228, -1, -1, 234, 235, -1, 235, - 234, -1, 234, -1, 235, -1, -1, 21, 22, 232, - -1, -1, 232, 233, -1, 233, -1, 24, 305, -1, - 25, 305, -1, 271, -1, 293, -1, 305, -1, 306, - -1, 12, 145, -1, 20, 145, -1, 110, 259, -1, - -1, 238, -1, -1, 238, 293, -1, 293, -1, 240, - -1, -1, 240, 241, -1, 241, -1, 118, 242, 119, - -1, 118, 119, -1, 242, 244, -1, 244, -1, 140, - -1, 140, 141, -1, 140, 126, 316, -1, 312, 126, - 316, -1, 316, -1, 243, -1, 312, -1, 151, -1, - 73, -1, 122, 173, 123, -1, 122, 246, 123, -1, - 247, 248, -1, 252, -1, -1, 248, 249, -1, 249, - -1, -1, 250, 251, 247, -1, 253, -1, 268, -1, - 159, -1, -1, 278, 159, 247, -1, 278, -1, 265, - -1, 254, -1, 264, -1, 255, -1, 256, -1, 267, - -1, 257, -1, 263, -1, 6, 245, -1, 17, 292, - 245, -1, 74, 205, 292, 245, -1, 96, 118, 297, - 68, 293, 119, -1, 110, 259, -1, 260, -1, 262, - -1, 293, 122, 261, 123, -1, 242, -1, -1, 118, - 237, 119, 122, 239, 123, -1, 258, -1, 75, 245, - -1, 245, 13, 266, -1, 245, -1, 266, 13, 245, - -1, 245, -1, 112, 118, 293, 139, 297, 119, -1, - 19, 269, -1, 305, -1, 306, -1, 271, -1, 158, - -1, -1, 316, 118, 179, 274, 270, 119, -1, 311, - 274, 119, -1, 67, 273, -1, 118, 274, 119, -1, - 274, 117, 297, -1, 297, -1, -1, 122, 276, 123, - -1, 277, -1, -1, 278, 159, 276, -1, 278, -1, - 291, 279, -1, 286, 281, -1, 285, 282, 280, -1, - 158, 281, -1, -1, 279, -1, -1, 284, 283, -1, - 117, 282, -1, -1, 290, -1, 292, -1, 27, -1, - 288, -1, 287, -1, 120, 279, 121, -1, 118, 289, - 119, -1, 289, 290, -1, 290, -1, 291, -1, 286, - -1, 293, -1, 296, -1, 293, -1, 316, -1, 124, - 294, -1, 125, 294, -1, 157, -1, 124, 294, -1, - 125, 294, -1, 294, -1, 316, -1, 243, -1, 312, - -1, 151, -1, 317, -1, 118, 119, -1, 298, -1, - 298, 127, 299, -1, 299, -1, 299, 128, 300, -1, - 300, -1, 301, 129, 301, -1, 301, 130, 301, -1, - 301, 131, 301, -1, 301, 132, 301, -1, 301, 133, - 301, -1, 301, 134, 301, -1, 301, 71, 273, -1, - 301, 70, 71, 273, -1, 301, -1, 302, 135, 301, - -1, 302, 136, 301, -1, 302, 314, -1, 302, 315, - -1, 302, -1, 303, 137, 302, -1, 303, 138, 302, - -1, 303, -1, 160, 304, -1, 135, 304, -1, 136, - 304, -1, 304, -1, 305, -1, 306, -1, 271, -1, - 296, -1, 293, -1, 178, -1, 118, 297, 119, -1, - 30, 118, 297, 119, -1, 34, 118, 297, 119, -1, - 26, 118, 297, 117, 297, 119, -1, 35, 118, 297, - 119, -1, 16, 118, 293, 119, -1, 31, 118, 297, - 119, -1, 32, 118, 297, 119, -1, 33, 118, 297, - 119, -1, 33, 118, 119, -1, 101, 118, 119, -1, - 97, 118, 297, 119, -1, 99, 118, 297, 119, -1, - 100, 118, 297, 119, -1, 98, 118, 297, 119, -1, - 102, 118, 297, 119, -1, 103, 118, 297, 119, -1, - 104, 118, 297, 119, -1, 105, 118, 297, 119, -1, - 106, 118, 297, 119, -1, 107, 118, 297, 119, -1, - 108, 118, 119, -1, 109, 118, 119, -1, 307, -1, - 272, -1, 69, 118, 297, 117, 297, 117, 297, 119, - -1, 28, 118, 297, 117, 297, 119, -1, 29, 118, - 297, 117, 297, 119, -1, 40, 118, 297, 117, 297, - 119, -1, 36, 118, 297, 119, -1, 37, 118, 297, - 119, -1, 38, 118, 297, 119, -1, 39, 118, 297, - 119, -1, 308, -1, 309, -1, 310, -1, 84, 118, - 297, 119, -1, 85, 118, 297, 117, 297, 119, -1, - 85, 118, 297, 117, 297, 117, 297, 119, -1, 86, - 118, 297, 119, -1, 87, 118, 297, 119, -1, 88, - 118, 297, 117, 297, 119, -1, 89, 118, 297, 117, - 297, 119, -1, 90, 118, 297, 117, 297, 119, -1, - 91, 118, 297, 119, -1, 92, 118, 187, 119, -1, - 93, 118, 297, 117, 297, 119, -1, 94, 118, 297, - 117, 297, 119, -1, 95, 118, 297, 117, 297, 117, - 297, 119, -1, 95, 118, 297, 117, 297, 117, 297, - 117, 297, 119, -1, 23, 118, 297, 117, 297, 119, - -1, 23, 118, 297, 117, 297, 117, 297, 119, -1, - 76, 118, 297, 119, -1, 77, 118, 297, 119, -1, - 78, 118, 297, 119, -1, 79, 118, 297, 119, -1, - 80, 118, 297, 119, -1, 81, 118, 297, 119, -1, - 82, 118, 297, 119, -1, 83, 118, 297, 119, -1, - 113, 118, 119, -1, 114, 118, 119, -1, 115, 118, - 297, 119, -1, 116, 118, 297, 119, -1, 153, -1, - 155, -1, 313, -1, 314, -1, 315, -1, 145, -1, - 148, -1, 142, -1, 146, -1, 149, -1, 143, -1, - 147, -1, 150, -1, 144, -1, 152, -1, 154, -1, - 156, -1, 120, 121, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 499, 499, 500, 505, 514, 528, 535, 555, 560, - 565, 573, 577, 578, 579, 583, 587, 591, 595, 599, - 603, 607, 611, 615, 619, 627, 635, 640, 647, 677, - 684, 702, 717, 722, 727, 737, 741, 751, 760, 769, - 787, 791, 833, 837, 841, 845, 849, 853, 857, 864, - 878, 884, 888, 896, 917, 938, 959, 980, 1001, 1008, - 1017, 1026, 1042, 1070, 1092, 1115, 1160, 1184, 1201, 1210, - 1219, 1235, 1256, 1260, 1268, 1276, 1296, 1328, 1348, 1392, - 1409, 1442, 1457, 1461, 1469, 1484, 1493, 1513, 1543, 1563, - 1607, 1649, 1691, 1715, 1719, 1723, 1727, 1731, 1744, 1776, - 1811, 1816, 1823, 1850, 1885, 1921, 1930, 1949, 1953, 1960, - 1964, 1972, 1984, 2011, 2057, 2088, 2119, 2150, 2156, 2165, - 2170, 2177, 2201, 2224, 2232, 2236, 2244, 2249, 2256, 2270, - 2280, 2300, 2305, 2312, 2316, 2320, 2347, 2361, 2375, 2382, - 2389, 2399, 2419, 2433, 2440, 2445, 2450, 2455, 2461, 2469, - 2474, 2481, 2491, 2511, 2518, 2525, 2533, 2550, 2558, 2570, - 2584, 2597, 2602, 2609, 2614, 2620, 2629, 2648, 2653, 2662, - 2674, 2696, 2724, 2731, 2745, 2768, 2774, 2780, 2788, 2806, - 2810, 2814, 2818, 2822, 2834, 2838, 2849, 2907, 2921, 2933, - 2970, 2975, 2987, 3035, 3048, 3076, 3077, 3082, 3113, 3121, - 3125, 3129, 3133, 3137, 3141, 3145, 3149, 3157, 3196, 3246, - 3263, 3284, 3291, 3295, 3303, 3312, 3317, 3332, 3348, 3358, - 3368, 3383, 3390, 3400, 3425, 3446, 3454, 3458, 3462, 3469, - 3474, 3481, 3520, 3554, 3582, 3589, 3599, 3616, 3624, 3632, - 3637, 3648, 3678, 3693, 3737, 3785, 3883, 3888, 3895, 3900, - 3907, 3985, 3990, 3997, 4005, 4015, 4043, 4047, 4055, 4122, - 4249, 4302, 4339, 4343, 4351, 4363, 4376, 4382, 4390, 4394, - 4401, 4412, 4416, 4420, 4430, 4434, 4438, 4442, 4446, 4450, - 4460, 4468, 4475, 4483, 4491, 4500, 4507, 4514, 4521, 4528, - 4535, 4542, 4547, 4552, 4561, 4568, 4575, 4588, 4601, 4608, - 4615, 4622, 4630, 4637, 4641, 4648, 4662, 4666, 4670, 4679, - 4685, 4695, 4703, 4711, 4718, 4725, 4732, 4739, 4754, 4761, - 4768, 4775, 4782, 4789, 4796, 4803, 4810, 4817, 4824, 4831, - 4838, 4845, 4852, 4859, 4866, 4873, 4877, 4881, 4888, 4895, - 4902, 4909, 4916, 4923, 4930, 4937, 4941, 4945, 4952, 4959, - 4966, 4973, 4980, 4987, 4994, 5001, 5008, 5015, 5022, 5029, - 5036, 5043, 5054, 5061, 5072, 5079, 5086, 5093, 5100, 5107, - 5114, 5121, 5132, 5149, 5167, 5185, 5210, 5216, 5236, 5240, - 5244, 5251, 5255, 5259, 5267, 5271, 5275, 5283, 5287, 5291, - 5303, 5309, 5329, 5335 + 0, 512, 512, 513, 518, 527, 541, 548, 568, 573, + 578, 586, 590, 591, 592, 596, 600, 604, 608, 612, + 616, 620, 624, 628, 632, 640, 648, 653, 660, 690, + 697, 715, 730, 735, 740, 750, 754, 764, 773, 782, + 800, 804, 846, 850, 854, 858, 862, 866, 870, 877, + 891, 897, 901, 909, 930, 951, 972, 993, 1014, 1021, + 1030, 1039, 1055, 1083, 1105, 1128, 1173, 1197, 1214, 1223, + 1232, 1248, 1269, 1273, 1281, 1289, 1309, 1341, 1361, 1405, + 1422, 1455, 1470, 1474, 1482, 1497, 1506, 1526, 1556, 1576, + 1620, 1662, 1704, 1728, 1732, 1736, 1740, 1744, 1757, 1789, + 1824, 1829, 1836, 1863, 1898, 1934, 1943, 1962, 1966, 1973, + 1977, 1985, 1997, 2024, 2070, 2101, 2132, 2163, 2169, 2178, + 2183, 2190, 2214, 2237, 2245, 2249, 2257, 2262, 2269, 2283, + 2293, 2313, 2318, 2325, 2329, 2333, 2360, 2374, 2388, 2395, + 2402, 2412, 2432, 2446, 2453, 2458, 2463, 2468, 2474, 2482, + 2487, 2494, 2504, 2524, 2531, 2538, 2546, 2563, 2571, 2583, + 2597, 2610, 2615, 2622, 2627, 2633, 2642, 2661, 2666, 2675, + 2687, 2709, 2737, 2744, 2758, 2781, 2787, 2793, 2801, 2819, + 2823, 2827, 2831, 2835, 2847, 2851, 2862, 2920, 2934, 2946, + 2983, 2988, 3000, 3048, 3061, 3089, 3090, 3095, 3126, 3134, + 3138, 3142, 3146, 3150, 3154, 3158, 3162, 3170, 3209, 3259, + 3276, 3297, 3304, 3308, 3316, 3325, 3330, 3345, 3361, 3371, + 3381, 3396, 3403, 3413, 3438, 3459, 3467, 3471, 3475, 3482, + 3487, 3494, 3533, 3567, 3595, 3602, 3612, 3629, 3637, 3645, + 3650, 3661, 3691, 3706, 3750, 3798, 3896, 3901, 3908, 3913, + 3920, 3998, 4003, 4010, 4018, 4028, 4056, 4060, 4068, 4135, + 4261, 4314, 4351, 4355, 4363, 4375, 4388, 4394, 4402, 4406, + 4413, 4424, 4428, 4432, 4442, 4446, 4450, 4454, 4458, 4462, + 4472, 4480, 4487, 4495, 4503, 4512, 4519, 4526, 4533, 4540, + 4547, 4554, 4559, 4564, 4573, 4580, 4587, 4600, 4613, 4620, + 4627, 4634, 4642, 4649, 4653, 4660, 4674, 4678, 4682, 4691, + 4697, 4707, 4715, 4723, 4730, 4737, 4744, 4751, 4766, 4773, + 4780, 4787, 4794, 4801, 4808, 4815, 4822, 4829, 4836, 4843, + 4850, 4857, 4864, 4871, 4878, 4885, 4889, 4893, 4900, 4907, + 4914, 4921, 4928, 4935, 4942, 4949, 4953, 4957, 4964, 4971, + 4978, 4985, 4992, 4999, 5006, 5013, 5020, 5027, 5034, 5041, + 5048, 5055, 5066, 5073, 5084, 5091, 5098, 5105, 5112, 5119, + 5126, 5133, 5144, 5161, 5179, 5197, 5222, 5228, 5248, 5252, + 5256, 5263, 5267, 5271, 5279, 5283, 5287, 5295, 5299, 5303, + 5315, 5321, 5341, 5347 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -1128,13 +814,13 @@ "BuiltInCall", "StringExpression", "RegexExpression", "DatetimeBuiltinAccessors", "DatetimeExtensions", "IRIrefBrace", "NumericLiteral", "NumericLiteralUnsigned", "NumericLiteralPositive", - "NumericLiteralNegative", "IRIref", "BlankNode", 0 + "NumericLiteralNegative", "IRIref", "BlankNode", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -1157,99 +843,107 @@ }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 161, 162, 162, 163, 164, 164, 165, 165, 165, - 165, 166, 167, 167, 167, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 169, 170, 170, 171, 171, - 172, 173, 174, 174, 174, 175, 175, 176, 176, 176, - 177, 177, 178, 178, 178, 178, 178, 178, 178, 179, - 179, 180, 180, 181, 182, 183, 184, 185, 186, 186, - 187, 187, 188, 189, 190, 190, 191, 191, 192, 192, - 192, 193, 194, 194, 195, 196, 196, 196, 196, 197, - 197, 198, 199, 199, 200, 200, 201, 201, 201, 202, - 202, 202, 202, 203, 203, 203, 203, 203, 204, 204, - 205, 205, 206, 206, 207, 208, 208, 209, 209, 210, - 210, 210, 211, 211, 212, 213, 214, 215, 215, 216, - 216, 217, 218, 219, 220, 220, 221, 221, 222, 223, - 223, 224, 224, 225, 225, 225, 225, 226, 226, 227, - 228, 228, 229, 229, 230, 230, 230, 230, 230, 231, - 231, 232, 232, 233, 233, 233, 233, 233, 233, 234, - 235, 236, 236, 237, 237, 238, 238, 239, 239, 240, - 240, 241, 241, 242, 242, 243, 243, 243, 243, 244, - 244, 244, 244, 244, 245, 245, 246, 247, 247, 248, - 248, 248, 249, 250, 250, 251, 251, 252, 252, 253, - 253, 253, 253, 253, 253, 253, 253, 254, 255, 256, - 257, 258, 259, 259, 260, 261, 261, 262, 263, 264, - 265, 265, 266, 266, 267, 268, 269, 269, 269, 270, - 270, 271, 271, 272, 273, 274, 274, 274, 275, 276, - 276, 277, 277, 278, 278, 279, 280, 280, 281, 281, - 282, 283, 283, 284, 285, 285, 286, 286, 287, 288, - 289, 289, 290, 290, 291, 291, 292, 292, 293, 293, - 294, 295, 295, 295, 296, 296, 296, 296, 296, 296, - 297, 298, 298, 299, 299, 300, 300, 300, 300, 300, - 300, 300, 300, 300, 301, 301, 301, 301, 301, 302, - 302, 302, 303, 303, 303, 303, 304, 304, 304, 304, - 304, 304, 305, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 308, 308, 309, 309, 309, 309, 309, 309, - 309, 309, 310, 310, 310, 310, 311, 311, 312, 312, - 312, 313, 313, 313, 314, 314, 314, 315, 315, 315, - 316, 316, 317, 317 -}; +#define YYPACT_NINF -583 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-583))) + +#define YYTABLE_NINF -113 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = { - 0, 2, 1, 1, 4, 1, 0, 1, 1, 1, - 1, 3, 2, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 0, 4, 0, - 4, 4, 3, 3, 2, 1, 1, 2, 3, 1, - 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 5, 5, 5, 5, 5, 4, 0, - 3, 1, 6, 5, 5, 7, 5, 5, 2, 3, - 1, 3, 2, 2, 2, 3, 5, 5, 3, 1, - 5, 5, 1, 1, 2, 1, 3, 5, 5, 11, - 7, 7, 7, 1, 1, 1, 1, 2, 3, 1, - 1, 0, 3, 3, 3, 2, 1, 1, 1, 1, - 1, 1, 3, 5, 5, 5, 5, 2, 1, 1, - 0, 1, 2, 1, 2, 1, 1, 0, 4, 2, - 1, 2, 0, 1, 1, 4, 1, 3, 0, 1, - 2, 1, 2, 0, 2, 2, 1, 1, 0, 3, - 0, 2, 1, 2, 2, 1, 1, 1, 1, 2, - 2, 2, 0, 1, 0, 2, 1, 1, 0, 2, - 1, 3, 2, 2, 1, 1, 2, 3, 3, 1, - 1, 1, 1, 1, 3, 3, 2, 1, 0, 2, - 1, 0, 3, 1, 1, 1, 0, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, - 6, 2, 1, 1, 4, 1, 0, 6, 1, 2, - 3, 1, 3, 1, 6, 2, 1, 1, 1, 1, - 0, 6, 3, 2, 3, 3, 1, 0, 3, 1, - 0, 3, 1, 2, 2, 3, 2, 0, 1, 0, - 2, 2, 0, 1, 1, 1, 1, 1, 3, 3, - 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, - 1, 3, 1, 3, 1, 3, 3, 3, 3, 3, - 3, 3, 4, 1, 3, 3, 2, 2, 1, 3, - 3, 1, 2, 2, 2, 1, 1, 1, 1, 1, - 1, 1, 3, 4, 4, 6, 4, 4, 4, 4, - 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 3, 3, 1, 1, 8, 6, 6, - 6, 4, 4, 4, 4, 1, 1, 1, 4, 6, - 8, 4, 4, 6, 6, 6, 4, 4, 6, 6, - 8, 10, 6, 8, 4, 4, 4, 4, 4, 4, - 4, 4, 3, 3, 4, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2 + 34, -85, 94, -583, -583, 602, -583, -583, -583, 66, + 72, -46, 28, 62, 62, 62, 62, 62, 62, -583, + 302, -30, -583, -583, -583, -583, -583, -583, -583, -583, + -583, -583, 110, 30, 13, 26, 1982, -583, 74, 43, + 1982, 74, 37, -583, 73, 47, 73, -8, 5, 5, + 5, 91, -21, 56, 175, 79, -583, 175, -583, -583, + -583, 130, -583, 54, -42, -583, -583, -583, -583, -583, + -583, 404, -583, 2028, 216, 935, 98, 57, 57, 12, + -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, + -583, -583, -583, 459, -583, -583, 65, 105, -583, -583, + 105, -583, -583, 95, -583, -583, -583, -583, -583, 13, + -583, -583, -583, -583, 2028, 496, -583, 111, 18, 46, + -583, -583, -583, -583, -583, 103, -583, -583, -583, 27, + 45, -583, -583, 200, 208, 211, 121, 121, 1380, -583, + -583, 136, -583, -583, 175, 88, -583, -583, -583, 2102, + 175, 273, 175, 40, 147, -583, 40, -583, 672, 137, + -583, 174, 40, 180, 250, -583, 148, 140, 199, -583, + 210, -583, -583, 2067, -583, -583, -583, -583, 222, 2102, + -583, -583, -583, -583, -42, -583, 40, -583, 2102, -583, + -583, -583, -42, -583, 234, 40, 1982, 236, 1982, -583, + -583, 16, -583, 5, 5, 5, -583, -583, 241, 243, + 245, 246, 247, 251, 257, 258, 259, 260, 263, 264, + 265, 272, 274, 275, 277, 278, 280, 281, 282, 283, + 285, 286, 287, 301, 304, 305, 306, 307, 308, 312, + 314, 315, 319, 320, 321, 323, 324, 325, 326, 327, + 329, 330, 331, 332, 334, 336, 337, 340, 341, 348, + 351, 357, 359, 360, 361, 362, 363, 365, 366, 368, + 864, 270, 1521, 1521, -583, -583, 1521, -583, -583, -583, + -583, -583, -583, -583, -583, -583, -583, -583, -583, 316, + 364, 369, -583, 403, 201, 177, -583, -583, -583, -583, + -583, -583, -583, 1380, 370, 176, -583, 40, 216, 40, + -583, 367, -583, 371, 40, -583, -25, -583, -583, -583, + 374, 446, -583, -583, 446, -583, 13, 216, 1868, 62, + 13, 390, 147, 391, 497, 250, -583, 353, -583, -583, + -583, -583, -583, -583, -583, -583, -583, -583, -583, 2102, + 392, -583, 2102, -583, -583, -583, 358, 401, -583, -583, + -583, -583, -583, -583, -583, 717, 2028, 1892, -583, -583, + -583, -583, -583, -583, -583, -25, 1380, 1380, 1380, 1380, + 1380, 1380, 1380, 1098, 1380, 1380, 1380, 1380, 1380, 1380, + 1380, 510, 510, 510, 510, 510, 510, 510, 1380, -583, + 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, + 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, + 1380, 1380, 1380, 1380, 1380, 406, 1380, 1380, 1380, 1380, + 1380, 1380, 407, 408, 411, 412, 1380, 1380, 419, -583, + -583, -583, 107, 1380, 1380, 452, 286, 1380, 1380, 1380, + 1380, 1380, 1380, 1380, 1380, -583, -583, 1380, 1380, 83, + -583, 510, -583, 446, -583, 446, -583, 2102, 446, 420, + -25, -583, 609, 519, -583, 500, 79, -583, 13, 1380, + -583, -583, -583, -583, 370, 216, -583, 1380, -583, -25, + 13, -583, -583, 2102, -583, 2102, 422, 105, -583, 2102, + -583, 29, 434, 40, 424, 442, 444, 445, 447, 449, + 450, 453, -583, 456, 457, 461, 462, 466, 467, 468, + 448, -583, 1239, 1380, 1380, 1380, 1380, 1380, 1380, 124, + 454, 478, 479, 493, 498, 503, 504, 505, 506, 511, + 512, 514, 515, 518, 520, 532, 539, 132, -583, 534, + 542, 551, 552, 554, 555, 556, -583, 557, 558, 560, + 561, 562, 564, -583, -583, -583, -583, 579, 581, -583, + 57, 57, -583, 582, 369, -583, 286, -583, -583, -583, + -583, -583, -583, -583, -583, -583, -583, -583, 1380, -583, + 1380, -583, -583, 440, -583, 509, -583, -583, -583, 609, + -583, -583, 443, 95, -583, 1765, 1868, 649, -583, -583, + 13, 634, 439, -583, 690, -583, 583, -583, -583, -583, + 585, -583, -583, -583, -583, 1380, 1380, 1380, 1380, -583, + -583, -583, -583, -583, -583, -583, -583, -583, -583, 1380, + -583, 586, -583, 589, 590, 591, 593, -37, 595, -583, + 1380, -583, -583, -583, -583, -583, -583, -583, -583, -583, + 1380, -583, -583, 1380, 1380, 1380, -583, 1380, -583, 1380, + 1380, 1380, -583, -583, -583, -583, -583, -583, -583, -583, + -583, -583, -583, -583, -583, -583, -583, -583, -583, -31, + 446, 597, -583, -583, 1380, 1765, -583, -583, -583, -583, + -583, 1868, -583, 694, 205, -583, -25, 1380, 13, -583, + 1982, 162, 599, 600, 603, 610, -583, -583, -583, -583, + -583, 671, 614, -583, 621, 169, 620, 622, 623, -583, + 624, 625, 628, -583, 627, -583, 266, 639, 597, -583, + 680, -583, -583, 1662, 619, 626, -583, 746, 755, 650, + 651, -583, 1947, 1380, -583, -583, -583, -583, -583, 643, + -583, 1380, 1380, -583, -583, -583, -583, -583, -583, 1380, + -583, -583, 545, -583, -583, -25, 654, 657, 657, 1662, + -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, + -583, 40, 658, 636, 674, 675, 209, -583, -583, -583, + -583, -583, -583, -583, -583, -583, -583, -583, 1380, -583, + 676, -583 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_uint16 yydefact[] = { 27, 0, 0, 2, 3, 6, 29, 26, 1, 0, @@ -1336,118 +1030,8 @@ 0, 361 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 2, 3, 20, 55, 4, 62, 21, 5, 6, - 32, 56, 161, 57, 140, 141, 142, 277, 522, 641, - 278, 279, 280, 281, 282, 722, 547, 283, 284, 58, - 59, 145, 60, 37, 123, 22, 168, 91, 92, 93, - 23, 24, 124, 25, 44, 26, 27, 130, 133, 371, - 28, 29, 30, 31, 150, 151, 67, 68, 69, 111, - 112, 474, 695, 776, 696, 475, 700, 701, 607, 746, - 704, 779, 780, 747, 748, 155, 469, 470, 737, 738, - 739, 599, 94, 601, 113, 163, 164, 335, 336, 337, - 493, 165, 338, 339, 340, 341, 342, 343, 317, 318, - 602, 319, 344, 345, 346, 614, 347, 348, 702, 734, - 285, 286, 399, 459, 152, 311, 95, 96, 189, 498, - 190, 356, 500, 357, 179, 97, 98, 99, 173, 358, - 100, 180, 287, 182, 573, 288, 460, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 103, 104, 105, 106, 304, 108 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -583 -static const yytype_int16 yypact[] = -{ - 34, -85, 94, -583, -583, 602, -583, -583, -583, 66, - 72, -46, 28, 62, 62, 62, 62, 62, 62, -583, - 302, -30, -583, -583, -583, -583, -583, -583, -583, -583, - -583, -583, 110, 30, 13, 26, 1982, -583, 74, 43, - 1982, 74, 37, -583, 73, 47, 73, -8, 5, 5, - 5, 91, -21, 56, 175, 79, -583, 175, -583, -583, - -583, 130, -583, 54, -42, -583, -583, -583, -583, -583, - -583, 404, -583, 2028, 216, 935, 98, 57, 57, 12, - -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, - -583, -583, -583, 459, -583, -583, 65, 105, -583, -583, - 105, -583, -583, 95, -583, -583, -583, -583, -583, 13, - -583, -583, -583, -583, 2028, 496, -583, 111, 18, 46, - -583, -583, -583, -583, -583, 103, -583, -583, -583, 27, - 45, -583, -583, 200, 208, 211, 121, 121, 1380, -583, - -583, 136, -583, -583, 175, 88, -583, -583, -583, 2102, - 175, 273, 175, 40, 147, -583, 40, -583, 672, 137, - -583, 174, 40, 180, 250, -583, 148, 140, 199, -583, - 210, -583, -583, 2067, -583, -583, -583, -583, 222, 2102, - -583, -583, -583, -583, -42, -583, 40, -583, 2102, -583, - -583, -583, -42, -583, 234, 40, 1982, 236, 1982, -583, - -583, 16, -583, 5, 5, 5, -583, -583, 241, 243, - 245, 246, 247, 251, 257, 258, 259, 260, 263, 264, - 265, 272, 274, 275, 277, 278, 280, 281, 282, 283, - 285, 286, 287, 301, 304, 305, 306, 307, 308, 312, - 314, 315, 319, 320, 321, 323, 324, 325, 326, 327, - 329, 330, 331, 332, 334, 336, 337, 340, 341, 348, - 351, 357, 359, 360, 361, 362, 363, 365, 366, 368, - 864, 270, 1521, 1521, -583, -583, 1521, -583, -583, -583, - -583, -583, -583, -583, -583, -583, -583, -583, -583, 316, - 364, 369, -583, 403, 201, 177, -583, -583, -583, -583, - -583, -583, -583, 1380, 370, 176, -583, 40, 216, 40, - -583, 367, -583, 371, 40, -583, -25, -583, -583, -583, - 374, 446, -583, -583, 446, -583, 13, 216, 1868, 62, - 13, 390, 147, 391, 497, 250, -583, 353, -583, -583, - -583, -583, -583, -583, -583, -583, -583, -583, -583, 2102, - 392, -583, 2102, -583, -583, -583, 358, 401, -583, -583, - -583, -583, -583, -583, -583, 717, 2028, 1892, -583, -583, - -583, -583, -583, -583, -583, -25, 1380, 1380, 1380, 1380, - 1380, 1380, 1380, 1098, 1380, 1380, 1380, 1380, 1380, 1380, - 1380, 510, 510, 510, 510, 510, 510, 510, 1380, -583, - 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, - 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380, - 1380, 1380, 1380, 1380, 1380, 406, 1380, 1380, 1380, 1380, - 1380, 1380, 407, 408, 411, 412, 1380, 1380, 419, -583, - -583, -583, 107, 1380, 1380, 452, 286, 1380, 1380, 1380, - 1380, 1380, 1380, 1380, 1380, -583, -583, 1380, 1380, 83, - -583, 510, -583, 446, -583, 446, -583, 2102, 446, 420, - -25, -583, 609, 519, -583, 500, 79, -583, 13, 1380, - -583, -583, -583, -583, 370, 216, -583, 1380, -583, -25, - 13, -583, -583, 2102, -583, 2102, 422, 105, -583, 2102, - -583, 29, 434, 40, 424, 442, 444, 445, 447, 449, - 450, 453, -583, 456, 457, 461, 462, 466, 467, 468, - 448, -583, 1239, 1380, 1380, 1380, 1380, 1380, 1380, 124, - 454, 478, 479, 493, 498, 503, 504, 505, 506, 511, - 512, 514, 515, 518, 520, 532, 539, 132, -583, 534, - 542, 551, 552, 554, 555, 556, -583, 557, 558, 560, - 561, 562, 564, -583, -583, -583, -583, 579, 581, -583, - 57, 57, -583, 582, 369, -583, 286, -583, -583, -583, - -583, -583, -583, -583, -583, -583, -583, -583, 1380, -583, - 1380, -583, -583, 440, -583, 509, -583, -583, -583, 609, - -583, -583, 443, 95, -583, 1765, 1868, 649, -583, -583, - 13, 634, 439, -583, 690, -583, 583, -583, -583, -583, - 585, -583, -583, -583, -583, 1380, 1380, 1380, 1380, -583, - -583, -583, -583, -583, -583, -583, -583, -583, -583, 1380, - -583, 586, -583, 589, 590, 591, 593, -37, 595, -583, - 1380, -583, -583, -583, -583, -583, -583, -583, -583, -583, - 1380, -583, -583, 1380, 1380, 1380, -583, 1380, -583, 1380, - 1380, 1380, -583, -583, -583, -583, -583, -583, -583, -583, - -583, -583, -583, -583, -583, -583, -583, -583, -583, -31, - 446, 597, -583, -583, 1380, 1765, -583, -583, -583, -583, - -583, 1868, -583, 694, 205, -583, -25, 1380, 13, -583, - 1982, 162, 599, 600, 603, 610, -583, -583, -583, -583, - -583, 671, 614, -583, 621, 169, 620, 622, 623, -583, - 624, 625, 628, -583, 627, -583, 266, 639, 597, -583, - 680, -583, -583, 1662, 619, 626, -583, 746, 755, 650, - 651, -583, 1947, 1380, -583, -583, -583, -583, -583, 643, - -583, 1380, 1380, -583, -583, -583, -583, -583, -583, 1380, - -583, -583, 545, -583, -583, -25, 654, 657, 657, 1662, - -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, - -583, 40, 658, 636, 674, 675, 209, -583, -583, -583, - -583, -583, -583, -583, -583, -583, -583, -583, 1380, -583, - 676, -583 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = { -583, -583, -583, -583, -583, 707, -583, -583, 735, -583, -583, -583, -583, 727, 182, -583, -122, -583, 109, -583, @@ -1467,10 +1051,30 @@ -583, -449, -583, 578, 580, -32, -583 }; -/* 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 YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -113 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 2, 3, 20, 55, 4, 62, 21, 5, 6, + 32, 56, 161, 57, 140, 141, 142, 277, 522, 641, + 278, 279, 280, 281, 282, 722, 547, 283, 284, 58, + 59, 145, 60, 37, 123, 22, 168, 91, 92, 93, + 23, 24, 124, 25, 44, 26, 27, 130, 133, 371, + 28, 29, 30, 31, 150, 151, 67, 68, 69, 111, + 112, 474, 695, 776, 696, 475, 700, 701, 607, 746, + 704, 779, 780, 747, 748, 155, 469, 470, 737, 738, + 739, 599, 94, 601, 113, 163, 164, 335, 336, 337, + 493, 165, 338, 339, 340, 341, 342, 343, 317, 318, + 602, 319, 344, 345, 346, 614, 347, 348, 702, 734, + 285, 286, 399, 459, 152, 311, 95, 96, 189, 498, + 190, 356, 500, 357, 179, 97, 98, 99, 173, 358, + 100, 180, 287, 182, 573, 288, 460, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 103, 104, 105, 106, 304, 108 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 116, 70, 183, 187, 107, 169, 481, 166, 107, 166, @@ -1701,12 +1305,6 @@ 86, 87, 88, 89, 65, 0, 66, 0, 90 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-583)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 41, 33, 78, 93, 36, 73, 328, 71, 40, 73, @@ -1937,8 +1535,8 @@ 148, 149, 150, 151, 152, -1, 154, -1, 156 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { 0, 15, 162, 163, 166, 169, 170, 152, 0, 51, @@ -2025,94 +1623,131 @@ 297, 119 }; -#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. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 161, 162, 162, 163, 164, 164, 165, 165, 165, + 165, 166, 167, 167, 167, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 169, 170, 170, 171, 171, + 172, 173, 174, 174, 174, 175, 175, 176, 176, 176, + 177, 177, 178, 178, 178, 178, 178, 178, 178, 179, + 179, 180, 180, 181, 182, 183, 184, 185, 186, 186, + 187, 187, 188, 189, 190, 190, 191, 191, 192, 192, + 192, 193, 194, 194, 195, 196, 196, 196, 196, 197, + 197, 198, 199, 199, 200, 200, 201, 201, 201, 202, + 202, 202, 202, 203, 203, 203, 203, 203, 204, 204, + 205, 205, 206, 206, 207, 208, 208, 209, 209, 210, + 210, 210, 211, 211, 212, 213, 214, 215, 215, 216, + 216, 217, 218, 219, 220, 220, 221, 221, 222, 223, + 223, 224, 224, 225, 225, 225, 225, 226, 226, 227, + 228, 228, 229, 229, 230, 230, 230, 230, 230, 231, + 231, 232, 232, 233, 233, 233, 233, 233, 233, 234, + 235, 236, 236, 237, 237, 238, 238, 239, 239, 240, + 240, 241, 241, 242, 242, 243, 243, 243, 243, 244, + 244, 244, 244, 244, 245, 245, 246, 247, 247, 248, + 248, 248, 249, 250, 250, 251, 251, 252, 252, 253, + 253, 253, 253, 253, 253, 253, 253, 254, 255, 256, + 257, 258, 259, 259, 260, 261, 261, 262, 263, 264, + 265, 265, 266, 266, 267, 268, 269, 269, 269, 270, + 270, 271, 271, 272, 273, 274, 274, 274, 275, 276, + 276, 277, 277, 278, 278, 279, 280, 280, 281, 281, + 282, 283, 283, 284, 285, 285, 286, 286, 287, 288, + 289, 289, 290, 290, 291, 291, 292, 292, 293, 293, + 294, 295, 295, 295, 296, 296, 296, 296, 296, 296, + 297, 298, 298, 299, 299, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 301, 301, 301, 301, 301, 302, + 302, 302, 303, 303, 303, 303, 304, 304, 304, 304, + 304, 304, 305, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 307, 307, + 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, + 307, 307, 308, 308, 309, 309, 309, 309, 309, 309, + 309, 309, 310, 310, 310, 310, 311, 311, 312, 312, + 312, 313, 313, 313, 314, 314, 314, 315, 315, 315, + 316, 316, 317, 317 +}; -#define YYRECOVERING() (!!yyerrstatus) + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 4, 1, 0, 1, 1, 1, + 1, 3, 2, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 2, 0, 4, 0, + 4, 4, 3, 3, 2, 1, 1, 2, 3, 1, + 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 5, 5, 5, 5, 5, 4, 0, + 3, 1, 6, 5, 5, 7, 5, 5, 2, 3, + 1, 3, 2, 2, 2, 3, 5, 5, 3, 1, + 5, 5, 1, 1, 2, 1, 3, 5, 5, 11, + 7, 7, 7, 1, 1, 1, 1, 2, 3, 1, + 1, 0, 3, 3, 3, 2, 1, 1, 1, 1, + 1, 1, 3, 5, 5, 5, 5, 2, 1, 1, + 0, 1, 2, 1, 2, 1, 1, 0, 4, 2, + 1, 2, 0, 1, 1, 4, 1, 3, 0, 1, + 2, 1, 2, 0, 2, 2, 1, 1, 0, 3, + 0, 2, 1, 2, 2, 1, 1, 1, 1, 2, + 2, 2, 0, 1, 0, 2, 1, 1, 0, 2, + 1, 3, 2, 2, 1, 1, 2, 3, 3, 1, + 1, 1, 1, 1, 3, 3, 2, 1, 0, 2, + 1, 0, 3, 1, 1, 1, 0, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, + 6, 2, 1, 1, 4, 1, 0, 6, 1, 2, + 3, 1, 3, 1, 6, 2, 1, 1, 1, 1, + 0, 6, 3, 2, 3, 3, 1, 0, 3, 1, + 0, 3, 1, 2, 2, 3, 2, 0, 1, 0, + 2, 2, 0, 1, 1, 1, 1, 1, 3, 3, + 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, + 1, 3, 1, 3, 1, 3, 3, 3, 3, 3, + 3, 3, 4, 1, 3, 3, 2, 2, 1, 3, + 3, 1, 2, 2, 2, 1, 1, 1, 1, 1, + 1, 1, 3, 4, 4, 6, 4, 4, 4, 4, + 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 3, 3, 1, 1, 8, 6, 6, + 6, 4, 4, 4, 4, 1, 1, 1, 4, 6, + 8, 4, 4, 6, 6, 6, 4, 4, 6, 6, + 8, 10, 6, 8, 4, 4, 4, 4, 4, 4, + 4, 4, 3, 3, 4, 4, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2 +}; -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#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 -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (rq, yyscanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -/* 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 @@ -2122,54 +1757,48 @@ # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, rq, yyscanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, rasqal_query* rq, void* yyscanner) { + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (rq); + YYUSE (yyscanner); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -2177,24 +1806,13 @@ | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, rasqal_query* rq, void* yyscanner) { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - yy_symbol_value_print (yyoutput, yytype, yyvaluep); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, rq, yyscanner); YYFPRINTF (yyoutput, ")"); } @@ -2203,16 +1821,8 @@ | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -2223,49 +1833,42 @@ YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# 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 __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, rasqal_query* rq, void* yyscanner) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , rq, yyscanner); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, rq, yyscanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -2279,7 +1882,7 @@ /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -2302,15 +1905,8 @@ # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -2326,16 +1922,8 @@ # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -2365,27 +1953,27 @@ char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -2408,12 +1996,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -2421,10 +2008,6 @@ int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -2473,11 +2056,13 @@ break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -2497,10 +2082,12 @@ # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -2537,1749 +2124,1296 @@ | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, rasqal_query* rq, void* yyscanner) { YYUSE (yyvaluep); - + YYUSE (rq); + YYUSE (yyscanner); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN switch (yytype) { - case 140: /* "\"string\"" */ - -/* Line 1391 of yacc.c */ -#line 372 "./sparql_parser.y" - { - if((yyvaluep->name)) - RASQAL_FREE(char*, (yyvaluep->name)); -}; + case 140: /* "string" */ +#line 385 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).name)) + RASQAL_FREE(char*, ((*yyvaluep).name)); +} +#line 2147 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2572 "sparql_parser.c" - break; - case 141: /* "\"langtag\"" */ - -/* Line 1391 of yacc.c */ -#line 372 "./sparql_parser.y" - { - if((yyvaluep->name)) - RASQAL_FREE(char*, (yyvaluep->name)); -}; + case 141: /* "langtag" */ +#line 385 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).name)) + RASQAL_FREE(char*, ((*yyvaluep).name)); +} +#line 2156 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2584 "sparql_parser.c" - break; - case 142: /* "\"double literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 142: /* "double literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2165 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2596 "sparql_parser.c" - break; - case 143: /* "\"double positive literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 143: /* "double positive literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2174 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2608 "sparql_parser.c" - break; - case 144: /* "\"double negative literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 144: /* "double negative literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2183 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2620 "sparql_parser.c" - break; - case 145: /* "\"integer literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 145: /* "integer literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2192 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2632 "sparql_parser.c" - break; - case 146: /* "\"integer positive literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 146: /* "integer positive literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2201 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2644 "sparql_parser.c" - break; - case 147: /* "\"integer negative literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 147: /* "integer negative literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2210 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2656 "sparql_parser.c" - break; - case 148: /* "\"decimal literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 148: /* "decimal literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2219 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2668 "sparql_parser.c" - break; - case 149: /* "\"decimal positive literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 149: /* "decimal positive literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2228 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2680 "sparql_parser.c" - break; - case 150: /* "\"decimal negative literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 150: /* "decimal negative literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2237 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2692 "sparql_parser.c" - break; - case 151: /* "\"boolean literal\"" */ - -/* Line 1391 of yacc.c */ -#line 351 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 151: /* "boolean literal" */ +#line 364 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2246 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2704 "sparql_parser.c" - break; - case 152: /* "\"URI literal\"" */ - -/* Line 1391 of yacc.c */ -#line 361 "./sparql_parser.y" - { - if((yyvaluep->uri)) - raptor_free_uri((yyvaluep->uri)); -}; + case 152: /* "URI literal" */ +#line 374 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).uri)) + raptor_free_uri(((*yyvaluep).uri)); +} +#line 2255 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2716 "sparql_parser.c" - break; - case 153: /* "\"URI literal (\"" */ - -/* Line 1391 of yacc.c */ -#line 361 "./sparql_parser.y" - { - if((yyvaluep->uri)) - raptor_free_uri((yyvaluep->uri)); -}; + case 153: /* "URI literal (" */ +#line 374 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).uri)) + raptor_free_uri(((*yyvaluep).uri)); +} +#line 2264 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2728 "sparql_parser.c" - break; - case 154: /* "\"QName literal\"" */ - -/* Line 1391 of yacc.c */ -#line 372 "./sparql_parser.y" - { - if((yyvaluep->name)) - RASQAL_FREE(char*, (yyvaluep->name)); -}; + case 154: /* "QName literal" */ +#line 385 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).name)) + RASQAL_FREE(char*, ((*yyvaluep).name)); +} +#line 2273 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2740 "sparql_parser.c" - break; - case 155: /* "\"QName literal (\"" */ - -/* Line 1391 of yacc.c */ -#line 372 "./sparql_parser.y" - { - if((yyvaluep->name)) - RASQAL_FREE(char*, (yyvaluep->name)); -}; + case 155: /* "QName literal (" */ +#line 385 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).name)) + RASQAL_FREE(char*, ((*yyvaluep).name)); +} +#line 2282 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2752 "sparql_parser.c" - break; - case 156: /* "\"blank node literal\"" */ - -/* Line 1391 of yacc.c */ -#line 372 "./sparql_parser.y" - { - if((yyvaluep->name)) - RASQAL_FREE(char*, (yyvaluep->name)); -}; + case 156: /* "blank node literal" */ +#line 385 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).name)) + RASQAL_FREE(char*, ((*yyvaluep).name)); +} +#line 2291 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2764 "sparql_parser.c" - break; - case 157: /* "\"identifier\"" */ - -/* Line 1391 of yacc.c */ -#line 372 "./sparql_parser.y" - { - if((yyvaluep->name)) - RASQAL_FREE(char*, (yyvaluep->name)); -}; + case 157: /* "identifier" */ +#line 385 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).name)) + RASQAL_FREE(char*, ((*yyvaluep).name)); +} +#line 2300 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2776 "sparql_parser.c" - break; - case 172: /* "SelectQuery" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 172: /* SelectQuery */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2309 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2788 "sparql_parser.c" - break; - case 173: /* "SubSelect" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 173: /* SubSelect */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2318 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2800 "sparql_parser.c" - break; - case 174: /* "SelectClause" */ - -/* Line 1391 of yacc.c */ -#line 477 "./sparql_parser.y" - { - if((yyvaluep->projection)) - rasqal_free_projection((yyvaluep->projection)); -}; + case 174: /* SelectClause */ +#line 490 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).projection)) + rasqal_free_projection(((*yyvaluep).projection)); +} +#line 2327 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2812 "sparql_parser.c" - break; - case 175: /* "SelectExpressionList" */ - -/* Line 1391 of yacc.c */ -#line 477 "./sparql_parser.y" - { - if((yyvaluep->projection)) - rasqal_free_projection((yyvaluep->projection)); -}; + case 175: /* SelectExpressionList */ +#line 490 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).projection)) + rasqal_free_projection(((*yyvaluep).projection)); +} +#line 2336 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2824 "sparql_parser.c" - break; - case 176: /* "SelectExpressionListTail" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 176: /* SelectExpressionListTail */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2345 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2836 "sparql_parser.c" - break; - case 177: /* "SelectTerm" */ - -/* Line 1391 of yacc.c */ -#line 453 "./sparql_parser.y" - { - if((yyvaluep->variable)) - rasqal_free_variable((yyvaluep->variable)); -}; + case 177: /* SelectTerm */ +#line 466 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).variable)) + rasqal_free_variable(((*yyvaluep).variable)); +} +#line 2354 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2848 "sparql_parser.c" - break; - case 178: /* "AggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 178: /* AggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2363 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2860 "sparql_parser.c" - break; - case 180: /* "ExpressionOrStar" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 180: /* ExpressionOrStar */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2372 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2872 "sparql_parser.c" - break; - case 181: /* "CountAggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 181: /* CountAggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2381 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2884 "sparql_parser.c" - break; - case 182: /* "SumAggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 182: /* SumAggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2390 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2896 "sparql_parser.c" - break; - case 183: /* "AvgAggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 183: /* AvgAggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2399 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2908 "sparql_parser.c" - break; - case 184: /* "MinAggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 184: /* MinAggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2408 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2920 "sparql_parser.c" - break; - case 185: /* "MaxAggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 185: /* MaxAggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2417 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2932 "sparql_parser.c" - break; - case 186: /* "SeparatorOpt" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 186: /* SeparatorOpt */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2426 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2944 "sparql_parser.c" - break; - case 188: /* "GroupConcatAggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 188: /* GroupConcatAggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2435 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2956 "sparql_parser.c" - break; - case 189: /* "SampleAggregateExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 189: /* SampleAggregateExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2444 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2968 "sparql_parser.c" - break; - case 190: /* "ConstructQuery" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 190: /* ConstructQuery */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2453 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2980 "sparql_parser.c" - break; - case 191: /* "DescribeQuery" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 191: /* DescribeQuery */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2462 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 2992 "sparql_parser.c" - break; - case 192: /* "VarOrIRIrefList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 192: /* VarOrIRIrefList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2471 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3004 "sparql_parser.c" - break; - case 194: /* "DatasetClause" */ - -/* Line 1391 of yacc.c */ -#line 459 "./sparql_parser.y" - { - if((yyvaluep->data_graph)) - rasqal_free_data_graph((yyvaluep->data_graph)); -}; + case 194: /* DatasetClause */ +#line 472 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).data_graph)) + rasqal_free_data_graph(((*yyvaluep).data_graph)); +} +#line 2480 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3016 "sparql_parser.c" - break; - case 197: /* "GraphTriples" */ - -/* Line 1391 of yacc.c */ -#line 395 "./sparql_parser.y" - { - if((yyvaluep->update)) - rasqal_free_update_operation((yyvaluep->update)); -}; + case 197: /* GraphTriples */ +#line 408 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).update)) + rasqal_free_update_operation(((*yyvaluep).update)); +} +#line 2489 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3028 "sparql_parser.c" - break; - case 198: /* "GraphTemplate" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 198: /* GraphTemplate */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2498 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3040 "sparql_parser.c" - break; - case 199: /* "ModifyTemplate" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 199: /* ModifyTemplate */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2507 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3052 "sparql_parser.c" - break; - case 200: /* "ModifyTemplateList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 200: /* ModifyTemplateList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2516 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3064 "sparql_parser.c" - break; - case 203: /* "GraphRefAll" */ - -/* Line 1391 of yacc.c */ -#line 367 "./sparql_parser.y" - { - if((yyvaluep->uri_applies)) - free_uri_applies((yyvaluep->uri_applies)); -}; + case 203: /* GraphRefAll */ +#line 380 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).uri_applies)) + free_uri_applies(((*yyvaluep).uri_applies)); +} +#line 2525 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3076 "sparql_parser.c" - break; - case 208: /* "IriRefList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 208: /* IriRefList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2534 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3088 "sparql_parser.c" - break; - case 215: /* "DatasetClauseList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 215: /* DatasetClauseList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2543 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3100 "sparql_parser.c" - break; - case 216: /* "DatasetClauseListOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 216: /* DatasetClauseListOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2552 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3112 "sparql_parser.c" - break; - case 217: /* "DefaultGraphClause" */ - -/* Line 1391 of yacc.c */ -#line 459 "./sparql_parser.y" - { - if((yyvaluep->data_graph)) - rasqal_free_data_graph((yyvaluep->data_graph)); -}; + case 217: /* DefaultGraphClause */ +#line 472 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).data_graph)) + rasqal_free_data_graph(((*yyvaluep).data_graph)); +} +#line 2561 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3124 "sparql_parser.c" - break; - case 218: /* "NamedGraphClause" */ - -/* Line 1391 of yacc.c */ -#line 459 "./sparql_parser.y" - { - if((yyvaluep->data_graph)) - rasqal_free_data_graph((yyvaluep->data_graph)); -}; + case 218: /* NamedGraphClause */ +#line 472 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).data_graph)) + rasqal_free_data_graph(((*yyvaluep).data_graph)); +} +#line 2570 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3136 "sparql_parser.c" - break; - case 219: /* "SourceSelector" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 219: /* SourceSelector */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2579 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3148 "sparql_parser.c" - break; - case 222: /* "SolutionModifier" */ - -/* Line 1391 of yacc.c */ -#line 471 "./sparql_parser.y" - { - if((yyvaluep->modifier)) - rasqal_free_solution_modifier((yyvaluep->modifier)); -}; + case 222: /* SolutionModifier */ +#line 484 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).modifier)) + rasqal_free_solution_modifier(((*yyvaluep).modifier)); +} +#line 2588 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3160 "sparql_parser.c" - break; - case 223: /* "GroupConditionList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 223: /* GroupConditionList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2597 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3172 "sparql_parser.c" - break; - case 224: /* "AsVarOpt" */ - -/* Line 1391 of yacc.c */ -#line 453 "./sparql_parser.y" - { - if((yyvaluep->variable)) - rasqal_free_variable((yyvaluep->variable)); -}; + case 224: /* AsVarOpt */ +#line 466 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).variable)) + rasqal_free_variable(((*yyvaluep).variable)); +} +#line 2606 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3184 "sparql_parser.c" - break; - case 225: /* "GroupCondition" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 225: /* GroupCondition */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2615 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3196 "sparql_parser.c" - break; - case 226: /* "GroupClauseOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 226: /* GroupClauseOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2624 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3208 "sparql_parser.c" - break; - case 227: /* "HavingCondition" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 227: /* HavingCondition */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2633 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3220 "sparql_parser.c" - break; - case 228: /* "HavingConditionList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 228: /* HavingConditionList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2642 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3232 "sparql_parser.c" - break; - case 229: /* "HavingClauseOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 229: /* HavingClauseOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2651 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3244 "sparql_parser.c" - break; - case 231: /* "OrderClauseOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 231: /* OrderClauseOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2660 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3256 "sparql_parser.c" - break; - case 232: /* "OrderConditionList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 232: /* OrderConditionList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2669 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3268 "sparql_parser.c" - break; - case 233: /* "OrderCondition" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 233: /* OrderCondition */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2678 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3280 "sparql_parser.c" - break; - case 236: /* "ValuesClauseOpt" */ - -/* Line 1391 of yacc.c */ -#line 484 "./sparql_parser.y" - { - if((yyvaluep->bindings)) - rasqal_free_bindings((yyvaluep->bindings)); -}; + case 236: /* ValuesClauseOpt */ +#line 497 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).bindings)) + rasqal_free_bindings(((*yyvaluep).bindings)); +} +#line 2687 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3292 "sparql_parser.c" - break; - case 237: /* "VarListOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 237: /* VarListOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2696 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3304 "sparql_parser.c" - break; - case 238: /* "VarList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 238: /* VarList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2705 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3316 "sparql_parser.c" - break; - case 239: /* "DataBlockRowListOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 239: /* DataBlockRowListOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2714 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3328 "sparql_parser.c" - break; - case 240: /* "DataBlockRowList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 240: /* DataBlockRowList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2723 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3340 "sparql_parser.c" - break; - case 241: /* "DataBlockRow" */ - -/* Line 1391 of yacc.c */ -#line 465 "./sparql_parser.y" - { - if((yyvaluep->row)) - rasqal_free_row((yyvaluep->row)); -}; + case 241: /* DataBlockRow */ +#line 478 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).row)) + rasqal_free_row(((*yyvaluep).row)); +} +#line 2732 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3352 "sparql_parser.c" - break; - case 242: /* "DataBlockValueList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 242: /* DataBlockValueList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2741 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3364 "sparql_parser.c" - break; - case 243: /* "RDFLiteral" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 243: /* RDFLiteral */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2750 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3376 "sparql_parser.c" - break; - case 244: /* "DataBlockValue" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 244: /* DataBlockValue */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 2759 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3388 "sparql_parser.c" - break; - case 245: /* "GroupGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 245: /* GroupGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2768 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3400 "sparql_parser.c" - break; - case 246: /* "GroupGraphPatternSub" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 246: /* GroupGraphPatternSub */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2777 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3412 "sparql_parser.c" - break; - case 247: /* "TriplesBlockOpt" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 247: /* TriplesBlockOpt */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 2786 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3424 "sparql_parser.c" - break; - case 248: /* "GraphPatternListOpt" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 248: /* GraphPatternListOpt */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2795 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3436 "sparql_parser.c" - break; - case 249: /* "GraphPatternList" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 249: /* GraphPatternList */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2804 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3448 "sparql_parser.c" - break; - case 250: /* "GraphPatternListFilter" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 250: /* GraphPatternListFilter */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2813 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3460 "sparql_parser.c" - break; - case 252: /* "TriplesBlock" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 252: /* TriplesBlock */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 2822 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3472 "sparql_parser.c" - break; - case 253: /* "GraphPatternNotTriples" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 253: /* GraphPatternNotTriples */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2831 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3484 "sparql_parser.c" - break; - case 254: /* "OptionalGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 254: /* OptionalGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2840 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3496 "sparql_parser.c" - break; - case 255: /* "GraphGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 255: /* GraphGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2849 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3508 "sparql_parser.c" - break; - case 256: /* "ServiceGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 256: /* ServiceGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2858 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3520 "sparql_parser.c" - break; - case 257: /* "Bind" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 257: /* Bind */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2867 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3532 "sparql_parser.c" - break; - case 258: /* "InlineData" */ - -/* Line 1391 of yacc.c */ -#line 484 "./sparql_parser.y" - { - if((yyvaluep->bindings)) - rasqal_free_bindings((yyvaluep->bindings)); -}; + case 258: /* InlineData */ +#line 497 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).bindings)) + rasqal_free_bindings(((*yyvaluep).bindings)); +} +#line 2876 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3544 "sparql_parser.c" - break; - case 259: /* "DataBlock" */ - -/* Line 1391 of yacc.c */ -#line 484 "./sparql_parser.y" - { - if((yyvaluep->bindings)) - rasqal_free_bindings((yyvaluep->bindings)); -}; + case 259: /* DataBlock */ +#line 497 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).bindings)) + rasqal_free_bindings(((*yyvaluep).bindings)); +} +#line 2885 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3556 "sparql_parser.c" - break; - case 260: /* "InlineDataOneVar" */ - -/* Line 1391 of yacc.c */ -#line 484 "./sparql_parser.y" - { - if((yyvaluep->bindings)) - rasqal_free_bindings((yyvaluep->bindings)); -}; + case 260: /* InlineDataOneVar */ +#line 497 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).bindings)) + rasqal_free_bindings(((*yyvaluep).bindings)); +} +#line 2894 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3568 "sparql_parser.c" - break; - case 261: /* "DataBlockValueListOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 261: /* DataBlockValueListOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2903 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3580 "sparql_parser.c" - break; - case 262: /* "InlineDataFull" */ - -/* Line 1391 of yacc.c */ -#line 484 "./sparql_parser.y" - { - if((yyvaluep->bindings)) - rasqal_free_bindings((yyvaluep->bindings)); -}; + case 262: /* InlineDataFull */ +#line 497 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).bindings)) + rasqal_free_bindings(((*yyvaluep).bindings)); +} +#line 2912 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3592 "sparql_parser.c" - break; - case 263: /* "InlineDataGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 263: /* InlineDataGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2921 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3604 "sparql_parser.c" - break; - case 264: /* "MinusGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 264: /* MinusGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2930 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3616 "sparql_parser.c" - break; - case 265: /* "GroupOrUnionGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 265: /* GroupOrUnionGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2939 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3628 "sparql_parser.c" - break; - case 266: /* "GroupOrUnionGraphPatternList" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 266: /* GroupOrUnionGraphPatternList */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2948 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3640 "sparql_parser.c" - break; - case 267: /* "LetGraphPattern" */ - -/* Line 1391 of yacc.c */ -#line 412 "./sparql_parser.y" - { - if((yyvaluep->graph_pattern)) - rasqal_free_graph_pattern((yyvaluep->graph_pattern)); -}; + case 267: /* LetGraphPattern */ +#line 425 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).graph_pattern)) + rasqal_free_graph_pattern(((*yyvaluep).graph_pattern)); +} +#line 2957 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3652 "sparql_parser.c" - break; - case 268: /* "Filter" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 268: /* Filter */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2966 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3664 "sparql_parser.c" - break; - case 269: /* "Constraint" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 269: /* Constraint */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2975 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3676 "sparql_parser.c" - break; - case 270: /* "ParamsOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 270: /* ParamsOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 2984 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3688 "sparql_parser.c" - break; - case 271: /* "FunctionCall" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 271: /* FunctionCall */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 2993 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3700 "sparql_parser.c" - break; - case 272: /* "CoalesceExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 272: /* CoalesceExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3002 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3712 "sparql_parser.c" - break; - case 273: /* "ArgList" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 273: /* ArgList */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 3011 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3724 "sparql_parser.c" - break; - case 274: /* "ArgListNoBraces" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 274: /* ArgListNoBraces */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 3020 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3736 "sparql_parser.c" - break; - case 275: /* "ConstructTemplate" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 275: /* ConstructTemplate */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 3029 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3748 "sparql_parser.c" - break; - case 276: /* "ConstructTriplesOpt" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 276: /* ConstructTriplesOpt */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 3038 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3760 "sparql_parser.c" - break; - case 277: /* "ConstructTriples" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 277: /* ConstructTriples */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 3047 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3772 "sparql_parser.c" - break; - case 278: /* "TriplesSameSubject" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 278: /* TriplesSameSubject */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3056 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3784 "sparql_parser.c" - break; - case 279: /* "PropertyListNotEmpty" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 279: /* PropertyListNotEmpty */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3065 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3796 "sparql_parser.c" - break; - case 280: /* "PropertyListTailOpt" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 280: /* PropertyListTailOpt */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3074 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3808 "sparql_parser.c" - break; - case 281: /* "PropertyList" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 281: /* PropertyList */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3083 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3820 "sparql_parser.c" - break; - case 282: /* "ObjectList" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 282: /* ObjectList */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3092 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3832 "sparql_parser.c" - break; - case 283: /* "ObjectTail" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 283: /* ObjectTail */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3101 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3844 "sparql_parser.c" - break; - case 284: /* "Object" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 284: /* Object */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3110 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3856 "sparql_parser.c" - break; - case 285: /* "Verb" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 285: /* Verb */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3119 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3868 "sparql_parser.c" - break; - case 286: /* "TriplesNode" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 286: /* TriplesNode */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3128 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3880 "sparql_parser.c" - break; - case 287: /* "BlankNodePropertyList" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 287: /* BlankNodePropertyList */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3137 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3892 "sparql_parser.c" - break; - case 288: /* "Collection" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 288: /* Collection */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3146 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3904 "sparql_parser.c" - break; - case 289: /* "GraphNodeListNotEmpty" */ - -/* Line 1391 of yacc.c */ -#line 378 "./sparql_parser.y" - { - if((yyvaluep->seq)) - raptor_free_sequence((yyvaluep->seq)); -}; + case 289: /* GraphNodeListNotEmpty */ +#line 391 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).seq)) + raptor_free_sequence(((*yyvaluep).seq)); +} +#line 3155 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3916 "sparql_parser.c" - break; - case 290: /* "GraphNode" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 290: /* GraphNode */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3164 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3928 "sparql_parser.c" - break; - case 291: /* "VarOrTerm" */ - -/* Line 1391 of yacc.c */ -#line 401 "./sparql_parser.y" - { - if((yyvaluep->formula)) - rasqal_free_formula((yyvaluep->formula)); -}; + case 291: /* VarOrTerm */ +#line 414 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).formula)) + rasqal_free_formula(((*yyvaluep).formula)); +} +#line 3173 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3940 "sparql_parser.c" - break; - case 292: /* "VarOrIRIref" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 292: /* VarOrIRIref */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3182 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3952 "sparql_parser.c" - break; - case 293: /* "Var" */ - -/* Line 1391 of yacc.c */ -#line 453 "./sparql_parser.y" - { - if((yyvaluep->variable)) - rasqal_free_variable((yyvaluep->variable)); -}; + case 293: /* Var */ +#line 466 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).variable)) + rasqal_free_variable(((*yyvaluep).variable)); +} +#line 3191 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3964 "sparql_parser.c" - break; - case 294: /* "VarName" */ - -/* Line 1391 of yacc.c */ -#line 453 "./sparql_parser.y" - { - if((yyvaluep->variable)) - rasqal_free_variable((yyvaluep->variable)); -}; + case 294: /* VarName */ +#line 466 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).variable)) + rasqal_free_variable(((*yyvaluep).variable)); +} +#line 3200 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3976 "sparql_parser.c" - break; - case 296: /* "GraphTerm" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 296: /* GraphTerm */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3209 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 3988 "sparql_parser.c" - break; - case 297: /* "Expression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 297: /* Expression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3218 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4000 "sparql_parser.c" - break; - case 298: /* "ConditionalOrExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 298: /* ConditionalOrExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3227 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4012 "sparql_parser.c" - break; - case 299: /* "ConditionalAndExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 299: /* ConditionalAndExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3236 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4024 "sparql_parser.c" - break; - case 300: /* "RelationalExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 300: /* RelationalExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3245 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4036 "sparql_parser.c" - break; - case 301: /* "AdditiveExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 301: /* AdditiveExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3254 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4048 "sparql_parser.c" - break; - case 302: /* "MultiplicativeExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 302: /* MultiplicativeExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3263 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4060 "sparql_parser.c" - break; - case 303: /* "UnaryExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 303: /* UnaryExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3272 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4072 "sparql_parser.c" - break; - case 304: /* "PrimaryExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 304: /* PrimaryExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3281 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4084 "sparql_parser.c" - break; - case 305: /* "BrackettedExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 305: /* BrackettedExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3290 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4096 "sparql_parser.c" - break; - case 306: /* "BuiltInCall" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 306: /* BuiltInCall */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3299 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4108 "sparql_parser.c" - break; - case 308: /* "RegexExpression" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 308: /* RegexExpression */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3308 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4120 "sparql_parser.c" - break; - case 309: /* "DatetimeBuiltinAccessors" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 309: /* DatetimeBuiltinAccessors */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3317 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4132 "sparql_parser.c" - break; - case 310: /* "DatetimeExtensions" */ - -/* Line 1391 of yacc.c */ -#line 425 "./sparql_parser.y" - { - if((yyvaluep->expr)) - rasqal_free_expression((yyvaluep->expr)); -}; + case 310: /* DatetimeExtensions */ +#line 438 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).expr)) + rasqal_free_expression(((*yyvaluep).expr)); +} +#line 3326 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4144 "sparql_parser.c" - break; - case 311: /* "IRIrefBrace" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 311: /* IRIrefBrace */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3335 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4156 "sparql_parser.c" - break; - case 312: /* "NumericLiteral" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 312: /* NumericLiteral */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3344 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4168 "sparql_parser.c" - break; - case 313: /* "NumericLiteralUnsigned" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 313: /* NumericLiteralUnsigned */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3353 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4180 "sparql_parser.c" - break; - case 314: /* "NumericLiteralPositive" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 314: /* NumericLiteralPositive */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3362 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4192 "sparql_parser.c" - break; - case 315: /* "NumericLiteralNegative" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 315: /* NumericLiteralNegative */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3371 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4204 "sparql_parser.c" - break; - case 316: /* "IRIref" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 316: /* IRIref */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3380 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4216 "sparql_parser.c" - break; - case 317: /* "BlankNode" */ - -/* Line 1391 of yacc.c */ -#line 442 "./sparql_parser.y" - { - if((yyvaluep->literal)) - rasqal_free_literal((yyvaluep->literal)); -}; + case 317: /* BlankNode */ +#line 455 "./sparql_parser.y" /* yacc.c:1257 */ + { + if(((*yyvaluep).literal)) + rasqal_free_literal(((*yyvaluep).literal)); +} +#line 3389 "sparql_parser.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 4228 "sparql_parser.c" - break; default: - break; + break; } + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* 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 __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else int -yyparse () - -#endif -#endif +yyparse (rasqal_query* rq, void* yyscanner) { /* The lookahead symbol. */ int yychar; + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -4289,10 +3423,10 @@ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -4310,7 +3444,7 @@ int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -4328,9 +3462,8 @@ Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -4339,14 +3472,6 @@ 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; /*------------------------------------------------------------. @@ -4367,23 +3492,23 @@ #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; - yytype_int16 *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 (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* 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; + yytype_int16 *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 (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -4391,22 +3516,22 @@ # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -4415,10 +3540,10 @@ yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -4447,7 +3572,7 @@ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, yyscanner); } if (yychar <= YYEOF) @@ -4487,7 +3612,9 @@ yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -4510,7 +3637,7 @@ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -4524,999 +3651,929 @@ switch (yyn) { case 4: - -/* Line 1806 of yacc.c */ -#line 506 "./sparql_parser.y" +#line 519 "./sparql_parser.y" /* yacc.c:1646 */ { - if((yyvsp[(4) - (4)].bindings)) - ((rasqal_query*)rq)->bindings = (yyvsp[(4) - (4)].bindings); + if((yyvsp[0].bindings)) + rq->bindings = (yyvsp[0].bindings); } +#line 3660 "sparql_parser.c" /* yacc.c:1646 */ break; case 5: - -/* Line 1806 of yacc.c */ -#line 515 "./sparql_parser.y" +#line 528 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(sparql->experimental) - ((rasqal_query*)rq)->explain = 1; + rq->explain = 1; else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "EXPLAIN can only used with LAQRS"); YYERROR; } } +#line 3677 "sparql_parser.c" /* yacc.c:1646 */ break; case 6: - -/* Line 1806 of yacc.c */ -#line 528 "./sparql_parser.y" +#line 541 "./sparql_parser.y" /* yacc.c:1646 */ { /* nothing to do */ } +#line 3685 "sparql_parser.c" /* yacc.c:1646 */ break; case 7: - -/* Line 1806 of yacc.c */ -#line 536 "./sparql_parser.y" +#line 549 "./sparql_parser.y" /* yacc.c:1646 */ { raptor_sequence* seq; rasqal_graph_pattern* where_gp; /* Query graph pattern is first GP inside sequence of sub-GPs */ - seq = rasqal_graph_pattern_get_sub_graph_pattern_sequence((yyvsp[(1) - (1)].graph_pattern)); + seq = rasqal_graph_pattern_get_sub_graph_pattern_sequence((yyvsp[0].graph_pattern)); where_gp = (rasqal_graph_pattern*)raptor_sequence_delete_at(seq, 0); - rasqal_query_store_select_query(((rasqal_query*)rq), - (yyvsp[(1) - (1)].graph_pattern)->projection, - (yyvsp[(1) - (1)].graph_pattern)->data_graphs, + rasqal_query_store_select_query(rq, + (yyvsp[0].graph_pattern)->projection, + (yyvsp[0].graph_pattern)->data_graphs, where_gp, - (yyvsp[(1) - (1)].graph_pattern)->modifier); - (yyvsp[(1) - (1)].graph_pattern)->projection = NULL; - (yyvsp[(1) - (1)].graph_pattern)->data_graphs = NULL; - (yyvsp[(1) - (1)].graph_pattern)->modifier = NULL; + (yyvsp[0].graph_pattern)->modifier); + (yyvsp[0].graph_pattern)->projection = NULL; + (yyvsp[0].graph_pattern)->data_graphs = NULL; + (yyvsp[0].graph_pattern)->modifier = NULL; - rasqal_free_graph_pattern((yyvsp[(1) - (1)].graph_pattern)); + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); } +#line 3709 "sparql_parser.c" /* yacc.c:1646 */ break; case 8: - -/* Line 1806 of yacc.c */ -#line 556 "./sparql_parser.y" +#line 569 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->constructs = (yyvsp[(1) - (1)].seq); - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_CONSTRUCT; + rq->constructs = (yyvsp[0].seq); + rq->verb = RASQAL_QUERY_VERB_CONSTRUCT; } +#line 3718 "sparql_parser.c" /* yacc.c:1646 */ break; case 9: - -/* Line 1806 of yacc.c */ -#line 561 "./sparql_parser.y" +#line 574 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->describes = (yyvsp[(1) - (1)].seq); - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_DESCRIBE; + rq->describes = (yyvsp[0].seq); + rq->verb = RASQAL_QUERY_VERB_DESCRIBE; } +#line 3727 "sparql_parser.c" /* yacc.c:1646 */ break; case 10: - -/* Line 1806 of yacc.c */ -#line 566 "./sparql_parser.y" +#line 579 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_ASK; + rq->verb = RASQAL_QUERY_VERB_ASK; } +#line 3735 "sparql_parser.c" /* yacc.c:1646 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 584 "./sparql_parser.y" +#line 597 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_DELETE; + rq->verb = RASQAL_QUERY_VERB_DELETE; } +#line 3743 "sparql_parser.c" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 588 "./sparql_parser.y" +#line 601 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_INSERT; + rq->verb = RASQAL_QUERY_VERB_INSERT; } +#line 3751 "sparql_parser.c" /* yacc.c:1646 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 592 "./sparql_parser.y" +#line 605 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3759 "sparql_parser.c" /* yacc.c:1646 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 596 "./sparql_parser.y" +#line 609 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3767 "sparql_parser.c" /* yacc.c:1646 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 600 "./sparql_parser.y" +#line 613 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3775 "sparql_parser.c" /* yacc.c:1646 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 604 "./sparql_parser.y" +#line 617 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3783 "sparql_parser.c" /* yacc.c:1646 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 608 "./sparql_parser.y" +#line 621 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3791 "sparql_parser.c" /* yacc.c:1646 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 612 "./sparql_parser.y" +#line 625 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3799 "sparql_parser.c" /* yacc.c:1646 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 616 "./sparql_parser.y" +#line 629 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3807 "sparql_parser.c" /* yacc.c:1646 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 620 "./sparql_parser.y" +#line 633 "./sparql_parser.y" /* yacc.c:1646 */ { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } +#line 3815 "sparql_parser.c" /* yacc.c:1646 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 628 "./sparql_parser.y" +#line 641 "./sparql_parser.y" /* yacc.c:1646 */ { /* nothing to do */ } +#line 3823 "sparql_parser.c" /* yacc.c:1646 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 636 "./sparql_parser.y" +#line 649 "./sparql_parser.y" /* yacc.c:1646 */ { - rasqal_query_set_base_uri((rasqal_query*)rq, (yyvsp[(2) - (2)].uri)); + rasqal_query_set_base_uri(rq, (yyvsp[0].uri)); } +#line 3831 "sparql_parser.c" /* yacc.c:1646 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 640 "./sparql_parser.y" +#line 653 "./sparql_parser.y" /* yacc.c:1646 */ { /* nothing to do */ } +#line 3839 "sparql_parser.c" /* yacc.c:1646 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 648 "./sparql_parser.y" +#line 661 "./sparql_parser.y" /* yacc.c:1646 */ { - raptor_sequence *seq = ((rasqal_query*)rq)->prefixes; - unsigned const char* prefix_string = (yyvsp[(3) - (4)].name); + raptor_sequence *seq = rq->prefixes; + unsigned const char* prefix_string = (yyvsp[-1].name); size_t prefix_length = 0; if(prefix_string) prefix_length = strlen(RASQAL_GOOD_CAST(const char*, prefix_string)); - if(raptor_namespaces_find_namespace(((rasqal_query*)rq)->namespaces, + if(raptor_namespaces_find_namespace(rq->namespaces, prefix_string, RASQAL_BAD_CAST(int, prefix_length))) { /* A prefix may be defined only once */ - sparql_syntax_warning(((rasqal_query*)rq), + sparql_syntax_warning(rq, "PREFIX %s can be defined only once.", prefix_string ? RASQAL_GOOD_CAST(const char*, prefix_string) : ":"); RASQAL_FREE(char*, prefix_string); - raptor_free_uri((yyvsp[(4) - (4)].uri)); + raptor_free_uri((yyvsp[0].uri)); } else { rasqal_prefix *p; - p = rasqal_new_prefix(((rasqal_query*)rq)->world, prefix_string, (yyvsp[(4) - (4)].uri)); + p = rasqal_new_prefix(rq->world, prefix_string, (yyvsp[0].uri)); if(!p) YYERROR_MSG("PrefixDeclOpt: failed to create new prefix"); if(raptor_sequence_push(seq, p)) YYERROR_MSG("PrefixDeclOpt: cannot push prefix to seq"); - if(rasqal_query_declare_prefix(((rasqal_query*)rq), p)) { + if(rasqal_query_declare_prefix(rq, p)) { YYERROR_MSG("PrefixDeclOpt: cannot declare prefix"); } } } +#line 3872 "sparql_parser.c" /* yacc.c:1646 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 677 "./sparql_parser.y" +#line 690 "./sparql_parser.y" /* yacc.c:1646 */ { /* nothing to do, rq->prefixes already initialised */ } +#line 3880 "sparql_parser.c" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 685 "./sparql_parser.y" +#line 698 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.graph_pattern) = NULL; - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "SELECT can only be used with a SPARQL query"); YYERROR; } else { - (yyval.graph_pattern) = rasqal_new_select_graph_pattern((rasqal_query*)rq, - (yyvsp[(1) - (4)].projection), (yyvsp[(2) - (4)].seq), (yyvsp[(3) - (4)].graph_pattern), (yyvsp[(4) - (4)].modifier), NULL); + (yyval.graph_pattern) = rasqal_new_select_graph_pattern(rq, + (yyvsp[-3].projection), (yyvsp[-2].seq), (yyvsp[-1].graph_pattern), (yyvsp[0].modifier), NULL); } } +#line 3899 "sparql_parser.c" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 703 "./sparql_parser.y" +#line 716 "./sparql_parser.y" /* yacc.c:1646 */ { - if((yyvsp[(1) - (4)].projection) && (yyvsp[(2) - (4)].graph_pattern) && (yyvsp[(3) - (4)].modifier)) { - (yyval.graph_pattern) = rasqal_new_select_graph_pattern((rasqal_query*)rq, - (yyvsp[(1) - (4)].projection), + if((yyvsp[-3].projection) && (yyvsp[-2].graph_pattern) && (yyvsp[-1].modifier)) { + (yyval.graph_pattern) = rasqal_new_select_graph_pattern(rq, + (yyvsp[-3].projection), /* data graphs */ NULL, - (yyvsp[(2) - (4)].graph_pattern), - (yyvsp[(3) - (4)].modifier), - (yyvsp[(4) - (4)].bindings)); + (yyvsp[-2].graph_pattern), + (yyvsp[-1].modifier), + (yyvsp[0].bindings)); } else (yyval.graph_pattern) = NULL; } +#line 3915 "sparql_parser.c" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 718 "./sparql_parser.y" +#line 731 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.projection) = (yyvsp[(3) - (3)].projection); + (yyval.projection) = (yyvsp[0].projection); (yyval.projection)->distinct = 1; } +#line 3924 "sparql_parser.c" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 723 "./sparql_parser.y" +#line 736 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.projection) = (yyvsp[(3) - (3)].projection); + (yyval.projection) = (yyvsp[0].projection); (yyval.projection)->distinct = 2; } +#line 3933 "sparql_parser.c" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 728 "./sparql_parser.y" +#line 741 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.projection) = (yyvsp[(2) - (2)].projection); + (yyval.projection) = (yyvsp[0].projection); } +#line 3941 "sparql_parser.c" /* yacc.c:1646 */ break; case 35: - -/* Line 1806 of yacc.c */ -#line 738 "./sparql_parser.y" +#line 751 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.projection) = rasqal_new_projection((rasqal_query*)rq, (yyvsp[(1) - (1)].seq), 0, 0); + (yyval.projection) = rasqal_new_projection(rq, (yyvsp[0].seq), 0, 0); } +#line 3949 "sparql_parser.c" /* yacc.c:1646 */ break; case 36: - -/* Line 1806 of yacc.c */ -#line 742 "./sparql_parser.y" +#line 755 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.projection) = rasqal_new_projection((rasqal_query*)rq, NULL, /* wildcard */ 1, 0); + (yyval.projection) = rasqal_new_projection(rq, NULL, /* wildcard */ 1, 0); } +#line 3957 "sparql_parser.c" /* yacc.c:1646 */ break; case 37: - -/* Line 1806 of yacc.c */ -#line 752 "./sparql_parser.y" +#line 765 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].variable))) { + (yyval.seq) = (yyvsp[-1].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].variable))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("SelectExpressionListTail 1: sequence push failed"); } } +#line 3970 "sparql_parser.c" /* yacc.c:1646 */ break; case 38: - -/* Line 1806 of yacc.c */ -#line 761 "./sparql_parser.y" +#line 774 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (3)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(3) - (3)].variable))) { + (yyval.seq) = (yyvsp[-2].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].variable))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("SelectExpressionListTail 2: sequence push failed"); } } +#line 3983 "sparql_parser.c" /* yacc.c:1646 */ break; case 39: - -/* Line 1806 of yacc.c */ -#line 770 "./sparql_parser.y" +#line 783 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_variable, (raptor_data_print_handler)rasqal_variable_print); if(!(yyval.seq)) YYERROR_MSG("SelectExpressionListTail 3: failed to create sequence"); - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].variable))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].variable))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("SelectExpressionListTail 3: sequence push failed"); } } +#line 3999 "sparql_parser.c" /* yacc.c:1646 */ break; case 40: - -/* Line 1806 of yacc.c */ -#line 788 "./sparql_parser.y" +#line 801 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = (yyvsp[(1) - (1)].variable); + (yyval.variable) = (yyvsp[0].variable); } +#line 4007 "sparql_parser.c" /* yacc.c:1646 */ break; case 41: - -/* Line 1806 of yacc.c */ -#line 792 "./sparql_parser.y" +#line 805 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.variable) = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "SELECT ( expression ) AS Variable cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "SELECT ( expression ) AS Variable can only be used with SPARQL 1.1"); YYERROR; - } else if((yyvsp[(2) - (5)].expr) && (yyvsp[(4) - (5)].variable)) { - if(rasqal_expression_mentions_variable((yyvsp[(2) - (5)].expr), (yyvsp[(4) - (5)].variable))) { - sparql_query_error_full((rasqal_query*)rq, + } else if((yyvsp[-3].expr) && (yyvsp[-1].variable)) { + if(rasqal_expression_mentions_variable((yyvsp[-3].expr), (yyvsp[-1].variable))) { + sparql_query_error_full(rq, "Expression in SELECT ( expression ) AS %s contains the variable name '%s'", - (yyvsp[(4) - (5)].variable)->name, (yyvsp[(4) - (5)].variable)->name); + (yyvsp[-1].variable)->name, (yyvsp[-1].variable)->name); YYERROR; } else { - (yyval.variable) = (yyvsp[(4) - (5)].variable); - (yyval.variable)->expression = (yyvsp[(2) - (5)].expr); + (yyval.variable) = (yyvsp[-1].variable); + (yyval.variable)->expression = (yyvsp[-3].expr); } } } +#line 4034 "sparql_parser.c" /* yacc.c:1646 */ break; case 42: - -/* Line 1806 of yacc.c */ -#line 834 "./sparql_parser.y" +#line 847 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4042 "sparql_parser.c" /* yacc.c:1646 */ break; case 43: - -/* Line 1806 of yacc.c */ -#line 838 "./sparql_parser.y" +#line 851 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4050 "sparql_parser.c" /* yacc.c:1646 */ break; case 44: - -/* Line 1806 of yacc.c */ -#line 842 "./sparql_parser.y" +#line 855 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4058 "sparql_parser.c" /* yacc.c:1646 */ break; case 45: - -/* Line 1806 of yacc.c */ -#line 846 "./sparql_parser.y" +#line 859 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4066 "sparql_parser.c" /* yacc.c:1646 */ break; case 46: - -/* Line 1806 of yacc.c */ -#line 850 "./sparql_parser.y" +#line 863 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4074 "sparql_parser.c" /* yacc.c:1646 */ break; case 47: - -/* Line 1806 of yacc.c */ -#line 854 "./sparql_parser.y" +#line 867 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4082 "sparql_parser.c" /* yacc.c:1646 */ break; case 48: - -/* Line 1806 of yacc.c */ -#line 858 "./sparql_parser.y" +#line 871 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4090 "sparql_parser.c" /* yacc.c:1646 */ break; case 49: - -/* Line 1806 of yacc.c */ -#line 865 "./sparql_parser.y" +#line 878 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "functions with DISTINCT cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "functions with DISTINCT can only be used with SPARQL 1.1"); YYERROR; } (yyval.uinteger) = RASQAL_EXPR_FLAG_DISTINCT; } +#line 4107 "sparql_parser.c" /* yacc.c:1646 */ break; case 50: - -/* Line 1806 of yacc.c */ -#line 878 "./sparql_parser.y" +#line 891 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.uinteger) = 0; } +#line 4115 "sparql_parser.c" /* yacc.c:1646 */ break; case 51: - -/* Line 1806 of yacc.c */ -#line 885 "./sparql_parser.y" +#line 898 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 4123 "sparql_parser.c" /* yacc.c:1646 */ break; case 52: - -/* Line 1806 of yacc.c */ -#line 889 "./sparql_parser.y" +#line 902 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_VARSTAR); } +#line 4132 "sparql_parser.c" /* yacc.c:1646 */ break; case 53: - -/* Line 1806 of yacc.c */ -#line 897 "./sparql_parser.y" +#line 910 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "COUNT() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "COUNT() can only be used with SPARQL 1.1"); YYERROR; } else { - (yyval.expr) = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_COUNT, (yyvsp[(4) - (5)].expr), - NULL /* params */, (yyvsp[(3) - (5)].uinteger)); + (yyval.expr) = rasqal_new_aggregate_function_expression(rq->world, + RASQAL_EXPR_COUNT, (yyvsp[-1].expr), + NULL /* params */, (yyvsp[-2].uinteger)); if(!(yyval.expr)) YYERROR_MSG("CountAggregateExpression: cannot create expr"); } } +#line 4154 "sparql_parser.c" /* yacc.c:1646 */ break; case 54: - -/* Line 1806 of yacc.c */ -#line 918 "./sparql_parser.y" +#line 931 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "SUM() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "SUM() can only be used with SPARQL 1.1"); YYERROR; } else { - (yyval.expr) = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SUM, (yyvsp[(4) - (5)].expr), - NULL /* params */, (yyvsp[(3) - (5)].uinteger)); + (yyval.expr) = rasqal_new_aggregate_function_expression(rq->world, + RASQAL_EXPR_SUM, (yyvsp[-1].expr), + NULL /* params */, (yyvsp[-2].uinteger)); if(!(yyval.expr)) YYERROR_MSG("SumAggregateExpression: cannot create expr"); } } +#line 4176 "sparql_parser.c" /* yacc.c:1646 */ break; case 55: - -/* Line 1806 of yacc.c */ -#line 939 "./sparql_parser.y" +#line 952 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "AVG() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "AVG() can only be used with SPARQL 1.1"); YYERROR; } else { - (yyval.expr) = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_AVG, (yyvsp[(4) - (5)].expr), - NULL /* params */, (yyvsp[(3) - (5)].uinteger)); + (yyval.expr) = rasqal_new_aggregate_function_expression(rq->world, + RASQAL_EXPR_AVG, (yyvsp[-1].expr), + NULL /* params */, (yyvsp[-2].uinteger)); if(!(yyval.expr)) YYERROR_MSG("AvgAggregateExpression: cannot create expr"); } } +#line 4198 "sparql_parser.c" /* yacc.c:1646 */ break; case 56: - -/* Line 1806 of yacc.c */ -#line 960 "./sparql_parser.y" +#line 973 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "MIN() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "MIN() can only be used with SPARQL 1.1"); YYERROR; } else { - (yyval.expr) = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_MIN, (yyvsp[(4) - (5)].expr), - NULL /* params */, (yyvsp[(3) - (5)].uinteger)); + (yyval.expr) = rasqal_new_aggregate_function_expression(rq->world, + RASQAL_EXPR_MIN, (yyvsp[-1].expr), + NULL /* params */, (yyvsp[-2].uinteger)); if(!(yyval.expr)) YYERROR_MSG("MinAggregateExpression: cannot create expr"); } } +#line 4220 "sparql_parser.c" /* yacc.c:1646 */ break; case 57: - -/* Line 1806 of yacc.c */ -#line 981 "./sparql_parser.y" +#line 994 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "MAX() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "MAX() can only be used with SPARQL 1.1"); YYERROR; } else { - (yyval.expr) = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_MAX, (yyvsp[(4) - (5)].expr), - NULL /* params */, (yyvsp[(3) - (5)].uinteger)); + (yyval.expr) = rasqal_new_aggregate_function_expression(rq->world, + RASQAL_EXPR_MAX, (yyvsp[-1].expr), + NULL /* params */, (yyvsp[-2].uinteger)); if(!(yyval.expr)) YYERROR_MSG("MaxAggregateExpression: cannot create expr"); } } +#line 4242 "sparql_parser.c" /* yacc.c:1646 */ break; case 58: - -/* Line 1806 of yacc.c */ -#line 1002 "./sparql_parser.y" +#line 1015 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_string_literal(((rasqal_query*)rq)->world, (yyvsp[(4) - (4)].name), + (yyval.literal) = rasqal_new_string_literal(rq->world, (yyvsp[0].name), NULL /* language */, NULL /* dt uri */, NULL /* dt_qname */); } +#line 4252 "sparql_parser.c" /* yacc.c:1646 */ break; case 59: - -/* Line 1806 of yacc.c */ -#line 1008 "./sparql_parser.y" +#line 1021 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.literal) = NULL; } +#line 4260 "sparql_parser.c" /* yacc.c:1646 */ break; case 60: - -/* Line 1806 of yacc.c */ -#line 1018 "./sparql_parser.y" +#line 1031 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (3)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(3) - (3)].expr))) { + (yyval.seq) = (yyvsp[-2].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("ExpressionList 1: sequence push failed"); } } +#line 4273 "sparql_parser.c" /* yacc.c:1646 */ break; case 61: - -/* Line 1806 of yacc.c */ -#line 1027 "./sparql_parser.y" +#line 1040 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); if(!(yyval.seq)) YYERROR_MSG("ExpressionList 2: failed to create sequence"); - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].expr))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("ExpressionList 2: sequence push failed"); } } +#line 4290 "sparql_parser.c" /* yacc.c:1646 */ break; case 62: - -/* Line 1806 of yacc.c */ -#line 1043 "./sparql_parser.y" +#line 1056 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "GROUP_CONCAT() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "GROUP_CONCAT() can only be used with SPARQL 1.1"); YYERROR; } else { int flags = 0; - if((yyvsp[(3) - (6)].uinteger)) + if((yyvsp[-3].uinteger)) flags |= RASQAL_EXPR_FLAG_DISTINCT; - (yyval.expr) = rasqal_new_group_concat_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_group_concat_expression(rq->world, flags /* flags */, - (yyvsp[(4) - (6)].seq) /* args */, - (yyvsp[(5) - (6)].literal) /* separator */); + (yyvsp[-2].seq) /* args */, + (yyvsp[-1].literal) /* separator */); if(!(yyval.expr)) YYERROR_MSG("GroupConcatAggregateExpression: cannot create expr"); } } +#line 4319 "sparql_parser.c" /* yacc.c:1646 */ break; case 63: - -/* Line 1806 of yacc.c */ -#line 1071 "./sparql_parser.y" +#line 1084 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "SAMPLE() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "SAMPLE() can only be used with SPARQL 1.1"); YYERROR; } else { - (yyval.expr) = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SAMPLE, (yyvsp[(4) - (5)].expr), - NULL /* params */, (yyvsp[(3) - (5)].uinteger)); + (yyval.expr) = rasqal_new_aggregate_function_expression(rq->world, + RASQAL_EXPR_SAMPLE, (yyvsp[-1].expr), + NULL /* params */, (yyvsp[-2].uinteger)); if(!(yyval.expr)) YYERROR_MSG("SampleAggregateExpression: cannot create expr"); } } +#line 4341 "sparql_parser.c" /* yacc.c:1646 */ break; case 64: - -/* Line 1806 of yacc.c */ -#line 1094 "./sparql_parser.y" +#line 1107 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.seq) = NULL; - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "CONSTRUCT can only be used with a SPARQL query"); YYERROR; } - (yyval.seq) = (yyvsp[(2) - (5)].seq); + (yyval.seq) = (yyvsp[-3].seq); - if((yyvsp[(3) - (5)].seq)) - rasqal_query_add_data_graphs((rasqal_query*)rq, (yyvsp[(3) - (5)].seq)); - ((rasqal_query*)rq)->query_graph_pattern = (yyvsp[(4) - (5)].graph_pattern); + if((yyvsp[-2].seq)) + rasqal_query_add_data_graphs(rq, (yyvsp[-2].seq)); + rq->query_graph_pattern = (yyvsp[-1].graph_pattern); - if((yyvsp[(5) - (5)].modifier)) - ((rasqal_query*)rq)->modifier = (yyvsp[(5) - (5)].modifier); + if((yyvsp[0].modifier)) + rq->modifier = (yyvsp[0].modifier); } +#line 4367 "sparql_parser.c" /* yacc.c:1646 */ break; case 65: - -/* Line 1806 of yacc.c */ -#line 1116 "./sparql_parser.y" +#line 1129 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_graph_pattern* where_gp; raptor_sequence* seq = NULL; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "CONSTRUCT can only be used with a SPARQL query"); YYERROR; } - if((yyvsp[(5) - (7)].seq)) { + if((yyvsp[-2].seq)) { int i; - int size = raptor_sequence_size((yyvsp[(5) - (7)].seq)); + int size = raptor_sequence_size((yyvsp[-2].seq)); seq = raptor_new_sequence((raptor_data_free_handler)rasqal_free_triple, (raptor_data_print_handler)rasqal_triple_print); for(i = 0; i < size; i++) { - rasqal_triple* t = (rasqal_triple*)raptor_sequence_get_at((yyvsp[(5) - (7)].seq), i); + rasqal_triple* t = (rasqal_triple*)raptor_sequence_get_at((yyvsp[-2].seq), i); t = rasqal_new_triple_from_triple(t); raptor_sequence_push(seq, t); } } - where_gp = rasqal_new_basic_graph_pattern_from_triples((rasqal_query*)rq, seq); + where_gp = rasqal_new_basic_graph_pattern_from_triples(rq, seq); seq = NULL; if(!where_gp) YYERROR_MSG("ConstructQuery: cannot create graph pattern"); - (yyval.seq) = (yyvsp[(5) - (7)].seq); + (yyval.seq) = (yyvsp[-2].seq); - if((yyvsp[(2) - (7)].seq)) - rasqal_query_add_data_graphs((rasqal_query*)rq, (yyvsp[(2) - (7)].seq)); - ((rasqal_query*)rq)->query_graph_pattern = where_gp; + if((yyvsp[-5].seq)) + rasqal_query_add_data_graphs(rq, (yyvsp[-5].seq)); + rq->query_graph_pattern = where_gp; - if((yyvsp[(7) - (7)].modifier)) - ((rasqal_query*)rq)->modifier = (yyvsp[(7) - (7)].modifier); + if((yyvsp[0].modifier)) + rq->modifier = (yyvsp[0].modifier); } +#line 4412 "sparql_parser.c" /* yacc.c:1646 */ break; case 66: - -/* Line 1806 of yacc.c */ -#line 1162 "./sparql_parser.y" +#line 1175 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.seq) = NULL; - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "DESCRIBE can only be used with a SPARQL query"); YYERROR; } - (yyval.seq) = (yyvsp[(2) - (5)].seq); + (yyval.seq) = (yyvsp[-3].seq); - if((yyvsp[(3) - (5)].seq)) - rasqal_query_add_data_graphs((rasqal_query*)rq, (yyvsp[(3) - (5)].seq)); + if((yyvsp[-2].seq)) + rasqal_query_add_data_graphs(rq, (yyvsp[-2].seq)); - ((rasqal_query*)rq)->query_graph_pattern = (yyvsp[(4) - (5)].graph_pattern); + rq->query_graph_pattern = (yyvsp[-1].graph_pattern); - if((yyvsp[(5) - (5)].modifier)) - ((rasqal_query*)rq)->modifier = (yyvsp[(5) - (5)].modifier); + if((yyvsp[0].modifier)) + rq->modifier = (yyvsp[0].modifier); } +#line 4439 "sparql_parser.c" /* yacc.c:1646 */ break; case 67: - -/* Line 1806 of yacc.c */ -#line 1186 "./sparql_parser.y" +#line 1199 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; - if((yyvsp[(3) - (5)].seq)) - rasqal_query_add_data_graphs((rasqal_query*)rq, (yyvsp[(3) - (5)].seq)); + if((yyvsp[-2].seq)) + rasqal_query_add_data_graphs(rq, (yyvsp[-2].seq)); - ((rasqal_query*)rq)->query_graph_pattern = (yyvsp[(4) - (5)].graph_pattern); + rq->query_graph_pattern = (yyvsp[-1].graph_pattern); - if((yyvsp[(5) - (5)].modifier)) - ((rasqal_query*)rq)->modifier = (yyvsp[(5) - (5)].modifier); + if((yyvsp[0].modifier)) + rq->modifier = (yyvsp[0].modifier); } +#line 4455 "sparql_parser.c" /* yacc.c:1646 */ break; case 68: - -/* Line 1806 of yacc.c */ -#line 1202 "./sparql_parser.y" +#line 1215 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].literal))) { + (yyval.seq) = (yyvsp[-1].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].literal))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("VarOrIRIrefList 1: sequence push failed"); } } +#line 4468 "sparql_parser.c" /* yacc.c:1646 */ break; case 69: - -/* Line 1806 of yacc.c */ -#line 1211 "./sparql_parser.y" +#line 1224 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (3)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(3) - (3)].literal))) { + (yyval.seq) = (yyvsp[-2].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].literal))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("VarOrIRIrefList 2: sequence push failed"); } } +#line 4481 "sparql_parser.c" /* yacc.c:1646 */ break; case 70: - -/* Line 1806 of yacc.c */ -#line 1220 "./sparql_parser.y" +#line 1233 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_literal, (raptor_data_print_handler)rasqal_literal_print); if(!(yyval.seq)) YYERROR_MSG("VarOrIRIrefList 3: cannot create seq"); - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].literal))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].literal))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("VarOrIRIrefList 3: sequence push failed"); } } +#line 4497 "sparql_parser.c" /* yacc.c:1646 */ break; case 71: - -/* Line 1806 of yacc.c */ -#line 1237 "./sparql_parser.y" +#line 1250 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "ASK can only be used with a SPARQL query"); YYERROR; } - if((yyvsp[(2) - (3)].seq)) - rasqal_query_add_data_graphs((rasqal_query*)rq, (yyvsp[(2) - (3)].seq)); + if((yyvsp[-1].seq)) + rasqal_query_add_data_graphs(rq, (yyvsp[-1].seq)); - ((rasqal_query*)rq)->query_graph_pattern = (yyvsp[(3) - (3)].graph_pattern); + rq->query_graph_pattern = (yyvsp[0].graph_pattern); } +#line 4517 "sparql_parser.c" /* yacc.c:1646 */ break; case 72: - -/* Line 1806 of yacc.c */ -#line 1257 "./sparql_parser.y" +#line 1270 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.data_graph) = (yyvsp[(2) - (2)].data_graph); + (yyval.data_graph) = (yyvsp[0].data_graph); } +#line 4525 "sparql_parser.c" /* yacc.c:1646 */ break; case 73: - -/* Line 1806 of yacc.c */ -#line 1261 "./sparql_parser.y" +#line 1274 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.data_graph) = (yyvsp[(2) - (2)].data_graph); + (yyval.data_graph) = (yyvsp[0].data_graph); } +#line 4533 "sparql_parser.c" /* yacc.c:1646 */ break; case 74: - -/* Line 1806 of yacc.c */ -#line 1269 "./sparql_parser.y" +#line 1282 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.uri) = (yyvsp[(2) - (2)].uri); + (yyval.uri) = (yyvsp[0].uri); } +#line 4541 "sparql_parser.c" /* yacc.c:1646 */ break; case 75: - -/* Line 1806 of yacc.c */ -#line 1277 "./sparql_parser.y" +#line 1290 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE can only be used with a SPARQL 1.1 Update"); YYERROR; } /* LAQRS: experimental syntax */ - sparql_syntax_warning(((rasqal_query*)rq), + sparql_syntax_warning(rq, "DELETE FROM ... WHERE ... is deprecated LAQRS syntax."); - if((yyvsp[(2) - (3)].seq)) - rasqal_query_add_data_graphs((rasqal_query*)rq, (yyvsp[(2) - (3)].seq)); + if((yyvsp[-1].seq)) + rasqal_query_add_data_graphs(rq, (yyvsp[-1].seq)); - ((rasqal_query*)rq)->query_graph_pattern = (yyvsp[(3) - (3)].graph_pattern); + rq->query_graph_pattern = (yyvsp[0].graph_pattern); } +#line 4565 "sparql_parser.c" /* yacc.c:1646 */ break; case 76: - -/* Line 1806 of yacc.c */ -#line 1297 "./sparql_parser.y" +#line 1310 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -5529,29 +4586,28 @@ NULL /* graph_uri */, NULL /* document_uri */, NULL /* insert templates */, - (yyvsp[(3) - (5)].seq) /* delete templates */, - (yyvsp[(5) - (5)].graph_pattern) /* where */, + (yyvsp[-2].seq) /* delete templates */, + (yyvsp[0].graph_pattern) /* where */, 0 /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("DeleteQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("DeleteQuery: rasqal_query_add_update_operation failed"); } } +#line 4601 "sparql_parser.c" /* yacc.c:1646 */ break; case 77: - -/* Line 1806 of yacc.c */ -#line 1329 "./sparql_parser.y" +#line 1342 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -5559,27 +4615,26 @@ /* SPARQL 1.1 (Draft) update: * deleting inline triples - not inserting from graph URIs */ - (yyvsp[(4) - (5)].update)->type = RASQAL_UPDATE_TYPE_UPDATE; - (yyvsp[(4) - (5)].update)->delete_templates = (yyvsp[(4) - (5)].update)->insert_templates; (yyvsp[(4) - (5)].update)->insert_templates = NULL; - (yyvsp[(4) - (5)].update)->flags |= RASQAL_UPDATE_FLAGS_DATA; + (yyvsp[-1].update)->type = RASQAL_UPDATE_TYPE_UPDATE; + (yyvsp[-1].update)->delete_templates = (yyvsp[-1].update)->insert_templates; (yyvsp[-1].update)->insert_templates = NULL; + (yyvsp[-1].update)->flags |= RASQAL_UPDATE_FLAGS_DATA; - rasqal_query_add_update_operation((rasqal_query*)rq, (yyvsp[(4) - (5)].update)); + rasqal_query_add_update_operation(rq, (yyvsp[-1].update)); } +#line 4625 "sparql_parser.c" /* yacc.c:1646 */ break; case 78: - -/* Line 1806 of yacc.c */ -#line 1349 "./sparql_parser.y" +#line 1362 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; raptor_sequence* delete_templates = NULL; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE WHERE { } can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -5589,10 +4644,10 @@ */ /* Turn GP into flattened triples */ - if((yyvsp[(3) - (3)].graph_pattern)) { - delete_templates = rasqal_graph_pattern_get_flattened_triples((rasqal_query*)rq, (yyvsp[(3) - (3)].graph_pattern)); - rasqal_free_graph_pattern((yyvsp[(3) - (3)].graph_pattern)); - (yyvsp[(3) - (3)].graph_pattern) = NULL; + if((yyvsp[0].graph_pattern)) { + delete_templates = rasqal_graph_pattern_get_flattened_triples(rq, (yyvsp[0].graph_pattern)); + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); + (yyvsp[0].graph_pattern) = NULL; } update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_UPDATE, @@ -5606,50 +4661,48 @@ if(!update) { YYERROR_MSG("DeleteQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("DeleteQuery: rasqal_query_add_update_operation failed"); } } +#line 4669 "sparql_parser.c" /* yacc.c:1646 */ break; case 79: - -/* Line 1806 of yacc.c */ -#line 1393 "./sparql_parser.y" +#line 1406 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.update) = NULL; - if((yyvsp[(1) - (1)].formula)) { + if((yyvsp[0].formula)) { (yyval.update) = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_UNKNOWN, NULL /* graph_uri */, NULL /* document_uri */, - (yyvsp[(1) - (1)].formula)->triples /* insert templates */, + (yyvsp[0].formula)->triples /* insert templates */, NULL /* delete templates */, NULL /* where */, 0 /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); - (yyvsp[(1) - (1)].formula)->triples = NULL; - rasqal_free_formula((yyvsp[(1) - (1)].formula)); + (yyvsp[0].formula)->triples = NULL; + rasqal_free_formula((yyvsp[0].formula)); } } +#line 4690 "sparql_parser.c" /* yacc.c:1646 */ break; case 80: - -/* Line 1806 of yacc.c */ -#line 1410 "./sparql_parser.y" +#line 1423 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.update) = NULL; - if((yyvsp[(4) - (5)].formula)) { + if((yyvsp[-1].formula)) { raptor_sequence* seq; - seq = (yyvsp[(4) - (5)].formula)->triples; + seq = (yyvsp[-1].formula)->triples; - if((yyvsp[(2) - (5)].uri)) { + if((yyvsp[-3].uri)) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, (yyvsp[(2) - (5)].uri)); - (yyvsp[(2) - (5)].uri) = NULL; + origin_literal = rasqal_new_uri_literal(rq->world, (yyvsp[-3].uri)); + (yyvsp[-3].uri) = NULL; rasqal_triples_sequence_set_origin(/* dest */ NULL, seq, origin_literal); rasqal_free_literal(origin_literal); @@ -5662,111 +4715,104 @@ NULL /* where */, 0 /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); - (yyvsp[(4) - (5)].formula)->triples = NULL; - rasqal_free_formula((yyvsp[(4) - (5)].formula)); + (yyvsp[-1].formula)->triples = NULL; + rasqal_free_formula((yyvsp[-1].formula)); } } +#line 4723 "sparql_parser.c" /* yacc.c:1646 */ break; case 81: - -/* Line 1806 of yacc.c */ -#line 1443 "./sparql_parser.y" +#line 1456 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(4) - (5)].seq); + (yyval.seq) = (yyvsp[-1].seq); - if((yyvsp[(2) - (5)].literal)) { - rasqal_triples_sequence_set_origin(NULL, (yyval.seq), (yyvsp[(2) - (5)].literal)); - rasqal_free_literal((yyvsp[(2) - (5)].literal)); - (yyvsp[(2) - (5)].literal) = NULL; + if((yyvsp[-3].literal)) { + rasqal_triples_sequence_set_origin(NULL, (yyval.seq), (yyvsp[-3].literal)); + rasqal_free_literal((yyvsp[-3].literal)); + (yyvsp[-3].literal) = NULL; } } +#line 4737 "sparql_parser.c" /* yacc.c:1646 */ break; case 82: - -/* Line 1806 of yacc.c */ -#line 1458 "./sparql_parser.y" +#line 1471 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 4745 "sparql_parser.c" /* yacc.c:1646 */ break; case 83: - -/* Line 1806 of yacc.c */ -#line 1462 "./sparql_parser.y" +#line 1475 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 4753 "sparql_parser.c" /* yacc.c:1646 */ break; case 84: - -/* Line 1806 of yacc.c */ -#line 1470 "./sparql_parser.y" +#line 1483 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); + (yyval.seq) = (yyvsp[-1].seq); - if((yyvsp[(2) - (2)].seq)) { - if(raptor_sequence_join((yyval.seq), (yyvsp[(2) - (2)].seq))) { - raptor_free_sequence((yyvsp[(2) - (2)].seq)); + if((yyvsp[0].seq)) { + if(raptor_sequence_join((yyval.seq), (yyvsp[0].seq))) { + raptor_free_sequence((yyvsp[0].seq)); raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("ModifyTemplateList: sequence join failed"); } - raptor_free_sequence((yyvsp[(2) - (2)].seq)); + raptor_free_sequence((yyvsp[0].seq)); } } +#line 4772 "sparql_parser.c" /* yacc.c:1646 */ break; case 85: - -/* Line 1806 of yacc.c */ -#line 1485 "./sparql_parser.y" +#line 1498 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 4780 "sparql_parser.c" /* yacc.c:1646 */ break; case 86: - -/* Line 1806 of yacc.c */ -#line 1494 "./sparql_parser.y" +#line 1507 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "INSERT can only be used with a SPARQL 1.1 Update"); YYERROR; } /* LAQRS: experimental syntax */ - sparql_syntax_warning(((rasqal_query*)rq), + sparql_syntax_warning(rq, "INSERT FROM ... WHERE ... is deprecated LAQRS syntax."); - if((yyvsp[(2) - (3)].seq)) - rasqal_query_add_data_graphs((rasqal_query*)rq, (yyvsp[(2) - (3)].seq)); + if((yyvsp[-1].seq)) + rasqal_query_add_data_graphs(rq, (yyvsp[-1].seq)); - ((rasqal_query*)rq)->query_graph_pattern = (yyvsp[(3) - (3)].graph_pattern); + rq->query_graph_pattern = (yyvsp[0].graph_pattern); } +#line 4804 "sparql_parser.c" /* yacc.c:1646 */ break; case 87: - -/* Line 1806 of yacc.c */ -#line 1514 "./sparql_parser.y" +#line 1527 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "INSERT can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -5776,66 +4822,64 @@ update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_UPDATE, NULL /* graph_uri */, NULL /* document_uri */, - (yyvsp[(3) - (5)].seq) /* insert templates */, + (yyvsp[-2].seq) /* insert templates */, NULL /* delete templates */, - (yyvsp[(5) - (5)].graph_pattern) /* where */, + (yyvsp[0].graph_pattern) /* where */, 0 /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("InsertQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("InsertQuery: rasqal_query_add_update_operation failed"); } } +#line 4838 "sparql_parser.c" /* yacc.c:1646 */ break; case 88: - -/* Line 1806 of yacc.c */ -#line 1544 "./sparql_parser.y" +#line 1557 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "INSERT DATA can only be used with a SPARQL 1.1 Update"); YYERROR; } /* inserting inline atomic triples (no variables) - not via template */ - (yyvsp[(4) - (5)].update)->type = RASQAL_UPDATE_TYPE_UPDATE; - (yyvsp[(4) - (5)].update)->flags |= RASQAL_UPDATE_FLAGS_DATA; + (yyvsp[-1].update)->type = RASQAL_UPDATE_TYPE_UPDATE; + (yyvsp[-1].update)->flags |= RASQAL_UPDATE_FLAGS_DATA; - rasqal_query_add_update_operation((rasqal_query*)rq, (yyvsp[(4) - (5)].update)); + rasqal_query_add_update_operation(rq, (yyvsp[-1].update)); } +#line 4859 "sparql_parser.c" /* yacc.c:1646 */ break; case 89: - -/* Line 1806 of yacc.c */ -#line 1567 "./sparql_parser.y" +#line 1580 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } - if((yyvsp[(2) - (11)].uri)) { + if((yyvsp[-9].uri)) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, (yyvsp[(2) - (11)].uri)); - (yyvsp[(2) - (11)].uri) = NULL; + origin_literal = rasqal_new_uri_literal(rq->world, (yyvsp[-9].uri)); + (yyvsp[-9].uri) = NULL; - rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[(9) - (11)].seq), origin_literal); - rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[(5) - (11)].seq), origin_literal); + rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[-2].seq), origin_literal); + rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[-6].seq), origin_literal); rasqal_free_literal(origin_literal); } @@ -5844,43 +4888,42 @@ update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_UPDATE, NULL /* graph uri */, NULL /* document uri */, - (yyvsp[(9) - (11)].seq) /* insert templates */, - (yyvsp[(5) - (11)].seq) /* delete templates */, - (yyvsp[(11) - (11)].graph_pattern) /* where */, + (yyvsp[-2].seq) /* insert templates */, + (yyvsp[-6].seq) /* delete templates */, + (yyvsp[0].graph_pattern) /* where */, 0 /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("UpdateQuery 1: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("UpdateQuery 1: rasqal_query_add_update_operation failed"); } } +#line 4904 "sparql_parser.c" /* yacc.c:1646 */ break; case 90: - -/* Line 1806 of yacc.c */ -#line 1610 "./sparql_parser.y" +#line 1623 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } - if((yyvsp[(2) - (7)].uri)) { + if((yyvsp[-5].uri)) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, (yyvsp[(2) - (7)].uri)); - (yyvsp[(2) - (7)].uri) = NULL; + origin_literal = rasqal_new_uri_literal(rq->world, (yyvsp[-5].uri)); + (yyvsp[-5].uri) = NULL; - rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[(5) - (7)].seq), origin_literal); + rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[-2].seq), origin_literal); rasqal_free_literal(origin_literal); } @@ -5890,42 +4933,41 @@ NULL /* graph uri */, NULL /* document uri */, NULL /* insert templates */, - (yyvsp[(5) - (7)].seq) /* delete templates */, - (yyvsp[(7) - (7)].graph_pattern) /* where */, + (yyvsp[-2].seq) /* delete templates */, + (yyvsp[0].graph_pattern) /* where */, 0 /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("UpdateQuery 2: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("UpdateQuery 2: rasqal_query_add_update_operation failed"); } } +#line 4948 "sparql_parser.c" /* yacc.c:1646 */ break; case 91: - -/* Line 1806 of yacc.c */ -#line 1652 "./sparql_parser.y" +#line 1665 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } - if((yyvsp[(2) - (7)].uri)) { + if((yyvsp[-5].uri)) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, (yyvsp[(2) - (7)].uri)); - (yyvsp[(2) - (7)].uri) = NULL; + origin_literal = rasqal_new_uri_literal(rq->world, (yyvsp[-5].uri)); + (yyvsp[-5].uri) = NULL; - rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[(5) - (7)].seq), origin_literal); + rasqal_triples_sequence_set_origin(/* dest */ NULL, (yyvsp[-2].seq), origin_literal); rasqal_free_literal(origin_literal); } @@ -5934,149 +4976,141 @@ update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_UPDATE, NULL /* graph uri */, NULL /* document uri */, - (yyvsp[(5) - (7)].seq) /* insert templates */, + (yyvsp[-2].seq) /* insert templates */, NULL /* delete templates */, - (yyvsp[(7) - (7)].graph_pattern) /* where */, + (yyvsp[0].graph_pattern) /* where */, 0 /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("UpdateQuery 3: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("UpdateQuery 3: rasqal_query_add_update_operation failed"); } } +#line 4992 "sparql_parser.c" /* yacc.c:1646 */ break; case 92: - -/* Line 1806 of yacc.c */ -#line 1693 "./sparql_parser.y" +#line 1706 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } /* inserting inline atomic triples (no variables) - not via template */ - (yyvsp[(6) - (7)].update)->graph_uri = (yyvsp[(2) - (7)].uri); /* graph uri */ - (yyvsp[(6) - (7)].update)->type = RASQAL_UPDATE_TYPE_UPDATE; - (yyvsp[(6) - (7)].update)->flags |= RASQAL_UPDATE_FLAGS_DATA; + (yyvsp[-1].update)->graph_uri = (yyvsp[-5].uri); /* graph uri */ + (yyvsp[-1].update)->type = RASQAL_UPDATE_TYPE_UPDATE; + (yyvsp[-1].update)->flags |= RASQAL_UPDATE_FLAGS_DATA; - rasqal_query_add_update_operation((rasqal_query*)rq, (yyvsp[(6) - (7)].update)); + rasqal_query_add_update_operation(rq, (yyvsp[-1].update)); } +#line 5015 "sparql_parser.c" /* yacc.c:1646 */ break; case 93: - -/* Line 1806 of yacc.c */ -#line 1716 "./sparql_parser.y" +#line 1729 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.uri_applies) = new_uri_applies((yyvsp[(1) - (1)].uri), RASQAL_UPDATE_GRAPH_ONE); + (yyval.uri_applies) = new_uri_applies((yyvsp[0].uri), RASQAL_UPDATE_GRAPH_ONE); } +#line 5023 "sparql_parser.c" /* yacc.c:1646 */ break; case 94: - -/* Line 1806 of yacc.c */ -#line 1720 "./sparql_parser.y" +#line 1733 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.uri_applies) = new_uri_applies(NULL, RASQAL_UPDATE_GRAPH_DEFAULT); } +#line 5031 "sparql_parser.c" /* yacc.c:1646 */ break; case 95: - -/* Line 1806 of yacc.c */ -#line 1724 "./sparql_parser.y" +#line 1737 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.uri_applies) = new_uri_applies(NULL, RASQAL_UPDATE_GRAPH_NAMED); } +#line 5039 "sparql_parser.c" /* yacc.c:1646 */ break; case 96: - -/* Line 1806 of yacc.c */ -#line 1728 "./sparql_parser.y" +#line 1741 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.uri_applies) = new_uri_applies(NULL, RASQAL_UPDATE_GRAPH_ALL); } +#line 5047 "sparql_parser.c" /* yacc.c:1646 */ break; case 97: - -/* Line 1806 of yacc.c */ -#line 1732 "./sparql_parser.y" +#line 1745 "./sparql_parser.y" /* yacc.c:1646 */ { /* Early draft syntax - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "CLEAR GRAPH DEFAULT is replaced by CLEAR DEFAULT in later SPARQL 1.1 drafts"); (yyval.uri_applies) = new_uri_applies(NULL, RASQAL_UPDATE_GRAPH_DEFAULT); } +#line 5060 "sparql_parser.c" /* yacc.c:1646 */ break; case 98: - -/* Line 1806 of yacc.c */ -#line 1745 "./sparql_parser.y" +#line 1758 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CLEAR (SILENT) DEFAULT | NAMED | ALL can only be used with a SPARQL 1.1 Update"); YYERROR; } - if((yyvsp[(3) - (3)].uri_applies)) { + if((yyvsp[0].uri_applies)) { update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_CLEAR, - (yyvsp[(3) - (3)].uri_applies)->uri ? raptor_uri_copy((yyvsp[(3) - (3)].uri_applies)->uri) : NULL /* graph uri or NULL */, + (yyvsp[0].uri_applies)->uri ? raptor_uri_copy((yyvsp[0].uri_applies)->uri) : NULL /* graph uri or NULL */, NULL /* document uri */, NULL, NULL, NULL /*where */, - (yyvsp[(2) - (3)].integer) /* flags */, - (yyvsp[(3) - (3)].uri_applies)->applies /* applies */); - free_uri_applies((yyvsp[(3) - (3)].uri_applies)); - (yyvsp[(3) - (3)].uri_applies) = NULL; + (yyvsp[-1].integer) /* flags */, + (yyvsp[0].uri_applies)->applies /* applies */); + free_uri_applies((yyvsp[0].uri_applies)); + (yyvsp[0].uri_applies) = NULL; if(!update) { YYERROR_MSG("ClearQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("ClearQuery: rasqal_query_add_update_operation failed"); } } } +#line 5096 "sparql_parser.c" /* yacc.c:1646 */ break; case 99: - -/* Line 1806 of yacc.c */ -#line 1777 "./sparql_parser.y" +#line 1790 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CLEAR can only be used with a SPARQL 1.1 Update"); YYERROR; } /* Early draft syntax - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "CLEAR is replaced by CLEAR DEFAULT in later SPARQL 1.1 drafts"); update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_CLEAR, @@ -6089,84 +5123,80 @@ if(!update) { YYERROR_MSG("ClearQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("ClearQuery: rasqal_query_add_update_operation failed"); } } +#line 5131 "sparql_parser.c" /* yacc.c:1646 */ break; case 100: - -/* Line 1806 of yacc.c */ -#line 1812 "./sparql_parser.y" +#line 1825 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.integer) = RASQAL_UPDATE_FLAGS_SILENT; } +#line 5139 "sparql_parser.c" /* yacc.c:1646 */ break; case 101: - -/* Line 1806 of yacc.c */ -#line 1816 "./sparql_parser.y" +#line 1829 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } +#line 5147 "sparql_parser.c" /* yacc.c:1646 */ break; case 102: - -/* Line 1806 of yacc.c */ -#line 1824 "./sparql_parser.y" +#line 1837 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CREATE (SILENT) can only be used with a SPARQL 1.1 Update"); YYERROR; } update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_CREATE, - (yyvsp[(3) - (3)].uri) /* graph uri */, + (yyvsp[0].uri) /* graph uri */, NULL /* document uri */, NULL, NULL, NULL /*where */, - (yyvsp[(2) - (3)].integer) /* flags */, + (yyvsp[-1].integer) /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("CreateQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("CreateQuery: rasqal_query_add_update_operation failed"); } } +#line 5178 "sparql_parser.c" /* yacc.c:1646 */ break; case 103: - -/* Line 1806 of yacc.c */ -#line 1851 "./sparql_parser.y" +#line 1864 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CREATE (SILENT) GRAPH can only be used with a SPARQL 1.1 Update"); YYERROR; } /* Early draft syntax - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "CREATE (SILENT) GRAPH is replaced by CREATE (SILENT) in later SPARQL 1.1 drafts"); update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_CREATE, - (yyvsp[(3) - (3)].uri) /* graph uri */, + (yyvsp[0].uri) /* graph uri */, NULL /* document uri */, NULL, NULL, NULL /*where */, @@ -6175,1043 +5205,975 @@ if(!update) { YYERROR_MSG("CreateQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("CreateQuery: rasqal_query_add_update_operation failed"); } } +#line 5213 "sparql_parser.c" /* yacc.c:1646 */ break; case 104: - -/* Line 1806 of yacc.c */ -#line 1886 "./sparql_parser.y" +#line 1899 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DROP (SILENT) DEFAULT | NAMED | ALL can only be used with a SPARQL 1.1 Update"); YYERROR; } - if((yyvsp[(3) - (3)].uri_applies)) { + if((yyvsp[0].uri_applies)) { update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_DROP, - (yyvsp[(3) - (3)].uri_applies)->uri ? raptor_uri_copy((yyvsp[(3) - (3)].uri_applies)->uri) : NULL /* graph uri or NULL */, + (yyvsp[0].uri_applies)->uri ? raptor_uri_copy((yyvsp[0].uri_applies)->uri) : NULL /* graph uri or NULL */, NULL /* document uri */, NULL, NULL, NULL /*where */, - (yyvsp[(2) - (3)].integer) /* flags */, - (yyvsp[(3) - (3)].uri_applies)->applies /* applies */); - free_uri_applies((yyvsp[(3) - (3)].uri_applies)); - (yyvsp[(3) - (3)].uri_applies) = NULL; + (yyvsp[-1].integer) /* flags */, + (yyvsp[0].uri_applies)->applies /* applies */); + free_uri_applies((yyvsp[0].uri_applies)); + (yyvsp[0].uri_applies) = NULL; if(!update) { YYERROR_MSG("DropQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("DropQuery: rasqal_query_add_update_operation failed"); } } } +#line 5249 "sparql_parser.c" /* yacc.c:1646 */ break; case 105: - -/* Line 1806 of yacc.c */ -#line 1922 "./sparql_parser.y" +#line 1935 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].uri))) { + (yyval.seq) = (yyvsp[-1].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].uri))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("IriRefList 1: sequence push failed"); } } +#line 5262 "sparql_parser.c" /* yacc.c:1646 */ break; case 106: - -/* Line 1806 of yacc.c */ -#line 1931 "./sparql_parser.y" +#line 1944 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)raptor_free_uri, (raptor_data_print_handler)raptor_uri_print); if(!(yyval.seq)) { - if((yyvsp[(1) - (1)].uri)) - raptor_free_uri((yyvsp[(1) - (1)].uri)); + if((yyvsp[0].uri)) + raptor_free_uri((yyvsp[0].uri)); YYERROR_MSG("IriRefList 2: cannot create sequence"); } - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].uri))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].uri))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("IriRefList 2: sequence push failed"); } } +#line 5281 "sparql_parser.c" /* yacc.c:1646 */ break; case 107: - -/* Line 1806 of yacc.c */ -#line 1950 "./sparql_parser.y" +#line 1963 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.uri) = NULL; } +#line 5289 "sparql_parser.c" /* yacc.c:1646 */ break; case 108: - -/* Line 1806 of yacc.c */ -#line 1954 "./sparql_parser.y" +#line 1967 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.uri) = (yyvsp[(1) - (1)].uri); + (yyval.uri) = (yyvsp[0].uri); } +#line 5297 "sparql_parser.c" /* yacc.c:1646 */ break; case 109: - -/* Line 1806 of yacc.c */ -#line 1961 "./sparql_parser.y" +#line 1974 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.uri) = (yyvsp[(1) - (1)].uri); + (yyval.uri) = (yyvsp[0].uri); } +#line 5305 "sparql_parser.c" /* yacc.c:1646 */ break; case 110: - -/* Line 1806 of yacc.c */ -#line 1965 "./sparql_parser.y" +#line 1978 "./sparql_parser.y" /* yacc.c:1646 */ { /* Early draft syntax allowed a list of URIs - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "LOAD INTO is replaced by LOAD INTO GRAPH in later SPARQL 1.1 drafts"); - (yyval.uri) = (yyvsp[(1) - (1)].uri); + (yyval.uri) = (yyvsp[0].uri); } +#line 5317 "sparql_parser.c" /* yacc.c:1646 */ break; case 111: - -/* Line 1806 of yacc.c */ -#line 1973 "./sparql_parser.y" +#line 1986 "./sparql_parser.y" /* yacc.c:1646 */ { /* Early draft syntax allowed a list of URIs - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "LOAD INTO DEFAULT is replaced by LOAD in later SPARQL 1.1 drafts"); (yyval.uri) = NULL; } +#line 5329 "sparql_parser.c" /* yacc.c:1646 */ break; case 112: - -/* Line 1806 of yacc.c */ -#line 1985 "./sparql_parser.y" +#line 1998 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "LOAD can only be used with a SPARQL 1.1 Update"); YYERROR; } update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_LOAD, NULL /* graph uri */, - (yyvsp[(3) - (3)].uri) /* document uri */, + (yyvsp[0].uri) /* document uri */, NULL, NULL, NULL /* where */, - (yyvsp[(2) - (3)].integer) /* flags */, + (yyvsp[-1].integer) /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("LoadQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("LoadQuery: rasqal_query_add_update_operation failed"); } } +#line 5360 "sparql_parser.c" /* yacc.c:1646 */ break; case 113: - -/* Line 1806 of yacc.c */ -#line 2012 "./sparql_parser.y" +#line 2025 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; int i; raptor_uri* doc_uri; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "LOAD INTO GRAPH / DEFAULT can only be used with a SPARQL 1.1 Update"); YYERROR; } - for(i = 0; (doc_uri = (raptor_uri*)raptor_sequence_get_at((yyvsp[(3) - (5)].seq), i)); i++) { + for(i = 0; (doc_uri = (raptor_uri*)raptor_sequence_get_at((yyvsp[-2].seq), i)); i++) { rasqal_update_operation* update; update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_LOAD, - (yyvsp[(5) - (5)].uri) ? raptor_uri_copy((yyvsp[(5) - (5)].uri)) : NULL /* graph uri */, + (yyvsp[0].uri) ? raptor_uri_copy((yyvsp[0].uri)) : NULL /* graph uri */, raptor_uri_copy(doc_uri) /* document uri */, NULL, NULL, NULL /*where */, - (yyvsp[(2) - (5)].integer) /* flags */, + (yyvsp[-3].integer) /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("LoadQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("LoadQuery: rasqal_query_add_update_operation failed"); } if(i == 1) /* Early draft syntax allowed a list of URIs - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "LOAD INTO / DEFAULT is replaced by LOAD INTO GRAPH or LOAD in later SPARQL 1.1 drafts"); } - raptor_free_sequence((yyvsp[(3) - (5)].seq)); - if((yyvsp[(5) - (5)].uri)) - raptor_free_uri((yyvsp[(5) - (5)].uri)); + raptor_free_sequence((yyvsp[-2].seq)); + if((yyvsp[0].uri)) + raptor_free_uri((yyvsp[0].uri)); } +#line 5406 "sparql_parser.c" /* yacc.c:1646 */ break; case 114: - -/* Line 1806 of yacc.c */ -#line 2058 "./sparql_parser.y" +#line 2071 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "ADD (SILENT) TO can only be used with a SPARQL 1.1 Update"); YYERROR; } update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_ADD, - (yyvsp[(3) - (5)].uri) /* graph uri or NULL */, - (yyvsp[(5) - (5)].uri) /* document uri */, + (yyvsp[-2].uri) /* graph uri or NULL */, + (yyvsp[0].uri) /* document uri */, NULL, NULL, NULL /*where */, - (yyvsp[(2) - (5)].integer) /* flags */, + (yyvsp[-3].integer) /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("AddQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("AddQuery: rasqal_query_add_update_operation failed"); } } +#line 5437 "sparql_parser.c" /* yacc.c:1646 */ break; case 115: - -/* Line 1806 of yacc.c */ -#line 2089 "./sparql_parser.y" +#line 2102 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "MOVE (SILENT) TO can only be used with a SPARQL 1.1 Update"); YYERROR; } update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_MOVE, - (yyvsp[(3) - (5)].uri) /* graph uri or NULL */, - (yyvsp[(5) - (5)].uri) /* document uri */, + (yyvsp[-2].uri) /* graph uri or NULL */, + (yyvsp[0].uri) /* document uri */, NULL, NULL, NULL /*where */, - (yyvsp[(2) - (5)].integer) /* flags */, + (yyvsp[-3].integer) /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("MoveQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("MoveQuery: rasqal_query_add_update_operation failed"); } } +#line 5468 "sparql_parser.c" /* yacc.c:1646 */ break; case 116: - -/* Line 1806 of yacc.c */ -#line 2120 "./sparql_parser.y" +#line 2133 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "COPY (SILENT) TO can only be used with a SPARQL 1.1 Update"); YYERROR; } update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_COPY, - (yyvsp[(3) - (5)].uri) /* graph uri or NULL */, - (yyvsp[(5) - (5)].uri) /* document uri */, + (yyvsp[-2].uri) /* graph uri or NULL */, + (yyvsp[0].uri) /* document uri */, NULL, NULL, NULL /*where */, - (yyvsp[(2) - (5)].integer) /* flags */, + (yyvsp[-3].integer) /* flags */, RASQAL_UPDATE_GRAPH_ONE /* applies */); if(!update) { YYERROR_MSG("CopyQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("CopyQuery: rasqal_query_add_update_operation failed"); } } +#line 5499 "sparql_parser.c" /* yacc.c:1646 */ break; case 117: - -/* Line 1806 of yacc.c */ -#line 2151 "./sparql_parser.y" +#line 2164 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if((yyvsp[(1) - (2)].seq) && (yyvsp[(2) - (2)].data_graph)) - raptor_sequence_push((yyvsp[(1) - (2)].seq), (yyvsp[(2) - (2)].data_graph)); + (yyval.seq) = (yyvsp[-1].seq); + if((yyvsp[-1].seq) && (yyvsp[0].data_graph)) + raptor_sequence_push((yyvsp[-1].seq), (yyvsp[0].data_graph)); } +#line 5509 "sparql_parser.c" /* yacc.c:1646 */ break; case 118: - -/* Line 1806 of yacc.c */ -#line 2157 "./sparql_parser.y" +#line 2170 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_data_graph, (raptor_data_print_handler)rasqal_data_graph_print); - if((yyval.seq) && (yyvsp[(1) - (1)].data_graph)) - raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].data_graph)); + if((yyval.seq) && (yyvsp[0].data_graph)) + raptor_sequence_push((yyval.seq), (yyvsp[0].data_graph)); } +#line 5519 "sparql_parser.c" /* yacc.c:1646 */ break; case 119: - -/* Line 1806 of yacc.c */ -#line 2166 "./sparql_parser.y" +#line 2179 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 5527 "sparql_parser.c" /* yacc.c:1646 */ break; case 120: - -/* Line 1806 of yacc.c */ -#line 2170 "./sparql_parser.y" +#line 2183 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 5535 "sparql_parser.c" /* yacc.c:1646 */ break; case 121: - -/* Line 1806 of yacc.c */ -#line 2178 "./sparql_parser.y" +#line 2191 "./sparql_parser.y" /* yacc.c:1646 */ { - if((yyvsp[(1) - (1)].literal)) { - raptor_uri* uri = rasqal_literal_as_uri((yyvsp[(1) - (1)].literal)); + if((yyvsp[0].literal)) { + raptor_uri* uri = rasqal_literal_as_uri((yyvsp[0].literal)); rasqal_data_graph* dg; - dg = rasqal_new_data_graph_from_uri(((rasqal_query*)rq)->world, uri, + dg = rasqal_new_data_graph_from_uri(rq->world, uri, NULL, RASQAL_DATA_GRAPH_BACKGROUND, NULL, NULL, NULL); if(!dg) { - rasqal_free_literal((yyvsp[(1) - (1)].literal)); + rasqal_free_literal((yyvsp[0].literal)); YYERROR_MSG("DefaultGraphClause: rasqal_query_new_data_graph_from_uri() failed"); } - rasqal_free_literal((yyvsp[(1) - (1)].literal)); + rasqal_free_literal((yyvsp[0].literal)); (yyval.data_graph) = dg; } else (yyval.data_graph) = NULL; } +#line 5559 "sparql_parser.c" /* yacc.c:1646 */ break; case 122: - -/* Line 1806 of yacc.c */ -#line 2202 "./sparql_parser.y" +#line 2215 "./sparql_parser.y" /* yacc.c:1646 */ { - if((yyvsp[(2) - (2)].literal)) { - raptor_uri* uri = rasqal_literal_as_uri((yyvsp[(2) - (2)].literal)); + if((yyvsp[0].literal)) { + raptor_uri* uri = rasqal_literal_as_uri((yyvsp[0].literal)); rasqal_data_graph* dg; - dg = rasqal_new_data_graph_from_uri(((rasqal_query*)rq)->world, uri, + dg = rasqal_new_data_graph_from_uri(rq->world, uri, uri, RASQAL_DATA_GRAPH_NAMED, NULL, NULL, NULL); if(!dg) { - rasqal_free_literal((yyvsp[(2) - (2)].literal)); + rasqal_free_literal((yyvsp[0].literal)); YYERROR_MSG("NamedGraphClause: rasqal_query_new_data_graph_from_uri() failed"); } - rasqal_free_literal((yyvsp[(2) - (2)].literal)); + rasqal_free_literal((yyvsp[0].literal)); (yyval.data_graph) = dg; } else (yyval.data_graph) = NULL; } +#line 5582 "sparql_parser.c" /* yacc.c:1646 */ break; case 123: - -/* Line 1806 of yacc.c */ -#line 2225 "./sparql_parser.y" +#line 2238 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 5590 "sparql_parser.c" /* yacc.c:1646 */ break; case 124: - -/* Line 1806 of yacc.c */ -#line 2233 "./sparql_parser.y" +#line 2246 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(2) - (2)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 5598 "sparql_parser.c" /* yacc.c:1646 */ break; case 125: - -/* Line 1806 of yacc.c */ -#line 2237 "./sparql_parser.y" +#line 2250 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 5606 "sparql_parser.c" /* yacc.c:1646 */ break; case 126: - -/* Line 1806 of yacc.c */ -#line 2245 "./sparql_parser.y" +#line 2258 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 5614 "sparql_parser.c" /* yacc.c:1646 */ break; case 127: - -/* Line 1806 of yacc.c */ -#line 2249 "./sparql_parser.y" +#line 2262 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.graph_pattern) = NULL; } +#line 5622 "sparql_parser.c" /* yacc.c:1646 */ break; case 128: - -/* Line 1806 of yacc.c */ -#line 2257 "./sparql_parser.y" +#line 2270 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.modifier) = rasqal_new_solution_modifier((rasqal_query*)rq, - /* order_conditions */ (yyvsp[(3) - (4)].seq), - /* group_conditions */ (yyvsp[(1) - (4)].seq), - /* having_conditions */ (yyvsp[(2) - (4)].seq), - /* limit */ (yyvsp[(4) - (4)].limit_offset)[0], - /* offset */ (yyvsp[(4) - (4)].limit_offset)[1]); + (yyval.modifier) = rasqal_new_solution_modifier(rq, + /* order_conditions */ (yyvsp[-1].seq), + /* group_conditions */ (yyvsp[-3].seq), + /* having_conditions */ (yyvsp[-2].seq), + /* limit */ (yyvsp[0].limit_offset)[0], + /* offset */ (yyvsp[0].limit_offset)[1]); } +#line 5636 "sparql_parser.c" /* yacc.c:1646 */ break; case 129: - -/* Line 1806 of yacc.c */ -#line 2271 "./sparql_parser.y" +#line 2284 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if((yyvsp[(2) - (2)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].expr))) { + (yyval.seq) = (yyvsp[-1].seq); + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("GroupConditionList 1: sequence push failed"); } } +#line 5650 "sparql_parser.c" /* yacc.c:1646 */ break; case 130: - -/* Line 1806 of yacc.c */ -#line 2281 "./sparql_parser.y" +#line 2294 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); if(!(yyval.seq)) { - if((yyvsp[(1) - (1)].expr)) - rasqal_free_expression((yyvsp[(1) - (1)].expr)); + if((yyvsp[0].expr)) + rasqal_free_expression((yyvsp[0].expr)); YYERROR_MSG("GroupConditionList 2: cannot create sequence"); } - if((yyvsp[(1) - (1)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].expr))) { + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("GroupConditionList 2: sequence push failed"); } } +#line 5670 "sparql_parser.c" /* yacc.c:1646 */ break; case 131: - -/* Line 1806 of yacc.c */ -#line 2301 "./sparql_parser.y" +#line 2314 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = (yyvsp[(2) - (2)].variable); + (yyval.variable) = (yyvsp[0].variable); } +#line 5678 "sparql_parser.c" /* yacc.c:1646 */ break; case 132: - -/* Line 1806 of yacc.c */ -#line 2305 "./sparql_parser.y" +#line 2318 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.variable) = NULL; } +#line 5686 "sparql_parser.c" /* yacc.c:1646 */ break; case 133: - -/* Line 1806 of yacc.c */ -#line 2313 "./sparql_parser.y" +#line 2326 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 5694 "sparql_parser.c" /* yacc.c:1646 */ break; case 134: - -/* Line 1806 of yacc.c */ -#line 2317 "./sparql_parser.y" +#line 2330 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 5702 "sparql_parser.c" /* yacc.c:1646 */ break; case 135: - -/* Line 1806 of yacc.c */ -#line 2321 "./sparql_parser.y" +#line 2334 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_literal* l; - (yyval.expr) = (yyvsp[(2) - (4)].expr); - if((yyvsp[(3) - (4)].variable)) { - if(rasqal_expression_mentions_variable((yyval.expr), (yyvsp[(3) - (4)].variable))) { - sparql_query_error_full((rasqal_query*)rq, + (yyval.expr) = (yyvsp[-2].expr); + if((yyvsp[-1].variable)) { + if(rasqal_expression_mentions_variable((yyval.expr), (yyvsp[-1].variable))) { + sparql_query_error_full(rq, "Expression in GROUP BY ( expression ) AS %s contains the variable name '%s'", - (yyvsp[(3) - (4)].variable)->name, (yyvsp[(3) - (4)].variable)->name); + (yyvsp[-1].variable)->name, (yyvsp[-1].variable)->name); } else { /* Expression AS Variable */ - (yyvsp[(3) - (4)].variable)->expression = (yyval.expr); + (yyvsp[-1].variable)->expression = (yyval.expr); (yyval.expr) = NULL; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, (yyvsp[(3) - (4)].variable)); + l = rasqal_new_variable_literal(rq->world, (yyvsp[-1].variable)); if(!l) YYERROR_MSG("GroupCondition 4: cannot create variable literal"); - (yyvsp[(3) - (4)].variable) = NULL; + (yyvsp[-1].variable) = NULL; - (yyval.expr) = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + (yyval.expr) = rasqal_new_literal_expression(rq->world, l); if(!(yyval.expr)) YYERROR_MSG("GroupCondition 4: cannot create variable literal expression"); } } } +#line 5733 "sparql_parser.c" /* yacc.c:1646 */ break; case 136: - -/* Line 1806 of yacc.c */ -#line 2348 "./sparql_parser.y" +#line 2361 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_literal* l; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].variable)); + l = rasqal_new_variable_literal(rq->world, (yyvsp[0].variable)); if(!l) YYERROR_MSG("GroupCondition 5: cannot create lit"); - (yyval.expr) = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + (yyval.expr) = rasqal_new_literal_expression(rq->world, l); if(!(yyval.expr)) YYERROR_MSG("GroupCondition 5: cannot create lit expr"); } +#line 5747 "sparql_parser.c" /* yacc.c:1646 */ break; case 137: - -/* Line 1806 of yacc.c */ -#line 2362 "./sparql_parser.y" +#line 2375 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.seq) = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "GROUP BY cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "GROUP BY can only be used with SPARQL 1.1"); YYERROR; } else - (yyval.seq) = (yyvsp[(3) - (3)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 5764 "sparql_parser.c" /* yacc.c:1646 */ break; case 138: - -/* Line 1806 of yacc.c */ -#line 2375 "./sparql_parser.y" +#line 2388 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 5772 "sparql_parser.c" /* yacc.c:1646 */ break; case 139: - -/* Line 1806 of yacc.c */ -#line 2383 "./sparql_parser.y" +#line 2396 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 5780 "sparql_parser.c" /* yacc.c:1646 */ break; case 140: - -/* Line 1806 of yacc.c */ -#line 2390 "./sparql_parser.y" +#line 2403 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if((yyvsp[(2) - (2)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].expr))) { + (yyval.seq) = (yyvsp[-1].seq); + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("HavingConditionList 1: sequence push failed"); } } +#line 5794 "sparql_parser.c" /* yacc.c:1646 */ break; case 141: - -/* Line 1806 of yacc.c */ -#line 2400 "./sparql_parser.y" +#line 2413 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); if(!(yyval.seq)) { - if((yyvsp[(1) - (1)].expr)) - rasqal_free_expression((yyvsp[(1) - (1)].expr)); + if((yyvsp[0].expr)) + rasqal_free_expression((yyvsp[0].expr)); YYERROR_MSG("HavingConditionList 2: cannot create sequence"); } - if((yyvsp[(1) - (1)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].expr))) { + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("HavingConditionList 2: sequence push failed"); } } +#line 5814 "sparql_parser.c" /* yacc.c:1646 */ break; case 142: - -/* Line 1806 of yacc.c */ -#line 2420 "./sparql_parser.y" +#line 2433 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.seq) = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "HAVING cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "HAVING can only be used with SPARQL 1.1"); YYERROR; } else - (yyval.seq) = (yyvsp[(2) - (2)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 5831 "sparql_parser.c" /* yacc.c:1646 */ break; case 143: - -/* Line 1806 of yacc.c */ -#line 2433 "./sparql_parser.y" +#line 2446 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 5839 "sparql_parser.c" /* yacc.c:1646 */ break; case 144: - -/* Line 1806 of yacc.c */ -#line 2441 "./sparql_parser.y" +#line 2454 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.limit_offset)[0] = (yyvsp[(1) - (2)].integer); - (yyval.limit_offset)[1] = (yyvsp[(2) - (2)].integer); + (yyval.limit_offset)[0] = (yyvsp[-1].integer); + (yyval.limit_offset)[1] = (yyvsp[0].integer); } +#line 5848 "sparql_parser.c" /* yacc.c:1646 */ break; case 145: - -/* Line 1806 of yacc.c */ -#line 2446 "./sparql_parser.y" +#line 2459 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.limit_offset)[0] = (yyvsp[(2) - (2)].integer); - (yyval.limit_offset)[1] = (yyvsp[(1) - (2)].integer); + (yyval.limit_offset)[0] = (yyvsp[0].integer); + (yyval.limit_offset)[1] = (yyvsp[-1].integer); } +#line 5857 "sparql_parser.c" /* yacc.c:1646 */ break; case 146: - -/* Line 1806 of yacc.c */ -#line 2451 "./sparql_parser.y" +#line 2464 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.limit_offset)[0] = (yyvsp[(1) - (1)].integer); + (yyval.limit_offset)[0] = (yyvsp[0].integer); (yyval.limit_offset)[1] = -1; } +#line 5866 "sparql_parser.c" /* yacc.c:1646 */ break; case 147: - -/* Line 1806 of yacc.c */ -#line 2456 "./sparql_parser.y" +#line 2469 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.limit_offset)[0] = -1; - (yyval.limit_offset)[1] = (yyvsp[(1) - (1)].integer); + (yyval.limit_offset)[1] = (yyvsp[0].integer); } +#line 5875 "sparql_parser.c" /* yacc.c:1646 */ break; case 148: - -/* Line 1806 of yacc.c */ -#line 2461 "./sparql_parser.y" +#line 2474 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.limit_offset)[0] = -1; (yyval.limit_offset)[1] = -1; } +#line 5884 "sparql_parser.c" /* yacc.c:1646 */ break; case 149: - -/* Line 1806 of yacc.c */ -#line 2470 "./sparql_parser.y" +#line 2483 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(3) - (3)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 5892 "sparql_parser.c" /* yacc.c:1646 */ break; case 150: - -/* Line 1806 of yacc.c */ -#line 2474 "./sparql_parser.y" +#line 2487 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 5900 "sparql_parser.c" /* yacc.c:1646 */ break; case 151: - -/* Line 1806 of yacc.c */ -#line 2482 "./sparql_parser.y" +#line 2495 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if((yyvsp[(2) - (2)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].expr))) { + (yyval.seq) = (yyvsp[-1].seq); + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("OrderConditionList 1: sequence push failed"); } } +#line 5914 "sparql_parser.c" /* yacc.c:1646 */ break; case 152: - -/* Line 1806 of yacc.c */ -#line 2492 "./sparql_parser.y" +#line 2505 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); if(!(yyval.seq)) { - if((yyvsp[(1) - (1)].expr)) - rasqal_free_expression((yyvsp[(1) - (1)].expr)); + if((yyvsp[0].expr)) + rasqal_free_expression((yyvsp[0].expr)); YYERROR_MSG("OrderConditionList 2: cannot create sequence"); } - if((yyvsp[(1) - (1)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].expr))) { + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("OrderConditionList 2: sequence push failed"); } } +#line 5934 "sparql_parser.c" /* yacc.c:1646 */ break; case 153: - -/* Line 1806 of yacc.c */ -#line 2512 "./sparql_parser.y" +#line 2525 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[(2) - (2)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("OrderCondition 1: cannot create expr"); } +#line 5945 "sparql_parser.c" /* yacc.c:1646 */ break; case 154: - -/* Line 1806 of yacc.c */ -#line 2519 "./sparql_parser.y" +#line 2532 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ORDER_COND_DESC, (yyvsp[(2) - (2)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ORDER_COND_DESC, (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("OrderCondition 2: cannot create expr"); } +#line 5956 "sparql_parser.c" /* yacc.c:1646 */ break; case 155: - -/* Line 1806 of yacc.c */ -#line 2526 "./sparql_parser.y" +#line 2539 "./sparql_parser.y" /* yacc.c:1646 */ { /* The direction of ordering is ascending by default */ - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[(1) - (1)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("OrderCondition 3: cannot create expr"); } +#line 5968 "sparql_parser.c" /* yacc.c:1646 */ break; case 156: - -/* Line 1806 of yacc.c */ -#line 2534 "./sparql_parser.y" +#line 2547 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_literal* l; rasqal_expression *e; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].variable)); + l = rasqal_new_variable_literal(rq->world, (yyvsp[0].variable)); if(!l) YYERROR_MSG("OrderCondition 4: cannot create lit"); - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + e = rasqal_new_literal_expression(rq->world, l); if(!e) YYERROR_MSG("OrderCondition 4: cannot create lit expr"); /* The direction of ordering is ascending by default */ - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ORDER_COND_ASC, e); if(!(yyval.expr)) YYERROR_MSG("OrderCondition 1: cannot create expr"); } +#line 5989 "sparql_parser.c" /* yacc.c:1646 */ break; case 157: - -/* Line 1806 of yacc.c */ -#line 2551 "./sparql_parser.y" +#line 2564 "./sparql_parser.y" /* yacc.c:1646 */ { /* The direction of ordering is ascending by default */ - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[(1) - (1)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("OrderCondition 5: cannot create expr"); } +#line 6001 "sparql_parser.c" /* yacc.c:1646 */ break; case 158: - -/* Line 1806 of yacc.c */ -#line 2559 "./sparql_parser.y" +#line 2572 "./sparql_parser.y" /* yacc.c:1646 */ { /* The direction of ordering is ascending by default */ - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[(1) - (1)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ORDER_COND_ASC, (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("OrderCondition 6: cannot create expr"); } +#line 6013 "sparql_parser.c" /* yacc.c:1646 */ break; case 159: - -/* Line 1806 of yacc.c */ -#line 2571 "./sparql_parser.y" +#line 2584 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.integer) = -1; - if((yyvsp[(2) - (2)].literal) != NULL) { - (yyval.integer) = (yyvsp[(2) - (2)].literal)->value.integer; - rasqal_free_literal((yyvsp[(2) - (2)].literal)); + if((yyvsp[0].literal) != NULL) { + (yyval.integer) = (yyvsp[0].literal)->value.integer; + rasqal_free_literal((yyvsp[0].literal)); } } +#line 6027 "sparql_parser.c" /* yacc.c:1646 */ break; case 160: - -/* Line 1806 of yacc.c */ -#line 2585 "./sparql_parser.y" +#line 2598 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.integer) = -1; - if((yyvsp[(2) - (2)].literal) != NULL) { - (yyval.integer) = (yyvsp[(2) - (2)].literal)->value.integer; - rasqal_free_literal((yyvsp[(2) - (2)].literal)); + if((yyvsp[0].literal) != NULL) { + (yyval.integer) = (yyvsp[0].literal)->value.integer; + rasqal_free_literal((yyvsp[0].literal)); } } +#line 6040 "sparql_parser.c" /* yacc.c:1646 */ break; case 161: - -/* Line 1806 of yacc.c */ -#line 2598 "./sparql_parser.y" +#line 2611 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.bindings) = (yyvsp[(2) - (2)].bindings); + (yyval.bindings) = (yyvsp[0].bindings); } +#line 6048 "sparql_parser.c" /* yacc.c:1646 */ break; case 162: - -/* Line 1806 of yacc.c */ -#line 2602 "./sparql_parser.y" +#line 2615 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.bindings) = NULL; } +#line 6056 "sparql_parser.c" /* yacc.c:1646 */ break; case 163: - -/* Line 1806 of yacc.c */ -#line 2610 "./sparql_parser.y" +#line 2623 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 6064 "sparql_parser.c" /* yacc.c:1646 */ break; case 164: - -/* Line 1806 of yacc.c */ -#line 2614 "./sparql_parser.y" +#line 2627 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 6072 "sparql_parser.c" /* yacc.c:1646 */ break; case 165: - -/* Line 1806 of yacc.c */ -#line 2621 "./sparql_parser.y" +#line 2634 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].variable))) { + (yyval.seq) = (yyvsp[-1].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].variable))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("VarList 1: sequence push failed"); } } +#line 6085 "sparql_parser.c" /* yacc.c:1646 */ break; case 166: - -/* Line 1806 of yacc.c */ -#line 2630 "./sparql_parser.y" +#line 2643 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_variable, (raptor_data_print_handler)rasqal_variable_print); if(!(yyval.seq)) YYERROR_MSG("VarList 2: cannot create seq"); - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].variable))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].variable))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("VarList 3: sequence push failed"); } } +#line 6102 "sparql_parser.c" /* yacc.c:1646 */ break; case 167: - -/* Line 1806 of yacc.c */ -#line 2649 "./sparql_parser.y" +#line 2662 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 6110 "sparql_parser.c" /* yacc.c:1646 */ break; case 168: - -/* Line 1806 of yacc.c */ -#line 2653 "./sparql_parser.y" +#line 2666 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 6118 "sparql_parser.c" /* yacc.c:1646 */ break; case 169: - -/* Line 1806 of yacc.c */ -#line 2663 "./sparql_parser.y" +#line 2676 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].row))) { + (yyval.seq) = (yyvsp[-1].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].row))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("DataBlockRowList 1: sequence push failed"); } else { int size = raptor_sequence_size((yyval.seq)); - (yyvsp[(2) - (2)].row)->offset = size-1; + (yyvsp[0].row)->offset = size-1; } } +#line 6134 "sparql_parser.c" /* yacc.c:1646 */ break; case 170: - -/* Line 1806 of yacc.c */ -#line 2675 "./sparql_parser.y" +#line 2688 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_row, (raptor_data_print_handler)rasqal_row_print); if(!(yyval.seq)) { - if((yyvsp[(1) - (1)].row)) - rasqal_free_row((yyvsp[(1) - (1)].row)); + if((yyvsp[0].row)) + rasqal_free_row((yyvsp[0].row)); YYERROR_MSG("DataBlockRowList 2: cannot create sequence"); } - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].row))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].row))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("DataBlockRowList 2: sequence push failed"); } } +#line 6154 "sparql_parser.c" /* yacc.c:1646 */ break; case 171: - -/* Line 1806 of yacc.c */ -#line 2697 "./sparql_parser.y" +#line 2710 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.row) = NULL; - if((yyvsp[(2) - (3)].seq)) { + if((yyvsp[-1].seq)) { int size; rasqal_row* row; int i; - size = raptor_sequence_size((yyvsp[(2) - (3)].seq)); + size = raptor_sequence_size((yyvsp[-1].seq)); - row = rasqal_new_row_for_size(((rasqal_query*)rq)->world, size); + row = rasqal_new_row_for_size(rq->world, size); if(!row) { YYERROR_MSG("DataBlockRow: cannot create row"); } else { for(i = 0; i < size; i++) { - rasqal_literal* value = (rasqal_literal*)raptor_sequence_get_at((yyvsp[(2) - (3)].seq), i); + rasqal_literal* value = (rasqal_literal*)raptor_sequence_get_at((yyvsp[-1].seq), i); rasqal_row_set_value_at(row, i, value); } } - raptor_free_sequence((yyvsp[(2) - (3)].seq)); + raptor_free_sequence((yyvsp[-1].seq)); #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 RASQAL_DEBUG1("DataBlockRow returned: "); rasqal_row_print(row, stderr); @@ -7220,217 +6182,202 @@ (yyval.row) = row; } } +#line 6186 "sparql_parser.c" /* yacc.c:1646 */ break; case 172: - -/* Line 1806 of yacc.c */ -#line 2725 "./sparql_parser.y" +#line 2738 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.row) = NULL; } +#line 6194 "sparql_parser.c" /* yacc.c:1646 */ break; case 173: - -/* Line 1806 of yacc.c */ -#line 2732 "./sparql_parser.y" +#line 2745 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 RASQAL_DEBUG1("DataBlockValue 1 value: "); - rasqal_literal_print((yyvsp[(2) - (2)].literal), stderr); + rasqal_literal_print((yyvsp[0].literal), stderr); fputc('\n', stderr); #endif - (yyval.seq) = (yyvsp[(1) - (2)].seq); - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].literal))) { + (yyval.seq) = (yyvsp[-1].seq); + if(raptor_sequence_push((yyval.seq), (yyvsp[0].literal))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("IriRefList 1: sequence push failed"); } } +#line 6212 "sparql_parser.c" /* yacc.c:1646 */ break; case 174: - -/* Line 1806 of yacc.c */ -#line 2746 "./sparql_parser.y" +#line 2759 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 RASQAL_DEBUG1("DataBlockValue 2 value: "); - rasqal_literal_print((yyvsp[(1) - (1)].literal), stderr); + rasqal_literal_print((yyvsp[0].literal), stderr); fputc('\n', stderr); #endif (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_literal, (raptor_data_print_handler)rasqal_literal_print); if(!(yyval.seq)) { - if((yyvsp[(1) - (1)].literal)) - rasqal_free_literal((yyvsp[(1) - (1)].literal)); + if((yyvsp[0].literal)) + rasqal_free_literal((yyvsp[0].literal)); YYERROR_MSG("IriRefList 2: cannot create sequence"); } - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].literal))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].literal))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("IriRefList 2: sequence push failed"); } } +#line 6236 "sparql_parser.c" /* yacc.c:1646 */ break; case 175: - -/* Line 1806 of yacc.c */ -#line 2769 "./sparql_parser.y" +#line 2782 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_string_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].name), + (yyval.literal) = rasqal_new_string_literal(rq->world, (yyvsp[0].name), NULL /* language */, NULL /* dt uri */, NULL /* dt_qname */); } +#line 6246 "sparql_parser.c" /* yacc.c:1646 */ break; case 176: - -/* Line 1806 of yacc.c */ -#line 2775 "./sparql_parser.y" +#line 2788 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_string_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (2)].name), - RASQAL_GOOD_CAST(const char*, (yyvsp[(2) - (2)].name)), + (yyval.literal) = rasqal_new_string_literal(rq->world, (yyvsp[-1].name), + RASQAL_GOOD_CAST(const char*, (yyvsp[0].name)), NULL /* dt uri */, NULL /* dt_qname */); } +#line 6256 "sparql_parser.c" /* yacc.c:1646 */ break; case 177: - -/* Line 1806 of yacc.c */ -#line 2781 "./sparql_parser.y" +#line 2794 "./sparql_parser.y" /* yacc.c:1646 */ { - raptor_uri* dt_uri = raptor_uri_copy(rasqal_literal_as_uri((yyvsp[(3) - (3)].literal))); - (yyval.literal) = rasqal_new_string_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (3)].name), + raptor_uri* dt_uri = raptor_uri_copy(rasqal_literal_as_uri((yyvsp[0].literal))); + (yyval.literal) = rasqal_new_string_literal(rq->world, (yyvsp[-2].name), NULL /* language */, dt_uri, NULL /* dt_qname */); - rasqal_free_literal((yyvsp[(3) - (3)].literal)); + rasqal_free_literal((yyvsp[0].literal)); } +#line 6268 "sparql_parser.c" /* yacc.c:1646 */ break; case 178: - -/* Line 1806 of yacc.c */ -#line 2789 "./sparql_parser.y" +#line 2802 "./sparql_parser.y" /* yacc.c:1646 */ { - if((yyvsp[(1) - (3)].literal)) { - raptor_uri* dt_uri = raptor_uri_copy(rasqal_literal_as_uri((yyvsp[(3) - (3)].literal))); - const unsigned char *str = (yyvsp[(1) - (3)].literal)->string; - (yyvsp[(1) - (3)].literal)->string = NULL; + if((yyvsp[-2].literal)) { + raptor_uri* dt_uri = raptor_uri_copy(rasqal_literal_as_uri((yyvsp[0].literal))); + const unsigned char *str = (yyvsp[-2].literal)->string; + (yyvsp[-2].literal)->string = NULL; - (yyval.literal) = rasqal_new_string_literal(((rasqal_query*)rq)->world, str, + (yyval.literal) = rasqal_new_string_literal(rq->world, str, NULL /* language */, dt_uri, NULL /* dt_qname */); } - rasqal_free_literal((yyvsp[(3) - (3)].literal)); - rasqal_free_literal((yyvsp[(1) - (3)].literal)); + rasqal_free_literal((yyvsp[0].literal)); + rasqal_free_literal((yyvsp[-2].literal)); } +#line 6286 "sparql_parser.c" /* yacc.c:1646 */ break; case 179: - -/* Line 1806 of yacc.c */ -#line 2807 "./sparql_parser.y" +#line 2820 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 6294 "sparql_parser.c" /* yacc.c:1646 */ break; case 180: - -/* Line 1806 of yacc.c */ -#line 2811 "./sparql_parser.y" +#line 2824 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 6302 "sparql_parser.c" /* yacc.c:1646 */ break; case 181: - -/* Line 1806 of yacc.c */ -#line 2815 "./sparql_parser.y" +#line 2828 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 6310 "sparql_parser.c" /* yacc.c:1646 */ break; case 182: - -/* Line 1806 of yacc.c */ -#line 2819 "./sparql_parser.y" +#line 2832 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 6318 "sparql_parser.c" /* yacc.c:1646 */ break; case 183: - -/* Line 1806 of yacc.c */ -#line 2823 "./sparql_parser.y" +#line 2836 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.literal) = NULL; } +#line 6326 "sparql_parser.c" /* yacc.c:1646 */ break; case 184: - -/* Line 1806 of yacc.c */ -#line 2835 "./sparql_parser.y" +#line 2848 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(2) - (3)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[-1].graph_pattern); } +#line 6334 "sparql_parser.c" /* yacc.c:1646 */ break; case 185: - -/* Line 1806 of yacc.c */ -#line 2839 "./sparql_parser.y" +#line 2852 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(2) - (3)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[-1].graph_pattern); } +#line 6342 "sparql_parser.c" /* yacc.c:1646 */ break; case 186: - -/* Line 1806 of yacc.c */ -#line 2850 "./sparql_parser.y" +#line 2863 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_graph_pattern *formula_gp = NULL; #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "GroupGraphPattern\n TriplesBlockOpt="); - if((yyvsp[(2) - (2)].graph_pattern)) - rasqal_formula_print((yyvsp[(1) - (2)].formula), DEBUG_FH); + if((yyvsp[0].graph_pattern)) + rasqal_formula_print((yyvsp[-1].formula), DEBUG_FH); else fputs("NULL", DEBUG_FH); fprintf(DEBUG_FH, ", GraphpatternListOpt="); - if((yyvsp[(2) - (2)].graph_pattern)) - rasqal_graph_pattern_print((yyvsp[(2) - (2)].graph_pattern), DEBUG_FH); + if((yyvsp[0].graph_pattern)) + rasqal_graph_pattern_print((yyvsp[0].graph_pattern), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n", DEBUG_FH); #endif - if(!(yyvsp[(1) - (2)].formula) && !(yyvsp[(2) - (2)].graph_pattern)) { - (yyval.graph_pattern) = rasqal_new_2_group_graph_pattern((rasqal_query*)rq, NULL, NULL); + if(!(yyvsp[-1].formula) && !(yyvsp[0].graph_pattern)) { + (yyval.graph_pattern) = rasqal_new_2_group_graph_pattern(rq, NULL, NULL); if(!(yyval.graph_pattern)) YYERROR_MSG("GroupGraphPattern: cannot create group gp"); } else { - if((yyvsp[(1) - (2)].formula)) { - formula_gp = rasqal_new_basic_graph_pattern_from_formula((rasqal_query*)rq, - (yyvsp[(1) - (2)].formula)); + if((yyvsp[-1].formula)) { + formula_gp = rasqal_new_basic_graph_pattern_from_formula(rq, + (yyvsp[-1].formula)); if(!formula_gp) { - if((yyvsp[(2) - (2)].graph_pattern)) - rasqal_free_graph_pattern((yyvsp[(2) - (2)].graph_pattern)); + if((yyvsp[0].graph_pattern)) + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); YYERROR_MSG("GroupGraphPattern: cannot create formula_gp"); } } - if((yyvsp[(2) - (2)].graph_pattern)) { - (yyval.graph_pattern) = (yyvsp[(2) - (2)].graph_pattern); + if((yyvsp[0].graph_pattern)) { + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); if(formula_gp && raptor_sequence_shift((yyval.graph_pattern)->graph_patterns, formula_gp)) { rasqal_free_graph_pattern((yyval.graph_pattern)); (yyval.graph_pattern) = NULL; @@ -7449,64 +6396,61 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 6400 "sparql_parser.c" /* yacc.c:1646 */ break; case 187: - -/* Line 1806 of yacc.c */ -#line 2908 "./sparql_parser.y" +#line 2921 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "TriplesBlockOpt 1\n TriplesBlock="); - if((yyvsp[(1) - (1)].formula)) - rasqal_formula_print((yyvsp[(1) - (1)].formula), DEBUG_FH); + if((yyvsp[0].formula)) + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n\n", DEBUG_FH); #endif - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 6417 "sparql_parser.c" /* yacc.c:1646 */ break; case 188: - -/* Line 1806 of yacc.c */ -#line 2921 "./sparql_parser.y" +#line 2934 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.formula) = NULL; } +#line 6425 "sparql_parser.c" /* yacc.c:1646 */ break; case 189: - -/* Line 1806 of yacc.c */ -#line 2934 "./sparql_parser.y" +#line 2947 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "GraphPatternListOpt\n GraphPatternListOpt="); - if((yyvsp[(1) - (2)].graph_pattern)) - rasqal_graph_pattern_print((yyvsp[(1) - (2)].graph_pattern), DEBUG_FH); + if((yyvsp[-1].graph_pattern)) + rasqal_graph_pattern_print((yyvsp[-1].graph_pattern), DEBUG_FH); else fputs("NULL", DEBUG_FH); fprintf(DEBUG_FH, ", GraphPatternList="); - if((yyvsp[(2) - (2)].graph_pattern)) - rasqal_graph_pattern_print((yyvsp[(2) - (2)].graph_pattern), DEBUG_FH); + if((yyvsp[0].graph_pattern)) + rasqal_graph_pattern_print((yyvsp[0].graph_pattern), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n", DEBUG_FH); #endif - (yyval.graph_pattern) = ((yyvsp[(1) - (2)].graph_pattern) ? (yyvsp[(1) - (2)].graph_pattern) : (yyvsp[(2) - (2)].graph_pattern)); - if((yyvsp[(1) - (2)].graph_pattern) && (yyvsp[(2) - (2)].graph_pattern)) { - (yyval.graph_pattern) = (yyvsp[(1) - (2)].graph_pattern); - if(rasqal_graph_patterns_join((yyval.graph_pattern), (yyvsp[(2) - (2)].graph_pattern))) { + (yyval.graph_pattern) = ((yyvsp[-1].graph_pattern) ? (yyvsp[-1].graph_pattern) : (yyvsp[0].graph_pattern)); + if((yyvsp[-1].graph_pattern) && (yyvsp[0].graph_pattern)) { + (yyval.graph_pattern) = (yyvsp[-1].graph_pattern); + if(rasqal_graph_patterns_join((yyval.graph_pattern), (yyvsp[0].graph_pattern))) { rasqal_free_graph_pattern((yyval.graph_pattern)); - rasqal_free_graph_pattern((yyvsp[(2) - (2)].graph_pattern)); + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); (yyval.graph_pattern) = NULL; YYERROR_MSG("GraphPatternListOpt: sequence join failed"); } - rasqal_free_graph_pattern((yyvsp[(2) - (2)].graph_pattern)); + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); } #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 @@ -7518,57 +6462,54 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 6466 "sparql_parser.c" /* yacc.c:1646 */ break; case 190: - -/* Line 1806 of yacc.c */ -#line 2971 "./sparql_parser.y" +#line 2984 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6474 "sparql_parser.c" /* yacc.c:1646 */ break; case 191: - -/* Line 1806 of yacc.c */ -#line 2975 "./sparql_parser.y" +#line 2988 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.graph_pattern) = NULL; } +#line 6482 "sparql_parser.c" /* yacc.c:1646 */ break; case 192: - -/* Line 1806 of yacc.c */ -#line 2988 "./sparql_parser.y" +#line 3001 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_graph_pattern *formula_gp = NULL; #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "GraphPatternList\n GraphPatternListFilter="); - if((yyvsp[(1) - (3)].graph_pattern)) - rasqal_graph_pattern_print((yyvsp[(1) - (3)].graph_pattern), DEBUG_FH); + if((yyvsp[-2].graph_pattern)) + rasqal_graph_pattern_print((yyvsp[-2].graph_pattern), DEBUG_FH); else fputs("NULL", DEBUG_FH); fprintf(DEBUG_FH, ", TriplesBlockOpt="); - if((yyvsp[(3) - (3)].formula)) - rasqal_formula_print((yyvsp[(3) - (3)].formula), DEBUG_FH); + if((yyvsp[0].formula)) + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n", DEBUG_FH); #endif - if((yyvsp[(3) - (3)].formula)) { - formula_gp = rasqal_new_basic_graph_pattern_from_formula((rasqal_query*)rq, - (yyvsp[(3) - (3)].formula)); + if((yyvsp[0].formula)) { + formula_gp = rasqal_new_basic_graph_pattern_from_formula(rq, + (yyvsp[0].formula)); if(!formula_gp) { - if((yyvsp[(1) - (3)].graph_pattern)) - rasqal_free_graph_pattern((yyvsp[(1) - (3)].graph_pattern)); + if((yyvsp[-2].graph_pattern)) + rasqal_free_graph_pattern((yyvsp[-2].graph_pattern)); YYERROR_MSG("GraphPatternList: cannot create formula_gp"); } } - (yyval.graph_pattern) = rasqal_new_2_group_graph_pattern((rasqal_query*)rq, (yyvsp[(1) - (3)].graph_pattern), formula_gp); + (yyval.graph_pattern) = rasqal_new_2_group_graph_pattern(rq, (yyvsp[-2].graph_pattern), formula_gp); if(!(yyval.graph_pattern)) YYERROR_MSG("GraphPatternList: cannot create sequence"); @@ -7581,41 +6522,39 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 6526 "sparql_parser.c" /* yacc.c:1646 */ break; case 193: - -/* Line 1806 of yacc.c */ -#line 3036 "./sparql_parser.y" +#line 3049 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "GraphPatternListFilter 1\n GraphPatternNotTriples="); - if((yyvsp[(1) - (1)].graph_pattern)) - rasqal_graph_pattern_print((yyvsp[(1) - (1)].graph_pattern), DEBUG_FH); + if((yyvsp[0].graph_pattern)) + rasqal_graph_pattern_print((yyvsp[0].graph_pattern), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n\n", DEBUG_FH); #endif - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6543 "sparql_parser.c" /* yacc.c:1646 */ break; case 194: - -/* Line 1806 of yacc.c */ -#line 3049 "./sparql_parser.y" +#line 3062 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "GraphPatternListFilter 2\n Filter="); - if((yyvsp[(1) - (1)].expr)) - rasqal_expression_print((yyvsp[(1) - (1)].expr), DEBUG_FH); + if((yyvsp[0].expr)) + rasqal_expression_print((yyvsp[0].expr), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n", DEBUG_FH); #endif - (yyval.graph_pattern) = rasqal_new_filter_graph_pattern((rasqal_query*)rq, (yyvsp[(1) - (1)].expr)); + (yyval.graph_pattern) = rasqal_new_filter_graph_pattern(rq, (yyvsp[0].expr)); if(!(yyval.graph_pattern)) YYERROR_MSG("GraphPatternListFilter 2: cannot create graph pattern"); @@ -7628,33 +6567,32 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 6571 "sparql_parser.c" /* yacc.c:1646 */ break; case 197: - -/* Line 1806 of yacc.c */ -#line 3083 "./sparql_parser.y" +#line 3096 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "TriplesBlock\n TriplesSameSubject="); - if((yyvsp[(1) - (3)].formula)) - rasqal_formula_print((yyvsp[(1) - (3)].formula), DEBUG_FH); + if((yyvsp[-2].formula)) + rasqal_formula_print((yyvsp[-2].formula), DEBUG_FH); else fputs("NULL", DEBUG_FH); fprintf(DEBUG_FH, ", TriplesBlockOpt="); - if((yyvsp[(3) - (3)].formula)) - rasqal_formula_print((yyvsp[(3) - (3)].formula), DEBUG_FH); + if((yyvsp[0].formula)) + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n", DEBUG_FH); #endif - (yyval.formula) = ((yyvsp[(1) - (3)].formula) ? (yyvsp[(1) - (3)].formula) : (yyvsp[(3) - (3)].formula)); - if((yyvsp[(1) - (3)].formula) && (yyvsp[(3) - (3)].formula)) { + (yyval.formula) = ((yyvsp[-2].formula) ? (yyvsp[-2].formula) : (yyvsp[0].formula)); + if((yyvsp[-2].formula) && (yyvsp[0].formula)) { /* $1 and $3 are freed as necessary */ - (yyval.formula) = rasqal_formula_join((yyvsp[(1) - (3)].formula), (yyvsp[(3) - (3)].formula)); - if(!(yyvsp[(1) - (3)].formula)) + (yyval.formula) = rasqal_formula_join((yyvsp[-2].formula), (yyvsp[0].formula)); + if(!(yyvsp[-2].formula)) YYERROR_MSG("TriplesBlock: formula join failed"); } @@ -7664,98 +6602,88 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 6606 "sparql_parser.c" /* yacc.c:1646 */ break; case 198: - -/* Line 1806 of yacc.c */ -#line 3114 "./sparql_parser.y" +#line 3127 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 6614 "sparql_parser.c" /* yacc.c:1646 */ break; case 199: - -/* Line 1806 of yacc.c */ -#line 3122 "./sparql_parser.y" +#line 3135 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6622 "sparql_parser.c" /* yacc.c:1646 */ break; case 200: - -/* Line 1806 of yacc.c */ -#line 3126 "./sparql_parser.y" +#line 3139 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6630 "sparql_parser.c" /* yacc.c:1646 */ break; case 201: - -/* Line 1806 of yacc.c */ -#line 3130 "./sparql_parser.y" +#line 3143 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6638 "sparql_parser.c" /* yacc.c:1646 */ break; case 202: - -/* Line 1806 of yacc.c */ -#line 3134 "./sparql_parser.y" +#line 3147 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6646 "sparql_parser.c" /* yacc.c:1646 */ break; case 203: - -/* Line 1806 of yacc.c */ -#line 3138 "./sparql_parser.y" +#line 3151 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6654 "sparql_parser.c" /* yacc.c:1646 */ break; case 204: - -/* Line 1806 of yacc.c */ -#line 3142 "./sparql_parser.y" +#line 3155 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6662 "sparql_parser.c" /* yacc.c:1646 */ break; case 205: - -/* Line 1806 of yacc.c */ -#line 3146 "./sparql_parser.y" +#line 3159 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6670 "sparql_parser.c" /* yacc.c:1646 */ break; case 206: - -/* Line 1806 of yacc.c */ -#line 3150 "./sparql_parser.y" +#line 3163 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6678 "sparql_parser.c" /* yacc.c:1646 */ break; case 207: - -/* Line 1806 of yacc.c */ -#line 3158 "./sparql_parser.y" +#line 3171 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "PatternElementForms 4\n graphpattern="); - if((yyvsp[(2) - (2)].graph_pattern)) - rasqal_graph_pattern_print((yyvsp[(2) - (2)].graph_pattern), DEBUG_FH); + if((yyvsp[0].graph_pattern)) + rasqal_graph_pattern_print((yyvsp[0].graph_pattern), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n\n", DEBUG_FH); @@ -7763,20 +6691,20 @@ (yyval.graph_pattern) = NULL; - if((yyvsp[(2) - (2)].graph_pattern)) { + if((yyvsp[0].graph_pattern)) { raptor_sequence *seq; seq = raptor_new_sequence((raptor_data_free_handler)rasqal_free_graph_pattern, (raptor_data_print_handler)rasqal_graph_pattern_print); if(!seq) { - rasqal_free_graph_pattern((yyvsp[(2) - (2)].graph_pattern)); + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); YYERROR_MSG("OptionalGraphPattern 1: cannot create sequence"); } else { - if(raptor_sequence_push(seq, (yyvsp[(2) - (2)].graph_pattern))) { + if(raptor_sequence_push(seq, (yyvsp[0].graph_pattern))) { raptor_free_sequence(seq); YYERROR_MSG("OptionalGraphPattern 2: sequence push failed"); } else { - (yyval.graph_pattern) = rasqal_new_graph_pattern_from_sequence((rasqal_query*)rq, + (yyval.graph_pattern) = rasqal_new_graph_pattern_from_sequence(rq, seq, RASQAL_GRAPH_PATTERN_OPERATOR_OPTIONAL); if(!(yyval.graph_pattern)) @@ -7785,44 +6713,43 @@ } } } +#line 6717 "sparql_parser.c" /* yacc.c:1646 */ break; case 208: - -/* Line 1806 of yacc.c */ -#line 3197 "./sparql_parser.y" +#line 3210 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "GraphGraphPattern 2\n varoruri="); - rasqal_literal_print((yyvsp[(2) - (3)].literal), DEBUG_FH); + rasqal_literal_print((yyvsp[-1].literal), DEBUG_FH); fprintf(DEBUG_FH, ", graphpattern="); - if((yyvsp[(3) - (3)].graph_pattern)) - rasqal_graph_pattern_print((yyvsp[(3) - (3)].graph_pattern), DEBUG_FH); + if((yyvsp[0].graph_pattern)) + rasqal_graph_pattern_print((yyvsp[0].graph_pattern), DEBUG_FH); else fputs("NULL", DEBUG_FH); fputs("\n\n", DEBUG_FH); #endif - if((yyvsp[(3) - (3)].graph_pattern)) { + if((yyvsp[0].graph_pattern)) { raptor_sequence *seq; seq = raptor_new_sequence((raptor_data_free_handler)rasqal_free_graph_pattern, (raptor_data_print_handler)rasqal_graph_pattern_print); if(!seq) { - rasqal_free_graph_pattern((yyvsp[(3) - (3)].graph_pattern)); + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); YYERROR_MSG("GraphGraphPattern 1: cannot create sequence"); } else { - if(raptor_sequence_push(seq, (yyvsp[(3) - (3)].graph_pattern))) { + if(raptor_sequence_push(seq, (yyvsp[0].graph_pattern))) { raptor_free_sequence(seq); YYERROR_MSG("GraphGraphPattern 2: sequence push failed"); } else { - (yyval.graph_pattern) = rasqal_new_graph_pattern_from_sequence((rasqal_query*)rq, + (yyval.graph_pattern) = rasqal_new_graph_pattern_from_sequence(rq, seq, RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH); if(!(yyval.graph_pattern)) YYERROR_MSG("GraphGraphPattern: cannot create graph pattern"); else - rasqal_graph_pattern_set_origin((yyval.graph_pattern), (yyvsp[(2) - (3)].literal)); + rasqal_graph_pattern_set_origin((yyval.graph_pattern), (yyvsp[-1].literal)); } } } @@ -7834,151 +6761,139 @@ fputs("\n\n", DEBUG_FH); #endif - rasqal_free_literal((yyvsp[(2) - (3)].literal)); + rasqal_free_literal((yyvsp[-1].literal)); } +#line 6767 "sparql_parser.c" /* yacc.c:1646 */ break; case 209: - -/* Line 1806 of yacc.c */ -#line 3247 "./sparql_parser.y" +#line 3260 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = rasqal_new_single_graph_pattern((rasqal_query*)rq, + (yyval.graph_pattern) = rasqal_new_single_graph_pattern(rq, RASQAL_GRAPH_PATTERN_OPERATOR_SERVICE, - (yyvsp[(4) - (4)].graph_pattern)); + (yyvsp[0].graph_pattern)); if((yyval.graph_pattern)) { - (yyval.graph_pattern)->silent = ((yyvsp[(2) - (4)].integer) & RASQAL_UPDATE_FLAGS_SILENT) ? 1 : 0; + (yyval.graph_pattern)->silent = ((yyvsp[-2].integer) & RASQAL_UPDATE_FLAGS_SILENT) ? 1 : 0; - (yyval.graph_pattern)->origin = (yyvsp[(3) - (4)].literal); - (yyvsp[(3) - (4)].literal) = NULL; - } else if((yyvsp[(3) - (4)].literal)) - rasqal_free_literal((yyvsp[(3) - (4)].literal)); + (yyval.graph_pattern)->origin = (yyvsp[-1].literal); + (yyvsp[-1].literal) = NULL; + } else if((yyvsp[-1].literal)) + rasqal_free_literal((yyvsp[-1].literal)); } +#line 6784 "sparql_parser.c" /* yacc.c:1646 */ break; case 210: - -/* Line 1806 of yacc.c */ -#line 3264 "./sparql_parser.y" +#line 3277 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.graph_pattern) = NULL; - if((yyvsp[(3) - (6)].expr) && (yyvsp[(5) - (6)].variable)) { + if((yyvsp[-3].expr) && (yyvsp[-1].variable)) { if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "BIND cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "BIND can only be used with SPARQL 1.1"); YYERROR; } else { - (yyval.graph_pattern) = rasqal_new_let_graph_pattern((rasqal_query*)rq, (yyvsp[(5) - (6)].variable), (yyvsp[(3) - (6)].expr)); + (yyval.graph_pattern) = rasqal_new_let_graph_pattern(rq, (yyvsp[-1].variable), (yyvsp[-3].expr)); } } else (yyval.graph_pattern) = NULL; } +#line 6805 "sparql_parser.c" /* yacc.c:1646 */ break; case 211: - -/* Line 1806 of yacc.c */ -#line 3285 "./sparql_parser.y" +#line 3298 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.bindings) = (yyvsp[(2) - (2)].bindings); + (yyval.bindings) = (yyvsp[0].bindings); } +#line 6813 "sparql_parser.c" /* yacc.c:1646 */ break; case 212: - -/* Line 1806 of yacc.c */ -#line 3292 "./sparql_parser.y" +#line 3305 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.bindings) = (yyvsp[(1) - (1)].bindings); + (yyval.bindings) = (yyvsp[0].bindings); } +#line 6821 "sparql_parser.c" /* yacc.c:1646 */ break; case 213: - -/* Line 1806 of yacc.c */ -#line 3296 "./sparql_parser.y" +#line 3309 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.bindings) = (yyvsp[(1) - (1)].bindings); + (yyval.bindings) = (yyvsp[0].bindings); } +#line 6829 "sparql_parser.c" /* yacc.c:1646 */ break; case 214: - -/* Line 1806 of yacc.c */ -#line 3304 "./sparql_parser.y" +#line 3317 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.bindings) = rasqal_new_bindings_from_var_values((rasqal_query*)rq, (yyvsp[(1) - (4)].variable), (yyvsp[(3) - (4)].seq)); + (yyval.bindings) = rasqal_new_bindings_from_var_values(rq, (yyvsp[-3].variable), (yyvsp[-1].seq)); } +#line 6837 "sparql_parser.c" /* yacc.c:1646 */ break; case 215: - -/* Line 1806 of yacc.c */ -#line 3313 "./sparql_parser.y" +#line 3326 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 6845 "sparql_parser.c" /* yacc.c:1646 */ break; case 216: - -/* Line 1806 of yacc.c */ -#line 3317 "./sparql_parser.y" +#line 3330 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 6853 "sparql_parser.c" /* yacc.c:1646 */ break; case 217: - -/* Line 1806 of yacc.c */ -#line 3333 "./sparql_parser.y" +#line 3346 "./sparql_parser.y" /* yacc.c:1646 */ { - if((yyvsp[(2) - (6)].seq)) { - (yyval.bindings) = rasqal_new_bindings((rasqal_query*)rq, (yyvsp[(2) - (6)].seq), (yyvsp[(5) - (6)].seq)); + if((yyvsp[-4].seq)) { + (yyval.bindings) = rasqal_new_bindings(rq, (yyvsp[-4].seq), (yyvsp[-1].seq)); if(!(yyval.bindings)) YYERROR_MSG("InlineDataFull: cannot create bindings"); } else { - if((yyvsp[(5) - (6)].seq)) - raptor_free_sequence((yyvsp[(5) - (6)].seq)); + if((yyvsp[-1].seq)) + raptor_free_sequence((yyvsp[-1].seq)); (yyval.bindings) = NULL; } } +#line 6870 "sparql_parser.c" /* yacc.c:1646 */ break; case 218: - -/* Line 1806 of yacc.c */ -#line 3349 "./sparql_parser.y" +#line 3362 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = rasqal_new_values_graph_pattern((rasqal_query*)rq, (yyvsp[(1) - (1)].bindings)); + (yyval.graph_pattern) = rasqal_new_values_graph_pattern(rq, (yyvsp[0].bindings)); if(!(yyval.graph_pattern)) YYERROR_MSG("InlineDataGraphPattern: cannot create gp"); } +#line 6880 "sparql_parser.c" /* yacc.c:1646 */ break; case 219: - -/* Line 1806 of yacc.c */ -#line 3359 "./sparql_parser.y" +#line 3372 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = rasqal_new_single_graph_pattern((rasqal_query*)rq, + (yyval.graph_pattern) = rasqal_new_single_graph_pattern(rq, RASQAL_GRAPH_PATTERN_OPERATOR_MINUS, - (yyvsp[(2) - (2)].graph_pattern)); + (yyvsp[0].graph_pattern)); } +#line 6890 "sparql_parser.c" /* yacc.c:1646 */ break; case 220: - -/* Line 1806 of yacc.c */ -#line 3369 "./sparql_parser.y" +#line 3382 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(3) - (3)].graph_pattern); - if(raptor_sequence_shift((yyval.graph_pattern)->graph_patterns, (yyvsp[(1) - (3)].graph_pattern))) { + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); + if(raptor_sequence_shift((yyval.graph_pattern)->graph_patterns, (yyvsp[-2].graph_pattern))) { rasqal_free_graph_pattern((yyval.graph_pattern)); (yyval.graph_pattern) = NULL; YYERROR_MSG("GroupOrUnionGraphPattern: sequence push failed"); @@ -7990,318 +6905,298 @@ fputs("\n\n", DEBUG_FH); #endif } +#line 6909 "sparql_parser.c" /* yacc.c:1646 */ break; case 221: - -/* Line 1806 of yacc.c */ -#line 3384 "./sparql_parser.y" +#line 3397 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (1)].graph_pattern); + (yyval.graph_pattern) = (yyvsp[0].graph_pattern); } +#line 6917 "sparql_parser.c" /* yacc.c:1646 */ break; case 222: - -/* Line 1806 of yacc.c */ -#line 3391 "./sparql_parser.y" +#line 3404 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.graph_pattern) = (yyvsp[(1) - (3)].graph_pattern); - if((yyvsp[(3) - (3)].graph_pattern)) - if(raptor_sequence_push((yyval.graph_pattern)->graph_patterns, (yyvsp[(3) - (3)].graph_pattern))) { + (yyval.graph_pattern) = (yyvsp[-2].graph_pattern); + if((yyvsp[0].graph_pattern)) + if(raptor_sequence_push((yyval.graph_pattern)->graph_patterns, (yyvsp[0].graph_pattern))) { rasqal_free_graph_pattern((yyval.graph_pattern)); (yyval.graph_pattern) = NULL; YYERROR_MSG("GroupOrUnionGraphPatternList 1: sequence push failed"); } } +#line 6931 "sparql_parser.c" /* yacc.c:1646 */ break; case 223: - -/* Line 1806 of yacc.c */ -#line 3401 "./sparql_parser.y" +#line 3414 "./sparql_parser.y" /* yacc.c:1646 */ { raptor_sequence *seq; seq = raptor_new_sequence((raptor_data_free_handler)rasqal_free_graph_pattern, (raptor_data_print_handler)rasqal_graph_pattern_print); if(!seq) { - if((yyvsp[(1) - (1)].graph_pattern)) - rasqal_free_graph_pattern((yyvsp[(1) - (1)].graph_pattern)); + if((yyvsp[0].graph_pattern)) + rasqal_free_graph_pattern((yyvsp[0].graph_pattern)); YYERROR_MSG("GroupOrUnionGraphPatternList 2: cannot create sequence"); } - if((yyvsp[(1) - (1)].graph_pattern)) - if(raptor_sequence_push(seq, (yyvsp[(1) - (1)].graph_pattern))) { + if((yyvsp[0].graph_pattern)) + if(raptor_sequence_push(seq, (yyvsp[0].graph_pattern))) { raptor_free_sequence(seq); YYERROR_MSG("GroupOrUnionGraphPatternList 2: sequence push failed"); } - (yyval.graph_pattern) = rasqal_new_graph_pattern_from_sequence((rasqal_query*)rq, + (yyval.graph_pattern) = rasqal_new_graph_pattern_from_sequence(rq, seq, RASQAL_GRAPH_PATTERN_OPERATOR_UNION); if(!(yyval.graph_pattern)) YYERROR_MSG("GroupOrUnionGraphPatternList 1: cannot create gp"); } +#line 6956 "sparql_parser.c" /* yacc.c:1646 */ break; case 224: - -/* Line 1806 of yacc.c */ -#line 3426 "./sparql_parser.y" +#line 3439 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.graph_pattern) = NULL; - if((yyvsp[(3) - (6)].variable) && (yyvsp[(5) - (6)].expr)) { + if((yyvsp[-3].variable) && (yyvsp[-1].expr)) { if(sparql->experimental) - (yyval.graph_pattern) = rasqal_new_let_graph_pattern((rasqal_query*)rq, (yyvsp[(3) - (6)].variable), (yyvsp[(5) - (6)].expr)); + (yyval.graph_pattern) = rasqal_new_let_graph_pattern(rq, (yyvsp[-3].variable), (yyvsp[-1].expr)); else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "LET can only be used with LAQRS"); YYERROR; } } else (yyval.graph_pattern) = NULL; } +#line 6977 "sparql_parser.c" /* yacc.c:1646 */ break; case 225: - -/* Line 1806 of yacc.c */ -#line 3447 "./sparql_parser.y" +#line 3460 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(2) - (2)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 6985 "sparql_parser.c" /* yacc.c:1646 */ break; case 226: - -/* Line 1806 of yacc.c */ -#line 3455 "./sparql_parser.y" +#line 3468 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 6993 "sparql_parser.c" /* yacc.c:1646 */ break; case 227: - -/* Line 1806 of yacc.c */ -#line 3459 "./sparql_parser.y" +#line 3472 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 7001 "sparql_parser.c" /* yacc.c:1646 */ break; case 228: - -/* Line 1806 of yacc.c */ -#line 3463 "./sparql_parser.y" +#line 3476 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 7009 "sparql_parser.c" /* yacc.c:1646 */ break; case 229: - -/* Line 1806 of yacc.c */ -#line 3470 "./sparql_parser.y" +#line 3483 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 7017 "sparql_parser.c" /* yacc.c:1646 */ break; case 230: - -/* Line 1806 of yacc.c */ -#line 3474 "./sparql_parser.y" +#line 3487 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; } +#line 7025 "sparql_parser.c" /* yacc.c:1646 */ break; case 231: - -/* Line 1806 of yacc.c */ -#line 3482 "./sparql_parser.y" +#line 3495 "./sparql_parser.y" /* yacc.c:1646 */ { - raptor_uri* uri = rasqal_literal_as_uri((yyvsp[(1) - (6)].literal)); + raptor_uri* uri = rasqal_literal_as_uri((yyvsp[-5].literal)); - if(!(yyvsp[(4) - (6)].seq)) { - (yyvsp[(4) - (6)].seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, + if(!(yyvsp[-2].seq)) { + (yyvsp[-2].seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); - if(!(yyvsp[(4) - (6)].seq)) { - rasqal_free_literal((yyvsp[(1) - (6)].literal)); + if(!(yyvsp[-2].seq)) { + rasqal_free_literal((yyvsp[-5].literal)); YYERROR_MSG("FunctionCall: cannot create sequence"); } } uri = raptor_uri_copy(uri); - if(raptor_sequence_size((yyvsp[(4) - (6)].seq)) == 1 && - rasqal_xsd_is_datatype_uri(((rasqal_query*)rq)->world, uri)) { - rasqal_expression* e = (rasqal_expression*)raptor_sequence_pop((yyvsp[(4) - (6)].seq)); - (yyval.expr) = rasqal_new_cast_expression(((rasqal_query*)rq)->world, uri, e); + if(raptor_sequence_size((yyvsp[-2].seq)) == 1 && + rasqal_xsd_is_datatype_uri(rq->world, uri)) { + rasqal_expression* e = (rasqal_expression*)raptor_sequence_pop((yyvsp[-2].seq)); + (yyval.expr) = rasqal_new_cast_expression(rq->world, uri, e); if((yyval.expr)) - (yyval.expr)->flags |= (yyvsp[(3) - (6)].uinteger); - raptor_free_sequence((yyvsp[(4) - (6)].seq)); + (yyval.expr)->flags |= (yyvsp[-3].uinteger); + raptor_free_sequence((yyvsp[-2].seq)); } else { unsigned int flags = 0; - if((yyvsp[(3) - (6)].uinteger)) + if((yyvsp[-3].uinteger)) flags |= 1; - (yyval.expr) = rasqal_new_function_expression(((rasqal_query*)rq)->world, - uri, (yyvsp[(4) - (6)].seq), (yyvsp[(5) - (6)].seq) /* params */, + (yyval.expr) = rasqal_new_function_expression(rq->world, + uri, (yyvsp[-2].seq), (yyvsp[-1].seq) /* params */, flags); if((yyval.expr)) - (yyval.expr)->flags |= (yyvsp[(3) - (6)].uinteger); + (yyval.expr)->flags |= (yyvsp[-3].uinteger); } - rasqal_free_literal((yyvsp[(1) - (6)].literal)); + rasqal_free_literal((yyvsp[-5].literal)); if(!(yyval.expr)) YYERROR_MSG("FunctionCall: cannot create expr"); } +#line 7067 "sparql_parser.c" /* yacc.c:1646 */ break; case 232: - -/* Line 1806 of yacc.c */ -#line 3521 "./sparql_parser.y" +#line 3534 "./sparql_parser.y" /* yacc.c:1646 */ { - raptor_uri* uri = rasqal_literal_as_uri((yyvsp[(1) - (3)].literal)); + raptor_uri* uri = rasqal_literal_as_uri((yyvsp[-2].literal)); - if(!(yyvsp[(2) - (3)].seq)) { - (yyvsp[(2) - (3)].seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, + if(!(yyvsp[-1].seq)) { + (yyvsp[-1].seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); - if(!(yyvsp[(2) - (3)].seq)) { - rasqal_free_literal((yyvsp[(1) - (3)].literal)); + if(!(yyvsp[-1].seq)) { + rasqal_free_literal((yyvsp[-2].literal)); YYERROR_MSG("FunctionCall: cannot create sequence"); } } uri = raptor_uri_copy(uri); - if(raptor_sequence_size((yyvsp[(2) - (3)].seq)) == 1 && - rasqal_xsd_is_datatype_uri(((rasqal_query*)rq)->world, uri)) { - rasqal_expression* e = (rasqal_expression*)raptor_sequence_pop((yyvsp[(2) - (3)].seq)); - (yyval.expr) = rasqal_new_cast_expression(((rasqal_query*)rq)->world, uri, e); - raptor_free_sequence((yyvsp[(2) - (3)].seq)); + if(raptor_sequence_size((yyvsp[-1].seq)) == 1 && + rasqal_xsd_is_datatype_uri(rq->world, uri)) { + rasqal_expression* e = (rasqal_expression*)raptor_sequence_pop((yyvsp[-1].seq)); + (yyval.expr) = rasqal_new_cast_expression(rq->world, uri, e); + raptor_free_sequence((yyvsp[-1].seq)); } else { - (yyval.expr) = rasqal_new_function_expression(((rasqal_query*)rq)->world, - uri, (yyvsp[(2) - (3)].seq), NULL /* params */, + (yyval.expr) = rasqal_new_function_expression(rq->world, + uri, (yyvsp[-1].seq), NULL /* params */, 0 /* flags */); } - rasqal_free_literal((yyvsp[(1) - (3)].literal)); + rasqal_free_literal((yyvsp[-2].literal)); if(!(yyval.expr)) YYERROR_MSG("FunctionCall: cannot create expr"); } +#line 7101 "sparql_parser.c" /* yacc.c:1646 */ break; case 233: - -/* Line 1806 of yacc.c */ -#line 3555 "./sparql_parser.y" +#line 3568 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "COALESCE cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "COALESCE can only be used with SPARQL 1.1"); YYERROR; } - if(!(yyvsp[(2) - (2)].seq)) { - (yyvsp[(2) - (2)].seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, + if(!(yyvsp[0].seq)) { + (yyvsp[0].seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); - if(!(yyvsp[(2) - (2)].seq)) + if(!(yyvsp[0].seq)) YYERROR_MSG("FunctionCall: cannot create sequence"); } - (yyval.expr) = rasqal_new_expr_seq_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_COALESCE, (yyvsp[(2) - (2)].seq)); + (yyval.expr) = rasqal_new_expr_seq_expression(rq->world, + RASQAL_EXPR_COALESCE, (yyvsp[0].seq)); if(!(yyval.expr)) YYERROR_MSG("Coalesce: cannot create expr"); } +#line 7129 "sparql_parser.c" /* yacc.c:1646 */ break; case 234: - -/* Line 1806 of yacc.c */ -#line 3583 "./sparql_parser.y" +#line 3596 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(2) - (3)].seq); + (yyval.seq) = (yyvsp[-1].seq); } +#line 7137 "sparql_parser.c" /* yacc.c:1646 */ break; case 235: - -/* Line 1806 of yacc.c */ -#line 3590 "./sparql_parser.y" +#line 3603 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (3)].seq); - if((yyvsp[(3) - (3)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(3) - (3)].expr))) { + (yyval.seq) = (yyvsp[-2].seq); + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("ArgListNoBraces 1: sequence push failed"); } } +#line 7151 "sparql_parser.c" /* yacc.c:1646 */ break; case 236: - -/* Line 1806 of yacc.c */ -#line 3600 "./sparql_parser.y" +#line 3613 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); if(!(yyval.seq)) { - if((yyvsp[(1) - (1)].expr)) - rasqal_free_expression((yyvsp[(1) - (1)].expr)); + if((yyvsp[0].expr)) + rasqal_free_expression((yyvsp[0].expr)); YYERROR_MSG("ArgListNoBraces 2: cannot create sequence"); } - if((yyvsp[(1) - (1)].expr)) - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].expr))) { + if((yyvsp[0].expr)) + if(raptor_sequence_push((yyval.seq), (yyvsp[0].expr))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("ArgListNoBraces 2: sequence push failed"); } } +#line 7171 "sparql_parser.c" /* yacc.c:1646 */ break; case 237: - -/* Line 1806 of yacc.c */ -#line 3616 "./sparql_parser.y" +#line 3629 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_expression, (raptor_data_print_handler)rasqal_expression_print); } +#line 7180 "sparql_parser.c" /* yacc.c:1646 */ break; case 238: - -/* Line 1806 of yacc.c */ -#line 3625 "./sparql_parser.y" +#line 3638 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(2) - (3)].seq); + (yyval.seq) = (yyvsp[-1].seq); } +#line 7188 "sparql_parser.c" /* yacc.c:1646 */ break; case 239: - -/* Line 1806 of yacc.c */ -#line 3633 "./sparql_parser.y" +#line 3646 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.seq) = (yyvsp[(1) - (1)].seq); + (yyval.seq) = (yyvsp[0].seq); } +#line 7196 "sparql_parser.c" /* yacc.c:1646 */ break; case 240: - -/* Line 1806 of yacc.c */ -#line 3637 "./sparql_parser.y" +#line 3650 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_triple, (raptor_data_print_handler)rasqal_triple_print); @@ -8309,80 +7204,77 @@ YYERROR_MSG("ConstructTriplesOpt: cannot create sequence"); } } +#line 7208 "sparql_parser.c" /* yacc.c:1646 */ break; case 241: - -/* Line 1806 of yacc.c */ -#line 3649 "./sparql_parser.y" +#line 3662 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; - if((yyvsp[(1) - (3)].formula)) { - (yyval.seq) = (yyvsp[(1) - (3)].formula)->triples; - (yyvsp[(1) - (3)].formula)->triples = NULL; - rasqal_free_formula((yyvsp[(1) - (3)].formula)); + if((yyvsp[-2].formula)) { + (yyval.seq) = (yyvsp[-2].formula)->triples; + (yyvsp[-2].formula)->triples = NULL; + rasqal_free_formula((yyvsp[-2].formula)); } - if((yyvsp[(3) - (3)].seq)) { + if((yyvsp[0].seq)) { if(!(yyval.seq)) { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_triple, (raptor_data_print_handler)rasqal_triple_print); if(!(yyval.seq)) { - raptor_free_sequence((yyvsp[(3) - (3)].seq)); + raptor_free_sequence((yyvsp[0].seq)); YYERROR_MSG("ConstructTriples: cannot create sequence"); } } - if(raptor_sequence_join((yyval.seq), (yyvsp[(3) - (3)].seq))) { - raptor_free_sequence((yyvsp[(3) - (3)].seq)); + if(raptor_sequence_join((yyval.seq), (yyvsp[0].seq))) { + raptor_free_sequence((yyvsp[0].seq)); raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("ConstructTriples: sequence join failed"); } - raptor_free_sequence((yyvsp[(3) - (3)].seq)); + raptor_free_sequence((yyvsp[0].seq)); } } +#line 7242 "sparql_parser.c" /* yacc.c:1646 */ break; case 242: - -/* Line 1806 of yacc.c */ -#line 3679 "./sparql_parser.y" +#line 3692 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.seq) = NULL; - if((yyvsp[(1) - (1)].formula)) { - (yyval.seq) = (yyvsp[(1) - (1)].formula)->triples; - (yyvsp[(1) - (1)].formula)->triples = NULL; - rasqal_free_formula((yyvsp[(1) - (1)].formula)); + if((yyvsp[0].formula)) { + (yyval.seq) = (yyvsp[0].formula)->triples; + (yyvsp[0].formula)->triples = NULL; + rasqal_free_formula((yyvsp[0].formula)); } } +#line 7257 "sparql_parser.c" /* yacc.c:1646 */ break; case 243: - -/* Line 1806 of yacc.c */ -#line 3694 "./sparql_parser.y" +#line 3707 "./sparql_parser.y" /* yacc.c:1646 */ { int i; #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "TriplesSameSubject 1\n subject="); - rasqal_formula_print((yyvsp[(1) - (2)].formula), DEBUG_FH); - if((yyvsp[(2) - (2)].formula)) { + rasqal_formula_print((yyvsp[-1].formula), DEBUG_FH); + if((yyvsp[0].formula)) { fprintf(DEBUG_FH, "\n propertyList="); - rasqal_formula_print((yyvsp[(2) - (2)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); } else fprintf(DEBUG_FH, "\n and empty propertyList\n"); #endif - if((yyvsp[(2) - (2)].formula)) { - raptor_sequence *seq = (yyvsp[(2) - (2)].formula)->triples; - rasqal_literal *subject = (yyvsp[(1) - (2)].formula)->value; + if((yyvsp[0].formula)) { + raptor_sequence *seq = (yyvsp[0].formula)->triples; + rasqal_literal *subject = (yyvsp[-1].formula)->value; int size = raptor_sequence_size(seq); /* non-empty property list, handle it */ @@ -8394,12 +7286,12 @@ } #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, " after substitution propertyList="); - rasqal_formula_print((yyvsp[(2) - (2)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); #endif } - (yyval.formula) = rasqal_formula_join((yyvsp[(1) - (2)].formula), (yyvsp[(2) - (2)].formula)); + (yyval.formula) = rasqal_formula_join((yyvsp[-1].formula), (yyvsp[0].formula)); if(!(yyval.formula)) YYERROR_MSG("TriplesSameSubject 1: formula join failed"); @@ -8409,29 +7301,28 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 7305 "sparql_parser.c" /* yacc.c:1646 */ break; case 244: - -/* Line 1806 of yacc.c */ -#line 3738 "./sparql_parser.y" +#line 3751 "./sparql_parser.y" /* yacc.c:1646 */ { int i; #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "TriplesSameSubject 2\n TriplesNode="); - rasqal_formula_print((yyvsp[(1) - (2)].formula), DEBUG_FH); - if((yyvsp[(2) - (2)].formula)) { + rasqal_formula_print((yyvsp[-1].formula), DEBUG_FH); + if((yyvsp[0].formula)) { fprintf(DEBUG_FH, "\n propertyList="); - rasqal_formula_print((yyvsp[(2) - (2)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); } else fprintf(DEBUG_FH, "\n and empty propertyList\n"); #endif - if((yyvsp[(2) - (2)].formula)) { - raptor_sequence *seq = (yyvsp[(2) - (2)].formula)->triples; - rasqal_literal *subject = (yyvsp[(1) - (2)].formula)->value; + if((yyvsp[0].formula)) { + raptor_sequence *seq = (yyvsp[0].formula)->triples; + rasqal_literal *subject = (yyvsp[-1].formula)->value; int size = raptor_sequence_size(seq); /* non-empty property list, handle it */ @@ -8443,12 +7334,12 @@ } #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, " after substitution propertyList="); - rasqal_formula_print((yyvsp[(2) - (2)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); #endif } - (yyval.formula) = rasqal_formula_join((yyvsp[(1) - (2)].formula), (yyvsp[(2) - (2)].formula)); + (yyval.formula) = rasqal_formula_join((yyvsp[-1].formula), (yyvsp[0].formula)); if(!(yyval.formula)) YYERROR_MSG("TriplesSameSubject 2: formula join failed"); @@ -8458,55 +7349,54 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 7353 "sparql_parser.c" /* yacc.c:1646 */ break; case 245: - -/* Line 1806 of yacc.c */ -#line 3786 "./sparql_parser.y" +#line 3799 "./sparql_parser.y" /* yacc.c:1646 */ { int i; #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "PropertyList 1\n Verb="); - rasqal_formula_print((yyvsp[(1) - (3)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[-2].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n ObjectList="); - rasqal_formula_print((yyvsp[(2) - (3)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[-1].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n PropertyListTail="); - if((yyvsp[(3) - (3)].formula) != NULL) - rasqal_formula_print((yyvsp[(3) - (3)].formula), DEBUG_FH); + if((yyvsp[0].formula) != NULL) + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); else fputs("NULL", DEBUG_FH); fprintf(DEBUG_FH, "\n"); #endif - if((yyvsp[(2) - (3)].formula) == NULL) { + if((yyvsp[-1].formula) == NULL) { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, " empty ObjectList not processed\n"); #endif - } else if((yyvsp[(1) - (3)].formula) && (yyvsp[(2) - (3)].formula)) { - raptor_sequence *seq = (yyvsp[(2) - (3)].formula)->triples; - rasqal_literal *predicate = (yyvsp[(1) - (3)].formula)->value; + } else if((yyvsp[-2].formula) && (yyvsp[-1].formula)) { + raptor_sequence *seq = (yyvsp[-1].formula)->triples; + rasqal_literal *predicate = (yyvsp[-2].formula)->value; rasqal_formula *formula; rasqal_triple *t2; int size; - formula = rasqal_new_formula(((rasqal_query*)rq)->world); + formula = rasqal_new_formula(rq->world); if(!formula) { - rasqal_free_formula((yyvsp[(1) - (3)].formula)); - rasqal_free_formula((yyvsp[(2) - (3)].formula)); - if((yyvsp[(3) - (3)].formula)) - rasqal_free_formula((yyvsp[(3) - (3)].formula)); + rasqal_free_formula((yyvsp[-2].formula)); + rasqal_free_formula((yyvsp[-1].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("PropertyList 1: cannot create formula"); } formula->triples = raptor_new_sequence((raptor_data_free_handler)rasqal_free_triple, (raptor_data_print_handler)rasqal_triple_print); if(!formula->triples) { rasqal_free_formula(formula); - rasqal_free_formula((yyvsp[(1) - (3)].formula)); - rasqal_free_formula((yyvsp[(2) - (3)].formula)); - if((yyvsp[(3) - (3)].formula)) - rasqal_free_formula((yyvsp[(3) - (3)].formula)); + rasqal_free_formula((yyvsp[-2].formula)); + rasqal_free_formula((yyvsp[-1].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("PropertyList 1: cannot create sequence"); } @@ -8528,77 +7418,72 @@ t2 = (rasqal_triple*)raptor_sequence_unshift(seq); if(raptor_sequence_push(formula->triples, t2)) { rasqal_free_formula(formula); - rasqal_free_formula((yyvsp[(1) - (3)].formula)); - rasqal_free_formula((yyvsp[(2) - (3)].formula)); - if((yyvsp[(3) - (3)].formula)) - rasqal_free_formula((yyvsp[(3) - (3)].formula)); + rasqal_free_formula((yyvsp[-2].formula)); + rasqal_free_formula((yyvsp[-1].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("PropertyList 1: sequence push failed"); } } - (yyvsp[(3) - (3)].formula) = rasqal_formula_join(formula, (yyvsp[(3) - (3)].formula)); - if(!(yyvsp[(3) - (3)].formula)) { - rasqal_free_formula((yyvsp[(1) - (3)].formula)); - rasqal_free_formula((yyvsp[(2) - (3)].formula)); + (yyvsp[0].formula) = rasqal_formula_join(formula, (yyvsp[0].formula)); + if(!(yyvsp[0].formula)) { + rasqal_free_formula((yyvsp[-2].formula)); + rasqal_free_formula((yyvsp[-1].formula)); YYERROR_MSG("PropertyList 1: formula join failed"); } #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, " after appending ObjectList="); - rasqal_formula_print((yyvsp[(3) - (3)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n\n"); #endif - rasqal_free_formula((yyvsp[(2) - (3)].formula)); + rasqal_free_formula((yyvsp[-1].formula)); } - if((yyvsp[(1) - (3)].formula)) - rasqal_free_formula((yyvsp[(1) - (3)].formula)); + if((yyvsp[-2].formula)) + rasqal_free_formula((yyvsp[-2].formula)); - (yyval.formula) = (yyvsp[(3) - (3)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7451 "sparql_parser.c" /* yacc.c:1646 */ break; case 246: - -/* Line 1806 of yacc.c */ -#line 3884 "./sparql_parser.y" +#line 3897 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(2) - (2)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7459 "sparql_parser.c" /* yacc.c:1646 */ break; case 247: - -/* Line 1806 of yacc.c */ -#line 3888 "./sparql_parser.y" +#line 3901 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.formula) = NULL; } +#line 7467 "sparql_parser.c" /* yacc.c:1646 */ break; case 248: - -/* Line 1806 of yacc.c */ -#line 3896 "./sparql_parser.y" +#line 3909 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7475 "sparql_parser.c" /* yacc.c:1646 */ break; case 249: - -/* Line 1806 of yacc.c */ -#line 3900 "./sparql_parser.y" +#line 3913 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.formula) = NULL; } +#line 7483 "sparql_parser.c" /* yacc.c:1646 */ break; case 250: - -/* Line 1806 of yacc.c */ -#line 3908 "./sparql_parser.y" +#line 3921 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_formula *formula; rasqal_triple *triple; @@ -8606,21 +7491,21 @@ #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "ObjectList 1\n"); fprintf(DEBUG_FH, " Object=\n"); - rasqal_formula_print((yyvsp[(1) - (2)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[-1].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); - if((yyvsp[(2) - (2)].formula)) { + if((yyvsp[0].formula)) { fprintf(DEBUG_FH, " ObjectTail="); - rasqal_formula_print((yyvsp[(2) - (2)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); } else fprintf(DEBUG_FH, " and empty ObjectTail\n"); #endif - formula = rasqal_new_formula(((rasqal_query*)rq)->world); + formula = rasqal_new_formula(rq->world); if(!formula) { - rasqal_free_formula((yyvsp[(1) - (2)].formula)); - if((yyvsp[(2) - (2)].formula)) - rasqal_free_formula((yyvsp[(2) - (2)].formula)); + rasqal_free_formula((yyvsp[-1].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("ObjectList: cannot create formula"); } @@ -8628,38 +7513,38 @@ (raptor_data_print_handler)rasqal_triple_print); if(!formula->triples) { rasqal_free_formula(formula); - rasqal_free_formula((yyvsp[(1) - (2)].formula)); - if((yyvsp[(2) - (2)].formula)) - rasqal_free_formula((yyvsp[(2) - (2)].formula)); + rasqal_free_formula((yyvsp[-1].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("ObjectList: cannot create sequence"); } - triple = rasqal_new_triple(NULL, NULL, (yyvsp[(1) - (2)].formula)->value); - (yyvsp[(1) - (2)].formula)->value = NULL; /* value now owned by triple */ + triple = rasqal_new_triple(NULL, NULL, (yyvsp[-1].formula)->value); + (yyvsp[-1].formula)->value = NULL; /* value now owned by triple */ if(!triple) { rasqal_free_formula(formula); - rasqal_free_formula((yyvsp[(1) - (2)].formula)); - if((yyvsp[(2) - (2)].formula)) - rasqal_free_formula((yyvsp[(2) - (2)].formula)); + rasqal_free_formula((yyvsp[-1].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("ObjectList: cannot create triple"); } if(raptor_sequence_push(formula->triples, triple)) { rasqal_free_formula(formula); - rasqal_free_formula((yyvsp[(1) - (2)].formula)); - if((yyvsp[(2) - (2)].formula)) - rasqal_free_formula((yyvsp[(2) - (2)].formula)); + rasqal_free_formula((yyvsp[-1].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("ObjectList: sequence push failed"); } - (yyval.formula) = rasqal_formula_join(formula, (yyvsp[(1) - (2)].formula)); + (yyval.formula) = rasqal_formula_join(formula, (yyvsp[-1].formula)); if(!(yyval.formula)) { - if((yyvsp[(2) - (2)].formula)) - rasqal_free_formula((yyvsp[(2) - (2)].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("ObjectList: formula join $1 failed"); } - (yyval.formula) = rasqal_formula_join((yyval.formula), (yyvsp[(2) - (2)].formula)); + (yyval.formula) = rasqal_formula_join((yyval.formula), (yyvsp[0].formula)); if(!(yyval.formula)) YYERROR_MSG("ObjectList: formula join $2 failed"); @@ -8672,54 +7557,49 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 7561 "sparql_parser.c" /* yacc.c:1646 */ break; case 251: - -/* Line 1806 of yacc.c */ -#line 3986 "./sparql_parser.y" +#line 3999 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(2) - (2)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7569 "sparql_parser.c" /* yacc.c:1646 */ break; case 252: - -/* Line 1806 of yacc.c */ -#line 3990 "./sparql_parser.y" +#line 4003 "./sparql_parser.y" /* yacc.c:1646 */ { (yyval.formula) = NULL; } +#line 7577 "sparql_parser.c" /* yacc.c:1646 */ break; case 253: - -/* Line 1806 of yacc.c */ -#line 3998 "./sparql_parser.y" +#line 4011 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7585 "sparql_parser.c" /* yacc.c:1646 */ break; case 254: - -/* Line 1806 of yacc.c */ -#line 4006 "./sparql_parser.y" +#line 4019 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = rasqal_new_formula(((rasqal_query*)rq)->world); + (yyval.formula) = rasqal_new_formula(rq->world); if(!(yyval.formula)) { - if((yyvsp[(1) - (1)].literal)) - rasqal_free_literal((yyvsp[(1) - (1)].literal)); + if((yyvsp[0].literal)) + rasqal_free_literal((yyvsp[0].literal)); YYERROR_MSG("Verb 1: cannot create formula"); } - (yyval.formula)->value = (yyvsp[(1) - (1)].literal); + (yyval.formula)->value = (yyvsp[0].literal); } +#line 7599 "sparql_parser.c" /* yacc.c:1646 */ break; case 255: - -/* Line 1806 of yacc.c */ -#line 4016 "./sparql_parser.y" +#line 4029 "./sparql_parser.y" /* yacc.c:1646 */ { raptor_uri *uri; @@ -8727,70 +7607,67 @@ fprintf(DEBUG_FH, "verb Verb=rdf:type (a)\n"); #endif - uri = raptor_new_uri_for_rdf_concept(((rasqal_query*)rq)->world->raptor_world_ptr, + uri = raptor_new_uri_for_rdf_concept(rq->world->raptor_world_ptr, RASQAL_GOOD_CAST(const unsigned char*, "type")); if(!uri) YYERROR_MSG("Verb 2: uri for rdf concept type failed"); - (yyval.formula) = rasqal_new_formula(((rasqal_query*)rq)->world); + (yyval.formula) = rasqal_new_formula(rq->world); if(!(yyval.formula)) { raptor_free_uri(uri); YYERROR_MSG("Verb 2: cannot create formula"); } - (yyval.formula)->value = rasqal_new_uri_literal(((rasqal_query*)rq)->world, uri); + (yyval.formula)->value = rasqal_new_uri_literal(rq->world, uri); if(!(yyval.formula)->value) { rasqal_free_formula((yyval.formula)); (yyval.formula) = NULL; YYERROR_MSG("Verb 2: cannot create uri literal"); } } +#line 7627 "sparql_parser.c" /* yacc.c:1646 */ break; case 256: - -/* Line 1806 of yacc.c */ -#line 4044 "./sparql_parser.y" +#line 4057 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7635 "sparql_parser.c" /* yacc.c:1646 */ break; case 257: - -/* Line 1806 of yacc.c */ -#line 4048 "./sparql_parser.y" +#line 4061 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7643 "sparql_parser.c" /* yacc.c:1646 */ break; case 258: - -/* Line 1806 of yacc.c */ -#line 4056 "./sparql_parser.y" +#line 4069 "./sparql_parser.y" /* yacc.c:1646 */ { int i; const unsigned char *id; - if((yyvsp[(2) - (3)].formula) == NULL) { - (yyval.formula) = rasqal_new_formula(((rasqal_query*)rq)->world); + if((yyvsp[-1].formula) == NULL) { + (yyval.formula) = rasqal_new_formula(rq->world); if(!(yyval.formula)) YYERROR_MSG("BlankNodePropertyList: cannot create formula"); } else { - (yyval.formula) = (yyvsp[(2) - (3)].formula); + (yyval.formula) = (yyvsp[-1].formula); if((yyval.formula)->value) { rasqal_free_literal((yyval.formula)->value); (yyval.formula)->value = NULL; } } - id = rasqal_query_generate_bnodeid((rasqal_query*)rq, NULL); + id = rasqal_query_generate_bnodeid(rq, NULL); if(!id) { rasqal_free_formula((yyval.formula)); (yyval.formula) = NULL; YYERROR_MSG("BlankNodeProperyList: cannot create bnodeid"); } - (yyval.formula)->value = rasqal_new_simple_literal(((rasqal_query*)rq)->world, + (yyval.formula)->value = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_BLANK, id); if(!(yyval.formula)->value) { rasqal_free_formula((yyval.formula)); @@ -8798,14 +7675,14 @@ YYERROR_MSG("BlankNodePropertyList: cannot create literal"); } - if((yyvsp[(2) - (3)].formula) == NULL) { + if((yyvsp[-1].formula) == NULL) { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "TriplesNode\n PropertyList="); rasqal_formula_print((yyval.formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); #endif } else { - raptor_sequence *seq = (yyvsp[(2) - (3)].formula)->triples; + raptor_sequence *seq = (yyvsp[-1].formula)->triples; /* non-empty property list, handle it */ #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 @@ -8829,15 +7706,13 @@ #endif } } +#line 7710 "sparql_parser.c" /* yacc.c:1646 */ break; case 259: - -/* Line 1806 of yacc.c */ -#line 4123 "./sparql_parser.y" +#line 4136 "./sparql_parser.y" /* yacc.c:1646 */ { int i; - rasqal_query* rdf_query = (rasqal_query*)rq; rasqal_literal* first_identifier = NULL; rasqal_literal* rest_identifier = NULL; rasqal_literal* object = NULL; @@ -8852,11 +7727,11 @@ #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "Collection\n GraphNodeListNotEmpty="); - raptor_sequence_print((yyvsp[(2) - (3)].seq), DEBUG_FH); + raptor_sequence_print((yyvsp[-1].seq), DEBUG_FH); fprintf(DEBUG_FH, "\n"); #endif - (yyval.formula) = rasqal_new_formula(((rasqal_query*)rq)->world); + (yyval.formula) = rasqal_new_formula(rq->world); if(!(yyval.formula)) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create formula"); @@ -8865,31 +7740,31 @@ if(!(yyval.formula)->triples) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create sequence"); - first_identifier = rasqal_new_uri_literal(rdf_query->world, - raptor_uri_copy(rdf_query->world->rdf_first_uri)); + first_identifier = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_first_uri)); if(!first_identifier) YYERR_MSG_GOTO(err_Collection, "Collection: cannot first_identifier"); - rest_identifier = rasqal_new_uri_literal(rdf_query->world, - raptor_uri_copy(rdf_query->world->rdf_rest_uri)); + rest_identifier = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_rest_uri)); if(!rest_identifier) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create rest_identifier"); - object = rasqal_new_uri_literal(rdf_query->world, - raptor_uri_copy(rdf_query->world->rdf_nil_uri)); + object = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_nil_uri)); if(!object) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create nil object"); - for(i = raptor_sequence_size((yyvsp[(2) - (3)].seq))-1; i >= 0; i--) { - rasqal_formula* f = (rasqal_formula*)raptor_sequence_get_at((yyvsp[(2) - (3)].seq), i); + for(i = raptor_sequence_size((yyvsp[-1].seq))-1; i >= 0; i--) { + rasqal_formula* f = (rasqal_formula*)raptor_sequence_get_at((yyvsp[-1].seq), i); rasqal_triple *t2; const unsigned char *blank_id = NULL; - blank_id = rasqal_query_generate_bnodeid(rdf_query, NULL); + blank_id = rasqal_query_generate_bnodeid(rq, NULL); if(!blank_id) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create bnodeid"); - blank = rasqal_new_simple_literal(((rasqal_query*)rq)->world, RASQAL_LITERAL_BLANK, blank_id); + blank = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_BLANK, blank_id); if(!blank) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create bnode"); @@ -8923,7 +7798,7 @@ } /* free sequence of formulas just processed */ - raptor_free_sequence((yyvsp[(2) - (3)].seq)); + raptor_free_sequence((yyvsp[-1].seq)); (yyval.formula)->value=object; @@ -8948,40 +7823,39 @@ rasqal_free_literal(rest_identifier); if(first_identifier) rasqal_free_literal(first_identifier); - if((yyvsp[(2) - (3)].seq)) - raptor_free_sequence((yyvsp[(2) - (3)].seq)); + if((yyvsp[-1].seq)) + raptor_free_sequence((yyvsp[-1].seq)); if((yyval.formula)) { rasqal_free_formula((yyval.formula)); (yyval.formula) = NULL; } YYERROR_MSG(errmsg); } +#line 7835 "sparql_parser.c" /* yacc.c:1646 */ break; case 260: - -/* Line 1806 of yacc.c */ -#line 4250 "./sparql_parser.y" +#line 4262 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 char const *errmsg; fprintf(DEBUG_FH, "GraphNodeListNotEmpty 1\n"); - if((yyvsp[(2) - (2)].formula)) { + if((yyvsp[0].formula)) { fprintf(DEBUG_FH, " GraphNode="); - rasqal_formula_print((yyvsp[(2) - (2)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); } else fprintf(DEBUG_FH, " and empty GraphNode\n"); - if((yyvsp[(1) - (2)].seq)) { + if((yyvsp[-1].seq)) { fprintf(DEBUG_FH, " GraphNodeListNotEmpty="); - raptor_sequence_print((yyvsp[(1) - (2)].seq), DEBUG_FH); + raptor_sequence_print((yyvsp[-1].seq), DEBUG_FH); fprintf(DEBUG_FH, "\n"); } else fprintf(DEBUG_FH, " and empty GraphNodeListNotEmpty\n"); #endif - (yyval.seq) = (yyvsp[(1) - (2)].seq); + (yyval.seq) = (yyvsp[-1].seq); if(!(yyval.seq)) { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_formula, (raptor_data_print_handler)rasqal_formula_print); @@ -8990,12 +7864,12 @@ "GraphNodeListNotEmpty: cannot create formula"); } - if((yyvsp[(2) - (2)].formula)) { - if(raptor_sequence_push((yyval.seq), (yyvsp[(2) - (2)].formula))) { + if((yyvsp[0].formula)) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].formula))) { YYERR_MSG_GOTO(err_GraphNodeListNotEmpty, "GraphNodeListNotEmpty 1: sequence push failed"); } - (yyvsp[(2) - (2)].formula) = NULL; + (yyvsp[0].formula) = NULL; #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, " itemList is now "); raptor_sequence_print((yyval.seq), DEBUG_FH); @@ -9006,41 +7880,40 @@ break; /* success */ err_GraphNodeListNotEmpty: - if((yyvsp[(2) - (2)].formula)) - rasqal_free_formula((yyvsp[(2) - (2)].formula)); + if((yyvsp[0].formula)) + rasqal_free_formula((yyvsp[0].formula)); if((yyval.seq)) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; } YYERROR_MSG(errmsg); } +#line 7892 "sparql_parser.c" /* yacc.c:1646 */ break; case 261: - -/* Line 1806 of yacc.c */ -#line 4303 "./sparql_parser.y" +#line 4315 "./sparql_parser.y" /* yacc.c:1646 */ { #if defined(RASQAL_DEBUG) && RASQAL_DEBUG > 1 fprintf(DEBUG_FH, "GraphNodeListNotEmpty 2\n"); - if((yyvsp[(1) - (1)].formula)) { + if((yyvsp[0].formula)) { fprintf(DEBUG_FH, " GraphNode="); - rasqal_formula_print((yyvsp[(1) - (1)].formula), DEBUG_FH); + rasqal_formula_print((yyvsp[0].formula), DEBUG_FH); fprintf(DEBUG_FH, "\n"); } else fprintf(DEBUG_FH, " and empty GraphNode\n"); #endif - if(!(yyvsp[(1) - (1)].formula)) + if(!(yyvsp[0].formula)) (yyval.seq) = NULL; else { (yyval.seq) = raptor_new_sequence((raptor_data_free_handler)rasqal_free_formula, (raptor_data_print_handler)rasqal_formula_print); if(!(yyval.seq)) { - rasqal_free_formula((yyvsp[(1) - (1)].formula)); + rasqal_free_formula((yyvsp[0].formula)); YYERROR_MSG("GraphNodeListNotEmpty 2: cannot create sequence"); } - if(raptor_sequence_push((yyval.seq), (yyvsp[(1) - (1)].formula))) { + if(raptor_sequence_push((yyval.seq), (yyvsp[0].formula))) { raptor_free_sequence((yyval.seq)); (yyval.seq) = NULL; YYERROR_MSG("GraphNodeListNotEmpty 2: sequence push failed"); @@ -9052,1559 +7925,1426 @@ fprintf(DEBUG_FH, "\n\n"); #endif } +#line 7929 "sparql_parser.c" /* yacc.c:1646 */ break; case 262: - -/* Line 1806 of yacc.c */ -#line 4340 "./sparql_parser.y" +#line 4352 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7937 "sparql_parser.c" /* yacc.c:1646 */ break; case 263: - -/* Line 1806 of yacc.c */ -#line 4344 "./sparql_parser.y" +#line 4356 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = (yyvsp[(1) - (1)].formula); + (yyval.formula) = (yyvsp[0].formula); } +#line 7945 "sparql_parser.c" /* yacc.c:1646 */ break; case 264: - -/* Line 1806 of yacc.c */ -#line 4352 "./sparql_parser.y" +#line 4364 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = rasqal_new_formula(((rasqal_query*)rq)->world); + (yyval.formula) = rasqal_new_formula(rq->world); if(!(yyval.formula)) YYERROR_MSG("VarOrTerm 1: cannot create formula"); - (yyval.formula)->value = rasqal_new_variable_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].variable)); + (yyval.formula)->value = rasqal_new_variable_literal(rq->world, (yyvsp[0].variable)); if(!(yyval.formula)->value) { rasqal_free_formula((yyval.formula)); (yyval.formula) = NULL; YYERROR_MSG("VarOrTerm 1: cannot create literal"); } } +#line 7961 "sparql_parser.c" /* yacc.c:1646 */ break; case 265: - -/* Line 1806 of yacc.c */ -#line 4364 "./sparql_parser.y" +#line 4376 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.formula) = rasqal_new_formula(((rasqal_query*)rq)->world); + (yyval.formula) = rasqal_new_formula(rq->world); if(!(yyval.formula)) { - if((yyvsp[(1) - (1)].literal)) - rasqal_free_literal((yyvsp[(1) - (1)].literal)); + if((yyvsp[0].literal)) + rasqal_free_literal((yyvsp[0].literal)); YYERROR_MSG("VarOrTerm 2: cannot create formula"); } - (yyval.formula)->value = (yyvsp[(1) - (1)].literal); + (yyval.formula)->value = (yyvsp[0].literal); } +#line 7975 "sparql_parser.c" /* yacc.c:1646 */ break; case 266: - -/* Line 1806 of yacc.c */ -#line 4377 "./sparql_parser.y" +#line 4389 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_variable_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].variable)); + (yyval.literal) = rasqal_new_variable_literal(rq->world, (yyvsp[0].variable)); if(!(yyval.literal)) YYERROR_MSG("VarOrIRIref: cannot create literal"); } +#line 7985 "sparql_parser.c" /* yacc.c:1646 */ break; case 267: - -/* Line 1806 of yacc.c */ -#line 4383 "./sparql_parser.y" +#line 4395 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 7993 "sparql_parser.c" /* yacc.c:1646 */ break; case 268: - -/* Line 1806 of yacc.c */ -#line 4391 "./sparql_parser.y" +#line 4403 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = (yyvsp[(2) - (2)].variable); + (yyval.variable) = (yyvsp[0].variable); } +#line 8001 "sparql_parser.c" /* yacc.c:1646 */ break; case 269: - -/* Line 1806 of yacc.c */ -#line 4395 "./sparql_parser.y" +#line 4407 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = (yyvsp[(2) - (2)].variable); + (yyval.variable) = (yyvsp[0].variable); } +#line 8009 "sparql_parser.c" /* yacc.c:1646 */ break; case 270: - -/* Line 1806 of yacc.c */ -#line 4402 "./sparql_parser.y" +#line 4414 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = rasqal_variables_table_add(((rasqal_query*)rq)->vars_table, - RASQAL_VARIABLE_TYPE_NORMAL, (yyvsp[(1) - (1)].name), NULL); + (yyval.variable) = rasqal_variables_table_add(rq->vars_table, + RASQAL_VARIABLE_TYPE_NORMAL, (yyvsp[0].name), NULL); if(!(yyval.variable)) YYERROR_MSG("VarName: cannot create var"); } +#line 8020 "sparql_parser.c" /* yacc.c:1646 */ break; case 271: - -/* Line 1806 of yacc.c */ -#line 4413 "./sparql_parser.y" +#line 4425 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = (yyvsp[(2) - (2)].variable); + (yyval.variable) = (yyvsp[0].variable); } +#line 8028 "sparql_parser.c" /* yacc.c:1646 */ break; case 272: - -/* Line 1806 of yacc.c */ -#line 4417 "./sparql_parser.y" +#line 4429 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = (yyvsp[(2) - (2)].variable); + (yyval.variable) = (yyvsp[0].variable); } +#line 8036 "sparql_parser.c" /* yacc.c:1646 */ break; case 273: - -/* Line 1806 of yacc.c */ -#line 4421 "./sparql_parser.y" +#line 4433 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.variable) = (yyvsp[(1) - (1)].variable); - sparql_syntax_warning(((rasqal_query*)rq), + (yyval.variable) = (yyvsp[0].variable); + sparql_syntax_warning(rq, "... AS varname is deprecated LAQRS syntax, use ... AS ?varname"); } +#line 8046 "sparql_parser.c" /* yacc.c:1646 */ break; case 274: - -/* Line 1806 of yacc.c */ -#line 4431 "./sparql_parser.y" +#line 4443 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 8054 "sparql_parser.c" /* yacc.c:1646 */ break; case 275: - -/* Line 1806 of yacc.c */ -#line 4435 "./sparql_parser.y" +#line 4447 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 8062 "sparql_parser.c" /* yacc.c:1646 */ break; case 276: - -/* Line 1806 of yacc.c */ -#line 4439 "./sparql_parser.y" +#line 4451 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 8070 "sparql_parser.c" /* yacc.c:1646 */ break; case 277: - -/* Line 1806 of yacc.c */ -#line 4443 "./sparql_parser.y" +#line 4455 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 8078 "sparql_parser.c" /* yacc.c:1646 */ break; case 278: - -/* Line 1806 of yacc.c */ -#line 4447 "./sparql_parser.y" +#line 4459 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 8086 "sparql_parser.c" /* yacc.c:1646 */ break; case 279: - -/* Line 1806 of yacc.c */ -#line 4451 "./sparql_parser.y" +#line 4463 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_uri_literal(((rasqal_query*)rq)->world, - raptor_uri_copy(((rasqal_query*)rq)->world->rdf_nil_uri)); + (yyval.literal) = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_nil_uri)); if(!(yyval.literal)) YYERROR_MSG("GraphTerm: cannot create literal"); } +#line 8097 "sparql_parser.c" /* yacc.c:1646 */ break; case 280: - -/* Line 1806 of yacc.c */ -#line 4461 "./sparql_parser.y" +#line 4473 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8105 "sparql_parser.c" /* yacc.c:1646 */ break; case 281: - -/* Line 1806 of yacc.c */ -#line 4469 "./sparql_parser.y" +#line 4481 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("ConditionalOrExpression: cannot create expr"); } +#line 8116 "sparql_parser.c" /* yacc.c:1646 */ break; case 282: - -/* Line 1806 of yacc.c */ -#line 4476 "./sparql_parser.y" +#line 4488 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8124 "sparql_parser.c" /* yacc.c:1646 */ break; case 283: - -/* Line 1806 of yacc.c */ -#line 4484 "./sparql_parser.y" +#line 4496 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("ConditionalAndExpression: cannot create expr"); ; } +#line 8136 "sparql_parser.c" /* yacc.c:1646 */ break; case 284: - -/* Line 1806 of yacc.c */ -#line 4492 "./sparql_parser.y" +#line 4504 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8144 "sparql_parser.c" /* yacc.c:1646 */ break; case 285: - -/* Line 1806 of yacc.c */ -#line 4501 "./sparql_parser.y" +#line 4513 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_EQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_EQ, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("RelationalExpression 1: cannot create expr"); } +#line 8155 "sparql_parser.c" /* yacc.c:1646 */ break; case 286: - -/* Line 1806 of yacc.c */ -#line 4508 "./sparql_parser.y" +#line 4520 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_NEQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_NEQ, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("RelationalExpression 2: cannot create expr"); } +#line 8166 "sparql_parser.c" /* yacc.c:1646 */ break; case 287: - -/* Line 1806 of yacc.c */ -#line 4515 "./sparql_parser.y" +#line 4527 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_LT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_LT, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("RelationalExpression 3: cannot create expr"); } +#line 8177 "sparql_parser.c" /* yacc.c:1646 */ break; case 288: - -/* Line 1806 of yacc.c */ -#line 4522 "./sparql_parser.y" +#line 4534 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_GT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_GT, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("RelationalExpression 4: cannot create expr"); } +#line 8188 "sparql_parser.c" /* yacc.c:1646 */ break; case 289: - -/* Line 1806 of yacc.c */ -#line 4529 "./sparql_parser.y" +#line 4541 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_LE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_LE, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("RelationalExpression 5: cannot create expr"); } +#line 8199 "sparql_parser.c" /* yacc.c:1646 */ break; case 290: - -/* Line 1806 of yacc.c */ -#line 4536 "./sparql_parser.y" +#line 4548 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_GE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_GE, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("RelationalExpression 6: cannot create expr"); } +#line 8210 "sparql_parser.c" /* yacc.c:1646 */ break; case 291: - -/* Line 1806 of yacc.c */ -#line 4543 "./sparql_parser.y" +#line 4555 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_set_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_IN, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].seq)); + (yyval.expr) = rasqal_new_set_expression(rq->world, + RASQAL_EXPR_IN, (yyvsp[-2].expr), (yyvsp[0].seq)); } +#line 8219 "sparql_parser.c" /* yacc.c:1646 */ break; case 292: - -/* Line 1806 of yacc.c */ -#line 4548 "./sparql_parser.y" +#line 4560 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_set_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_NOT_IN, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].seq)); + (yyval.expr) = rasqal_new_set_expression(rq->world, + RASQAL_EXPR_NOT_IN, (yyvsp[-3].expr), (yyvsp[0].seq)); } +#line 8228 "sparql_parser.c" /* yacc.c:1646 */ break; case 293: - -/* Line 1806 of yacc.c */ -#line 4553 "./sparql_parser.y" +#line 4565 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8236 "sparql_parser.c" /* yacc.c:1646 */ break; case 294: - -/* Line 1806 of yacc.c */ -#line 4562 "./sparql_parser.y" +#line 4574 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_PLUS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_PLUS, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("AdditiveExpression 1: cannot create expr"); } +#line 8247 "sparql_parser.c" /* yacc.c:1646 */ break; case 295: - -/* Line 1806 of yacc.c */ -#line 4569 "./sparql_parser.y" +#line 4581 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_MINUS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_MINUS, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("AdditiveExpression 2: cannot create expr"); } +#line 8258 "sparql_parser.c" /* yacc.c:1646 */ break; case 296: - -/* Line 1806 of yacc.c */ -#line 4576 "./sparql_parser.y" +#line 4588 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_expression *e; - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, (yyvsp[(2) - (2)].literal)); + e = rasqal_new_literal_expression(rq->world, (yyvsp[0].literal)); if(!e) { - rasqal_free_expression((yyvsp[(1) - (2)].expr)); + rasqal_free_expression((yyvsp[-1].expr)); YYERROR_MSG("AdditiveExpression 3: cannot create expr"); } - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_PLUS, (yyvsp[(1) - (2)].expr), e); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_PLUS, (yyvsp[-1].expr), e); if(!(yyval.expr)) YYERROR_MSG("AdditiveExpression 4: cannot create expr"); } +#line 8275 "sparql_parser.c" /* yacc.c:1646 */ break; case 297: - -/* Line 1806 of yacc.c */ -#line 4589 "./sparql_parser.y" +#line 4601 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_expression *e; - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, (yyvsp[(2) - (2)].literal)); + e = rasqal_new_literal_expression(rq->world, (yyvsp[0].literal)); if(!e) { - rasqal_free_expression((yyvsp[(1) - (2)].expr)); + rasqal_free_expression((yyvsp[-1].expr)); YYERROR_MSG("AdditiveExpression 5: cannot create expr"); } - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_PLUS, (yyvsp[(1) - (2)].expr), e); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_PLUS, (yyvsp[-1].expr), e); if(!(yyval.expr)) YYERROR_MSG("AdditiveExpression 6: cannot create expr"); } +#line 8292 "sparql_parser.c" /* yacc.c:1646 */ break; case 298: - -/* Line 1806 of yacc.c */ -#line 4602 "./sparql_parser.y" +#line 4614 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8300 "sparql_parser.c" /* yacc.c:1646 */ break; case 299: - -/* Line 1806 of yacc.c */ -#line 4609 "./sparql_parser.y" +#line 4621 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STAR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_STAR, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("MultiplicativeExpression 1: cannot create expr"); } +#line 8311 "sparql_parser.c" /* yacc.c:1646 */ break; case 300: - -/* Line 1806 of yacc.c */ -#line 4616 "./sparql_parser.y" +#line 4628 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SLASH, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_SLASH, (yyvsp[-2].expr), (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("MultiplicativeExpression 2: cannot create expr"); } +#line 8322 "sparql_parser.c" /* yacc.c:1646 */ break; case 301: - -/* Line 1806 of yacc.c */ -#line 4623 "./sparql_parser.y" +#line 4635 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8330 "sparql_parser.c" /* yacc.c:1646 */ break; case 302: - -/* Line 1806 of yacc.c */ -#line 4631 "./sparql_parser.y" +#line 4643 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_BANG, (yyvsp[(2) - (2)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_BANG, (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("UnaryExpression 1: cannot create expr"); } +#line 8341 "sparql_parser.c" /* yacc.c:1646 */ break; case 303: - -/* Line 1806 of yacc.c */ -#line 4638 "./sparql_parser.y" +#line 4650 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(2) - (2)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8349 "sparql_parser.c" /* yacc.c:1646 */ break; case 304: - -/* Line 1806 of yacc.c */ -#line 4642 "./sparql_parser.y" +#line 4654 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_UMINUS, (yyvsp[(2) - (2)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_UMINUS, (yyvsp[0].expr)); if(!(yyval.expr)) YYERROR_MSG("UnaryExpression 3: cannot create expr"); } +#line 8360 "sparql_parser.c" /* yacc.c:1646 */ break; case 305: - -/* Line 1806 of yacc.c */ -#line 4649 "./sparql_parser.y" +#line 4661 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8368 "sparql_parser.c" /* yacc.c:1646 */ break; case 306: - -/* Line 1806 of yacc.c */ -#line 4663 "./sparql_parser.y" +#line 4675 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8376 "sparql_parser.c" /* yacc.c:1646 */ break; case 307: - -/* Line 1806 of yacc.c */ -#line 4667 "./sparql_parser.y" +#line 4679 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8384 "sparql_parser.c" /* yacc.c:1646 */ break; case 308: - -/* Line 1806 of yacc.c */ -#line 4671 "./sparql_parser.y" +#line 4683 "./sparql_parser.y" /* yacc.c:1646 */ { /* Grammar has IRIrefOrFunction here which is "IRIref ArgList?" * and essentially shorthand for FunctionCall | IRIref. The Rasqal * SPARQL lexer distinguishes these for us with IRIrefBrace. * IRIref is covered below by GraphTerm. */ - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8397 "sparql_parser.c" /* yacc.c:1646 */ break; case 309: - -/* Line 1806 of yacc.c */ -#line 4680 "./sparql_parser.y" +#line 4692 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_literal_expression(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].literal)); + (yyval.expr) = rasqal_new_literal_expression(rq->world, (yyvsp[0].literal)); if(!(yyval.expr)) YYERROR_MSG("PrimaryExpression 4: cannot create expr"); } +#line 8407 "sparql_parser.c" /* yacc.c:1646 */ break; case 310: - -/* Line 1806 of yacc.c */ -#line 4686 "./sparql_parser.y" +#line 4698 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_literal *l; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].variable)); + l = rasqal_new_variable_literal(rq->world, (yyvsp[0].variable)); if(!l) YYERROR_MSG("PrimaryExpression 5: cannot create literal"); - (yyval.expr) = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + (yyval.expr) = rasqal_new_literal_expression(rq->world, l); if(!(yyval.expr)) YYERROR_MSG("PrimaryExpression 5: cannot create expr"); } +#line 8421 "sparql_parser.c" /* yacc.c:1646 */ break; case 311: - -/* Line 1806 of yacc.c */ -#line 4696 "./sparql_parser.y" +#line 4708 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8429 "sparql_parser.c" /* yacc.c:1646 */ break; case 312: - -/* Line 1806 of yacc.c */ -#line 4704 "./sparql_parser.y" +#line 4716 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(2) - (3)].expr); + (yyval.expr) = (yyvsp[-1].expr); } +#line 8437 "sparql_parser.c" /* yacc.c:1646 */ break; case 313: - -/* Line 1806 of yacc.c */ -#line 4712 "./sparql_parser.y" +#line 4724 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STR, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_STR, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 1: cannot create expr"); } +#line 8448 "sparql_parser.c" /* yacc.c:1646 */ break; case 314: - -/* Line 1806 of yacc.c */ -#line 4719 "./sparql_parser.y" +#line 4731 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_LANG, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_LANG, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 2: cannot create expr"); } +#line 8459 "sparql_parser.c" /* yacc.c:1646 */ break; case 315: - -/* Line 1806 of yacc.c */ -#line 4726 "./sparql_parser.y" +#line 4738 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_LANGMATCHES, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_LANGMATCHES, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 3: cannot create expr"); } +#line 8470 "sparql_parser.c" /* yacc.c:1646 */ break; case 316: - -/* Line 1806 of yacc.c */ -#line 4733 "./sparql_parser.y" +#line 4745 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_DATATYPE, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_DATATYPE, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 4: cannot create expr"); } +#line 8481 "sparql_parser.c" /* yacc.c:1646 */ break; case 317: - -/* Line 1806 of yacc.c */ -#line 4740 "./sparql_parser.y" +#line 4752 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_literal *l; rasqal_expression *e; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, (yyvsp[(3) - (4)].variable)); + l = rasqal_new_variable_literal(rq->world, (yyvsp[-1].variable)); if(!l) YYERROR_MSG("BuiltInCall 5: cannot create literal"); - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + e = rasqal_new_literal_expression(rq->world, l); if(!e) YYERROR_MSG("BuiltInCall 6: cannot create literal expr"); - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_BOUND, e); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7: cannot create expr"); } +#line 8500 "sparql_parser.c" /* yacc.c:1646 */ break; case 318: - -/* Line 1806 of yacc.c */ -#line 4755 "./sparql_parser.y" +#line 4767 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_IRI, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_IRI, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7a: cannot create expr"); } +#line 8511 "sparql_parser.c" /* yacc.c:1646 */ break; case 319: - -/* Line 1806 of yacc.c */ -#line 4762 "./sparql_parser.y" +#line 4774 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_IRI, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_IRI, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7b: cannot create expr"); } +#line 8522 "sparql_parser.c" /* yacc.c:1646 */ break; case 320: - -/* Line 1806 of yacc.c */ -#line 4769 "./sparql_parser.y" +#line 4781 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_BNODE, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_BNODE, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7c: cannot create expr"); } +#line 8533 "sparql_parser.c" /* yacc.c:1646 */ break; case 321: - -/* Line 1806 of yacc.c */ -#line 4776 "./sparql_parser.y" +#line 4788 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_BNODE, NULL); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7d: cannot create expr"); } +#line 8544 "sparql_parser.c" /* yacc.c:1646 */ break; case 322: - -/* Line 1806 of yacc.c */ -#line 4783 "./sparql_parser.y" +#line 4795 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_RAND); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7e: cannot create expr"); } +#line 8555 "sparql_parser.c" /* yacc.c:1646 */ break; case 323: - -/* Line 1806 of yacc.c */ -#line 4790 "./sparql_parser.y" +#line 4802 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ABS, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ABS, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7f: cannot create expr"); } +#line 8566 "sparql_parser.c" /* yacc.c:1646 */ break; case 324: - -/* Line 1806 of yacc.c */ -#line 4797 "./sparql_parser.y" +#line 4809 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_CEIL, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_CEIL, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7g: cannot create expr"); } +#line 8577 "sparql_parser.c" /* yacc.c:1646 */ break; case 325: - -/* Line 1806 of yacc.c */ -#line 4804 "./sparql_parser.y" +#line 4816 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_FLOOR, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_FLOOR, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7h: cannot create expr"); } +#line 8588 "sparql_parser.c" /* yacc.c:1646 */ break; case 326: - -/* Line 1806 of yacc.c */ -#line 4811 "./sparql_parser.y" +#line 4823 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ROUND, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ROUND, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7i: cannot create expr"); } +#line 8599 "sparql_parser.c" /* yacc.c:1646 */ break; case 327: - -/* Line 1806 of yacc.c */ -#line 4818 "./sparql_parser.y" +#line 4830 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_MD5, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_MD5, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7j: cannot create expr"); } +#line 8610 "sparql_parser.c" /* yacc.c:1646 */ break; case 328: - -/* Line 1806 of yacc.c */ -#line 4825 "./sparql_parser.y" +#line 4837 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SHA1, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_SHA1, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7k: cannot create expr"); } +#line 8621 "sparql_parser.c" /* yacc.c:1646 */ break; case 329: - -/* Line 1806 of yacc.c */ -#line 4832 "./sparql_parser.y" +#line 4844 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SHA224, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_SHA224, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7l: cannot create expr"); } +#line 8632 "sparql_parser.c" /* yacc.c:1646 */ break; case 330: - -/* Line 1806 of yacc.c */ -#line 4839 "./sparql_parser.y" +#line 4851 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SHA256, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_SHA256, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7m: cannot create expr"); } +#line 8643 "sparql_parser.c" /* yacc.c:1646 */ break; case 331: - -/* Line 1806 of yacc.c */ -#line 4846 "./sparql_parser.y" +#line 4858 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SHA384, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_SHA384, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7n: cannot create expr"); } +#line 8654 "sparql_parser.c" /* yacc.c:1646 */ break; case 332: - -/* Line 1806 of yacc.c */ -#line 4853 "./sparql_parser.y" +#line 4865 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SHA512, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_SHA512, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7o: cannot create expr"); } +#line 8665 "sparql_parser.c" /* yacc.c:1646 */ break; case 333: - -/* Line 1806 of yacc.c */ -#line 4860 "./sparql_parser.y" +#line 4872 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_UUID); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7p: cannot create expr"); } +#line 8676 "sparql_parser.c" /* yacc.c:1646 */ break; case 334: - -/* Line 1806 of yacc.c */ -#line 4867 "./sparql_parser.y" +#line 4879 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_STRUUID); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7q: cannot create expr"); } +#line 8687 "sparql_parser.c" /* yacc.c:1646 */ break; case 335: - -/* Line 1806 of yacc.c */ -#line 4874 "./sparql_parser.y" +#line 4886 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8695 "sparql_parser.c" /* yacc.c:1646 */ break; case 336: - -/* Line 1806 of yacc.c */ -#line 4878 "./sparql_parser.y" +#line 4890 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8703 "sparql_parser.c" /* yacc.c:1646 */ break; case 337: - -/* Line 1806 of yacc.c */ -#line 4882 "./sparql_parser.y" +#line 4894 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_3op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_IF, (yyvsp[(3) - (8)].expr), (yyvsp[(5) - (8)].expr), (yyvsp[(7) - (8)].expr)); + (yyval.expr) = rasqal_new_3op_expression(rq->world, + RASQAL_EXPR_IF, (yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7e: cannot create expr"); } +#line 8714 "sparql_parser.c" /* yacc.c:1646 */ break; case 338: - -/* Line 1806 of yacc.c */ -#line 4889 "./sparql_parser.y" +#line 4901 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STRLANG, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_STRLANG, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7f: cannot create expr"); } +#line 8725 "sparql_parser.c" /* yacc.c:1646 */ break; case 339: - -/* Line 1806 of yacc.c */ -#line 4896 "./sparql_parser.y" +#line 4908 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STRDT, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_STRDT, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 7g: cannot create expr"); } +#line 8736 "sparql_parser.c" /* yacc.c:1646 */ break; case 340: - -/* Line 1806 of yacc.c */ -#line 4903 "./sparql_parser.y" +#line 4915 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SAMETERM, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_SAMETERM, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 8: cannot create expr"); } +#line 8747 "sparql_parser.c" /* yacc.c:1646 */ break; case 341: - -/* Line 1806 of yacc.c */ -#line 4910 "./sparql_parser.y" +#line 4922 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ISURI, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ISURI, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 9: cannot create expr"); } +#line 8758 "sparql_parser.c" /* yacc.c:1646 */ break; case 342: - -/* Line 1806 of yacc.c */ -#line 4917 "./sparql_parser.y" +#line 4929 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ISBLANK, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ISBLANK, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 10: cannot create expr"); } +#line 8769 "sparql_parser.c" /* yacc.c:1646 */ break; case 343: - -/* Line 1806 of yacc.c */ -#line 4924 "./sparql_parser.y" +#line 4936 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ISLITERAL, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ISLITERAL, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 11: cannot create expr"); } +#line 8780 "sparql_parser.c" /* yacc.c:1646 */ break; case 344: - -/* Line 1806 of yacc.c */ -#line 4931 "./sparql_parser.y" +#line 4943 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ISNUMERIC, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ISNUMERIC, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("BuiltInCall 12: cannot create expr"); } +#line 8791 "sparql_parser.c" /* yacc.c:1646 */ break; case 345: - -/* Line 1806 of yacc.c */ -#line 4938 "./sparql_parser.y" +#line 4950 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8799 "sparql_parser.c" /* yacc.c:1646 */ break; case 346: - -/* Line 1806 of yacc.c */ -#line 4942 "./sparql_parser.y" +#line 4954 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8807 "sparql_parser.c" /* yacc.c:1646 */ break; case 347: - -/* Line 1806 of yacc.c */ -#line 4946 "./sparql_parser.y" +#line 4958 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(1) - (1)].expr); + (yyval.expr) = (yyvsp[0].expr); } +#line 8815 "sparql_parser.c" /* yacc.c:1646 */ break; case 348: - -/* Line 1806 of yacc.c */ -#line 4953 "./sparql_parser.y" +#line 4965 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STRLEN, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_STRLEN, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create STRLEN() expr"); } +#line 8826 "sparql_parser.c" /* yacc.c:1646 */ break; case 349: - -/* Line 1806 of yacc.c */ -#line 4960 "./sparql_parser.y" +#line 4972 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_3op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SUBSTR, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr), NULL); + (yyval.expr) = rasqal_new_3op_expression(rq->world, + RASQAL_EXPR_SUBSTR, (yyvsp[-3].expr), (yyvsp[-1].expr), NULL); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create SUBSTR() expr"); } +#line 8837 "sparql_parser.c" /* yacc.c:1646 */ break; case 350: - -/* Line 1806 of yacc.c */ -#line 4967 "./sparql_parser.y" +#line 4979 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_3op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SUBSTR, (yyvsp[(3) - (8)].expr), (yyvsp[(5) - (8)].expr), (yyvsp[(7) - (8)].expr)); + (yyval.expr) = rasqal_new_3op_expression(rq->world, + RASQAL_EXPR_SUBSTR, (yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create SUBSTR() expr"); } +#line 8848 "sparql_parser.c" /* yacc.c:1646 */ break; case 351: - -/* Line 1806 of yacc.c */ -#line 4974 "./sparql_parser.y" +#line 4986 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_UCASE, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_UCASE, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create UCASE() expr"); } +#line 8859 "sparql_parser.c" /* yacc.c:1646 */ break; case 352: - -/* Line 1806 of yacc.c */ -#line 4981 "./sparql_parser.y" +#line 4993 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_LCASE, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_LCASE, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create LCASE() expr"); } +#line 8870 "sparql_parser.c" /* yacc.c:1646 */ break; case 353: - -/* Line 1806 of yacc.c */ -#line 4988 "./sparql_parser.y" +#line 5000 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STRSTARTS, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_STRSTARTS, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create STRSTARTS() expr"); } +#line 8881 "sparql_parser.c" /* yacc.c:1646 */ break; case 354: - -/* Line 1806 of yacc.c */ -#line 4995 "./sparql_parser.y" +#line 5007 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STRENDS, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_STRENDS, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create STRENDS() expr"); } +#line 8892 "sparql_parser.c" /* yacc.c:1646 */ break; case 355: - -/* Line 1806 of yacc.c */ -#line 5002 "./sparql_parser.y" +#line 5014 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_CONTAINS, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_CONTAINS, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create YEAR expr"); } +#line 8903 "sparql_parser.c" /* yacc.c:1646 */ break; case 356: - -/* Line 1806 of yacc.c */ -#line 5009 "./sparql_parser.y" +#line 5021 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_ENCODE_FOR_URI, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_ENCODE_FOR_URI, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create ENCODE_FOR_URI() expr"); } +#line 8914 "sparql_parser.c" /* yacc.c:1646 */ break; case 357: - -/* Line 1806 of yacc.c */ -#line 5016 "./sparql_parser.y" +#line 5028 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_expr_seq_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_CONCAT, (yyvsp[(3) - (4)].seq)); + (yyval.expr) = rasqal_new_expr_seq_expression(rq->world, + RASQAL_EXPR_CONCAT, (yyvsp[-1].seq)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create CONCAT() expr"); } +#line 8925 "sparql_parser.c" /* yacc.c:1646 */ break; case 358: - -/* Line 1806 of yacc.c */ -#line 5023 "./sparql_parser.y" +#line 5035 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STRBEFORE, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_STRBEFORE, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create STRBEFORE() expr"); } +#line 8936 "sparql_parser.c" /* yacc.c:1646 */ break; case 359: - -/* Line 1806 of yacc.c */ -#line 5030 "./sparql_parser.y" +#line 5042 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_2op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_STRAFTER, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + (yyval.expr) = rasqal_new_2op_expression(rq->world, + RASQAL_EXPR_STRAFTER, (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create STRAFTER() expr"); } +#line 8947 "sparql_parser.c" /* yacc.c:1646 */ break; case 360: - -/* Line 1806 of yacc.c */ -#line 5037 "./sparql_parser.y" +#line 5049 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_3op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_REPLACE, (yyvsp[(3) - (8)].expr), (yyvsp[(5) - (8)].expr), (yyvsp[(7) - (8)].expr)); + (yyval.expr) = rasqal_new_3op_expression(rq->world, + RASQAL_EXPR_REPLACE, (yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create REPLACE() expr"); } +#line 8958 "sparql_parser.c" /* yacc.c:1646 */ break; case 361: - -/* Line 1806 of yacc.c */ -#line 5044 "./sparql_parser.y" +#line 5056 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_4op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_REPLACE, (yyvsp[(3) - (10)].expr), (yyvsp[(5) - (10)].expr), (yyvsp[(7) - (10)].expr), (yyvsp[(9) - (10)].expr)); + (yyval.expr) = rasqal_new_4op_expression(rq->world, + RASQAL_EXPR_REPLACE, (yyvsp[-7].expr), (yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("StringExpression: cannot create REPLACE() expr"); } +#line 8969 "sparql_parser.c" /* yacc.c:1646 */ break; case 362: - -/* Line 1806 of yacc.c */ -#line 5055 "./sparql_parser.y" +#line 5067 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_3op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_REGEX, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr), NULL); + (yyval.expr) = rasqal_new_3op_expression(rq->world, + RASQAL_EXPR_REGEX, (yyvsp[-3].expr), (yyvsp[-1].expr), NULL); if(!(yyval.expr)) YYERROR_MSG("RegexExpression 1: cannot create expr"); } +#line 8980 "sparql_parser.c" /* yacc.c:1646 */ break; case 363: - -/* Line 1806 of yacc.c */ -#line 5062 "./sparql_parser.y" +#line 5074 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_3op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_REGEX, (yyvsp[(3) - (8)].expr), (yyvsp[(5) - (8)].expr), (yyvsp[(7) - (8)].expr)); + (yyval.expr) = rasqal_new_3op_expression(rq->world, + RASQAL_EXPR_REGEX, (yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("RegexExpression 2: cannot create expr"); } +#line 8991 "sparql_parser.c" /* yacc.c:1646 */ break; case 364: - -/* Line 1806 of yacc.c */ -#line 5073 "./sparql_parser.y" +#line 5085 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_YEAR, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_YEAR, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create YEAR expr"); } +#line 9002 "sparql_parser.c" /* yacc.c:1646 */ break; case 365: - -/* Line 1806 of yacc.c */ -#line 5080 "./sparql_parser.y" +#line 5092 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_MONTH, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_MONTH, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create MONTH expr"); } +#line 9013 "sparql_parser.c" /* yacc.c:1646 */ break; case 366: - -/* Line 1806 of yacc.c */ -#line 5087 "./sparql_parser.y" +#line 5099 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_DAY, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_DAY, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create DAY expr"); } +#line 9024 "sparql_parser.c" /* yacc.c:1646 */ break; case 367: - -/* Line 1806 of yacc.c */ -#line 5094 "./sparql_parser.y" +#line 5106 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_HOURS, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_HOURS, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create HOURS expr"); } +#line 9035 "sparql_parser.c" /* yacc.c:1646 */ break; case 368: - -/* Line 1806 of yacc.c */ -#line 5101 "./sparql_parser.y" +#line 5113 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_MINUTES, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_MINUTES, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create MINUTES expr"); } +#line 9046 "sparql_parser.c" /* yacc.c:1646 */ break; case 369: - -/* Line 1806 of yacc.c */ -#line 5108 "./sparql_parser.y" +#line 5120 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_SECONDS, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_SECONDS, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create SECONDS expr"); } +#line 9057 "sparql_parser.c" /* yacc.c:1646 */ break; case 370: - -/* Line 1806 of yacc.c */ -#line 5115 "./sparql_parser.y" +#line 5127 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_TIMEZONE, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_TIMEZONE, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create TIMEZONE expr"); } +#line 9068 "sparql_parser.c" /* yacc.c:1646 */ break; case 371: - -/* Line 1806 of yacc.c */ -#line 5122 "./sparql_parser.y" +#line 5134 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_TZ, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_TZ, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create TZ expr"); } +#line 9079 "sparql_parser.c" /* yacc.c:1646 */ break; case 372: - -/* Line 1806 of yacc.c */ -#line 5133 "./sparql_parser.y" +#line 5145 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; if(sparql->experimental) { - (yyval.expr) = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_CURRENT_DATETIME); if(!(yyval.expr)) YYERROR_MSG("DatetimeExtensions: cannot create CURRENT_DATETIME() expr"); } else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CURRENT_DATETIME() can only used with LAQRS"); YYERROR; } } +#line 9100 "sparql_parser.c" /* yacc.c:1646 */ break; case 373: - -/* Line 1806 of yacc.c */ -#line 5150 "./sparql_parser.y" +#line 5162 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "NOW() cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "NOW() can only be used with SPARQL 1.1"); YYERROR; } - (yyval.expr) = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + (yyval.expr) = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_NOW); if(!(yyval.expr)) YYERROR_MSG("DatetimeExtensions: cannot create NOW()"); } +#line 9122 "sparql_parser.c" /* yacc.c:1646 */ break; case 374: - -/* Line 1806 of yacc.c */ -#line 5168 "./sparql_parser.y" +#line 5180 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; if(sparql->experimental) { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_FROM_UNIXTIME, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_FROM_UNIXTIME, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeExtensions: cannot create FROM_UNIXTIME() expr"); } else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "FROM_UNIXTIME() can only used with LAQRS"); YYERROR; } } +#line 9144 "sparql_parser.c" /* yacc.c:1646 */ break; case 375: - -/* Line 1806 of yacc.c */ -#line 5186 "./sparql_parser.y" +#line 5198 "./sparql_parser.y" /* yacc.c:1646 */ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); (yyval.expr) = NULL; if(sparql->experimental) { - (yyval.expr) = rasqal_new_1op_expression(((rasqal_query*)rq)->world, - RASQAL_EXPR_TO_UNIXTIME, (yyvsp[(3) - (4)].expr)); + (yyval.expr) = rasqal_new_1op_expression(rq->world, + RASQAL_EXPR_TO_UNIXTIME, (yyvsp[-1].expr)); if(!(yyval.expr)) YYERROR_MSG("DatetimeExtensions: cannot create TO_UNIXTIME() expr"); } else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "TO_UNIXTIME() can only used with LAQRS"); YYERROR; } } +#line 9166 "sparql_parser.c" /* yacc.c:1646 */ break; case 376: - -/* Line 1806 of yacc.c */ -#line 5211 "./sparql_parser.y" +#line 5223 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_uri_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].uri)); + (yyval.literal) = rasqal_new_uri_literal(rq->world, (yyvsp[0].uri)); if(!(yyval.literal)) YYERROR_MSG("IRIrefBrace 1: cannot create literal"); } +#line 9176 "sparql_parser.c" /* yacc.c:1646 */ break; case 377: - -/* Line 1806 of yacc.c */ -#line 5217 "./sparql_parser.y" +#line 5229 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_simple_literal(((rasqal_query*)rq)->world, - RASQAL_LITERAL_QNAME, (yyvsp[(1) - (1)].name)); + (yyval.literal) = rasqal_new_simple_literal(rq->world, + RASQAL_LITERAL_QNAME, (yyvsp[0].name)); if(!(yyval.literal)) YYERROR_MSG("IRIrefBrace 2: cannot create literal"); - if(rasqal_literal_expand_qname((rasqal_query*)rq, (yyval.literal))) { - sparql_query_error_full((rasqal_query*)rq, - "QName %s cannot be expanded", (yyvsp[(1) - (1)].name)); + if(rasqal_literal_expand_qname(rq, (yyval.literal))) { + sparql_query_error_full(rq, + "QName %s cannot be expanded", (yyvsp[0].name)); rasqal_free_literal((yyval.literal)); (yyval.literal) = NULL; YYERROR_MSG("IRIrefBrace 2: cannot expand qname"); } } +#line 9194 "sparql_parser.c" /* yacc.c:1646 */ break; case 378: - -/* Line 1806 of yacc.c */ -#line 5237 "./sparql_parser.y" +#line 5249 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9202 "sparql_parser.c" /* yacc.c:1646 */ break; case 379: - -/* Line 1806 of yacc.c */ -#line 5241 "./sparql_parser.y" +#line 5253 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9210 "sparql_parser.c" /* yacc.c:1646 */ break; case 380: - -/* Line 1806 of yacc.c */ -#line 5245 "./sparql_parser.y" +#line 5257 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9218 "sparql_parser.c" /* yacc.c:1646 */ break; case 381: - -/* Line 1806 of yacc.c */ -#line 5252 "./sparql_parser.y" +#line 5264 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9226 "sparql_parser.c" /* yacc.c:1646 */ break; case 382: - -/* Line 1806 of yacc.c */ -#line 5256 "./sparql_parser.y" +#line 5268 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9234 "sparql_parser.c" /* yacc.c:1646 */ break; case 383: - -/* Line 1806 of yacc.c */ -#line 5260 "./sparql_parser.y" +#line 5272 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9242 "sparql_parser.c" /* yacc.c:1646 */ break; case 384: - -/* Line 1806 of yacc.c */ -#line 5268 "./sparql_parser.y" +#line 5280 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9250 "sparql_parser.c" /* yacc.c:1646 */ break; case 385: - -/* Line 1806 of yacc.c */ -#line 5272 "./sparql_parser.y" +#line 5284 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9258 "sparql_parser.c" /* yacc.c:1646 */ break; case 386: - -/* Line 1806 of yacc.c */ -#line 5276 "./sparql_parser.y" +#line 5288 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9266 "sparql_parser.c" /* yacc.c:1646 */ break; case 387: - -/* Line 1806 of yacc.c */ -#line 5284 "./sparql_parser.y" +#line 5296 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9274 "sparql_parser.c" /* yacc.c:1646 */ break; case 388: - -/* Line 1806 of yacc.c */ -#line 5288 "./sparql_parser.y" +#line 5300 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9282 "sparql_parser.c" /* yacc.c:1646 */ break; case 389: - -/* Line 1806 of yacc.c */ -#line 5292 "./sparql_parser.y" +#line 5304 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = (yyvsp[(1) - (1)].literal); + (yyval.literal) = (yyvsp[0].literal); } +#line 9290 "sparql_parser.c" /* yacc.c:1646 */ break; case 390: - -/* Line 1806 of yacc.c */ -#line 5304 "./sparql_parser.y" +#line 5316 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_uri_literal(((rasqal_query*)rq)->world, (yyvsp[(1) - (1)].uri)); + (yyval.literal) = rasqal_new_uri_literal(rq->world, (yyvsp[0].uri)); if(!(yyval.literal)) YYERROR_MSG("IRIref 1: cannot create literal"); } +#line 9300 "sparql_parser.c" /* yacc.c:1646 */ break; case 391: - -/* Line 1806 of yacc.c */ -#line 5310 "./sparql_parser.y" +#line 5322 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_simple_literal(((rasqal_query*)rq)->world, - RASQAL_LITERAL_QNAME, (yyvsp[(1) - (1)].name)); + (yyval.literal) = rasqal_new_simple_literal(rq->world, + RASQAL_LITERAL_QNAME, (yyvsp[0].name)); if(!(yyval.literal)) YYERROR_MSG("IRIref 2: cannot create literal"); - if(rasqal_literal_expand_qname((rasqal_query*)rq, (yyval.literal))) { - sparql_query_error_full((rasqal_query*)rq, - "QName %s cannot be expanded", (yyvsp[(1) - (1)].name)); + if(rasqal_literal_expand_qname(rq, (yyval.literal))) { + sparql_query_error_full(rq, + "QName %s cannot be expanded", (yyvsp[0].name)); rasqal_free_literal((yyval.literal)); (yyval.literal) = NULL; YYERROR_MSG("IRIrefBrace 2: cannot expand qname"); } } +#line 9318 "sparql_parser.c" /* yacc.c:1646 */ break; case 392: - -/* Line 1806 of yacc.c */ -#line 5330 "./sparql_parser.y" +#line 5342 "./sparql_parser.y" /* yacc.c:1646 */ { - (yyval.literal) = rasqal_new_simple_literal(((rasqal_query*)rq)->world, - RASQAL_LITERAL_BLANK, (yyvsp[(1) - (1)].name)); + (yyval.literal) = rasqal_new_simple_literal(rq->world, + RASQAL_LITERAL_BLANK, (yyvsp[0].name)); if(!(yyval.literal)) YYERROR_MSG("BlankNode 1: cannot create literal"); } +#line 9329 "sparql_parser.c" /* yacc.c:1646 */ break; case 393: - -/* Line 1806 of yacc.c */ -#line 5336 "./sparql_parser.y" +#line 5348 "./sparql_parser.y" /* yacc.c:1646 */ { const unsigned char *id; - id = rasqal_query_generate_bnodeid((rasqal_query*)rq, NULL); + id = rasqal_query_generate_bnodeid(rq, NULL); if(!id) YYERROR_MSG("BlankNode 2: cannot create bnodeid"); - (yyval.literal) = rasqal_new_simple_literal(((rasqal_query*)rq)->world, + (yyval.literal) = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_BLANK, id); if(!(yyval.literal)) YYERROR_MSG("BlankNode 2: cannot create literal"); } +#line 9344 "sparql_parser.c" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 10608 "sparql_parser.c" +#line 9348 "sparql_parser.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -10626,7 +9366,7 @@ *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* 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. */ @@ -10641,9 +9381,9 @@ goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -10654,7 +9394,7 @@ { ++yynerrs; #if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); + yyerror (rq, yyscanner, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) @@ -10681,7 +9421,7 @@ yymsgp = yymsg; } } - yyerror (yymsgp); + yyerror (rq, yyscanner, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } @@ -10694,20 +9434,20 @@ if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, rq, yyscanner); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -10726,7 +9466,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -10739,35 +9479,37 @@ | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + 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; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp, rq, yyscanner); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -10791,12 +9533,12 @@ yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: - yyerror (YY_("memory exhausted")); + yyerror (rq, yyscanner, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif @@ -10808,16 +9550,16 @@ user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + yytoken, &yylval, rq, yyscanner); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp, rq, yyscanner); YYPOPSTACK (1); } #ifndef yyoverflow @@ -10828,14 +9570,9 @@ if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 5355 "./sparql_parser.y" +#line 5367 "./sparql_parser.y" /* yacc.c:1906 */ @@ -10848,8 +9585,12 @@ static int yy_init_globals (yyscan_t yyscanner ) { return 0; } -/** - * rasqal_sparql_query_language_init - Initialise the SPARQL query language parser +/* + * rasqal_sparql_query_language_init: + * @rdf_query: query + * @name: language name (or NULL) + * + * Internal: Initialise the SPARQL query language parser * * Return value: non 0 on failure **/ @@ -10863,36 +9604,36 @@ rdf_query->compare_flags = RASQAL_COMPARE_XQUERY; /* All the sparql query families support this */ - rqe->sparql10 = 1; - rqe->sparql_query = 1; - /* SPARQL 1.1 is the default */ + rqe->sparql_scda = 1; /* SELECT CONSTRUCT DESCRIBE ASK */ + + /* SPARQL 1.1 Query + Update is the default */ + rqe->sparql_scda = 1; /* SELECT CONSTRUCT DESCRIBE ASK */ rqe->sparql11_query = 1; - rqe->sparql11_aggregates = 1; rqe->sparql11_property_paths = 1; rqe->sparql11_update = 1; - /* SPARQL 1.0 disables SPARQL 1.1 features */ - if(!strncmp(name, "sparql10", 8)) { - rqe->sparql11_query = 0; - rqe->sparql11_aggregates = 0; - rqe->sparql11_property_paths = 0; - rqe->sparql11_update = 0; - } + if(name) { + /* SPARQL 1.0 disables SPARQL 1.1 features */ + if(!strncmp(name, "sparql10", 8)) { + rqe->sparql11_query = 0; + rqe->sparql11_property_paths = 0; + rqe->sparql11_update = 0; + } - if(!strcmp(name, "sparql11-query")) { - /* No update if SPARQL 1.1 query */ - rqe->sparql11_update = 0; - } - - if(!strcmp(name, "sparql11-update")) { - /* No query if SPARQL 1.1 update */ - rqe->sparql_query = 0; - rqe->sparql11_query = 0; + if(!strcmp(name, "sparql11-query")) { + /* No update if SPARQL 1.1 query */ + rqe->sparql11_update = 0; + } + + if(!strcmp(name, "sparql11-update")) { + /* No query (SELECT, CONSTRUCT, DESCRIBE, ASK) if SPARQL 1.1 update */ + rqe->sparql_scda = 0; + } + + /* LAQRS for experiments */ + if(!strcmp(name, "laqrs")) + rqe->experimental = 1; } - - /* LAQRS for experiments */ - if(!strcmp(name, "laqrs")) - rqe->experimental = 1; return 0; } @@ -10981,14 +9722,14 @@ sparql_parser_debug = 1; #endif - sparql_lexer_set_extra(((rasqal_query*)rq), rqe->scanner); + sparql_lexer_set_extra(rq, rqe->scanner); (void)sparql_lexer__scan_buffer(RASQAL_GOOD_CAST(char*, rq->query_string), rq->query_string_length, rqe->scanner); rqe->error_count = 0; - sparql_parser_parse(rq); + sparql_parser_parse(rq, rqe->scanner); sparql_lexer_lex_destroy(rqe->scanner); rqe->scanner_set = 0; @@ -11480,5 +10221,5 @@ return rc; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/sparql_parser.h rasqal-0.9.32/src/sparql_parser.h --- rasqal-0.9.31/src/sparql_parser.h 2013-11-16 19:26:51.000000000 +0000 +++ rasqal-0.9.32/src/sparql_parser.h 2014-02-22 20:28:58.000000000 +0000 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 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 3 of the License, 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, see . */ @@ -26,314 +26,176 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +#ifndef YY_SPARQL_PARSER_SPARQL_PARSER_TAB_H_INCLUDED +# define YY_SPARQL_PARSER_SPARQL_PARSER_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int sparql_parser_debug; +#endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - SELECT = 258, - FROM = 259, - WHERE = 260, - OPTIONAL = 261, - DESCRIBE = 262, - CONSTRUCT = 263, - ASK = 264, - DISTINCT = 265, - REDUCED = 266, - LIMIT = 267, - UNION = 268, - PREFIX = 269, - BASE = 270, - BOUND = 271, - GRAPH = 272, - NAMED = 273, - FILTER = 274, - OFFSET = 275, - ORDER = 276, - BY = 277, - REGEX = 278, - ASC = 279, - DESC = 280, - LANGMATCHES = 281, - A = 282, - STRLANG = 283, - STRDT = 284, - STR = 285, - IRI = 286, - URI = 287, - BNODE = 288, - LANG = 289, - DATATYPE = 290, - ISURI = 291, - ISBLANK = 292, - ISLITERAL = 293, - ISNUMERIC = 294, - SAMETERM = 295, - GROUP = 296, - HAVING = 297, - COUNT = 298, - SUM = 299, - AVG = 300, - MIN = 301, - MAX = 302, - GROUP_CONCAT = 303, - SAMPLE = 304, - SEPARATOR = 305, - DELETE = 306, - INSERT = 307, - WITH = 308, - CLEAR = 309, - CREATE = 310, - SILENT = 311, - DATA = 312, - DROP = 313, - LOAD = 314, - INTO = 315, - DEFAULT = 316, - TO = 317, - ADD = 318, - MOVE = 319, - COPY = 320, - ALL = 321, - COALESCE = 322, - AS = 323, - IF = 324, - NOT = 325, - IN = 326, - BINDINGS = 327, - UNDEF = 328, - SERVICE = 329, - MINUS = 330, - YEAR = 331, - MONTH = 332, - DAY = 333, - HOURS = 334, - MINUTES = 335, - SECONDS = 336, - TIMEZONE = 337, - TZ = 338, - STRLEN = 339, - SUBSTR = 340, - UCASE = 341, - LCASE = 342, - STRSTARTS = 343, - STRENDS = 344, - CONTAINS = 345, - ENCODE_FOR_URI = 346, - CONCAT = 347, - STRBEFORE = 348, - STRAFTER = 349, - REPLACE = 350, - BIND = 351, - ABS = 352, - ROUND = 353, - CEIL = 354, - FLOOR = 355, - RAND = 356, - MD5 = 357, - SHA1 = 358, - SHA224 = 359, - SHA256 = 360, - SHA384 = 361, - SHA512 = 362, - UUID = 363, - STRUUID = 364, - VALUES = 365, - EXPLAIN = 366, - LET = 367, - CURRENT_DATETIME = 368, - NOW = 369, - FROM_UNIXTIME = 370, - TO_UNIXTIME = 371, - HATHAT = 372, - SC_OR = 373, - SC_AND = 374, - EQ = 375, - NEQ = 376, - LT = 377, - GT = 378, - LE = 379, - GE = 380, - ASSIGN = 381, - STRING = 382, - LANGTAG = 383, - DOUBLE_LITERAL = 384, - DOUBLE_POSITIVE_LITERAL = 385, - DOUBLE_NEGATIVE_LITERAL = 386, - INTEGER_LITERAL = 387, - INTEGER_POSITIVE_LITERAL = 388, - INTEGER_NEGATIVE_LITERAL = 389, - DECIMAL_LITERAL = 390, - DECIMAL_POSITIVE_LITERAL = 391, - DECIMAL_NEGATIVE_LITERAL = 392, - BOOLEAN_LITERAL = 393, - URI_LITERAL = 394, - URI_LITERAL_BRACE = 395, - QNAME_LITERAL = 396, - QNAME_LITERAL_BRACE = 397, - BLANK_LITERAL = 398, - IDENTIFIER = 399 - }; + enum yytokentype + { + SELECT = 258, + FROM = 259, + WHERE = 260, + OPTIONAL = 261, + DESCRIBE = 262, + CONSTRUCT = 263, + ASK = 264, + DISTINCT = 265, + REDUCED = 266, + LIMIT = 267, + UNION = 268, + PREFIX = 269, + BASE = 270, + BOUND = 271, + GRAPH = 272, + NAMED = 273, + FILTER = 274, + OFFSET = 275, + ORDER = 276, + BY = 277, + REGEX = 278, + ASC = 279, + DESC = 280, + LANGMATCHES = 281, + A = 282, + STRLANG = 283, + STRDT = 284, + STR = 285, + IRI = 286, + URI = 287, + BNODE = 288, + LANG = 289, + DATATYPE = 290, + ISURI = 291, + ISBLANK = 292, + ISLITERAL = 293, + ISNUMERIC = 294, + SAMETERM = 295, + GROUP = 296, + HAVING = 297, + COUNT = 298, + SUM = 299, + AVG = 300, + MIN = 301, + MAX = 302, + GROUP_CONCAT = 303, + SAMPLE = 304, + SEPARATOR = 305, + DELETE = 306, + INSERT = 307, + WITH = 308, + CLEAR = 309, + CREATE = 310, + SILENT = 311, + DATA = 312, + DROP = 313, + LOAD = 314, + INTO = 315, + DEFAULT = 316, + TO = 317, + ADD = 318, + MOVE = 319, + COPY = 320, + ALL = 321, + COALESCE = 322, + AS = 323, + IF = 324, + NOT = 325, + IN = 326, + BINDINGS = 327, + UNDEF = 328, + SERVICE = 329, + MINUS = 330, + YEAR = 331, + MONTH = 332, + DAY = 333, + HOURS = 334, + MINUTES = 335, + SECONDS = 336, + TIMEZONE = 337, + TZ = 338, + STRLEN = 339, + SUBSTR = 340, + UCASE = 341, + LCASE = 342, + STRSTARTS = 343, + STRENDS = 344, + CONTAINS = 345, + ENCODE_FOR_URI = 346, + CONCAT = 347, + STRBEFORE = 348, + STRAFTER = 349, + REPLACE = 350, + BIND = 351, + ABS = 352, + ROUND = 353, + CEIL = 354, + FLOOR = 355, + RAND = 356, + MD5 = 357, + SHA1 = 358, + SHA224 = 359, + SHA256 = 360, + SHA384 = 361, + SHA512 = 362, + UUID = 363, + STRUUID = 364, + VALUES = 365, + EXPLAIN = 366, + LET = 367, + CURRENT_DATETIME = 368, + NOW = 369, + FROM_UNIXTIME = 370, + TO_UNIXTIME = 371, + HATHAT = 372, + SC_OR = 373, + SC_AND = 374, + EQ = 375, + NEQ = 376, + LT = 377, + GT = 378, + LE = 379, + GE = 380, + ASSIGN = 381, + STRING = 382, + LANGTAG = 383, + DOUBLE_LITERAL = 384, + DOUBLE_POSITIVE_LITERAL = 385, + DOUBLE_NEGATIVE_LITERAL = 386, + INTEGER_LITERAL = 387, + INTEGER_POSITIVE_LITERAL = 388, + INTEGER_NEGATIVE_LITERAL = 389, + DECIMAL_LITERAL = 390, + DECIMAL_POSITIVE_LITERAL = 391, + DECIMAL_NEGATIVE_LITERAL = 392, + BOOLEAN_LITERAL = 393, + URI_LITERAL = 394, + URI_LITERAL_BRACE = 395, + QNAME_LITERAL = 396, + QNAME_LITERAL_BRACE = 397, + BLANK_LITERAL = 398, + IDENTIFIER = 399 + }; #endif -/* Tokens. */ -#define SELECT 258 -#define FROM 259 -#define WHERE 260 -#define OPTIONAL 261 -#define DESCRIBE 262 -#define CONSTRUCT 263 -#define ASK 264 -#define DISTINCT 265 -#define REDUCED 266 -#define LIMIT 267 -#define UNION 268 -#define PREFIX 269 -#define BASE 270 -#define BOUND 271 -#define GRAPH 272 -#define NAMED 273 -#define FILTER 274 -#define OFFSET 275 -#define ORDER 276 -#define BY 277 -#define REGEX 278 -#define ASC 279 -#define DESC 280 -#define LANGMATCHES 281 -#define A 282 -#define STRLANG 283 -#define STRDT 284 -#define STR 285 -#define IRI 286 -#define URI 287 -#define BNODE 288 -#define LANG 289 -#define DATATYPE 290 -#define ISURI 291 -#define ISBLANK 292 -#define ISLITERAL 293 -#define ISNUMERIC 294 -#define SAMETERM 295 -#define GROUP 296 -#define HAVING 297 -#define COUNT 298 -#define SUM 299 -#define AVG 300 -#define MIN 301 -#define MAX 302 -#define GROUP_CONCAT 303 -#define SAMPLE 304 -#define SEPARATOR 305 -#define DELETE 306 -#define INSERT 307 -#define WITH 308 -#define CLEAR 309 -#define CREATE 310 -#define SILENT 311 -#define DATA 312 -#define DROP 313 -#define LOAD 314 -#define INTO 315 -#define DEFAULT 316 -#define TO 317 -#define ADD 318 -#define MOVE 319 -#define COPY 320 -#define ALL 321 -#define COALESCE 322 -#define AS 323 -#define IF 324 -#define NOT 325 -#define IN 326 -#define BINDINGS 327 -#define UNDEF 328 -#define SERVICE 329 -#define MINUS 330 -#define YEAR 331 -#define MONTH 332 -#define DAY 333 -#define HOURS 334 -#define MINUTES 335 -#define SECONDS 336 -#define TIMEZONE 337 -#define TZ 338 -#define STRLEN 339 -#define SUBSTR 340 -#define UCASE 341 -#define LCASE 342 -#define STRSTARTS 343 -#define STRENDS 344 -#define CONTAINS 345 -#define ENCODE_FOR_URI 346 -#define CONCAT 347 -#define STRBEFORE 348 -#define STRAFTER 349 -#define REPLACE 350 -#define BIND 351 -#define ABS 352 -#define ROUND 353 -#define CEIL 354 -#define FLOOR 355 -#define RAND 356 -#define MD5 357 -#define SHA1 358 -#define SHA224 359 -#define SHA256 360 -#define SHA384 361 -#define SHA512 362 -#define UUID 363 -#define STRUUID 364 -#define VALUES 365 -#define EXPLAIN 366 -#define LET 367 -#define CURRENT_DATETIME 368 -#define NOW 369 -#define FROM_UNIXTIME 370 -#define TO_UNIXTIME 371 -#define HATHAT 372 -#define SC_OR 373 -#define SC_AND 374 -#define EQ 375 -#define NEQ 376 -#define LT 377 -#define GT 378 -#define LE 379 -#define GE 380 -#define ASSIGN 381 -#define STRING 382 -#define LANGTAG 383 -#define DOUBLE_LITERAL 384 -#define DOUBLE_POSITIVE_LITERAL 385 -#define DOUBLE_NEGATIVE_LITERAL 386 -#define INTEGER_LITERAL 387 -#define INTEGER_POSITIVE_LITERAL 388 -#define INTEGER_NEGATIVE_LITERAL 389 -#define DECIMAL_LITERAL 390 -#define DECIMAL_POSITIVE_LITERAL 391 -#define DECIMAL_NEGATIVE_LITERAL 392 -#define BOOLEAN_LITERAL 393 -#define URI_LITERAL 394 -#define URI_LITERAL_BRACE 395 -#define QNAME_LITERAL 396 -#define QNAME_LITERAL_BRACE 397 -#define BLANK_LITERAL 398 -#define IDENTIFIER 399 - - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 2068 of yacc.c */ -#line 143 "./sparql_parser.y" +#line 156 "./sparql_parser.y" /* yacc.c:1909 */ raptor_sequence *seq; rasqal_variable *variable; @@ -356,16 +218,14 @@ rasqal_bindings* bindings; sparql_uri_applies* uri_applies; - - -/* Line 2068 of yacc.c */ -#line 363 "sparql_parser.tab.h" -} YYSTYPE; +#line 222 "sparql_parser.tab.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +int sparql_parser_parse (rasqal_query* rq, void* yyscanner); +#endif /* !YY_SPARQL_PARSER_SPARQL_PARSER_TAB_H_INCLUDED */ diff -Nru rasqal-0.9.31/src/sparql_parser.y rasqal-0.9.32/src/sparql_parser.y --- rasqal-0.9.31/src/sparql_parser.y 2013-11-16 19:25:22.000000000 +0000 +++ rasqal-0.9.32/src/sparql_parser.y 2014-02-22 20:28:15.000000000 +0000 @@ -2,7 +2,7 @@ * * sparql_parser.y - Rasqal SPARQL parser over tokens from sparql_lexer.l * - * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ + * Copyright (C) 2004-2014, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ @@ -40,11 +40,8 @@ #include #include -/* Pure parser argument (a void*) */ -#define YYPARSE_PARAM rq #include -#define YY_DECL int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t yyscanner) #define YY_NO_UNISTD_H 1 #include @@ -79,31 +76,23 @@ /* the lexer does not seem to track this */ #undef RASQAL_SPARQL_USE_ERROR_COLUMNS -/* Missing sparql_lexer.c/h prototypes on Bison < 2.6 */ -#if defined(BISON_VERSION) && BISON_VERSION < 206 -int sparql_lexer_get_column(yyscan_t yyscanner); -#endif - -/* What the lexer wants */ -extern int sparql_lexer_lex (YYSTYPE *sparql_parser_lval, yyscan_t scanner); -#define YYLEX_PARAM ((rasqal_sparql_query_language*)(((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) sparql_query_error((rasqal_query*)rq, message) +/* Prototypes */ +int sparql_parser_error(rasqal_query* rq, void* scanner, const char *msg); /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex sparql_lexer_lex +/* Make the yyerror below use the rdf_parser */ +#undef yyerror +#define yyerror(rq, scanner, message) sparql_query_error(rq, message) +/* Prototypes for local functions */ static int sparql_parse(rasqal_query* rq); static void sparql_query_error(rasqal_query* rq, const char *message); static void sparql_query_error_full(rasqal_query *rq, const char *message, ...) RASQAL_PRINTF_FORMAT(2, 3); + static sparql_uri_applies* new_uri_applies(raptor_uri* uri, rasqal_update_graph_applies applies) { @@ -135,8 +124,32 @@ /* directives */ +%require "3.0.0" + +/* File prefix (bison -b) */ +%file-prefix "sparql_parser" -%pure-parser +/* Symbol prefix (bison -d : deprecated) */ +%name-prefix "sparql_parser_" + +/* Write parser header file with macros (bison -d) */ +%defines + +/* Write output file with verbose descriptions of parser states */ +%verbose + +/* Generate code processing locations */ + /* %locations */ + +/* Pure parser - want a reentrant parser */ +%define api.pure full + +/* Push or pull parser? */ +%define api.push-pull pull + +/* Pure parser argument: lexer - yylex() and parser - yyparse() */ +%lex-param { yyscan_t yyscanner } +%parse-param { rasqal_query* rq } { void* yyscanner } /* Interface between lexer and parser */ @@ -505,7 +518,7 @@ Query: Prologue ExplainOpt ReportFormat ValuesClauseOpt { if($4) - ((rasqal_query*)rq)->bindings = $4; + rq->bindings = $4; } ; @@ -514,12 +527,12 @@ ExplainOpt: EXPLAIN { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(sparql->experimental) - ((rasqal_query*)rq)->explain = 1; + rq->explain = 1; else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "EXPLAIN can only used with LAQRS"); YYERROR; } @@ -541,7 +554,7 @@ seq = rasqal_graph_pattern_get_sub_graph_pattern_sequence($1); where_gp = (rasqal_graph_pattern*)raptor_sequence_delete_at(seq, 0); - rasqal_query_store_select_query(((rasqal_query*)rq), + rasqal_query_store_select_query(rq, $1->projection, $1->data_graphs, where_gp, @@ -554,17 +567,17 @@ } | ConstructQuery { - ((rasqal_query*)rq)->constructs = $1; - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_CONSTRUCT; + rq->constructs = $1; + rq->verb = RASQAL_QUERY_VERB_CONSTRUCT; } | DescribeQuery { - ((rasqal_query*)rq)->describes = $1; - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_DESCRIBE; + rq->describes = $1; + rq->verb = RASQAL_QUERY_VERB_DESCRIBE; } | AskQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_ASK; + rq->verb = RASQAL_QUERY_VERB_ASK; } ; @@ -582,43 +595,43 @@ UpdateOperation: DeleteQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_DELETE; + rq->verb = RASQAL_QUERY_VERB_DELETE; } | InsertQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_INSERT; + rq->verb = RASQAL_QUERY_VERB_INSERT; } | UpdateQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } | ClearQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } | CreateQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } | DropQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } | LoadQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } | AddQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } | MoveQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } | CopyQuery { - ((rasqal_query*)rq)->verb = RASQAL_QUERY_VERB_UPDATE; + rq->verb = RASQAL_QUERY_VERB_UPDATE; } ; @@ -634,7 +647,7 @@ /* SPARQL Grammar: BaseDecl */ BaseDeclOpt: BASE URI_LITERAL { - rasqal_query_set_base_uri((rasqal_query*)rq, $2); + rasqal_query_set_base_uri(rq, $2); } | /* empty */ { @@ -646,29 +659,29 @@ /* SPARQL Grammar: PrefixDecl renamed to include optional list */ PrefixDeclListOpt: PrefixDeclListOpt PREFIX IDENTIFIER URI_LITERAL { - raptor_sequence *seq = ((rasqal_query*)rq)->prefixes; + raptor_sequence *seq = rq->prefixes; unsigned const char* prefix_string = $3; size_t prefix_length = 0; if(prefix_string) prefix_length = strlen(RASQAL_GOOD_CAST(const char*, prefix_string)); - if(raptor_namespaces_find_namespace(((rasqal_query*)rq)->namespaces, + if(raptor_namespaces_find_namespace(rq->namespaces, prefix_string, RASQAL_BAD_CAST(int, prefix_length))) { /* A prefix may be defined only once */ - sparql_syntax_warning(((rasqal_query*)rq), + sparql_syntax_warning(rq, "PREFIX %s can be defined only once.", prefix_string ? RASQAL_GOOD_CAST(const char*, prefix_string) : ":"); RASQAL_FREE(char*, prefix_string); raptor_free_uri($4); } else { rasqal_prefix *p; - p = rasqal_new_prefix(((rasqal_query*)rq)->world, prefix_string, $4); + p = rasqal_new_prefix(rq->world, prefix_string, $4); if(!p) YYERROR_MSG("PrefixDeclOpt: failed to create new prefix"); if(raptor_sequence_push(seq, p)) YYERROR_MSG("PrefixDeclOpt: cannot push prefix to seq"); - if(rasqal_query_declare_prefix(((rasqal_query*)rq), p)) { + if(rasqal_query_declare_prefix(rq, p)) { YYERROR_MSG("PrefixDeclOpt: cannot declare prefix"); } } @@ -684,15 +697,15 @@ SelectQuery: SelectClause DatasetClauseListOpt WhereClause SolutionModifier { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "SELECT can only be used with a SPARQL query"); YYERROR; } else { - $$ = rasqal_new_select_graph_pattern((rasqal_query*)rq, + $$ = rasqal_new_select_graph_pattern(rq, $1, $2, $3, $4, NULL); } } @@ -702,7 +715,7 @@ SubSelect: SelectClause WhereClause SolutionModifier ValuesClauseOpt { if($1 && $2 && $3) { - $$ = rasqal_new_select_graph_pattern((rasqal_query*)rq, + $$ = rasqal_new_select_graph_pattern(rq, $1, /* data graphs */ NULL, $2, @@ -736,11 +749,11 @@ */ SelectExpressionList: SelectExpressionListTail { - $$ = rasqal_new_projection((rasqal_query*)rq, $1, 0, 0); + $$ = rasqal_new_projection(rq, $1, 0, 0); } | '*' { - $$ = rasqal_new_projection((rasqal_query*)rq, NULL, /* wildcard */ 1, 0); + $$ = rasqal_new_projection(rq, NULL, /* wildcard */ 1, 0); } ; @@ -791,16 +804,16 @@ | '(' Expression AS VarOrBadVarName ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "SELECT ( expression ) AS Variable cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "SELECT ( expression ) AS Variable can only be used with SPARQL 1.1"); YYERROR; } else if($2 && $4) { if(rasqal_expression_mentions_variable($2, $4)) { - sparql_query_error_full((rasqal_query*)rq, + sparql_query_error_full(rq, "Expression in SELECT ( expression ) AS %s contains the variable name '%s'", $4->name, $4->name); YYERROR; @@ -864,11 +877,11 @@ DistinctOpt: DISTINCT { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "functions with DISTINCT cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "functions with DISTINCT can only be used with SPARQL 1.1"); YYERROR; } @@ -887,7 +900,7 @@ } | '*' { - $$ = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_VARSTAR); } ; @@ -896,15 +909,15 @@ CountAggregateExpression: COUNT '(' DistinctOpt ExpressionOrStar ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "COUNT() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "COUNT() can only be used with SPARQL 1.1"); YYERROR; } else { - $$ = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_aggregate_function_expression(rq->world, RASQAL_EXPR_COUNT, $4, NULL /* params */, $3); if(!$$) @@ -917,15 +930,15 @@ SumAggregateExpression: SUM '(' DistinctOpt Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "SUM() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "SUM() can only be used with SPARQL 1.1"); YYERROR; } else { - $$ = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_aggregate_function_expression(rq->world, RASQAL_EXPR_SUM, $4, NULL /* params */, $3); if(!$$) @@ -938,15 +951,15 @@ AvgAggregateExpression: AVG '(' DistinctOpt Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "AVG() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "AVG() can only be used with SPARQL 1.1"); YYERROR; } else { - $$ = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_aggregate_function_expression(rq->world, RASQAL_EXPR_AVG, $4, NULL /* params */, $3); if(!$$) @@ -959,15 +972,15 @@ MinAggregateExpression: MIN '(' DistinctOpt Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "MIN() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "MIN() can only be used with SPARQL 1.1"); YYERROR; } else { - $$ = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_aggregate_function_expression(rq->world, RASQAL_EXPR_MIN, $4, NULL /* params */, $3); if(!$$) @@ -980,15 +993,15 @@ MaxAggregateExpression: MAX '(' DistinctOpt Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "MAX() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "MAX() can only be used with SPARQL 1.1"); YYERROR; } else { - $$ = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_aggregate_function_expression(rq->world, RASQAL_EXPR_MAX, $4, NULL /* params */, $3); if(!$$) @@ -1000,7 +1013,7 @@ SeparatorOpt: ';' SEPARATOR EQ STRING { - $$ = rasqal_new_string_literal(((rasqal_query*)rq)->world, $4, + $$ = rasqal_new_string_literal(rq->world, $4, NULL /* language */, NULL /* dt uri */, NULL /* dt_qname */); } @@ -1043,12 +1056,12 @@ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "GROUP_CONCAT() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "GROUP_CONCAT() can only be used with SPARQL 1.1"); YYERROR; } else { int flags = 0; @@ -1056,7 +1069,7 @@ if($3) flags |= RASQAL_EXPR_FLAG_DISTINCT; - $$ = rasqal_new_group_concat_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_group_concat_expression(rq->world, flags /* flags */, $4 /* args */, $5 /* separator */); @@ -1070,15 +1083,15 @@ SampleAggregateExpression: SAMPLE '(' DistinctOpt Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql11_aggregates) { - sparql_syntax_error((rasqal_query*)rq, - "SAMPLE() cannot be used with SPARQL 1.0"); + if(!sparql->sparql11_query) { + sparql_syntax_error(rq, + "SAMPLE() can only be used with SPARQL 1.1"); YYERROR; } else { - $$ = rasqal_new_aggregate_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_aggregate_function_expression(rq->world, RASQAL_EXPR_SAMPLE, $4, NULL /* params */, $3); if(!$$) @@ -1094,11 +1107,11 @@ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "CONSTRUCT can only be used with a SPARQL query"); YYERROR; } @@ -1106,11 +1119,11 @@ $$ = $2; if($3) - rasqal_query_add_data_graphs((rasqal_query*)rq, $3); - ((rasqal_query*)rq)->query_graph_pattern = $4; + rasqal_query_add_data_graphs(rq, $3); + rq->query_graph_pattern = $4; if($5) - ((rasqal_query*)rq)->modifier = $5; + rq->modifier = $5; } | CONSTRUCT DatasetClauseListOpt WHERE '{' ConstructTriples '}' SolutionModifier { @@ -1118,10 +1131,10 @@ rasqal_graph_pattern* where_gp; raptor_sequence* seq = NULL; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "CONSTRUCT can only be used with a SPARQL query"); YYERROR; } @@ -1139,7 +1152,7 @@ } } - where_gp = rasqal_new_basic_graph_pattern_from_triples((rasqal_query*)rq, seq); + where_gp = rasqal_new_basic_graph_pattern_from_triples(rq, seq); seq = NULL; if(!where_gp) YYERROR_MSG("ConstructQuery: cannot create graph pattern"); @@ -1147,11 +1160,11 @@ $$ = $5; if($2) - rasqal_query_add_data_graphs((rasqal_query*)rq, $2); - ((rasqal_query*)rq)->query_graph_pattern = where_gp; + rasqal_query_add_data_graphs(rq, $2); + rq->query_graph_pattern = where_gp; if($7) - ((rasqal_query*)rq)->modifier = $7; + rq->modifier = $7; } ; @@ -1162,11 +1175,11 @@ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "DESCRIBE can only be used with a SPARQL query"); YYERROR; } @@ -1174,12 +1187,12 @@ $$ = $2; if($3) - rasqal_query_add_data_graphs((rasqal_query*)rq, $3); + rasqal_query_add_data_graphs(rq, $3); - ((rasqal_query*)rq)->query_graph_pattern = $4; + rq->query_graph_pattern = $4; if($5) - ((rasqal_query*)rq)->modifier = $5; + rq->modifier = $5; } | DESCRIBE '*' DatasetClauseListOpt WhereClauseOpt SolutionModifier @@ -1187,12 +1200,12 @@ $$ = NULL; if($3) - rasqal_query_add_data_graphs((rasqal_query*)rq, $3); + rasqal_query_add_data_graphs(rq, $3); - ((rasqal_query*)rq)->query_graph_pattern = $4; + rq->query_graph_pattern = $4; if($5) - ((rasqal_query*)rq)->modifier = $5; + rq->modifier = $5; } ; @@ -1236,18 +1249,18 @@ DatasetClauseListOpt WhereClause { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); - if(!sparql->sparql_query) { - sparql_syntax_error((rasqal_query*)rq, + if(!sparql->sparql_scda) { + sparql_syntax_error(rq, "ASK can only be used with a SPARQL query"); YYERROR; } if($2) - rasqal_query_add_data_graphs((rasqal_query*)rq, $2); + rasqal_query_add_data_graphs(rq, $2); - ((rasqal_query*)rq)->query_graph_pattern = $3; + rq->query_graph_pattern = $3; } ; @@ -1276,32 +1289,32 @@ DeleteQuery: DELETE DatasetClauseList WhereClauseOpt { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE can only be used with a SPARQL 1.1 Update"); YYERROR; } /* LAQRS: experimental syntax */ - sparql_syntax_warning(((rasqal_query*)rq), + sparql_syntax_warning(rq, "DELETE FROM ... WHERE ... is deprecated LAQRS syntax."); if($2) - rasqal_query_add_data_graphs((rasqal_query*)rq, $2); + rasqal_query_add_data_graphs(rq, $2); - ((rasqal_query*)rq)->query_graph_pattern = $3; + rq->query_graph_pattern = $3; } | DELETE '{' ModifyTemplateList '}' WhereClause { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1321,17 +1334,17 @@ if(!update) { YYERROR_MSG("DeleteQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("DeleteQuery: rasqal_query_add_update_operation failed"); } } | DELETE DATA '{' GraphTriples '}' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1343,7 +1356,7 @@ $4->delete_templates = $4->insert_templates; $4->insert_templates = NULL; $4->flags |= RASQAL_UPDATE_FLAGS_DATA; - rasqal_query_add_update_operation((rasqal_query*)rq, $4); + rasqal_query_add_update_operation(rq, $4); } | DELETE WHERE GroupGraphPattern { @@ -1351,10 +1364,10 @@ rasqal_update_operation* update; raptor_sequence* delete_templates = NULL; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DELETE WHERE { } can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1365,7 +1378,7 @@ /* Turn GP into flattened triples */ if($3) { - delete_templates = rasqal_graph_pattern_get_flattened_triples((rasqal_query*)rq, $3); + delete_templates = rasqal_graph_pattern_get_flattened_triples(rq, $3); rasqal_free_graph_pattern($3); $3 = NULL; } @@ -1381,7 +1394,7 @@ if(!update) { YYERROR_MSG("DeleteQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("DeleteQuery: rasqal_query_add_update_operation failed"); } } @@ -1417,7 +1430,7 @@ if($2) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, $2); + origin_literal = rasqal_new_uri_literal(rq->world, $2); $2 = NULL; rasqal_triples_sequence_set_origin(/* dest */ NULL, seq, origin_literal); @@ -1493,32 +1506,32 @@ InsertQuery: INSERT DatasetClauseList WhereClauseOpt { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "INSERT can only be used with a SPARQL 1.1 Update"); YYERROR; } /* LAQRS: experimental syntax */ - sparql_syntax_warning(((rasqal_query*)rq), + sparql_syntax_warning(rq, "INSERT FROM ... WHERE ... is deprecated LAQRS syntax."); if($2) - rasqal_query_add_data_graphs((rasqal_query*)rq, $2); + rasqal_query_add_data_graphs(rq, $2); - ((rasqal_query*)rq)->query_graph_pattern = $3; + rq->query_graph_pattern = $3; } | INSERT '{' ModifyTemplateList '}' WhereClauseOpt { rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "INSERT can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1536,17 +1549,17 @@ if(!update) { YYERROR_MSG("InsertQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("InsertQuery: rasqal_query_add_update_operation failed"); } } | INSERT DATA '{' GraphTriples '}' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "INSERT DATA can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1555,7 +1568,7 @@ $4->type = RASQAL_UPDATE_TYPE_UPDATE; $4->flags |= RASQAL_UPDATE_FLAGS_DATA; - rasqal_query_add_update_operation((rasqal_query*)rq, $4); + rasqal_query_add_update_operation(rq, $4); } ; @@ -1568,10 +1581,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1579,7 +1592,7 @@ if($2) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, $2); + origin_literal = rasqal_new_uri_literal(rq->world, $2); $2 = NULL; rasqal_triples_sequence_set_origin(/* dest */ NULL, $9, origin_literal); @@ -1600,7 +1613,7 @@ if(!update) { YYERROR_MSG("UpdateQuery 1: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("UpdateQuery 1: rasqal_query_add_update_operation failed"); } } @@ -1611,10 +1624,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1622,7 +1635,7 @@ if($2) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, $2); + origin_literal = rasqal_new_uri_literal(rq->world, $2); $2 = NULL; rasqal_triples_sequence_set_origin(/* dest */ NULL, $5, origin_literal); @@ -1642,7 +1655,7 @@ if(!update) { YYERROR_MSG("UpdateQuery 2: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("UpdateQuery 2: rasqal_query_add_update_operation failed"); } } @@ -1653,10 +1666,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1664,7 +1677,7 @@ if($2) { rasqal_literal* origin_literal; - origin_literal = rasqal_new_uri_literal(((rasqal_query*)rq)->world, $2); + origin_literal = rasqal_new_uri_literal(rq->world, $2); $2 = NULL; rasqal_triples_sequence_set_origin(/* dest */ NULL, $5, origin_literal); @@ -1684,7 +1697,7 @@ if(!update) { YYERROR_MSG("UpdateQuery 3: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("UpdateQuery 3: rasqal_query_add_update_operation failed"); } } @@ -1693,10 +1706,10 @@ { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "WITH can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1706,7 +1719,7 @@ $6->type = RASQAL_UPDATE_TYPE_UPDATE; $6->flags |= RASQAL_UPDATE_FLAGS_DATA; - rasqal_query_add_update_operation((rasqal_query*)rq, $6); + rasqal_query_add_update_operation(rq, $6); } ; @@ -1731,7 +1744,7 @@ | GRAPH DEFAULT { /* Early draft syntax - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "CLEAR GRAPH DEFAULT is replaced by CLEAR DEFAULT in later SPARQL 1.1 drafts"); @@ -1746,10 +1759,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CLEAR (SILENT) DEFAULT | NAMED | ALL can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1768,7 +1781,7 @@ if(!update) { YYERROR_MSG("ClearQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("ClearQuery: rasqal_query_add_update_operation failed"); } } @@ -1778,16 +1791,16 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CLEAR can only be used with a SPARQL 1.1 Update"); YYERROR; } /* Early draft syntax - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "CLEAR is replaced by CLEAR DEFAULT in later SPARQL 1.1 drafts"); update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_CLEAR, @@ -1800,7 +1813,7 @@ if(!update) { YYERROR_MSG("ClearQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("ClearQuery: rasqal_query_add_update_operation failed"); } } @@ -1825,10 +1838,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CREATE (SILENT) can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1843,7 +1856,7 @@ if(!update) { YYERROR_MSG("CreateQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("CreateQuery: rasqal_query_add_update_operation failed"); } } @@ -1852,16 +1865,16 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CREATE (SILENT) GRAPH can only be used with a SPARQL 1.1 Update"); YYERROR; } /* Early draft syntax - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "CREATE (SILENT) GRAPH is replaced by CREATE (SILENT) in later SPARQL 1.1 drafts"); update = rasqal_new_update_operation(RASQAL_UPDATE_TYPE_CREATE, @@ -1874,7 +1887,7 @@ if(!update) { YYERROR_MSG("CreateQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("CreateQuery: rasqal_query_add_update_operation failed"); } } @@ -1887,10 +1900,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "DROP (SILENT) DEFAULT | NAMED | ALL can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -1909,7 +1922,7 @@ if(!update) { YYERROR_MSG("DropQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("DropQuery: rasqal_query_add_update_operation failed"); } } @@ -1964,7 +1977,7 @@ | URI_LITERAL { /* Early draft syntax allowed a list of URIs - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "LOAD INTO is replaced by LOAD INTO GRAPH in later SPARQL 1.1 drafts"); $$ = $1; @@ -1972,7 +1985,7 @@ | DEFAULT { /* Early draft syntax allowed a list of URIs - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "LOAD INTO DEFAULT is replaced by LOAD in later SPARQL 1.1 drafts"); $$ = NULL; @@ -1986,10 +1999,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "LOAD can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -2004,7 +2017,7 @@ if(!update) { YYERROR_MSG("LoadQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("LoadQuery: rasqal_query_add_update_operation failed"); } } @@ -2014,10 +2027,10 @@ int i; raptor_uri* doc_uri; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "LOAD INTO GRAPH / DEFAULT can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -2034,13 +2047,13 @@ if(!update) { YYERROR_MSG("LoadQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("LoadQuery: rasqal_query_add_update_operation failed"); } if(i == 1) /* Early draft syntax allowed a list of URIs - deprecated */ - sparql_syntax_warning((rasqal_query*)rq, + sparql_syntax_warning(rq, "LOAD INTO / DEFAULT is replaced by LOAD INTO GRAPH or LOAD in later SPARQL 1.1 drafts"); @@ -2059,10 +2072,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "ADD (SILENT) TO can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -2077,7 +2090,7 @@ if(!update) { YYERROR_MSG("AddQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("AddQuery: rasqal_query_add_update_operation failed"); } } @@ -2090,10 +2103,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "MOVE (SILENT) TO can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -2108,7 +2121,7 @@ if(!update) { YYERROR_MSG("MoveQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("MoveQuery: rasqal_query_add_update_operation failed"); } } @@ -2121,10 +2134,10 @@ rasqal_sparql_query_language* sparql; rasqal_update_operation* update; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); if(!sparql->sparql11_update) { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "COPY (SILENT) TO can only be used with a SPARQL 1.1 Update"); YYERROR; } @@ -2139,7 +2152,7 @@ if(!update) { YYERROR_MSG("CopyQuery: rasqal_new_update_operation failed"); } else { - if(rasqal_query_add_update_operation(((rasqal_query*)rq), update)) + if(rasqal_query_add_update_operation(rq, update)) YYERROR_MSG("CopyQuery: rasqal_query_add_update_operation failed"); } } @@ -2180,7 +2193,7 @@ raptor_uri* uri = rasqal_literal_as_uri($1); rasqal_data_graph* dg; - dg = rasqal_new_data_graph_from_uri(((rasqal_query*)rq)->world, uri, + dg = rasqal_new_data_graph_from_uri(rq->world, uri, NULL, RASQAL_DATA_GRAPH_BACKGROUND, NULL, NULL, NULL); @@ -2204,7 +2217,7 @@ raptor_uri* uri = rasqal_literal_as_uri($2); rasqal_data_graph* dg; - dg = rasqal_new_data_graph_from_uri(((rasqal_query*)rq)->world, uri, + dg = rasqal_new_data_graph_from_uri(rq->world, uri, uri, RASQAL_DATA_GRAPH_NAMED, NULL, NULL, NULL); @@ -2255,7 +2268,7 @@ /* SPARQL 1.1 Grammar: [18] SolutionModifier */ SolutionModifier: GroupClauseOpt HavingClauseOpt OrderClauseOpt LimitOffsetClausesOpt { - $$ = rasqal_new_solution_modifier((rasqal_query*)rq, + $$ = rasqal_new_solution_modifier(rq, /* order_conditions */ $3, /* group_conditions */ $1, /* having_conditions */ $2, @@ -2324,7 +2337,7 @@ $$ = $2; if($3) { if(rasqal_expression_mentions_variable($$, $3)) { - sparql_query_error_full((rasqal_query*)rq, + sparql_query_error_full(rq, "Expression in GROUP BY ( expression ) AS %s contains the variable name '%s'", $3->name, $3->name); } else { @@ -2332,12 +2345,12 @@ $3->expression = $$; $$ = NULL; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, $3); + l = rasqal_new_variable_literal(rq->world, $3); if(!l) YYERROR_MSG("GroupCondition 4: cannot create variable literal"); $3 = NULL; - $$ = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + $$ = rasqal_new_literal_expression(rq->world, l); if(!$$) YYERROR_MSG("GroupCondition 4: cannot create variable literal expression"); } @@ -2347,10 +2360,10 @@ | Var { rasqal_literal* l; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, $1); + l = rasqal_new_variable_literal(rq->world, $1); if(!l) YYERROR_MSG("GroupCondition 5: cannot create lit"); - $$ = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + $$ = rasqal_new_literal_expression(rq->world, l); if(!$$) YYERROR_MSG("GroupCondition 5: cannot create lit expr"); } @@ -2361,12 +2374,12 @@ GroupClauseOpt: GROUP BY GroupConditionList { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "GROUP BY cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "GROUP BY can only be used with SPARQL 1.1"); YYERROR; } else $$ = $3; @@ -2419,12 +2432,12 @@ HavingClauseOpt: HAVING HavingConditionList { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "HAVING cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "HAVING can only be used with SPARQL 1.1"); YYERROR; } else $$ = $2; @@ -2510,14 +2523,14 @@ /* SPARQL Grammar: OrderCondition */ OrderCondition: ASC BrackettedExpression { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ORDER_COND_ASC, $2); if(!$$) YYERROR_MSG("OrderCondition 1: cannot create expr"); } | DESC BrackettedExpression { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ORDER_COND_DESC, $2); if(!$$) YYERROR_MSG("OrderCondition 2: cannot create expr"); @@ -2525,7 +2538,7 @@ | FunctionCall { /* The direction of ordering is ascending by default */ - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ORDER_COND_ASC, $1); if(!$$) YYERROR_MSG("OrderCondition 3: cannot create expr"); @@ -2534,15 +2547,15 @@ { rasqal_literal* l; rasqal_expression *e; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, $1); + l = rasqal_new_variable_literal(rq->world, $1); if(!l) YYERROR_MSG("OrderCondition 4: cannot create lit"); - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + e = rasqal_new_literal_expression(rq->world, l); if(!e) YYERROR_MSG("OrderCondition 4: cannot create lit expr"); /* The direction of ordering is ascending by default */ - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ORDER_COND_ASC, e); if(!$$) YYERROR_MSG("OrderCondition 1: cannot create expr"); @@ -2550,7 +2563,7 @@ | BrackettedExpression { /* The direction of ordering is ascending by default */ - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ORDER_COND_ASC, $1); if(!$$) YYERROR_MSG("OrderCondition 5: cannot create expr"); @@ -2558,7 +2571,7 @@ | BuiltInCall { /* The direction of ordering is ascending by default */ - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ORDER_COND_ASC, $1); if(!$$) YYERROR_MSG("OrderCondition 6: cannot create expr"); @@ -2703,7 +2716,7 @@ size = raptor_sequence_size($2); - row = rasqal_new_row_for_size(((rasqal_query*)rq)->world, size); + row = rasqal_new_row_for_size(rq->world, size); if(!row) { YYERROR_MSG("DataBlockRow: cannot create row"); } else { @@ -2767,20 +2780,20 @@ RDFLiteral: STRING { - $$ = rasqal_new_string_literal(((rasqal_query*)rq)->world, $1, + $$ = rasqal_new_string_literal(rq->world, $1, NULL /* language */, NULL /* dt uri */, NULL /* dt_qname */); } | STRING LANGTAG { - $$ = rasqal_new_string_literal(((rasqal_query*)rq)->world, $1, + $$ = rasqal_new_string_literal(rq->world, $1, RASQAL_GOOD_CAST(const char*, $2), NULL /* dt uri */, NULL /* dt_qname */); } | STRING HATHAT IRIref { raptor_uri* dt_uri = raptor_uri_copy(rasqal_literal_as_uri($3)); - $$ = rasqal_new_string_literal(((rasqal_query*)rq)->world, $1, + $$ = rasqal_new_string_literal(rq->world, $1, NULL /* language */, dt_uri, NULL /* dt_qname */); rasqal_free_literal($3); @@ -2792,7 +2805,7 @@ const unsigned char *str = $1->string; $1->string = NULL; - $$ = rasqal_new_string_literal(((rasqal_query*)rq)->world, str, + $$ = rasqal_new_string_literal(rq->world, str, NULL /* language */, dt_uri, NULL /* dt_qname */); } @@ -2866,12 +2879,12 @@ if(!$1 && !$2) { - $$ = rasqal_new_2_group_graph_pattern((rasqal_query*)rq, NULL, NULL); + $$ = rasqal_new_2_group_graph_pattern(rq, NULL, NULL); if(!$$) YYERROR_MSG("GroupGraphPattern: cannot create group gp"); } else { if($1) { - formula_gp = rasqal_new_basic_graph_pattern_from_formula((rasqal_query*)rq, + formula_gp = rasqal_new_basic_graph_pattern_from_formula(rq, $1); if(!formula_gp) { if($2) @@ -3003,7 +3016,7 @@ #endif if($3) { - formula_gp = rasqal_new_basic_graph_pattern_from_formula((rasqal_query*)rq, + formula_gp = rasqal_new_basic_graph_pattern_from_formula(rq, $3); if(!formula_gp) { if($1) @@ -3011,7 +3024,7 @@ YYERROR_MSG("GraphPatternList: cannot create formula_gp"); } } - $$ = rasqal_new_2_group_graph_pattern((rasqal_query*)rq, $1, formula_gp); + $$ = rasqal_new_2_group_graph_pattern(rq, $1, formula_gp); if(!$$) YYERROR_MSG("GraphPatternList: cannot create sequence"); @@ -3056,7 +3069,7 @@ fputs("\n", DEBUG_FH); #endif - $$ = rasqal_new_filter_graph_pattern((rasqal_query*)rq, $1); + $$ = rasqal_new_filter_graph_pattern(rq, $1); if(!$$) YYERROR_MSG("GraphPatternListFilter 2: cannot create graph pattern"); @@ -3180,7 +3193,7 @@ raptor_free_sequence(seq); YYERROR_MSG("OptionalGraphPattern 2: sequence push failed"); } else { - $$ = rasqal_new_graph_pattern_from_sequence((rasqal_query*)rq, + $$ = rasqal_new_graph_pattern_from_sequence(rq, seq, RASQAL_GRAPH_PATTERN_OPERATOR_OPTIONAL); if(!$$) @@ -3219,7 +3232,7 @@ raptor_free_sequence(seq); YYERROR_MSG("GraphGraphPattern 2: sequence push failed"); } else { - $$ = rasqal_new_graph_pattern_from_sequence((rasqal_query*)rq, + $$ = rasqal_new_graph_pattern_from_sequence(rq, seq, RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH); if(!$$) @@ -3245,7 +3258,7 @@ /* SPARQL Grammar: ServiceGraphPattern */ ServiceGraphPattern: SERVICE SilentOpt VarOrIRIref GroupGraphPattern { - $$ = rasqal_new_single_graph_pattern((rasqal_query*)rq, + $$ = rasqal_new_single_graph_pattern(rq, RASQAL_GRAPH_PATTERN_OPERATOR_SERVICE, $4); if($$) { @@ -3263,16 +3276,16 @@ Bind: BIND '(' Expression AS Var ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if($3 && $5) { if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "BIND cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "BIND can only be used with SPARQL 1.1"); YYERROR; } else { - $$ = rasqal_new_let_graph_pattern((rasqal_query*)rq, $5, $3); + $$ = rasqal_new_let_graph_pattern(rq, $5, $3); } } else $$ = NULL; @@ -3302,7 +3315,7 @@ /* SPARQL 1.1: InlineDataOneVar */ InlineDataOneVar: Var '{' DataBlockValueListOpt '}' { - $$ = rasqal_new_bindings_from_var_values((rasqal_query*)rq, $1, $3); + $$ = rasqal_new_bindings_from_var_values(rq, $1, $3); } ; @@ -3332,7 +3345,7 @@ InlineDataFull: '(' VarListOpt ')' '{' DataBlockRowListOpt '}' { if($2) { - $$ = rasqal_new_bindings((rasqal_query*)rq, $2, $5); + $$ = rasqal_new_bindings(rq, $2, $5); if(!$$) YYERROR_MSG("InlineDataFull: cannot create bindings"); } else { @@ -3347,7 +3360,7 @@ InlineDataGraphPattern: InlineData { - $$ = rasqal_new_values_graph_pattern((rasqal_query*)rq, $1); + $$ = rasqal_new_values_graph_pattern(rq, $1); if(!$$) YYERROR_MSG("InlineDataGraphPattern: cannot create gp"); } @@ -3357,7 +3370,7 @@ /* SPARQL Grammar: MinusGraphPattern */ MinusGraphPattern: MINUS GroupGraphPattern { - $$ = rasqal_new_single_graph_pattern((rasqal_query*)rq, + $$ = rasqal_new_single_graph_pattern(rq, RASQAL_GRAPH_PATTERN_OPERATOR_MINUS, $2); } @@ -3412,7 +3425,7 @@ raptor_free_sequence(seq); YYERROR_MSG("GroupOrUnionGraphPatternList 2: sequence push failed"); } - $$ = rasqal_new_graph_pattern_from_sequence((rasqal_query*)rq, + $$ = rasqal_new_graph_pattern_from_sequence(rq, seq, RASQAL_GRAPH_PATTERN_OPERATOR_UNION); if(!$$) @@ -3425,14 +3438,14 @@ LetGraphPattern: LET '(' Var ASSIGN Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if($3 && $5) { if(sparql->experimental) - $$ = rasqal_new_let_graph_pattern((rasqal_query*)rq, $3, $5); + $$ = rasqal_new_let_graph_pattern(rq, $3, $5); else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "LET can only be used with LAQRS"); YYERROR; } @@ -3494,9 +3507,9 @@ uri = raptor_uri_copy(uri); if(raptor_sequence_size($4) == 1 && - rasqal_xsd_is_datatype_uri(((rasqal_query*)rq)->world, uri)) { + rasqal_xsd_is_datatype_uri(rq->world, uri)) { rasqal_expression* e = (rasqal_expression*)raptor_sequence_pop($4); - $$ = rasqal_new_cast_expression(((rasqal_query*)rq)->world, uri, e); + $$ = rasqal_new_cast_expression(rq->world, uri, e); if($$) $$->flags |= $3; raptor_free_sequence($4); @@ -3505,7 +3518,7 @@ if($3) flags |= 1; - $$ = rasqal_new_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_function_expression(rq->world, uri, $4, $5 /* params */, flags); if($$) @@ -3533,12 +3546,12 @@ uri = raptor_uri_copy(uri); if(raptor_sequence_size($2) == 1 && - rasqal_xsd_is_datatype_uri(((rasqal_query*)rq)->world, uri)) { + rasqal_xsd_is_datatype_uri(rq->world, uri)) { rasqal_expression* e = (rasqal_expression*)raptor_sequence_pop($2); - $$ = rasqal_new_cast_expression(((rasqal_query*)rq)->world, uri, e); + $$ = rasqal_new_cast_expression(rq->world, uri, e); raptor_free_sequence($2); } else { - $$ = rasqal_new_function_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_function_expression(rq->world, uri, $2, NULL /* params */, 0 /* flags */); } @@ -3554,12 +3567,12 @@ CoalesceExpression: COALESCE ArgList { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "COALESCE cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "COALESCE can only be used with SPARQL 1.1"); YYERROR; } @@ -3570,7 +3583,7 @@ YYERROR_MSG("FunctionCall: cannot create sequence"); } - $$ = rasqal_new_expr_seq_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_expr_seq_expression(rq->world, RASQAL_EXPR_COALESCE, $2); if(!$$) YYERROR_MSG("Coalesce: cannot create expr"); @@ -3810,7 +3823,7 @@ rasqal_triple *t2; int size; - formula = rasqal_new_formula(((rasqal_query*)rq)->world); + formula = rasqal_new_formula(rq->world); if(!formula) { rasqal_free_formula($1); rasqal_free_formula($2); @@ -3922,7 +3935,7 @@ fprintf(DEBUG_FH, " and empty ObjectTail\n"); #endif - formula = rasqal_new_formula(((rasqal_query*)rq)->world); + formula = rasqal_new_formula(rq->world); if(!formula) { rasqal_free_formula($1); if($2) @@ -4004,7 +4017,7 @@ /* SPARQL Grammar: Verb */ Verb: VarOrIRIref { - $$ = rasqal_new_formula(((rasqal_query*)rq)->world); + $$ = rasqal_new_formula(rq->world); if(!$$) { if($1) rasqal_free_literal($1); @@ -4020,16 +4033,16 @@ fprintf(DEBUG_FH, "verb Verb=rdf:type (a)\n"); #endif - uri = raptor_new_uri_for_rdf_concept(((rasqal_query*)rq)->world->raptor_world_ptr, + uri = raptor_new_uri_for_rdf_concept(rq->world->raptor_world_ptr, RASQAL_GOOD_CAST(const unsigned char*, "type")); if(!uri) YYERROR_MSG("Verb 2: uri for rdf concept type failed"); - $$ = rasqal_new_formula(((rasqal_query*)rq)->world); + $$ = rasqal_new_formula(rq->world); if(!$$) { raptor_free_uri(uri); YYERROR_MSG("Verb 2: cannot create formula"); } - $$->value = rasqal_new_uri_literal(((rasqal_query*)rq)->world, uri); + $$->value = rasqal_new_uri_literal(rq->world, uri); if(!$$->value) { rasqal_free_formula($$); $$ = NULL; @@ -4058,7 +4071,7 @@ const unsigned char *id; if($2 == NULL) { - $$ = rasqal_new_formula(((rasqal_query*)rq)->world); + $$ = rasqal_new_formula(rq->world); if(!$$) YYERROR_MSG("BlankNodePropertyList: cannot create formula"); } else { @@ -4069,14 +4082,14 @@ } } - id = rasqal_query_generate_bnodeid((rasqal_query*)rq, NULL); + id = rasqal_query_generate_bnodeid(rq, NULL); if(!id) { rasqal_free_formula($$); $$ = NULL; YYERROR_MSG("BlankNodeProperyList: cannot create bnodeid"); } - $$->value = rasqal_new_simple_literal(((rasqal_query*)rq)->world, + $$->value = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_BLANK, id); if(!$$->value) { rasqal_free_formula($$); @@ -4122,7 +4135,6 @@ Collection: '(' GraphNodeListNotEmpty ')' { int i; - rasqal_query* rdf_query = (rasqal_query*)rq; rasqal_literal* first_identifier = NULL; rasqal_literal* rest_identifier = NULL; rasqal_literal* object = NULL; @@ -4141,7 +4153,7 @@ fprintf(DEBUG_FH, "\n"); #endif - $$ = rasqal_new_formula(((rasqal_query*)rq)->world); + $$ = rasqal_new_formula(rq->world); if(!$$) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create formula"); @@ -4150,18 +4162,18 @@ if(!$$->triples) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create sequence"); - first_identifier = rasqal_new_uri_literal(rdf_query->world, - raptor_uri_copy(rdf_query->world->rdf_first_uri)); + first_identifier = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_first_uri)); if(!first_identifier) YYERR_MSG_GOTO(err_Collection, "Collection: cannot first_identifier"); - rest_identifier = rasqal_new_uri_literal(rdf_query->world, - raptor_uri_copy(rdf_query->world->rdf_rest_uri)); + rest_identifier = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_rest_uri)); if(!rest_identifier) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create rest_identifier"); - object = rasqal_new_uri_literal(rdf_query->world, - raptor_uri_copy(rdf_query->world->rdf_nil_uri)); + object = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_nil_uri)); if(!object) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create nil object"); @@ -4170,11 +4182,11 @@ rasqal_triple *t2; const unsigned char *blank_id = NULL; - blank_id = rasqal_query_generate_bnodeid(rdf_query, NULL); + blank_id = rasqal_query_generate_bnodeid(rq, NULL); if(!blank_id) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create bnodeid"); - blank = rasqal_new_simple_literal(((rasqal_query*)rq)->world, RASQAL_LITERAL_BLANK, blank_id); + blank = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_BLANK, blank_id); if(!blank) YYERR_MSG_GOTO(err_Collection, "Collection: cannot create bnode"); @@ -4350,10 +4362,10 @@ /* SPARQL Grammar Term: [42] VarOrTerm */ VarOrTerm: Var { - $$ = rasqal_new_formula(((rasqal_query*)rq)->world); + $$ = rasqal_new_formula(rq->world); if(!$$) YYERROR_MSG("VarOrTerm 1: cannot create formula"); - $$->value = rasqal_new_variable_literal(((rasqal_query*)rq)->world, $1); + $$->value = rasqal_new_variable_literal(rq->world, $1); if(!$$->value) { rasqal_free_formula($$); $$ = NULL; @@ -4362,7 +4374,7 @@ } | GraphTerm { - $$ = rasqal_new_formula(((rasqal_query*)rq)->world); + $$ = rasqal_new_formula(rq->world); if(!$$) { if($1) rasqal_free_literal($1); @@ -4375,7 +4387,7 @@ /* SPARQL Grammar: VarOrIRIref */ VarOrIRIref: Var { - $$ = rasqal_new_variable_literal(((rasqal_query*)rq)->world, $1); + $$ = rasqal_new_variable_literal(rq->world, $1); if(!$$) YYERROR_MSG("VarOrIRIref: cannot create literal"); } @@ -4400,7 +4412,7 @@ /* NEW Grammar Term made from SPARQL Grammar: Var */ VarName: IDENTIFIER { - $$ = rasqal_variables_table_add(((rasqal_query*)rq)->vars_table, + $$ = rasqal_variables_table_add(rq->vars_table, RASQAL_VARIABLE_TYPE_NORMAL, $1, NULL); if(!$$) YYERROR_MSG("VarName: cannot create var"); @@ -4420,7 +4432,7 @@ | VarName { $$ = $1; - sparql_syntax_warning(((rasqal_query*)rq), + sparql_syntax_warning(rq, "... AS varname is deprecated LAQRS syntax, use ... AS ?varname"); } ; @@ -4449,8 +4461,8 @@ } | '(' ')' { - $$ = rasqal_new_uri_literal(((rasqal_query*)rq)->world, - raptor_uri_copy(((rasqal_query*)rq)->world->rdf_nil_uri)); + $$ = rasqal_new_uri_literal(rq->world, + raptor_uri_copy(rq->world->rdf_nil_uri)); if(!$$) YYERROR_MSG("GraphTerm: cannot create literal"); } @@ -4467,7 +4479,7 @@ /* SPARQL Grammar: ConditionalOrExpression */ ConditionalOrExpression: ConditionalOrExpression SC_OR ConditionalAndExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_OR, $1, $3); if(!$$) YYERROR_MSG("ConditionalOrExpression: cannot create expr"); @@ -4482,7 +4494,7 @@ /* SPARQL Grammar: ConditionalAndExpression */ ConditionalAndExpression: ConditionalAndExpression SC_AND RelationalExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_AND, $1, $3); if(!$$) YYERROR_MSG("ConditionalAndExpression: cannot create expr"); @@ -4499,54 +4511,54 @@ /* SPARQL Grammar: RelationalExpression */ RelationalExpression: AdditiveExpression EQ AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_EQ, $1, $3); if(!$$) YYERROR_MSG("RelationalExpression 1: cannot create expr"); } | AdditiveExpression NEQ AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_NEQ, $1, $3); if(!$$) YYERROR_MSG("RelationalExpression 2: cannot create expr"); } | AdditiveExpression LT AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_LT, $1, $3); if(!$$) YYERROR_MSG("RelationalExpression 3: cannot create expr"); } | AdditiveExpression GT AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_GT, $1, $3); if(!$$) YYERROR_MSG("RelationalExpression 4: cannot create expr"); } | AdditiveExpression LE AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_LE, $1, $3); if(!$$) YYERROR_MSG("RelationalExpression 5: cannot create expr"); } | AdditiveExpression GE AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_GE, $1, $3); if(!$$) YYERROR_MSG("RelationalExpression 6: cannot create expr"); } | AdditiveExpression IN ArgList { - $$ = rasqal_new_set_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_set_expression(rq->world, RASQAL_EXPR_IN, $1, $3); } | AdditiveExpression NOT IN ArgList { - $$ = rasqal_new_set_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_set_expression(rq->world, RASQAL_EXPR_NOT_IN, $1, $4); } | AdditiveExpression @@ -4560,14 +4572,14 @@ /* SPARQL Grammar: AdditiveExpression */ AdditiveExpression: MultiplicativeExpression '+' AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_PLUS, $1, $3); if(!$$) YYERROR_MSG("AdditiveExpression 1: cannot create expr"); } | MultiplicativeExpression '-' AdditiveExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_MINUS, $1, $3); if(!$$) YYERROR_MSG("AdditiveExpression 2: cannot create expr"); @@ -4575,12 +4587,12 @@ | MultiplicativeExpression NumericLiteralPositive { rasqal_expression *e; - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, $2); + e = rasqal_new_literal_expression(rq->world, $2); if(!e) { rasqal_free_expression($1); YYERROR_MSG("AdditiveExpression 3: cannot create expr"); } - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_PLUS, $1, e); if(!$$) YYERROR_MSG("AdditiveExpression 4: cannot create expr"); @@ -4588,12 +4600,12 @@ | MultiplicativeExpression NumericLiteralNegative { rasqal_expression *e; - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, $2); + e = rasqal_new_literal_expression(rq->world, $2); if(!e) { rasqal_free_expression($1); YYERROR_MSG("AdditiveExpression 5: cannot create expr"); } - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_PLUS, $1, e); if(!$$) YYERROR_MSG("AdditiveExpression 6: cannot create expr"); @@ -4607,14 +4619,14 @@ /* SPARQL Grammar: MultiplicativeExpression */ MultiplicativeExpression: UnaryExpression '*' MultiplicativeExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_STAR, $1, $3); if(!$$) YYERROR_MSG("MultiplicativeExpression 1: cannot create expr"); } | UnaryExpression '/' MultiplicativeExpression { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_SLASH, $1, $3); if(!$$) YYERROR_MSG("MultiplicativeExpression 2: cannot create expr"); @@ -4629,7 +4641,7 @@ /* SPARQL Grammar: UnaryExpression */ UnaryExpression: '!' PrimaryExpression { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_BANG, $2); if(!$$) YYERROR_MSG("UnaryExpression 1: cannot create expr"); @@ -4640,7 +4652,7 @@ } | '-' PrimaryExpression { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_UMINUS, $2); if(!$$) YYERROR_MSG("UnaryExpression 3: cannot create expr"); @@ -4678,17 +4690,17 @@ } | GraphTerm { - $$ = rasqal_new_literal_expression(((rasqal_query*)rq)->world, $1); + $$ = rasqal_new_literal_expression(rq->world, $1); if(!$$) YYERROR_MSG("PrimaryExpression 4: cannot create expr"); } | Var { rasqal_literal *l; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, $1); + l = rasqal_new_variable_literal(rq->world, $1); if(!l) YYERROR_MSG("PrimaryExpression 5: cannot create literal"); - $$ = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + $$ = rasqal_new_literal_expression(rq->world, l); if(!$$) YYERROR_MSG("PrimaryExpression 5: cannot create expr"); } @@ -4710,28 +4722,28 @@ /* SPARQL Grammar: BuiltInCall */ BuiltInCall: STR '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_STR, $3); if(!$$) YYERROR_MSG("BuiltInCall 1: cannot create expr"); } | LANG '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_LANG, $3); if(!$$) YYERROR_MSG("BuiltInCall 2: cannot create expr"); } | LANGMATCHES '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_LANGMATCHES, $3, $5); if(!$$) YYERROR_MSG("BuiltInCall 3: cannot create expr"); } | DATATYPE '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_DATATYPE, $3); if(!$$) YYERROR_MSG("BuiltInCall 4: cannot create expr"); @@ -4740,132 +4752,132 @@ { rasqal_literal *l; rasqal_expression *e; - l = rasqal_new_variable_literal(((rasqal_query*)rq)->world, $3); + l = rasqal_new_variable_literal(rq->world, $3); if(!l) YYERROR_MSG("BuiltInCall 5: cannot create literal"); - e = rasqal_new_literal_expression(((rasqal_query*)rq)->world, l); + e = rasqal_new_literal_expression(rq->world, l); if(!e) YYERROR_MSG("BuiltInCall 6: cannot create literal expr"); - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_BOUND, e); if(!$$) YYERROR_MSG("BuiltInCall 7: cannot create expr"); } | IRI '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_IRI, $3); if(!$$) YYERROR_MSG("BuiltInCall 7a: cannot create expr"); } | URI '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_IRI, $3); if(!$$) YYERROR_MSG("BuiltInCall 7b: cannot create expr"); } | BNODE '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_BNODE, $3); if(!$$) YYERROR_MSG("BuiltInCall 7c: cannot create expr"); } | BNODE '(' ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_BNODE, NULL); if(!$$) YYERROR_MSG("BuiltInCall 7d: cannot create expr"); } | RAND '(' ')' { - $$ = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_RAND); if(!$$) YYERROR_MSG("BuiltInCall 7e: cannot create expr"); } | ABS '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ABS, $3); if(!$$) YYERROR_MSG("BuiltInCall 7f: cannot create expr"); } | CEIL '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_CEIL, $3); if(!$$) YYERROR_MSG("BuiltInCall 7g: cannot create expr"); } | FLOOR '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_FLOOR, $3); if(!$$) YYERROR_MSG("BuiltInCall 7h: cannot create expr"); } | ROUND '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ROUND, $3); if(!$$) YYERROR_MSG("BuiltInCall 7i: cannot create expr"); } | MD5 '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_MD5, $3); if(!$$) YYERROR_MSG("BuiltInCall 7j: cannot create expr"); } | SHA1 '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_SHA1, $3); if(!$$) YYERROR_MSG("BuiltInCall 7k: cannot create expr"); } | SHA224 '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_SHA224, $3); if(!$$) YYERROR_MSG("BuiltInCall 7l: cannot create expr"); } | SHA256 '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_SHA256, $3); if(!$$) YYERROR_MSG("BuiltInCall 7m: cannot create expr"); } | SHA384 '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_SHA384, $3); if(!$$) YYERROR_MSG("BuiltInCall 7n: cannot create expr"); } | SHA512 '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_SHA512, $3); if(!$$) YYERROR_MSG("BuiltInCall 7o: cannot create expr"); } | UUID '(' ')' { - $$ = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_UUID); if(!$$) YYERROR_MSG("BuiltInCall 7p: cannot create expr"); } | STRUUID '(' ')' { - $$ = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_STRUUID); if(!$$) YYERROR_MSG("BuiltInCall 7q: cannot create expr"); @@ -4880,56 +4892,56 @@ } | IF '(' Expression ',' Expression ',' Expression ')' { - $$ = rasqal_new_3op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_3op_expression(rq->world, RASQAL_EXPR_IF, $3, $5, $7); if(!$$) YYERROR_MSG("BuiltInCall 7e: cannot create expr"); } | STRLANG '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_STRLANG, $3, $5); if(!$$) YYERROR_MSG("BuiltInCall 7f: cannot create expr"); } | STRDT '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_STRDT, $3, $5); if(!$$) YYERROR_MSG("BuiltInCall 7g: cannot create expr"); } | SAMETERM '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_SAMETERM, $3, $5); if(!$$) YYERROR_MSG("BuiltInCall 8: cannot create expr"); } | ISURI '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ISURI, $3); if(!$$) YYERROR_MSG("BuiltInCall 9: cannot create expr"); } | ISBLANK '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ISBLANK, $3); if(!$$) YYERROR_MSG("BuiltInCall 10: cannot create expr"); } | ISLITERAL '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ISLITERAL, $3); if(!$$) YYERROR_MSG("BuiltInCall 11: cannot create expr"); } | ISNUMERIC '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ISNUMERIC, $3); if(!$$) YYERROR_MSG("BuiltInCall 12: cannot create expr"); @@ -4951,98 +4963,98 @@ StringExpression: STRLEN '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_STRLEN, $3); if(!$$) YYERROR_MSG("StringExpression: cannot create STRLEN() expr"); } | SUBSTR '(' Expression ',' Expression ')' { - $$ = rasqal_new_3op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_3op_expression(rq->world, RASQAL_EXPR_SUBSTR, $3, $5, NULL); if(!$$) YYERROR_MSG("StringExpression: cannot create SUBSTR() expr"); } | SUBSTR '(' Expression ',' Expression ',' Expression ')' { - $$ = rasqal_new_3op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_3op_expression(rq->world, RASQAL_EXPR_SUBSTR, $3, $5, $7); if(!$$) YYERROR_MSG("StringExpression: cannot create SUBSTR() expr"); } | UCASE '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_UCASE, $3); if(!$$) YYERROR_MSG("StringExpression: cannot create UCASE() expr"); } | LCASE '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_LCASE, $3); if(!$$) YYERROR_MSG("StringExpression: cannot create LCASE() expr"); } | STRSTARTS '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_STRSTARTS, $3, $5); if(!$$) YYERROR_MSG("StringExpression: cannot create STRSTARTS() expr"); } | STRENDS '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_STRENDS, $3, $5); if(!$$) YYERROR_MSG("StringExpression: cannot create STRENDS() expr"); } | CONTAINS '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_CONTAINS, $3, $5); if(!$$) YYERROR_MSG("StringExpression: cannot create YEAR expr"); } | ENCODE_FOR_URI '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_ENCODE_FOR_URI, $3); if(!$$) YYERROR_MSG("StringExpression: cannot create ENCODE_FOR_URI() expr"); } | CONCAT '(' ExpressionList ')' { - $$ = rasqal_new_expr_seq_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_expr_seq_expression(rq->world, RASQAL_EXPR_CONCAT, $3); if(!$$) YYERROR_MSG("StringExpression: cannot create CONCAT() expr"); } | STRBEFORE '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_STRBEFORE, $3, $5); if(!$$) YYERROR_MSG("StringExpression: cannot create STRBEFORE() expr"); } | STRAFTER '(' Expression ',' Expression ')' { - $$ = rasqal_new_2op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_2op_expression(rq->world, RASQAL_EXPR_STRAFTER, $3, $5); if(!$$) YYERROR_MSG("StringExpression: cannot create STRAFTER() expr"); } | REPLACE '(' Expression ',' Expression ',' Expression ')' { - $$ = rasqal_new_3op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_3op_expression(rq->world, RASQAL_EXPR_REPLACE, $3, $5, $7); if(!$$) YYERROR_MSG("StringExpression: cannot create REPLACE() expr"); } | REPLACE '(' Expression ',' Expression ',' Expression ',' Expression ')' { - $$ = rasqal_new_4op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_4op_expression(rq->world, RASQAL_EXPR_REPLACE, $3, $5, $7, $9); if(!$$) YYERROR_MSG("StringExpression: cannot create REPLACE() expr"); @@ -5053,14 +5065,14 @@ /* SPARQL Grammar: RegexExpression */ RegexExpression: REGEX '(' Expression ',' Expression ')' { - $$ = rasqal_new_3op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_3op_expression(rq->world, RASQAL_EXPR_REGEX, $3, $5, NULL); if(!$$) YYERROR_MSG("RegexExpression 1: cannot create expr"); } | REGEX '(' Expression ',' Expression ',' Expression ')' { - $$ = rasqal_new_3op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_3op_expression(rq->world, RASQAL_EXPR_REGEX, $3, $5, $7); if(!$$) YYERROR_MSG("RegexExpression 2: cannot create expr"); @@ -5071,56 +5083,56 @@ /* SPARQL 1.1 pre-draft */ DatetimeBuiltinAccessors: YEAR '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_YEAR, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create YEAR expr"); } | MONTH '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_MONTH, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create MONTH expr"); } | DAY '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_DAY, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create DAY expr"); } | HOURS '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_HOURS, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create HOURS expr"); } | MINUTES '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_MINUTES, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create MINUTES expr"); } | SECONDS '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_SECONDS, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create SECONDS expr"); } | TIMEZONE '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_TIMEZONE, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create TIMEZONE expr"); } | TZ '(' Expression ')' { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_TZ, $3); if(!$$) YYERROR_MSG("DatetimeBuiltinAccessors: cannot create TZ expr"); @@ -5132,16 +5144,16 @@ DatetimeExtensions: CURRENT_DATETIME '(' ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(sparql->experimental) { - $$ = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_CURRENT_DATETIME); if(!$$) YYERROR_MSG("DatetimeExtensions: cannot create CURRENT_DATETIME() expr"); } else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "CURRENT_DATETIME() can only used with LAQRS"); YYERROR; } @@ -5149,16 +5161,16 @@ | NOW '(' ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(!sparql->sparql11_query) { - sparql_syntax_error((rasqal_query*)rq, - "NOW() cannot be used with SPARQL 1.0"); + sparql_syntax_error(rq, + "NOW() can only be used with SPARQL 1.1"); YYERROR; } - $$ = rasqal_new_0op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_0op_expression(rq->world, RASQAL_EXPR_NOW); if(!$$) YYERROR_MSG("DatetimeExtensions: cannot create NOW()"); @@ -5167,16 +5179,16 @@ | FROM_UNIXTIME '(' Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(sparql->experimental) { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_FROM_UNIXTIME, $3); if(!$$) YYERROR_MSG("DatetimeExtensions: cannot create FROM_UNIXTIME() expr"); } else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "FROM_UNIXTIME() can only used with LAQRS"); YYERROR; } @@ -5185,16 +5197,16 @@ | TO_UNIXTIME '(' Expression ')' { rasqal_sparql_query_language* sparql; - sparql = (rasqal_sparql_query_language*)(((rasqal_query*)rq)->context); + sparql = (rasqal_sparql_query_language*)(rq->context); $$ = NULL; if(sparql->experimental) { - $$ = rasqal_new_1op_expression(((rasqal_query*)rq)->world, + $$ = rasqal_new_1op_expression(rq->world, RASQAL_EXPR_TO_UNIXTIME, $3); if(!$$) YYERROR_MSG("DatetimeExtensions: cannot create TO_UNIXTIME() expr"); } else { - sparql_syntax_error((rasqal_query*)rq, + sparql_syntax_error(rq, "TO_UNIXTIME() can only used with LAQRS"); YYERROR; } @@ -5209,18 +5221,18 @@ /* NEW Grammar Term made from SPARQL Grammar: IRIref + '(' expanded */ IRIrefBrace: URI_LITERAL_BRACE { - $$ = rasqal_new_uri_literal(((rasqal_query*)rq)->world, $1); + $$ = rasqal_new_uri_literal(rq->world, $1); if(!$$) YYERROR_MSG("IRIrefBrace 1: cannot create literal"); } | QNAME_LITERAL_BRACE { - $$ = rasqal_new_simple_literal(((rasqal_query*)rq)->world, + $$ = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_QNAME, $1); if(!$$) YYERROR_MSG("IRIrefBrace 2: cannot create literal"); - if(rasqal_literal_expand_qname((rasqal_query*)rq, $$)) { - sparql_query_error_full((rasqal_query*)rq, + if(rasqal_literal_expand_qname(rq, $$)) { + sparql_query_error_full(rq, "QName %s cannot be expanded", $1); rasqal_free_literal($$); $$ = NULL; @@ -5302,18 +5314,18 @@ /* SPARQL Grammar: IRIref */ IRIref: URI_LITERAL { - $$ = rasqal_new_uri_literal(((rasqal_query*)rq)->world, $1); + $$ = rasqal_new_uri_literal(rq->world, $1); if(!$$) YYERROR_MSG("IRIref 1: cannot create literal"); } | QNAME_LITERAL { - $$ = rasqal_new_simple_literal(((rasqal_query*)rq)->world, + $$ = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_QNAME, $1); if(!$$) YYERROR_MSG("IRIref 2: cannot create literal"); - if(rasqal_literal_expand_qname((rasqal_query*)rq, $$)) { - sparql_query_error_full((rasqal_query*)rq, + if(rasqal_literal_expand_qname(rq, $$)) { + sparql_query_error_full(rq, "QName %s cannot be expanded", $1); rasqal_free_literal($$); $$ = NULL; @@ -5328,17 +5340,17 @@ /* SPARQL Grammar: BlankNode */ BlankNode: BLANK_LITERAL { - $$ = rasqal_new_simple_literal(((rasqal_query*)rq)->world, + $$ = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_BLANK, $1); if(!$$) YYERROR_MSG("BlankNode 1: cannot create literal"); } | '[' ']' { const unsigned char *id; - id = rasqal_query_generate_bnodeid((rasqal_query*)rq, NULL); + id = rasqal_query_generate_bnodeid(rq, NULL); if(!id) YYERROR_MSG("BlankNode 2: cannot create bnodeid"); - $$ = rasqal_new_simple_literal(((rasqal_query*)rq)->world, + $$ = rasqal_new_simple_literal(rq->world, RASQAL_LITERAL_BLANK, id); if(!$$) YYERROR_MSG("BlankNode 2: cannot create literal"); @@ -5364,8 +5376,12 @@ static int yy_init_globals (yyscan_t yyscanner ) { return 0; }; -/** - * rasqal_sparql_query_language_init - Initialise the SPARQL query language parser +/* + * rasqal_sparql_query_language_init: + * @rdf_query: query + * @name: language name (or NULL) + * + * Internal: Initialise the SPARQL query language parser * * Return value: non 0 on failure **/ @@ -5379,36 +5395,36 @@ rdf_query->compare_flags = RASQAL_COMPARE_XQUERY; /* All the sparql query families support this */ - rqe->sparql10 = 1; - rqe->sparql_query = 1; - /* SPARQL 1.1 is the default */ + rqe->sparql_scda = 1; /* SELECT CONSTRUCT DESCRIBE ASK */ + + /* SPARQL 1.1 Query + Update is the default */ + rqe->sparql_scda = 1; /* SELECT CONSTRUCT DESCRIBE ASK */ rqe->sparql11_query = 1; - rqe->sparql11_aggregates = 1; rqe->sparql11_property_paths = 1; rqe->sparql11_update = 1; - /* SPARQL 1.0 disables SPARQL 1.1 features */ - if(!strncmp(name, "sparql10", 8)) { - rqe->sparql11_query = 0; - rqe->sparql11_aggregates = 0; - rqe->sparql11_property_paths = 0; - rqe->sparql11_update = 0; - } + if(name) { + /* SPARQL 1.0 disables SPARQL 1.1 features */ + if(!strncmp(name, "sparql10", 8)) { + rqe->sparql11_query = 0; + rqe->sparql11_property_paths = 0; + rqe->sparql11_update = 0; + } - if(!strcmp(name, "sparql11-query")) { - /* No update if SPARQL 1.1 query */ - rqe->sparql11_update = 0; - } - - if(!strcmp(name, "sparql11-update")) { - /* No query if SPARQL 1.1 update */ - rqe->sparql_query = 0; - rqe->sparql11_query = 0; + if(!strcmp(name, "sparql11-query")) { + /* No update if SPARQL 1.1 query */ + rqe->sparql11_update = 0; + } + + if(!strcmp(name, "sparql11-update")) { + /* No query (SELECT, CONSTRUCT, DESCRIBE, ASK) if SPARQL 1.1 update */ + rqe->sparql_scda = 0; + } + + /* LAQRS for experiments */ + if(!strcmp(name, "laqrs")) + rqe->experimental = 1; } - - /* LAQRS for experiments */ - if(!strcmp(name, "laqrs")) - rqe->experimental = 1; return 0; } @@ -5497,14 +5513,14 @@ sparql_parser_debug = 1; #endif - sparql_lexer_set_extra(((rasqal_query*)rq), rqe->scanner); + sparql_lexer_set_extra(rq, rqe->scanner); (void)sparql_lexer__scan_buffer(RASQAL_GOOD_CAST(char*, rq->query_string), rq->query_string_length, rqe->scanner); rqe->error_count = 0; - sparql_parser_parse(rq); + sparql_parser_parse(rq, rqe->scanner); sparql_lexer_lex_destroy(rqe->scanner); rqe->scanner_set = 0; @@ -5996,4 +6012,5 @@ return rc; } -#endif + +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/strcasecmp.c rasqal-0.9.32/src/strcasecmp.c --- rasqal-0.9.31/src/strcasecmp.c 2012-02-16 05:54:24.000000000 +0000 +++ rasqal-0.9.32/src/strcasecmp.c 2014-02-20 05:00:40.000000000 +0000 @@ -22,6 +22,8 @@ #include "rasqal_internal.h" +#ifndef STANDALONE + int rasqal_strcasecmp(const char* s1, const char* s2) { @@ -56,6 +58,7 @@ return 0; } +#endif /* not STANDALONE */ #ifdef STANDALONE @@ -115,4 +118,4 @@ return failures; } -#endif +#endif /* STANDALONE */ diff -Nru rasqal-0.9.31/src/win32_rasqal_config.h rasqal-0.9.32/src/win32_rasqal_config.h --- rasqal-0.9.31/src/win32_rasqal_config.h 2013-12-13 15:06:28.000000000 +0000 +++ rasqal-0.9.32/src/win32_rasqal_config.h 2014-02-23 16:39:47.000000000 +0000 @@ -109,10 +109,10 @@ #include /* Release version as a decimal */ -#define RASQAL_VERSION 931 +#define RASQAL_VERSION 932 /* Version number of package */ -#define RASQAL_VERSION_STRING "0.9.31" +#define RASQAL_VERSION_STRING "0.9.32" /* Major version number */ #define RASQAL_VERSION_MAJOR 0 @@ -121,7 +121,7 @@ #define RASQAL_VERSION_MINOR 9 /* Release version number */ -#define RASQAL_VERSION_RELEASE 31 +#define RASQAL_VERSION_RELEASE 32 /* This is a SPARQL token define */ diff -Nru rasqal-0.9.31/tests/algebra/Makefile.am rasqal-0.9.32/tests/algebra/Makefile.am --- rasqal-0.9.31/tests/algebra/Makefile.am 2010-12-03 05:36:30.000000000 +0000 +++ rasqal-0.9.32/tests/algebra/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -54,7 +54,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Algebra Conversions\"; t:path \"`pwd`:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Algebra Conversions\"; t:path \"$(abs_builddir):$$PATH\"; mf:entries ("; \ for test in $(ALGEBRA_TEST_FILES); do \ comment="SPARQL algebra $$test"; \ base=$(BASE_URI)$$test; \ diff -Nru rasqal-0.9.31/tests/algebra/Makefile.in rasqal-0.9.32/tests/algebra/Makefile.in --- rasqal-0.9.31/tests/algebra/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/tests/algebra/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -137,6 +137,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -209,7 +210,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -238,8 +238,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -599,7 +597,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Algebra Conversions\"; t:path \"`pwd`:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Algebra Conversions\"; t:path \"$(abs_builddir):$$PATH\"; mf:entries ("; \ for test in $(ALGEBRA_TEST_FILES); do \ comment="SPARQL algebra $$test"; \ base=$(BASE_URI)$$test; \ diff -Nru rasqal-0.9.31/tests/engine/Makefile.in rasqal-0.9.32/tests/engine/Makefile.in --- rasqal-0.9.31/tests/engine/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/tests/engine/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -153,6 +153,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -225,7 +226,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -254,8 +254,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/improve rasqal-0.9.32/tests/improve --- rasqal-0.9.31/tests/improve 2011-08-07 21:49:41.000000000 +0000 +++ rasqal-0.9.32/tests/improve 2014-02-23 15:22:04.000000000 +0000 @@ -21,7 +21,6 @@ # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # REQUIRES: -# 'rapper' from raptor in the PATH (or where envariable RAPPER is) # GNU 'make' in the PATH (or where envariable MAKE is) # @@ -30,9 +29,22 @@ use File::Basename; use Getopt::Long; use Pod::Usage; -use Cwd 'abs_path'; +use Cwd qw(abs_path getcwd); + +sub get_utils_dir() { + my $dir = getcwd; + while($dir ne '' && ! -d "$dir/utils") { + $dir =~ s{/[^/]+$}{}; + } + if($dir eq '') { + die "$0: Could not find 'utils' dir in parent directories\n"; + } + $dir . "/utils"; +} + +our $UTILS_DIR = get_utils_dir(); +our $TO_NTRIPLES = $ENV{TO_NTRIPLES} || $UTILS_DIR. '/to-ntriples'; -our $RAPPER=$ENV{RAPPER} || 'rapper'; our $MAKE=$ENV{MAKE} || 'make'; our $INDENT=' '; our $mf='http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#'; @@ -83,8 +95,8 @@ my $manifest_node; my $entries_node; - my $rapper_error='rapper.err'; - my $cmd="$RAPPER -q -i turtle -o ntriples $plan_file 2> $rapper_error"; + my $to_ntriples_error='to_ntriples.err'; + my $cmd="$TO_NTRIPLES $plan_file 2> $to_ntriples_error"; print STDERR "$program: Running pipe from $cmd\n" if $debug > 1; open(MF, "$cmd |") @@ -100,12 +112,12 @@ $entries_node=$o if $p eq "<${mf}entries>"; } close(MF); - if(!-z $rapper_error) { - my $status = {status => 'fail', details => `cat $rapper_error` }; - unlink $rapper_error; + if(!-z $to_ntriples_error) { + my $status = {status => 'fail', details => `cat $to_ntriples_error` }; + unlink $to_ntriples_error; return $status; } - unlink $rapper_error; + unlink $to_ntriples_error; warn "Manifest node is '$manifest_node'\n" @@ -422,7 +434,10 @@ print $fh $indent; for my $counter (@counters) { - my $count=ref($result->{$counter}) ? (scalar(@{$result->{$counter}}) || 0) : $result->{$counter}; + my $count=0; + if(defined($result->{$counter}) && ref($result->{$counter})) { + $count = scalar(@{$result->{$counter}}); + } print $fh ucfirst($counter).": ".$count." "; } print $fh "\n"; diff -Nru rasqal-0.9.31/tests/laqrs/Makefile.in rasqal-0.9.32/tests/laqrs/Makefile.in --- rasqal-0.9.31/tests/laqrs/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/tests/laqrs/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -149,6 +149,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -221,7 +222,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -250,8 +250,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/laqrs/syntax/Makefile.in rasqal-0.9.32/tests/laqrs/syntax/Makefile.in --- rasqal-0.9.31/tests/laqrs/syntax/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/tests/laqrs/syntax/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/Makefile.in rasqal-0.9.32/tests/Makefile.in --- rasqal-0.9.31/tests/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/tests/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -152,6 +152,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -224,7 +225,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -253,8 +253,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/sparql/aggregate/Makefile.am rasqal-0.9.32/tests/sparql/aggregate/Makefile.am --- rasqal-0.9.31/tests/sparql/aggregate/Makefile.am 2010-12-03 05:42:58.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/aggregate/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -106,7 +106,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL 1.1 Query Aggregates\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL 1.1 Query Aggregates\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -i sparql11 -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/aggregate/Makefile.in rasqal-0.9.32/tests/sparql/aggregate/Makefile.in --- rasqal-0.9.31/tests/sparql/aggregate/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/aggregate/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -540,7 +538,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL 1.1 Query Aggregates\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL 1.1 Query Aggregates\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -i sparql11 -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/bound/Makefile.am rasqal-0.9.32/tests/sparql/bound/Makefile.am --- rasqal-0.9.31/tests/sparql/bound/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/bound/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -84,7 +84,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/bound/Makefile.in rasqal-0.9.32/tests/sparql/bound/Makefile.in --- rasqal-0.9.31/tests/sparql/bound/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/bound/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -520,7 +518,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/bugs/Makefile.am rasqal-0.9.32/tests/sparql/bugs/Makefile.am --- rasqal-0.9.31/tests/sparql/bugs/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/bugs/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -71,7 +71,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"Bug Tests via SPARQL\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"Bug Tests via SPARQL\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/bugs/Makefile.in rasqal-0.9.32/tests/sparql/bugs/Makefile.in --- rasqal-0.9.31/tests/sparql/bugs/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/bugs/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -506,7 +504,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"Bug Tests via SPARQL\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"Bug Tests via SPARQL\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/check-sparql rasqal-0.9.32/tests/sparql/check-sparql --- rasqal-0.9.31/tests/sparql/check-sparql 2013-12-09 06:05:48.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/check-sparql 2014-02-23 15:22:04.000000000 +0000 @@ -24,7 +24,6 @@ # # Requires: # roqet (from rasqal) compiled in the parent directory -# rapper (from raptor) in the PATH # # Depends on a variety of rasqal internal debug print formats # @@ -42,9 +41,25 @@ return $_[0] & 0200; } -my $roqet=$ENV{ROQET} || "roqet"; +my $CURDIR = getcwd; + + +sub get_utils_dir() { + my $dir = $CURDIR; + while($dir ne '' && ! -d "$dir/utils") { + $dir =~ s{/[^/]+$}{}; + } + if($dir eq '') { + die "$0: Could not find 'utils' dir in parent directories\n"; + } + $dir . "/utils"; +} + +our $UTILS_DIR = get_utils_dir(); +our $TO_NTRIPLES = $ENV{TO_NTRIPLES} || $UTILS_DIR. '/to-ntriples'; +our $ROQET = $ENV{ROQET} || $UTILS_DIR . '/roqet'; + my $rasqal_url="http://librdf.org/rasqal/"; -my $rapper=$ENV{RAPPER} || "rapper"; my $diff_cmd=$ENV{DIFF} || "diff"; my $rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'; @@ -77,7 +92,7 @@ our $roqet_tmp = 'roqet.tmp'; our $roqet_err = 'roqet.err'; our $diff_out = 'diff.out'; -our $rapper_err = 'rapper.err'; +our $to_ntriples_err = 'to_ntriples.err'; # plural('result', 's', 2); @@ -116,9 +131,9 @@ my(%results)=(rows => []); - my $cmd="$roqet -q -R $results_input_format -r simple -t '$result_file'"; + my $cmd="$ROQET -q -R $results_input_format -r simple -t '$result_file'"; - warn "$program: Opening pipe from '$cmd'\n" + warn "$program: (read_query_results_file): Running $cmd\n" if $debug; open(PIPE, "$cmd 2>'$roqet_err' |"); my(@vars)=(); @@ -162,36 +177,35 @@ sub read_rdf_graph_file($$) { my($result_file, $base_uri)=@_; - my $cmd="$rapper -q -g -o ntriples '$result_file' $base_uri"; + my $cmd="$TO_NTRIPLES '$result_file' '$base_uri'"; - warn "$program: (read_rdf_graph_file): Opening pipe from '$cmd'\n" + warn "$program: (read_rdf_graph_file): Running $cmd\n" if $debug; my $result_string=''; - open(PIPE, "$cmd 2>'$rapper_err' |"); + open(PIPE, "$cmd 2>'$to_ntriples_err' |"); while() { $result_string .= $_; } close(PIPE); - open(ERR, "<", $rapper_err) or die "$program: Cannot open $rapper_err - $!\n"; + open(ERR, "<", $to_ntriples_err) or die "$program: Cannot open $to_ntriples_err - $!\n"; my(@errs)=(); while() { chomp; - push(@errs, "$result_file: $1") if m{rapper: Error - (.*)$}; + push(@errs, "$result_file: $1") if m{to-ntriples: Error - (.*)$}; } close(ERR); if(@errs) { - warn "$program: parsing RDF graph result file '$result_file' FAILED - rapper returned errors:\n ".join("\n ",@errs)."\n"; + warn "$program: parsing RDF graph result file '$result_file' FAILED - to_ntriples returned errors:\n ".join("\n ",@errs)."\n"; warn "Failing program was:\n"; warn " $cmd\n"; - my $curdir=getcwd; - my $r=$cmd; $r =~ s,file:[^ ]+/,,g; $r =~ s,$curdir/,,g; + my $r=$cmd; $r =~ s,file:[^ ]+/,,g; $r =~ s,$CURDIR/,,g; warn " OR $r\n"; return undef; } - unlink $rapper_err; + unlink $to_ntriples_err; my(%results)=(graph_ntriples => $result_string); @@ -211,7 +225,7 @@ } elsif(defined $ENV{JENAROOT}) { my $j = $ENV{JENAROOT}; my $classpath=join(':',glob("$j/lib/*jar")); - $cmd = qq{java -cp $classpath jena.rdfcompare '$file1' '$file2' N-TRIPLE N-TRIPLE > '$out'}; + $cmd = qq{java -cp $classpath jena.rdfcompare '$file1' '$file2' N-TRIPLE N-TRIPLE >'$out'}; $rc = system($cmd); if($rc) { $cmd = "$diff_cmd -u '$file1' '$file2' >'$out'"; @@ -282,25 +296,24 @@ } push(@args, "-W", $warning_level); - my $curdir = getcwd; for my $df (@data_files) { - $df =~ s,^file://$curdir/,,; + $df =~ s,^$CURDIR/,,; push(@args, "-D", $df); } for my $ndf (@named_data_files) { - $ndf =~ s,^file://$curdir/,,; + $ndf =~ s,^$CURDIR/,,; push(@args, "-G", $ndf); } push(@args, "-n") unless $config->{execute}; - my $tf = $test_file; $tf =~ s,^$curdir/,,; + my $tf = $test_file; $tf =~ s,^$CURDIR/,,; my $args_s = join(" ",@args); - my $roqet_cmd="$roqet $args_s '$tf' 2>'$roqet_err' >'$roqet_tmp'"; + my $roqet_cmd="$ROQET $args_s '$tf' 2>'$roqet_err' >'$roqet_tmp'"; my $sort="sort"; - warn "$program: Running '$roqet_cmd'\n" + warn "$program: Running $roqet_cmd\n" if $debug; my $start_time = time; system($roqet_cmd); @@ -348,8 +361,8 @@ } if(defined $test_type && $test_type eq "${mf}CSVResultFormatTest") { - my $file = $result_file; $file =~ s%^file://%%; - my $cmd = "$diff_cmd -u '$roqet_tmp' '$file' > $diff_out"; + my $file = $result_file; + my $cmd = "$diff_cmd -u '$roqet_tmp' '$file' >'$diff_out'"; $rc = system($cmd); if($rc) { warn "$program: '$name' FAILED\n"; @@ -407,7 +420,7 @@ my $line=$_; if($first_result) { - open(OUT, "|$sort >$roqet_out") or die "$program: Cannot create pipe to $roqet_out - $!\n"; + open(OUT, "|$sort >'$roqet_out'") or die "$program: Cannot create pipe to $roqet_out - $!\n"; $first_result=0; } @@ -419,7 +432,7 @@ if(m/^[_<]/) { my $line = $_; if($first_result) { - open(OUT, "|$sort -u >$roqet_out") or die "$program: Cannot create pipe to $roqet_out - $!\n"; + open(OUT, "|$sort -u >'$roqet_out'") or die "$program: Cannot create pipe to $roqet_out - $!\n"; $first_result=0; } @@ -459,19 +472,21 @@ my $results = {expect_empty => 1}; + my $result_file_base_uri; + if(defined $result_file) { + $result_file_base_uri = "file://$result_file"; + $result_file =~ s,^$CURDIR/,,; + } + + if($result_type eq 'graph') { warn "$program: Reading RDF graph result file $result_file\n" if $debug; if(defined $result_file) { - $results = read_rdf_graph_file($result_file, "file://$result_file"); + $results = read_rdf_graph_file($result_file, $result_file_base_uri); } } else { if(defined $result_file) { - my $result_file_base_uri = $result_file; - - # File URI to filename - $result_file =~ s%^file://%%; - if($result_file =~ /\.srx$/) { warn "$program: Reading SPARQL XML bindings result file $result_file\n" if $debug; @@ -510,7 +525,7 @@ my $count; if($result_type eq 'bindings') { - open(OUT, "|$sort >$result_out") + open(OUT, "|$sort >'$result_out'") or die "$program: Cannot create pipe to $result_out - $!\n"; $count=0; @@ -525,7 +540,7 @@ $test_result->{'actual-results-count'} = $roqet_results_count; } else { # graph: sort N-Triples in attempt to get canonical graph - open(OUT, "| sort -u >$result_out") + open(OUT, "| sort -u >'$result_out'") or die "$program: Cannot create pipe to $result_out - $!\n"; print OUT $results->{graph_ntriples} if exists $results->{graph_ntriples}; @@ -621,7 +636,7 @@ my(%triples); my $entries_node; -my $cmd="$rapper -q -i turtle -o ntriples '$srcdir$manifest_file'"; +my $cmd="$TO_NTRIPLES '$srcdir$manifest_file'"; open(MF, "$cmd |") or die "Cannot open pipe from '$cmd' - $!\n"; while() { @@ -665,7 +680,7 @@ my $result_file=undef; if(defined $result_node) { $result_file=($result_node =~ /^<(.+)>$/, $1); - $result_file =~ s,^file:([^/]+),$1,; + $result_file =~ s,^file:/+,/,; } warn "Entry result_file=".($result_file || "NONE")."\n" @@ -682,14 +697,14 @@ warn "Entry graph data_node $data_node\n" if $debug > 1; my $data_file=($data_node =~ /^<(.+)>$/, $1); - $data_file =~ s,^file:([^/]+),$1,; + $data_file =~ s,^file:/+,/,; push(@data_files, $data_file); } for my $data_node (@{$triples{$action_node}->{"<${qt}graphData>"}}) { warn "Entry named graph data_node $data_node\n" if $debug > 1; my $data_file=($data_node =~ /^<(.+)>$/, $1); - $data_file =~ s,^file:([^/]+),$1,; + $data_file =~ s,^file:/+,/,; push(@named_data_files, $data_file); } @@ -852,10 +867,10 @@ my $end_time = time; my $elapsed_time = ($end_time - $start_time); -unlink $roqet_out, $result_out, $roqet_tmp, $roqet_err, $diff_out, $rapper_err +unlink $roqet_out, $result_out, $roqet_tmp, $roqet_err, $diff_out, $to_ntriples_err unless $unique_test; -my $rasqal_version=`$roqet -v`; +my $rasqal_version=`$ROQET -v`; chomp $rasqal_version; if($earl_report_file) { diff -Nru rasqal-0.9.31/tests/sparql/examples/Makefile.am rasqal-0.9.32/tests/sparql/examples/Makefile.am --- rasqal-0.9.31/tests/sparql/examples/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/examples/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -113,7 +113,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/examples/Makefile.in rasqal-0.9.32/tests/sparql/examples/Makefile.in --- rasqal-0.9.31/tests/sparql/examples/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/examples/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -547,7 +545,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/Expr1/Makefile.am rasqal-0.9.32/tests/sparql/Expr1/Makefile.am --- rasqal-0.9.31/tests/sparql/Expr1/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/Expr1/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -88,7 +88,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/Expr1/Makefile.in rasqal-0.9.32/tests/sparql/Expr1/Makefile.in --- rasqal-0.9.31/tests/sparql/Expr1/Makefile.in 2013-12-09 17:12:26.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/Expr1/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -522,7 +520,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/Expr2/Makefile.am rasqal-0.9.32/tests/sparql/Expr2/Makefile.am --- rasqal-0.9.31/tests/sparql/Expr2/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/Expr2/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -93,7 +93,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"\"\"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) \"$$test\" \"\"\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/Expr2/Makefile.in rasqal-0.9.32/tests/sparql/Expr2/Makefile.in --- rasqal-0.9.31/tests/sparql/Expr2/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/Expr2/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -527,7 +525,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"\"\"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) \"$$test\" \"\"\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/ExprBuiltins/Makefile.am rasqal-0.9.32/tests/sparql/ExprBuiltins/Makefile.am --- rasqal-0.9.31/tests/sparql/ExprBuiltins/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/ExprBuiltins/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -104,7 +104,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/ExprBuiltins/Makefile.in rasqal-0.9.32/tests/sparql/ExprBuiltins/Makefile.in --- rasqal-0.9.31/tests/sparql/ExprBuiltins/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/ExprBuiltins/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -541,7 +539,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/ExprEquals/Makefile.am rasqal-0.9.32/tests/sparql/ExprEquals/Makefile.am --- rasqal-0.9.31/tests/sparql/ExprEquals/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/ExprEquals/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -104,7 +104,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/ExprEquals/Makefile.in rasqal-0.9.32/tests/sparql/ExprEquals/Makefile.in --- rasqal-0.9.31/tests/sparql/ExprEquals/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/ExprEquals/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -539,7 +537,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/federated/Makefile.in rasqal-0.9.32/tests/sparql/federated/Makefile.in --- rasqal-0.9.31/tests/sparql/federated/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/federated/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/sparql/Makefile.in rasqal-0.9.32/tests/sparql/Makefile.in --- rasqal-0.9.31/tests/sparql/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -150,6 +150,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -222,7 +223,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -251,8 +251,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/sparql/part1/Makefile.am rasqal-0.9.32/tests/sparql/part1/Makefile.am --- rasqal-0.9.31/tests/sparql/part1/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/part1/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -93,7 +93,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/part1/Makefile.in rasqal-0.9.32/tests/sparql/part1/Makefile.in --- rasqal-0.9.31/tests/sparql/part1/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/part1/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -529,7 +527,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/regex/Makefile.am rasqal-0.9.32/tests/sparql/regex/Makefile.am --- rasqal-0.9.31/tests/sparql/regex/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/regex/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -88,7 +88,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"\"\"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) \"$$test\" \"\"\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/regex/Makefile.in rasqal-0.9.32/tests/sparql/regex/Makefile.in --- rasqal-0.9.31/tests/sparql/regex/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/regex/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -524,7 +522,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"\"\"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) \"$$test\" \"\"\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/simple/Makefile.am rasqal-0.9.32/tests/sparql/simple/Makefile.am --- rasqal-0.9.31/tests/sparql/simple/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/simple/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -87,7 +87,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/simple/Makefile.in rasqal-0.9.32/tests/sparql/simple/Makefile.in --- rasqal-0.9.31/tests/sparql/simple/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/simple/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -523,7 +521,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/sort/Makefile.am rasqal-0.9.32/tests/sparql/sort/Makefile.am --- rasqal-0.9.31/tests/sparql/sort/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/sort/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -94,7 +94,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"\"\"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) \"$$test\" \"\"\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/sort/Makefile.in rasqal-0.9.32/tests/sparql/sort/Makefile.in --- rasqal-0.9.31/tests/sparql/sort/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/sort/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -529,7 +527,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"\"\"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) \"$$test\" \"\"\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/sparql11/Makefile.in rasqal-0.9.32/tests/sparql/sparql11/Makefile.in --- rasqal-0.9.31/tests/sparql/sparql11/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/sparql11/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/sparql/survey/Makefile.am rasqal-0.9.32/tests/sparql/survey/Makefile.am --- rasqal-0.9.31/tests/sparql/survey/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/survey/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -99,7 +99,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/survey/Makefile.in rasqal-0.9.32/tests/sparql/survey/Makefile.in --- rasqal-0.9.31/tests/sparql/survey/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/survey/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -535,7 +533,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/syntax/Makefile.am rasqal-0.9.32/tests/sparql/syntax/Makefile.am --- rasqal-0.9.31/tests/sparql/syntax/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/syntax/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -95,7 +95,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/syntax/Makefile.in rasqal-0.9.32/tests/sparql/syntax/Makefile.in --- rasqal-0.9.31/tests/sparql/syntax/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/syntax/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -530,7 +528,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $$tests; do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxDev/Makefile.in rasqal-0.9.32/tests/sparql/SyntaxDev/Makefile.in --- rasqal-0.9.31/tests/sparql/SyntaxDev/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxDev/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -150,6 +150,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -222,7 +223,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -251,8 +251,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am --- rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am 2010-12-03 05:36:30.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -164,7 +164,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.in rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.in --- rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -599,7 +597,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am --- rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am 2010-12-03 05:36:30.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -126,7 +126,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.in rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.in --- rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -562,7 +560,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am --- rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am 2010-12-03 05:36:30.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -104,7 +104,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.in rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.in --- rasqal-0.9.31/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -540,7 +538,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxFull/Makefile.am rasqal-0.9.32/tests/sparql/SyntaxFull/Makefile.am --- rasqal-0.9.31/tests/sparql/SyntaxFull/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxFull/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -131,7 +131,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(SPARQL_TEST_NAMES); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/SyntaxFull/Makefile.in rasqal-0.9.32/tests/sparql/SyntaxFull/Makefile.in --- rasqal-0.9.31/tests/sparql/SyntaxFull/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/SyntaxFull/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -566,7 +564,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(SPARQL_TEST_NAMES); do \ comment="sparql query $$test"; \ expect="PositiveTest"; \ diff -Nru rasqal-0.9.31/tests/sparql/update/Makefile.in rasqal-0.9.32/tests/sparql/update/Makefile.in --- rasqal-0.9.31/tests/sparql/update/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/update/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff -Nru rasqal-0.9.31/tests/sparql/ValueTesting/Makefile.am rasqal-0.9.32/tests/sparql/ValueTesting/Makefile.am --- rasqal-0.9.31/tests/sparql/ValueTesting/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/ValueTesting/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -126,7 +126,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/ValueTesting/Makefile.in rasqal-0.9.32/tests/sparql/ValueTesting/Makefile.in --- rasqal-0.9.31/tests/sparql/ValueTesting/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/ValueTesting/Makefile.in 2014-02-23 15:22:12.000000000 +0000 @@ -110,6 +110,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -182,7 +183,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -211,8 +211,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -563,7 +561,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_CORRECT); do \ comment="sparql query $$test"; \ $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/warnings/Makefile.am rasqal-0.9.32/tests/sparql/warnings/Makefile.am --- rasqal-0.9.31/tests/sparql/warnings/Makefile.am 2013-07-07 05:56:15.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/warnings/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -64,7 +64,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Preparation Warnings\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Preparation Warnings\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_WARNINGS); do \ comment="sparql warning $$test"; \ $(RECHO) " [ a t:NegativeTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) -W 100 '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/tests/sparql/warnings/Makefile.in rasqal-0.9.32/tests/sparql/warnings/Makefile.in --- rasqal-0.9.31/tests/sparql/warnings/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/tests/sparql/warnings/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -109,6 +109,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -181,7 +182,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -210,8 +210,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -498,7 +496,7 @@ $(RECHO) '@prefix mf: .'; \ $(RECHO) '@prefix t: .'; \ $(RECHO) ' '; \ - $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Preparation Warnings\"; t:path \"$(top_builddir)/utils:$(top_builddir)@RAPPER_PATH@:$$PATH\"; t:precondition \"$(PERL) -MXML::DOM -e 'exit 0'\"; mf:entries ("; \ + $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Preparation Warnings\"; mf:entries ("; \ for test in $(EXPECTED_SPARQL_WARNINGS); do \ comment="sparql warning $$test"; \ $(RECHO) " [ a t:NegativeTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) -W 100 '$$test'\" ]"; \ diff -Nru rasqal-0.9.31/utils/Makefile.am rasqal-0.9.32/utils/Makefile.am --- rasqal-0.9.31/utils/Makefile.am 2013-11-24 20:18:26.000000000 +0000 +++ rasqal-0.9.32/utils/Makefile.am 2014-02-23 15:22:04.000000000 +0000 @@ -21,7 +21,7 @@ # bin_PROGRAMS = roqet -noinst_PROGRAMS = check-query +noinst_PROGRAMS = check-query to-ntriples EXTRA_PROGRAMS = srxread srxwrite CLEANFILES = $(EXTRA_PROGRAMS) *.plist @@ -68,6 +68,10 @@ check_query_LDADD += $(top_builddir)/getopt/libgetopt.la endif +to_ntriples_SOURCES = to-ntriples.c +to_ntriples_CPPFLAGS = $(AM_CPPFLAGS) +to_ntriples_LDFLAGS = @RAPTOR2_LIBS@ + srxread_SOURCES = srxread.c srxread_LDADD = $(top_builddir)/src/librasqal.la srxread_LDFLAGS = @RAPTOR2_LIBS@ diff -Nru rasqal-0.9.31/utils/Makefile.in rasqal-0.9.32/utils/Makefile.in --- rasqal-0.9.31/utils/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/utils/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -75,7 +75,7 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = roqet$(EXEEXT) -noinst_PROGRAMS = check-query$(EXEEXT) +noinst_PROGRAMS = check-query$(EXEEXT) to-ntriples$(EXEEXT) EXTRA_PROGRAMS = srxread$(EXEEXT) srxwrite$(EXEEXT) @GETOPT_TRUE@am__append_1 = -I$(top_srcdir)/getopt @GETOPT_TRUE@am__append_2 = $(top_builddir)/getopt/libgetopt.la @@ -132,6 +132,12 @@ srxwrite_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(srxwrite_LDFLAGS) $(LDFLAGS) -o $@ +am_to_ntriples_OBJECTS = to_ntriples-to-ntriples.$(OBJEXT) +to_ntriples_OBJECTS = $(am_to_ntriples_OBJECTS) +to_ntriples_LDADD = $(LDADD) +to_ntriples_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(to_ntriples_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles @@ -159,9 +165,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(librasqalcmdline_la_SOURCES) $(check_query_SOURCES) \ - $(roqet_SOURCES) $(srxread_SOURCES) $(srxwrite_SOURCES) + $(roqet_SOURCES) $(srxread_SOURCES) $(srxwrite_SOURCES) \ + $(to_ntriples_SOURCES) DIST_SOURCES = $(librasqalcmdline_la_SOURCES) $(check_query_SOURCES) \ - $(roqet_SOURCES) $(srxread_SOURCES) $(srxwrite_SOURCES) + $(roqet_SOURCES) $(srxread_SOURCES) $(srxwrite_SOURCES) \ + $(to_ntriples_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -208,6 +216,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -280,7 +289,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -309,8 +317,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -391,6 +397,9 @@ check_query_LDADD = $(top_builddir)/src/librasqal.la \ librasqalcmdline.la $(am__append_4) check_query_LDFLAGS = @RAPTOR2_LIBS@ +to_ntriples_SOURCES = to-ntriples.c +to_ntriples_CPPFLAGS = $(AM_CPPFLAGS) +to_ntriples_LDFLAGS = @RAPTOR2_LIBS@ srxread_SOURCES = srxread.c srxread_LDADD = $(top_builddir)/src/librasqal.la srxread_LDFLAGS = @RAPTOR2_LIBS@ @@ -529,6 +538,9 @@ srxwrite$(EXEEXT): $(srxwrite_OBJECTS) $(srxwrite_DEPENDENCIES) $(EXTRA_srxwrite_DEPENDENCIES) @rm -f srxwrite$(EXEEXT) $(AM_V_CCLD)$(srxwrite_LINK) $(srxwrite_OBJECTS) $(srxwrite_LDADD) $(LIBS) +to-ntriples$(EXEEXT): $(to_ntriples_OBJECTS) $(to_ntriples_DEPENDENCIES) $(EXTRA_to_ntriples_DEPENDENCIES) + @rm -f to-ntriples$(EXEEXT) + $(AM_V_CCLD)$(to_ntriples_LINK) $(to_ntriples_OBJECTS) $(to_ntriples_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -542,6 +554,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/roqet-roqet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srxread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srxwrite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/to_ntriples-to-ntriples.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -592,6 +605,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(roqet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o roqet-roqet.obj `if test -f 'roqet.c'; then $(CYGPATH_W) 'roqet.c'; else $(CYGPATH_W) '$(srcdir)/roqet.c'; fi` +to_ntriples-to-ntriples.o: to-ntriples.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(to_ntriples_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT to_ntriples-to-ntriples.o -MD -MP -MF $(DEPDIR)/to_ntriples-to-ntriples.Tpo -c -o to_ntriples-to-ntriples.o `test -f 'to-ntriples.c' || echo '$(srcdir)/'`to-ntriples.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/to_ntriples-to-ntriples.Tpo $(DEPDIR)/to_ntriples-to-ntriples.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='to-ntriples.c' object='to_ntriples-to-ntriples.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(to_ntriples_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o to_ntriples-to-ntriples.o `test -f 'to-ntriples.c' || echo '$(srcdir)/'`to-ntriples.c + +to_ntriples-to-ntriples.obj: to-ntriples.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(to_ntriples_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT to_ntriples-to-ntriples.obj -MD -MP -MF $(DEPDIR)/to_ntriples-to-ntriples.Tpo -c -o to_ntriples-to-ntriples.obj `if test -f 'to-ntriples.c'; then $(CYGPATH_W) 'to-ntriples.c'; else $(CYGPATH_W) '$(srcdir)/to-ntriples.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/to_ntriples-to-ntriples.Tpo $(DEPDIR)/to_ntriples-to-ntriples.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='to-ntriples.c' object='to_ntriples-to-ntriples.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(to_ntriples_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o to_ntriples-to-ntriples.obj `if test -f 'to-ntriples.c'; then $(CYGPATH_W) 'to-ntriples.c'; else $(CYGPATH_W) '$(srcdir)/to-ntriples.c'; fi` + mostlyclean-libtool: -rm -f *.lo diff -Nru rasqal-0.9.31/utils/roqet.html rasqal-0.9.32/utils/roqet.html --- rasqal-0.9.31/utils/roqet.html 2013-12-12 22:56:37.000000000 +0000 +++ rasqal-0.9.32/utils/roqet.html 2013-12-23 06:35:33.000000000 +0000 @@ -0,0 +1,102 @@ + + + + + + +Rasqal RDF Query Library - Rasqal RDF parser utility + + +

Rasqal RDF Query Library - Rasqal RDF parser utility

+
+

NAME

+

roqet − Rasqal RDF query utility

+

SYNOPSIS

+

roqet [OPTIONS] <query-URI> [base-URI]
+roqet
[OPTIONS]-e query-string [base-URI]
+roqet
[OPTIONS]-p sparql-protocol-service-URI [-e query-string ] [base-URI]
+roqet
[OPTIONS]-t query results file [base-URI]

+

DESCRIPTION

+

The roqet utility allows querying of RDF content using the Rasqal RDF query library, printing the results for variable bindings, RDF graph or boolean results in a variety of formats. The query is read from query-URI and the optional base-URI is used as the base URI of the query if present.

+

MAIN OPTIONS

+

roqet uses the usual GNU command line syntax, with long options starting with two dashes (’-’) if supported by the getopt_long function. Otherwise only the short options are available.
+−e, −−exec QUERY

+

Execute the query string in the argument QUERY instead of reading the query from a URI (when −e / −−exec is not given).

+

−i, −−input LANGUAGE

+

Set the input query LANGUAGE to one of the supported languages which includes ’sparql’ (SPARQL Query Language for RDF, default), ’sparql11’ and ’laqrs’. The full list of supported languages and subsets is given in the help summary with the −h / −−help option.

+

−p, −−protocol SERVICE-URI

+

Call the SPARQL HTTP protocol SERVICE-URI to execute the query instead of executing it inside the Rasqal query engine locally ( when -e is given, or a query string given)

+

−r, −−results FORMAT

+

Set the query results output FORMAT

+

For variable bindings, the values of FORMAT vary upon what Rasqal supports but include ’simple’ for a simple text format (default), ’xml’ for the SPARQL Query Results XML format, ’csv’ for SPARQL CSV, ’tsv’ for SPARQL TSV, ’rdfxml’ and ’turtle’ for RDF syntax formats, and ’json’ for a JSON version of the results.

+

For RDF graph results, the values of FORMAT are ’ntriples’ (N-Triples, default), ’rdfxml-abbrev’ (RDF/XML Abbreviated), ’rdfxml’ (RDF/XML), ’turtle’ (Turtle), ’json’ (RDF/JSON resource centric), ’json-triples’ (RDF/JSON triples) or ’rss-1.0’ (RSS 1.0, also an RDF/XML syntax).

+

The exact list of formats depends on what libraptor2(3) was built with but is given correct in the usage message with −h.

+

−R, −−results-input-format FORMAT

+

Set the query results input FORMAT

+

This is for use with −t and takes values of ’xml’ for the SPARQL Query Results XML format,, ’csv’ for SPARQL CSV,, ’tsv’ for SPARQL TSV, ’turtle’ and ’rdfxml’ for RDF syntax formats.

+

−t, −−results−input FILE

+

Read query results from FILE

+

OTHER OPTIONS

+

−c, −−count

+

Only count the triples and produce no other output.

+

−d, −−dump−query FORMAT

+

Print the parsed query out in a given FORMAT one of ’none’ (default), ’debug’, ’structure’ or ’sparql’

+

−D, −−data URI

+

Add RDF data source URI (not a named graph). If no data sources are given, the query itself must point to the data such as via SPARQL FROM uri statements.

+

−E, −−ignore−errors

+

Do not print error messages and do not exit with a non-0 status.

+

−f, −−feature NAME(=VALUE)

+

Set query feature NAME to the VALUE or integer 1 if omitted. The known features can be shown with -f help or --feature help.

+

−F, −−format NAME

+

Set the data source format name for subsequent data graphs called with −D / −−data or −G / −−named. The default if this is not specified is for the query engine to guess. The name is a Raptor parser name.

+

−G, −−named URI

+

Add RDF data source URI (named graph)

+

−h, −−help

+

Show a summary of the options.

+

−n, −−dryrun

+

Prepare the query but do not execute it.

+

−q, −−quiet

+

No extra information messages.

+

−s, −−source URI

+

Add RDF data source URI (named graph) URI by adding it to the list of query data source URIs. FORMAT to ’simple’ (default) or ’xml’ (an experimental XML format)

+

−v, −−version

+

Print the rasqal library version and exit.

+

−W, −−warnings LEVEL

+

Set the warning LEVEL in the range 0 (do not warn about anything) to 100 (show every warning). The Rasqal default is in the middle (50).

+

EXAMPLES

+

roqet sparql-query-file.rq

+

Run a SPARQL query contained in the local file sparql-query-file.rq. The data used would be described in FROM statements in the query file.

+

roqet -q -i sparql http://example.org/sparql-query.rq

+

Run a SPARQL query that is in the web at URI http://example.org/sparql-query.rq without an extra messages (quiet, -q).

+

roqet -q query-file.rq http://example.org/base/

+

Run an query (default languge SPARQL) from a local file query-file.rq but using base URI http://example.org/base/ to resolve any relative URIs.

+

roqet -q -i sparql -r xml http://example.org/sparql-query.rq

+

Run a SPARQL query that is in the web at URI http://example.org/sparql-query.rq and format the results in the SPARQL Query Results XML format with no extra messages.

+

roqet -i sparql -e ’SELECT * WHERE { ?s ?p ?o }’ -D stuff.rdf

+

Run a SPARQL query given on the command line against data in the file stuff.rdf. The type of the file will be guessed and likely is of format RDF/XML.

+

roqet -t result.srx -r html

+

Read a SPARQL query results in SPARQL Query Results XML format (default) and print it in HTML.

+

roqet -t result.ttl -R turtle -r csv

+

Read a SPARQL query results in RDF/Turtle format and print it in CSV.

+

CONFORMING TO

+

SPARQL 1.1 Query Language, Steve Harris and Andy Seaborne (eds), W3C Recommendation, 21 March 2013 http://www.w3.org/TR/2013/REC-sparql11-query-20130321/

+

SPARQL Query Results XML Format (Second Edition), Sandro Hawke (Second Edition ed), Jeen Broekstra and Dave Beckett (eds), W3C Recommendation, 21 March 2013. http://www.w3.org/TR/2013/REC-rdf-sparql-XMLres-20130321/

+

SEE ALSO

+

librasqal(3),libraptor(3)

+

CHANGES

+

AUTHOR

+

Dave Beckett - http://www.dajobe.org/

+
+ +

Copyright 2002-2013 Dave Beckett
2002-2005 University of Bristol

+ + + diff -Nru rasqal-0.9.31/utils/to-ntriples.c rasqal-0.9.32/utils/to-ntriples.c --- rasqal-0.9.31/utils/to-ntriples.c 1970-01-01 00:00:00.000000000 +0000 +++ rasqal-0.9.32/utils/to-ntriples.c 2014-02-23 15:22:04.000000000 +0000 @@ -0,0 +1,169 @@ +/* -*- Mode: c; c-basic-offset: 2 -*- + * + * to-ntriples.c - Test support: parse RDF into N-Triples using raptor + * + * Copyright (C) 2014, David Beckett http://www.dajobe.org/ + * + * This package is Free Software and part of Redland http://librdf.org/ + * + * It is licensed under the following three licenses as alternatives: + * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version + * 2. GNU General Public License (GPL) V2 or any newer version + * 3. Apache License, V2.0 or any newer version + * + * You may not use this file except in compliance with at least one of + * the above three licenses. + * + * See LICENSE.html or LICENSE.txt at the top of this package for the + * complete terms and further detail along with the license texts for + * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. + * + * USAGE: + * to_ntriples RDF-FILE [BASE-URI] + * + * To parse an RDF syntax in RDF-FILE using the 'guess' parser, + * emitting the result as N-Triples with optional BASE-URI. + * + * NOTE: This is not a supported utility. It is only used for testing + * invoked by 'improve' and 'check-sparql' and may be replaced. + * + */ + + +#include +#include + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include + + +int main(int argc, char *argv[]); + + +static const char *program = "to-ntriples"; + +static raptor_serializer* rdf_serializer; +static int error_count = 0; +static int warning_count = 0; + + +static void +to_ntriples_write_triple(void* user_data, raptor_statement* triple) +{ + raptor_serializer_serialize_statement(rdf_serializer, triple); +} + + +static void +to_ntriples_log_handler(void *data, raptor_log_message *message) +{ + raptor_parser *parser = (raptor_parser*)data; + + switch(message->level) { + case RAPTOR_LOG_LEVEL_FATAL: + case RAPTOR_LOG_LEVEL_ERROR: + fprintf(stderr, "%s: Error - ", program); + raptor_locator_print(message->locator, stderr); + fprintf(stderr, " - %s\n", message->text); + + raptor_parser_parse_abort(parser); + error_count++; + break; + + case RAPTOR_LOG_LEVEL_WARN: + fprintf(stderr, "%s: Warning - ", program); + raptor_locator_print(message->locator, stderr); + fprintf(stderr, " - %s\n", message->text); + + warning_count++; + break; + + case RAPTOR_LOG_LEVEL_NONE: + case RAPTOR_LOG_LEVEL_TRACE: + case RAPTOR_LOG_LEVEL_DEBUG: + case RAPTOR_LOG_LEVEL_INFO: + + fprintf(stderr, "%s: Unexpected %s message - ", program, + raptor_log_level_get_label(message->level)); + raptor_locator_print(message->locator, stderr); + fprintf(stderr, " - %s\n", message->text); + break; + } +} + + +int +main(int argc, char *argv[]) +{ + raptor_world *world = NULL; + raptor_parser* rdf_parser = NULL; + unsigned char *uri_string; + raptor_uri *uri; + raptor_uri *base_uri; + int rc = 0; + int free_uri_string = 0; + + rdf_serializer = NULL; + + if(argc < 2 || argc > 3) { + fprintf(stderr, "USAGE: %s RDF-FILE [BASE-URI]\n", program); + rc = 1; + goto tidy; + } + + world = raptor_new_world(); + + uri_string = (unsigned char*)argv[1]; + if(!access((const char*)uri_string, R_OK)) { + uri_string = raptor_uri_filename_to_uri_string((char*)uri_string); + uri = raptor_new_uri(world, uri_string); + free_uri_string = 1; + } else { + uri = raptor_new_uri(world, (const unsigned char*)uri_string); + } + + if(argc == 3) { + char* base_uri_string = argv[2]; + base_uri = raptor_new_uri(world, (unsigned char*)(base_uri_string)); + } else { + base_uri = raptor_uri_copy(uri); + } + + rdf_parser = raptor_new_parser(world, "guess"); + + raptor_world_set_log_handler(world, rdf_parser, to_ntriples_log_handler); + + raptor_parser_set_statement_handler(rdf_parser, NULL, + to_ntriples_write_triple); + + rdf_serializer = raptor_new_serializer(world, "ntriples"); + + raptor_serializer_start_to_file_handle(rdf_serializer, base_uri, stdout); + raptor_parser_parse_file(rdf_parser, uri, base_uri); + raptor_serializer_serialize_end(rdf_serializer); + + raptor_free_serializer(rdf_serializer); + raptor_free_parser(rdf_parser); + + raptor_free_uri(base_uri); + raptor_free_uri(uri); + if(free_uri_string) + raptor_free_memory(uri_string); + + raptor_free_world(world); + + tidy: + if(warning_count) + rc = 2; + else if(error_count) + rc = 1; + + return rc; +} diff -Nru rasqal-0.9.31/win32/Makefile.in rasqal-0.9.32/win32/Makefile.in --- rasqal-0.9.31/win32/Makefile.in 2013-12-09 17:12:27.000000000 +0000 +++ rasqal-0.9.32/win32/Makefile.in 2014-02-23 15:22:13.000000000 +0000 @@ -88,6 +88,7 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -160,7 +161,6 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ -RAPPER_PATH = @RAPPER_PATH@ RAPTOR2_CFLAGS = @RAPTOR2_CFLAGS@ RAPTOR2_LIBS = @RAPTOR2_LIBS@ RAPTOR_MIN_VERSION = @RAPTOR_MIN_VERSION@ @@ -189,8 +189,6 @@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@