mirror of https://gitee.com/bigwinds/arangodb
generate .cpp file instead of .c file
This commit is contained in:
parent
ea236ec3a8
commit
cf81e3ff00
|
@ -35,10 +35,10 @@ setup:
|
|||
|
||||
MAINTAINER = \
|
||||
README \
|
||||
arangod/Ahuacatl/ahuacatl-tokens.c \
|
||||
arangod/Ahuacatl/ahuacatl-grammar.c \
|
||||
arangod/Ahuacatl/ahuacatl-tokens.cpp \
|
||||
arangod/Ahuacatl/ahuacatl-grammar.cpp \
|
||||
arangod/Ahuacatl/ahuacatl-grammar.h \
|
||||
lib/JsonParser/json-parser.c \
|
||||
lib/JsonParser/json-parser.cpp \
|
||||
lib/V8/v8-json.cpp \
|
||||
lib/V8/v8-json.h \
|
||||
lib/BasicsC/voc-errors.h \
|
||||
|
|
10
Makefile.am
10
Makefile.am
|
@ -475,7 +475,15 @@ endif
|
|||
################################################################################
|
||||
|
||||
if ENABLE_MAINTAINER_MODE
|
||||
include lib/Makefile.bison
|
||||
|
||||
BUILT_SOURCES += $(BISON_FILES) $(BISONXX_FILES)
|
||||
|
||||
%.cpp: %.y
|
||||
@top_srcdir@/utils/bison-c.sh $(BISON) $@ $<
|
||||
|
||||
%.cpp: %.yy
|
||||
@top_srcdir@/utils/bison-c++.sh $(BISON) $@ $<
|
||||
|
||||
endif
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,19 +1,19 @@
|
|||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
/* A Bison parser, made by GNU Bison 3.0.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 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 <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
@ -26,13 +26,13 @@
|
|||
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_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
||||
# define YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
||||
/* Enabling traces. */
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
|
@ -40,119 +40,105 @@
|
|||
extern int Ahuacatldebug;
|
||||
#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 {
|
||||
T_END = 0,
|
||||
T_FOR = 258,
|
||||
T_LET = 259,
|
||||
T_FILTER = 260,
|
||||
T_RETURN = 261,
|
||||
T_COLLECT = 262,
|
||||
T_SORT = 263,
|
||||
T_LIMIT = 264,
|
||||
T_ASC = 265,
|
||||
T_DESC = 266,
|
||||
T_IN = 267,
|
||||
T_WITH = 268,
|
||||
T_INTO = 269,
|
||||
T_REMOVE = 270,
|
||||
T_INSERT = 271,
|
||||
T_UPDATE = 272,
|
||||
T_REPLACE = 273,
|
||||
T_NULL = 274,
|
||||
T_TRUE = 275,
|
||||
T_FALSE = 276,
|
||||
T_STRING = 277,
|
||||
T_QUOTED_STRING = 278,
|
||||
T_INTEGER = 279,
|
||||
T_DOUBLE = 280,
|
||||
T_PARAMETER = 281,
|
||||
T_ASSIGN = 282,
|
||||
T_NOT = 283,
|
||||
T_AND = 284,
|
||||
T_OR = 285,
|
||||
T_EQ = 286,
|
||||
T_NE = 287,
|
||||
T_LT = 288,
|
||||
T_GT = 289,
|
||||
T_LE = 290,
|
||||
T_GE = 291,
|
||||
T_PLUS = 292,
|
||||
T_MINUS = 293,
|
||||
T_TIMES = 294,
|
||||
T_DIV = 295,
|
||||
T_MOD = 296,
|
||||
T_EXPAND = 297,
|
||||
T_QUESTION = 298,
|
||||
T_COLON = 299,
|
||||
T_SCOPE = 300,
|
||||
T_RANGE = 301,
|
||||
T_COMMA = 302,
|
||||
T_OPEN = 303,
|
||||
T_CLOSE = 304,
|
||||
T_DOC_OPEN = 305,
|
||||
T_DOC_CLOSE = 306,
|
||||
T_LIST_OPEN = 307,
|
||||
T_LIST_CLOSE = 308,
|
||||
UPLUS = 309,
|
||||
UMINUS = 310,
|
||||
FUNCCALL = 311,
|
||||
REFERENCE = 312,
|
||||
INDEXED = 313
|
||||
};
|
||||
enum yytokentype
|
||||
{
|
||||
T_END = 0,
|
||||
T_FOR = 258,
|
||||
T_LET = 259,
|
||||
T_FILTER = 260,
|
||||
T_RETURN = 261,
|
||||
T_COLLECT = 262,
|
||||
T_SORT = 263,
|
||||
T_LIMIT = 264,
|
||||
T_ASC = 265,
|
||||
T_DESC = 266,
|
||||
T_IN = 267,
|
||||
T_WITH = 268,
|
||||
T_INTO = 269,
|
||||
T_REMOVE = 270,
|
||||
T_INSERT = 271,
|
||||
T_UPDATE = 272,
|
||||
T_REPLACE = 273,
|
||||
T_NULL = 274,
|
||||
T_TRUE = 275,
|
||||
T_FALSE = 276,
|
||||
T_STRING = 277,
|
||||
T_QUOTED_STRING = 278,
|
||||
T_INTEGER = 279,
|
||||
T_DOUBLE = 280,
|
||||
T_PARAMETER = 281,
|
||||
T_ASSIGN = 282,
|
||||
T_NOT = 283,
|
||||
T_AND = 284,
|
||||
T_OR = 285,
|
||||
T_EQ = 286,
|
||||
T_NE = 287,
|
||||
T_LT = 288,
|
||||
T_GT = 289,
|
||||
T_LE = 290,
|
||||
T_GE = 291,
|
||||
T_PLUS = 292,
|
||||
T_MINUS = 293,
|
||||
T_TIMES = 294,
|
||||
T_DIV = 295,
|
||||
T_MOD = 296,
|
||||
T_EXPAND = 297,
|
||||
T_QUESTION = 298,
|
||||
T_COLON = 299,
|
||||
T_SCOPE = 300,
|
||||
T_RANGE = 301,
|
||||
T_COMMA = 302,
|
||||
T_OPEN = 303,
|
||||
T_CLOSE = 304,
|
||||
T_DOC_OPEN = 305,
|
||||
T_DOC_CLOSE = 306,
|
||||
T_LIST_OPEN = 307,
|
||||
T_LIST_CLOSE = 308,
|
||||
UMINUS = 309,
|
||||
UPLUS = 310,
|
||||
FUNCCALL = 311,
|
||||
REFERENCE = 312,
|
||||
INDEXED = 313
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
union YYSTYPE
|
||||
{
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1915 */
|
||||
|
||||
TRI_aql_node_t* node;
|
||||
char* strval;
|
||||
bool boolval;
|
||||
int64_t intval;
|
||||
|
||||
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 124 "arangod/Ahuacatl/ahuacatl-grammar.h"
|
||||
} YYSTYPE;
|
||||
#line 121 "arangod/Ahuacatl/ahuacatl-grammar.h" /* yacc.c:1915 */
|
||||
};
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
/* Location type. */
|
||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
typedef struct YYLTYPE
|
||||
typedef struct YYLTYPE YYLTYPE;
|
||||
struct YYLTYPE
|
||||
{
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
} YYLTYPE;
|
||||
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
|
||||
};
|
||||
# define YYLTYPE_IS_DECLARED 1
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int Ahuacatlparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int Ahuacatlparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
|
||||
int Ahuacatlparse (TRI_aql_context_t* const context);
|
||||
#else
|
||||
int Ahuacatlparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED */
|
||||
|
|
|
@ -169,19 +169,15 @@ FLEXXX_FILES += \
|
|||
################################################################################
|
||||
|
||||
BISON_FILES += \
|
||||
arangod/Ahuacatl/ahuacatl-grammar.c
|
||||
arangod/Ahuacatl/ahuacatl-grammar.cpp
|
||||
|
||||
if ENABLE_MAINTAINER_MODE
|
||||
|
||||
CLEANUP += \
|
||||
arangod/Ahuacatl/ahuacatl-grammar.h \
|
||||
arangod/Ahuacatl/ahuacatl-grammar.c \
|
||||
arangod/Ahuacatl/ahuacatl-grammar.cpp
|
||||
endif
|
||||
|
||||
arangod/Ahuacatl/ahuacatl-grammar.cpp: arangod/Ahuacatl/ahuacatl-grammar.c
|
||||
cp arangod/Ahuacatl/ahuacatl-grammar.c arangod/Ahuacatl/ahuacatl-grammar.cpp
|
||||
|
||||
################################################################################
|
||||
## --SECTION-- END-OF-FILE
|
||||
################################################################################
|
||||
|
|
|
@ -806,7 +806,6 @@ ArangoCollection.prototype.fulltext = function (attribute, query, iid) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief iterators over some elements of a collection
|
||||
/// @startDocuBlock collectionIterate
|
||||
/// `collection.iterate(iterator, options)`
|
||||
///
|
||||
/// Iterates over some elements of the collection and apply the function
|
||||
|
@ -829,7 +828,6 @@ ArangoCollection.prototype.fulltext = function (attribute, query, iid) {
|
|||
/// arango> db.example.index("93013/0");
|
||||
/// { "id" : "93013/0", "type" : "primary", "fields" : ["_id"] }
|
||||
/// ```
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ArangoCollection.prototype.iterate = function (iterator, options) {
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
# -*- mode: Makefile; -*-
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- PARSER
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
################################################################################
|
||||
### @brief built sources
|
||||
################################################################################
|
||||
|
||||
BUILT_SOURCES += $(BISON_FILES) $(BISONXX_FILES)
|
||||
|
||||
################################################################################
|
||||
### @brief BISON
|
||||
################################################################################
|
||||
|
||||
%.c: %.y
|
||||
@top_srcdir@/utils/bison-c.sh $(BISON) $@ $<
|
||||
|
||||
################################################################################
|
||||
### @brief BISON++
|
||||
################################################################################
|
||||
|
||||
%.cpp: %.yy
|
||||
@top_srcdir@/utils/bison-c++.sh $(BISON) $@ $<
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- END-OF-FILE
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
## Local Variables:
|
||||
## mode: outline-minor
|
||||
## outline-regexp: "^\\(### @brief\\|## --SECTION--\\|# -\\*- \\)"
|
||||
## End:
|
|
@ -19,8 +19,7 @@ ${BISON} -d -ra -o ${OUTPUT} ${INPUT}
|
|||
## sanity checks
|
||||
#############################################################################
|
||||
|
||||
PREFIX=`echo ${OUTPUT} | sed -e 's:\.c$::'`
|
||||
PREFIX=`echo ${OUTPUT} | sed -e 's:\.cpp$::'`
|
||||
|
||||
test -f ${PREFIX}.h || exit 1
|
||||
test -f ${PREFIX}.c || exit 1
|
||||
|
||||
test -f ${PREFIX}.cpp || exit 1
|
||||
|
|
Loading…
Reference in New Issue