1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/ArangoDB

This commit is contained in:
Frank Celler 2012-06-25 16:24:55 +02:00
commit 02974e6ec5
19 changed files with 208 additions and 256 deletions

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.0.alpha1
PROJECT_NUMBER = 1.0.alpha2
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -212,7 +212,7 @@ ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="1.0.alpha1"
ALIASES += VERSION="1.0.alpha2"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.0.alpha1
PROJECT_NUMBER = 1.0.alpha2
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -212,7 +212,7 @@ ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="1.0.alpha1"
ALIASES += VERSION="1.0.alpha2"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.0.alpha1
PROJECT_NUMBER = 1.0.alpha2
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -212,7 +212,7 @@ ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="1.0.alpha1"
ALIASES += VERSION="1.0.alpha2"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"

View File

@ -31,7 +31,7 @@ PROJECT_NAME = "ArangoDB"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.0.alpha1
PROJECT_NUMBER = 1.0.alpha2
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
@ -212,7 +212,7 @@ ALIASES += GE{1}="<b>\1</b>"
ALIASES += EXAMPLES="<b>Examples</b><br>"
ALIASES += EXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}@endlatexonly"
ALIASES += TINYEXAMPLE{2}="@latexonly\renewcommand{\examplecap}{\2}\setboolean{hascap}{true}\renewcommand{\examplesize}{\tiny}@endlatexonly@verbinclude \1@latexonly\setboolean{hascap}{false}\renewcommand{\examplesize}{\ttfamily}@endlatexonly"
ALIASES += VERSION="1.0.alpha1"
ALIASES += VERSION="1.0.alpha2"
ALIASES += EMBEDTOC{1}="@ifnot LATEX<hr>@copydoc \1<hr>@endif"
ALIASES += RESTHEADER{2}="@if LATEX@latexonly \vskip 0.5em\colorbox{gray}{@endlatexonly\1 (\2)@latexonly}\vskip 1em@endlatexonly@else <hr><em>\1</em> (\2)<hr><br>@endif"
ALIASES += LATEXBREAK="@latexonly\vskip -0.5em\hskip 1.0em@endlatexonly"

View File

@ -75,9 +75,6 @@ DOXYGEN = \
WIKI = \
ArangoErrors \
CommandLine \
CommandLineLogging \
CommandLineRandom \
CommandLineScheduler \
Compiling \
DbaManual \
DbaManualBasics \

View File

@ -1192,9 +1192,6 @@ DOXYGEN = \
WIKI = \
ArangoErrors \
CommandLine \
CommandLineLogging \
CommandLineRandom \
CommandLineScheduler \
Compiling \
DbaManual \
DbaManualBasics \

View File

@ -1 +1 @@
1.0.alpha1
1.0.alpha2

View File

@ -154,9 +154,10 @@ ApplicationV8::ApplicationV8 (string const& binaryPath)
#else
#ifdef _PKGDATADIR_
_actionPath = string(_PKGDATADIR_) + "/js/actions/system";
_startupModules = string(_PKGDATADIR_) + "/js/server/modules"
+ ";" + string(_PKGDATADIR_) + "/js/common/modules";
+ ";" + string(_PKGDATADIR_) + "/js/common/modules";
#endif

View File

@ -10,16 +10,34 @@ echo
OPTIONS="--disable-dependency-tracking --disable-relative"
PREFIX="--prefix=/usr --sysconfdir=/etc"
RESULTS="arangod arangosh arangoimp"
USE_ICECC="no"
export CPPFLAGS=""
export LDFLAGS=""
export MAKEJ=2
export LDD_INFO="no"
while [ 0 -lt "$#" ]; do
opt="$1"
shift
case "$opt" in
--enable-icecc)
USE_ICECC="yes"
;;
*)
echo "$0: unknown option '$opt'"
exit 1
;;
esac
done
HAS_ICECC=$(ps aux | grep -v "grep" | grep iceccd)
if [ "x$HAS_ICECC" != "x" ] ; then
if [ "x$HAS_ICECC" != "x" -a "x$USE_ICECC" == "xyes" ] ; then
export PATH=/usr/lib/icecc/bin/:/opt/icecream/bin/:$PATH
export MAKEJ=14
echo "########################################################"
echo "Using ICECC"
echo " PATH=$PATH"
@ -134,11 +152,11 @@ for result in $RESULTS; do
echo "########################################################"
echo
ident $result
ident "bin/$result"
if test "x$LDD_INFO" = "xyes"; then
echo
ldd $result
ldd "bin/$result"
echo
fi
done

20
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for triAGENS ArangoDB 1.0.alpha1.
# Generated by GNU Autoconf 2.68 for triAGENS ArangoDB 1.0.alpha2.
#
# Report bugs to <info@triagens.de>.
#
@ -560,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='triAGENS ArangoDB'
PACKAGE_TARNAME='arango'
PACKAGE_VERSION='1.0.alpha1'
PACKAGE_STRING='triAGENS ArangoDB 1.0.alpha1'
PACKAGE_VERSION='1.0.alpha2'
PACKAGE_STRING='triAGENS ArangoDB 1.0.alpha2'
PACKAGE_BUGREPORT='info@triagens.de'
PACKAGE_URL='http://www.arangodb.org'
@ -1407,7 +1407,7 @@ if test "$ac_init_help" = "long"; then
# 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 triAGENS ArangoDB 1.0.alpha1 to adapt to many kinds of systems.
\`configure' configures triAGENS ArangoDB 1.0.alpha2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1478,7 +1478,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of triAGENS ArangoDB 1.0.alpha1:";;
short | recursive ) echo "Configuration of triAGENS ArangoDB 1.0.alpha2:";;
esac
cat <<\_ACEOF
@ -1632,7 +1632,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
triAGENS ArangoDB configure 1.0.alpha1
triAGENS ArangoDB configure 1.0.alpha2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -2097,7 +2097,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by triAGENS ArangoDB $as_me 1.0.alpha1, which was
It was created by triAGENS ArangoDB $as_me 1.0.alpha2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -3219,7 +3219,7 @@ fi
# Define the identity of the package.
PACKAGE='arango'
VERSION='1.0.alpha1'
VERSION='1.0.alpha2'
cat >>confdefs.h <<_ACEOF
@ -10226,7 +10226,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by triAGENS ArangoDB $as_me 1.0.alpha1, which was
This file was extended by triAGENS ArangoDB $as_me 1.0.alpha2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -10293,7 +10293,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
triAGENS ArangoDB config.status 1.0.alpha1
triAGENS ArangoDB config.status 1.0.alpha2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -6,7 +6,7 @@ dnl ============================================================================
dnl --SECTION-- triAGENS GmbH Build Environment
dnl ============================================================================
AC_INIT([triAGENS ArangoDB], [1.0.alpha1], [info@triagens.de], [arango], [http://www.arangodb.org])
AC_INIT([triAGENS ArangoDB], [1.0.alpha2], [info@triagens.de], [arango], [http://www.arangodb.org])
dnl ----------------------------------------------------------------------------
dnl auxillary directory for install-sh and missing

View File

@ -126,8 +126,16 @@ void TRI_InitLinkedArray (TRI_linked_array_t* array, TRI_memory_zone_t* zone) {
/// @brief destroys a linked list, but does not free the pointer
////////////////////////////////////////////////////////////////////////////////
void TRI_DestroyLinkedList (TRI_linked_list_t* list) {
// nothing to destroy
void TRI_DestroyLinkedList (TRI_linked_list_t* list, TRI_memory_zone_t* zone) {
TRI_linked_list_entry_t* current = list->_begin;
// free all remaining entries in the list
while (current != NULL) {
TRI_linked_list_entry_t* next = current->_next;
TRI_Free(zone, current);
current = next;
}
}
////////////////////////////////////////////////////////////////////////////////
@ -135,7 +143,7 @@ void TRI_DestroyLinkedList (TRI_linked_list_t* list) {
////////////////////////////////////////////////////////////////////////////////
void TRI_FreeLinkedList (TRI_memory_zone_t* zone, TRI_linked_list_t* list) {
TRI_DestroyLinkedList(list);
TRI_DestroyLinkedList(list, zone);
TRI_Free(zone, list);
}
@ -144,7 +152,7 @@ void TRI_FreeLinkedList (TRI_memory_zone_t* zone, TRI_linked_list_t* list) {
////////////////////////////////////////////////////////////////////////////////
void TRI_DestroyLinkedArray (TRI_linked_array_t* array) {
TRI_DestroyLinkedList(&array->_list);
TRI_DestroyLinkedList(&array->_list, array->_memoryZone);
TRI_DestroyAssociativePointer(&array->_array);
}
@ -153,7 +161,7 @@ void TRI_DestroyLinkedArray (TRI_linked_array_t* array) {
////////////////////////////////////////////////////////////////////////////////
void TRI_FreeLinkedArray (TRI_memory_zone_t* zone, TRI_linked_array_t* array) {
TRI_DestroyLinkedList(&array->_list);
TRI_DestroyLinkedList(&array->_list, zone);
TRI_Free(zone, array);
}
@ -262,9 +270,8 @@ void TRI_RemoveLinkedArray (TRI_linked_array_t* array, void const* data) {
if (found != NULL) {
TRI_RemoveLinkedList(&array->_list, found);
TRI_Free(array->_memoryZone, found);
}
TRI_Free(array->_memoryZone, found);
}
////////////////////////////////////////////////////////////////////////////////
@ -302,6 +309,7 @@ void const* TRI_PopFrontLinkedArray (TRI_linked_array_t* array) {
TRI_RemoveElementAssociativePointer(&array->_array, found);
TRI_RemoveLinkedList(&array->_list, found);
TRI_Free(array->_memoryZone, found);
return data;
}

View File

@ -111,7 +111,7 @@ void TRI_InitLinkedArray (TRI_linked_array_t*, TRI_memory_zone_t*);
/// @brief destroys a linked list, but does not free the pointer
////////////////////////////////////////////////////////////////////////////////
void TRI_DestroyLinkedList (TRI_linked_list_t*);
void TRI_DestroyLinkedList (TRI_linked_list_t*, TRI_memory_zone_t*);
////////////////////////////////////////////////////////////////////////////////
/// @brief destroys a linked list and frees the pointer

View File

@ -1,8 +1,10 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison LALR(1) parsers in C++
Copyright (C) 2002-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 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
@ -70,7 +72,7 @@ YY_DECL;
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if defined(YYENABLE_NLS) && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@ -81,26 +83,6 @@ YY_DECL;
# endif
#endif
/* 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 (N) \
{ \
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
(Current).end = YYRHSLOC (Rhs, N).end; \
} \
else \
{ \
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
} \
while (false)
#endif
/* Suppress unused-variable warnings by "using" E. */
#define YYUSE(e) ((void) (e))
@ -152,6 +134,7 @@ do { \
namespace triagens { namespace json_parser {
#if YYERROR_VERBOSE
/* Return YYSTR after stripping away unnecessary quotes and
backslashes, so that it's suitable for yyerror. The heuristic is
@ -190,6 +173,7 @@ namespace triagens { namespace json_parser {
return yystr;
}
#endif
/// Build a parser object.
JsonParserX::JsonParserX (triagens::rest::JsonParserXDriver& driver_yyarg)
@ -295,18 +279,6 @@ namespace triagens { namespace json_parser {
}
#endif
inline bool
JsonParserX::yy_pact_value_is_default_ (int yyvalue)
{
return yyvalue == yypact_ninf_;
}
inline bool
JsonParserX::yy_table_value_is_error_ (int yyvalue)
{
return yyvalue == yytable_ninf_;
}
int
JsonParserX::parse ()
{
@ -328,7 +300,7 @@ namespace triagens { namespace json_parser {
/// Location of the lookahead.
location_type yylloc;
/// The locations where the error started and ended.
location_type yyerror_range[3];
location_type yyerror_range[2];
/// $$.
semantic_type yyval;
@ -374,7 +346,7 @@ namespace triagens { namespace json_parser {
/* Try to take a decision without lookahead. */
yyn = yypact_[yystate];
if (yy_pact_value_is_default_ (yyn))
if (yyn == yypact_ninf_)
goto yydefault;
/* Read a lookahead token. */
@ -407,8 +379,8 @@ namespace triagens { namespace json_parser {
yyn = yytable_[yyn];
if (yyn <= 0)
{
if (yy_table_value_is_error_ (yyn))
goto yyerrlab;
if (yyn == 0 || yyn == yytable_ninf_)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@ -732,17 +704,6 @@ namespace triagens { namespace json_parser {
default:
break;
}
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action
invokes YYABORT, YYACCEPT, or YYERROR immediately after altering
yychar. In the case of YYABORT or YYACCEPT, an incorrect
destructor might then be invoked immediately. In the case of
YYERROR, subsequent parser actions might lead to an incorrect
destructor call or verbose syntax error message before the
lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
yypop_ (yylen);
@ -766,20 +727,14 @@ namespace triagens { namespace json_parser {
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yytranslate_ (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus_)
{
++yynerrs_;
if (yychar == yyempty_)
yytoken = yyempty_;
error (yylloc, yysyntax_error_ (yystate, yytoken));
}
yyerror_range[1] = yylloc;
yyerror_range[0] = yylloc;
if (yyerrstatus_ == 3)
{
/* If just tried and failed to reuse lookahead token after an
@ -814,7 +769,7 @@ namespace triagens { namespace json_parser {
if (false)
goto yyerrorlab;
yyerror_range[1] = yylocation_stack_[yylen - 1];
yyerror_range[0] = yylocation_stack_[yylen - 1];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
yypop_ (yylen);
@ -831,7 +786,7 @@ namespace triagens { namespace json_parser {
for (;;)
{
yyn = yypact_[yystate];
if (!yy_pact_value_is_default_ (yyn))
if (yyn != yypact_ninf_)
{
yyn += yyterror_;
if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
@ -846,7 +801,7 @@ namespace triagens { namespace json_parser {
if (yystate_stack_.height () == 1)
YYABORT;
yyerror_range[1] = yylocation_stack_[0];
yyerror_range[0] = yylocation_stack_[0];
yydestruct_ ("Error: popping",
yystos_[yystate],
&yysemantic_stack_[0], &yylocation_stack_[0]);
@ -855,10 +810,10 @@ namespace triagens { namespace json_parser {
YY_STACK_PRINT ();
}
yyerror_range[2] = yylloc;
yyerror_range[1] = yylloc;
// Using YYLLOC is tempting, but would change the location of
// the lookahead. YYLOC is available though.
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
yysemantic_stack_.push (yylval);
yylocation_stack_.push (yyloc);
@ -881,13 +836,7 @@ namespace triagens { namespace json_parser {
yyreturn:
if (yychar != yyempty_)
{
/* Make sure we have latest lookahead translation. See comments
at user semantic actions for why this is necessary. */
yytoken = yytranslate_ (yychar);
yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval,
&yylloc);
}
yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
@ -906,97 +855,51 @@ namespace triagens { namespace json_parser {
// Generate an error message.
std::string
JsonParserX::yysyntax_error_ (int yystate, int yytoken)
JsonParserX::yysyntax_error_ (int yystate, int tok)
{
std::string yyres;
// Number of reported tokens (one for the "unexpected", one per
// "expected").
size_t yycount = 0;
// Its maximum.
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
// Arguments of yyformat.
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* There are many possibilities here to consider:
- 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
tokens because there are none.
- The only way there can be no lookahead present (in yytoken) is
if this state is a consistent state with a default action.
Thus, detecting the absence of a lookahead is sufficient to
determine that there is no unexpected or expected token to
report. In that case, just report a simple "syntax error".
- Don't assume there isn't a lookahead just because this state is
a consistent state with a default action. There might have
been a previous inconsistent state, consistent state with a
non-default action, or user semantic action that manipulated
yychar.
- Of course, the expected token list depends on states to have
correct lookahead information, and it depends on the parser not
to perform extra reductions after fetching a lookahead from the
scanner and before detecting a syntax error. Thus, state
merging (from LALR or IELR) and default reductions corrupt the
expected token list. However, the list is correct for
canonical LR with one exception: it will still contain any
token that will not be accepted due to an error action in a
later state.
*/
if (yytoken != yyempty_)
std::string res;
YYUSE (yystate);
#if YYERROR_VERBOSE
int yyn = yypact_[yystate];
if (yypact_ninf_ < yyn && yyn <= yylast_)
{
yyarg[yycount++] = yytname_[yytoken];
int yyn = yypact_[yystate];
if (!yy_pact_value_is_default_ (yyn))
{
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. In other words, skip the first -YYN actions for
this state because they are default actions. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = yylast_ - yyn + 1;
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_
&& !yy_table_value_is_error_ (yytable_[yyx + yyn]))
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
break;
}
else
yyarg[yycount++] = yytname_[yyx];
}
}
}
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0;
char const* yyformat = 0;
switch (yycount)
{
#define YYCASE_(N, S) \
case N: \
yyformat = S; \
break
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
#undef YYCASE_
}
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = yylast_ - yyn + 1;
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
int count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
if (yycheck_[x + yyn] == x && x != yyterror_)
++count;
// Argument number.
size_t yyi = 0;
for (char const* yyp = yyformat; *yyp; ++yyp)
if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
{
yyres += yytnamerr_ (yyarg[yyi++]);
++yyp;
}
else
yyres += *yyp;
return yyres;
// FIXME: This method of building the message is not compatible
// with internationalization. It should work like yacc.c does it.
// That is, first build a string that looks like this:
// "syntax error, unexpected %s or %s or %s"
// Then, invoke YY_ on this string.
// Finally, use the string as a format to output
// yytname_[tok], etc.
// Until this gets fixed, this message appears in English only.
res = "syntax error, unexpected ";
res += yytnamerr_ (yytname_[tok]);
if (count < 5)
{
count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
if (yycheck_[x + yyn] == x && x != yyterror_)
{
res += (!count++) ? ", expecting " : " or ";
res += yytnamerr_ (yytname_[x]);
}
}
}
else
#endif
res = YY_("syntax error");
return res;
}
@ -1013,9 +916,9 @@ namespace triagens { namespace json_parser {
4, -27, 32, -27, -1, -27, 32, -27
};
/* YYDEFACT[S] -- default reduction number in state S. Performed when
YYTABLE doesn't specify something else to do. Zero means the
default is an error. */
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
const unsigned char
JsonParserX::yydefact_[] =
{
@ -1042,7 +945,7 @@ namespace triagens { namespace json_parser {
/* 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. */
number is the opposite. If zero, do what YYDEFACT says. */
const signed char JsonParserX::yytable_ninf_ = -1;
const unsigned char
JsonParserX::yytable_[] =

View File

@ -1,8 +1,10 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison LALR(1) parsers in C++
Copyright (C) 2002-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 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
@ -52,6 +54,16 @@
#include <string>
#include <iostream>
#include "stack.hh"
namespace triagens { namespace json_parser {
class position;
class location;
} } // triagens::json_parser
#include "location.hh"
/* Enabling traces. */
@ -72,6 +84,25 @@
# define YYTOKEN_TABLE 0
#endif
/* 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). */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do { \
if (N) \
{ \
(Current).begin = (Rhs)[1].begin; \
(Current).end = (Rhs)[N].end; \
} \
else \
{ \
(Current).begin = (Current).end = (Rhs)[0].end; \
} \
} while (false)
#endif
namespace triagens { namespace json_parser {
@ -227,14 +258,6 @@ namespace triagens { namespace json_parser {
/// The location stack.
location_stack_type yylocation_stack_;
/// Whether the given \c yypact_ value indicates a defaulted state.
/// \param yyvalue the value to check
static bool yy_pact_value_is_default_ (int yyvalue);
/// Whether the given \c yytable_ value indicates a syntax error.
/// \param yyvalue the value to check
static bool yy_table_value_is_error_ (int yyvalue);
/// Internal symbol numbers.
typedef unsigned char token_number_type;
/* Tables. */
@ -242,7 +265,7 @@ namespace triagens { namespace json_parser {
static const signed char yypact_[];
static const signed char yypact_ninf_;
/// For a state, default reduction number.
/// For a state, default rule to reduce.
/// Unless\a yytable_ specifies something else to do.
/// Zero means the default is an error.
static const unsigned char yydefact_[];
@ -273,8 +296,10 @@ namespace triagens { namespace json_parser {
static const char* const yytname_[];
#endif
#if YYERROR_VERBOSE
/// Convert the symbol name \a n to a form suitable for a diagnostic.
static std::string yytnamerr_ (const char *n);
virtual std::string yytnamerr_ (const char *n);
#endif
#if YYDEBUG
/// A type to store symbol numbers and -1.

View File

@ -1,8 +1,9 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Locations for Bison parsers in C++
Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005, 2006 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

View File

@ -1,8 +1,9 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Positions for Bison parsers in C++
Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005, 2006 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
@ -125,11 +126,10 @@ namespace triagens { namespace json_parser {
inline bool
operator== (const position& pos1, const position& pos2)
{
return (pos1.line == pos2.line
&& pos1.column == pos2.column
&& (pos1.filename == pos2.filename
|| (pos1.filename && pos2.filename
&& *pos1.filename == *pos2.filename)));
return
(pos1.filename == pos2.filename
|| (pos1.filename && pos2.filename && *pos1.filename == *pos2.filename))
&& pos1.line == pos2.line && pos1.column == pos2.column;
}
/// Compare two position objects.

View File

@ -1,8 +1,10 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Stack handling for Bison parsers in C++
Copyright (C) 2002-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 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

View File

@ -1,4 +1,4 @@
#line 2 "V8/v8-json.ll"
#line 2 "lib/V8/v8-json.ll"
////////////////////////////////////////////////////////////////////////////////
/// @brief json parser
///
@ -6,7 +6,7 @@
///
/// DISCLAIMER
///
/// Copyright 2004-2012 triAGENS GmbH, Cologne, Germany
/// Copyright 2011 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
@ -23,21 +23,21 @@
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Dr. Frank Celler
/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany
/// @author Copyright 2011, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#include "BasicsC/common.h"
#include <BasicsC/common.h>
#include "V8/v8-globals.h"
#include "BasicsC/strings.h"
#include "BasicsC/logging.h"
#include <BasicsC/strings.h>
#include <BasicsC/logging.h>
#define YY_NO_INPUT
#line 41 "V8/v8-json.cpp"
#line 41 "lib/V8/v8-json.cpp"
#define YY_INT_ALIGNED short int
@ -63,7 +63,7 @@
/* %endif */
/* %if-c-only */
/* %endif */
/* %if-c-only */
@ -95,7 +95,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@ -112,7 +112,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
@ -262,7 +262,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@ -329,7 +329,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@ -1641,7 +1641,7 @@ static void tri_v8__load_buffer_state (yyscan_t yyscanner)
/* %endif */
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) tri_v8_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in tri_v8__create_buffer()" );
@ -1691,7 +1691,7 @@ static void tri_v8__load_buffer_state (yyscan_t yyscanner)
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
/* %endif */
/* %if-c++-only */
@ -1728,7 +1728,7 @@ extern int isatty (int );
/* %if-c-only */
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
/* %endif */
/* %if-c++-only */
/* %endif */
@ -1858,9 +1858,9 @@ static void tri_v8_ensure_buffer_stack (yyscan_t yyscanner)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in tri_v8_ensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
@ -1891,12 +1891,12 @@ static void tri_v8_ensure_buffer_stack (yyscan_t yyscanner)
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE tri_v8__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@ -1934,7 +1934,7 @@ YY_BUFFER_STATE tri_v8__scan_buffer (char * base, yy_size_t size , yyscan_t yy
*/
YY_BUFFER_STATE tri_v8__scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
return tri_v8__scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
/* %endif */
@ -1953,7 +1953,7 @@ YY_BUFFER_STATE tri_v8__scan_bytes (yyconst char * yybytes, int _yybytes_len ,
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) tri_v8_alloc(n ,yyscanner );
@ -2031,10 +2031,10 @@ YY_EXTRA_TYPE tri_v8_get_extra (yyscan_t yyscanner)
int tri_v8_get_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
return yylineno;
}
@ -2044,10 +2044,10 @@ int tri_v8_get_lineno (yyscan_t yyscanner)
int tri_v8_get_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
return yycolumn;
}
@ -2112,8 +2112,8 @@ void tri_v8_set_lineno (int line_number , yyscan_t yyscanner)
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
yy_fatal_error( "tri_v8_set_lineno called with no buffer" , yyscanner);
yy_fatal_error( "tri_v8_set_lineno called with no buffer" , yyscanner);
yylineno = line_number;
}
@ -2127,8 +2127,8 @@ void tri_v8_set_column (int column_no , yyscan_t yyscanner)
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
yy_fatal_error( "tri_v8_set_column called with no buffer" , yyscanner);
yy_fatal_error( "tri_v8_set_column called with no buffer" , yyscanner);
yycolumn = column_no;
}
@ -2217,20 +2217,20 @@ int tri_v8_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals
errno = EINVAL;
return 1;
}
*ptr_yy_globals = (yyscan_t) tri_v8_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
/* By setting to 0xAA, we expose bugs in
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
tri_v8_set_extra (yy_user_defined, *ptr_yy_globals);
return yy_init_globals ( *ptr_yy_globals );
}
@ -2673,6 +2673,6 @@ v8::Handle<v8::Value> TRI_FromJsonString (char const* text, char** error) {
// Local Variables:
// mode: C
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|/// @page\\|// --SECTION--\\|/// @\\}\\)"
// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\)"
// End: