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 = \
|
MAINTAINER = \
|
||||||
README \
|
README \
|
||||||
arangod/Ahuacatl/ahuacatl-tokens.c \
|
arangod/Ahuacatl/ahuacatl-tokens.cpp \
|
||||||
arangod/Ahuacatl/ahuacatl-grammar.c \
|
arangod/Ahuacatl/ahuacatl-grammar.cpp \
|
||||||
arangod/Ahuacatl/ahuacatl-grammar.h \
|
arangod/Ahuacatl/ahuacatl-grammar.h \
|
||||||
lib/JsonParser/json-parser.c \
|
lib/JsonParser/json-parser.cpp \
|
||||||
lib/V8/v8-json.cpp \
|
lib/V8/v8-json.cpp \
|
||||||
lib/V8/v8-json.h \
|
lib/V8/v8-json.h \
|
||||||
lib/BasicsC/voc-errors.h \
|
lib/BasicsC/voc-errors.h \
|
||||||
|
|
10
Makefile.am
10
Makefile.am
|
@ -475,7 +475,15 @@ endif
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
if ENABLE_MAINTAINER_MODE
|
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
|
endif
|
||||||
|
|
||||||
## -----------------------------------------------------------------------------
|
## -----------------------------------------------------------------------------
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
||||||
/* 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
|
/* 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#ifndef YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
#ifndef YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
||||||
# define YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
# define YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
||||||
/* Enabling traces. */
|
/* Debug traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG 0
|
# define YYDEBUG 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,12 +40,11 @@
|
||||||
extern int Ahuacatldebug;
|
extern int Ahuacatldebug;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tokens. */
|
/* Token type. */
|
||||||
#ifndef YYTOKENTYPE
|
#ifndef YYTOKENTYPE
|
||||||
# define YYTOKENTYPE
|
# define YYTOKENTYPE
|
||||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
enum yytokentype
|
||||||
know about them. */
|
{
|
||||||
enum yytokentype {
|
|
||||||
T_END = 0,
|
T_END = 0,
|
||||||
T_FOR = 258,
|
T_FOR = 258,
|
||||||
T_LET = 259,
|
T_LET = 259,
|
||||||
|
@ -98,61 +97,48 @@ extern int Ahuacatldebug;
|
||||||
T_DOC_CLOSE = 306,
|
T_DOC_CLOSE = 306,
|
||||||
T_LIST_OPEN = 307,
|
T_LIST_OPEN = 307,
|
||||||
T_LIST_CLOSE = 308,
|
T_LIST_CLOSE = 308,
|
||||||
UPLUS = 309,
|
UMINUS = 309,
|
||||||
UMINUS = 310,
|
UPLUS = 310,
|
||||||
FUNCCALL = 311,
|
FUNCCALL = 311,
|
||||||
REFERENCE = 312,
|
REFERENCE = 312,
|
||||||
INDEXED = 313
|
INDEXED = 313
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Value type. */
|
||||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
#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" /* yacc.c:1915 */
|
||||||
#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
|
||||||
|
|
||||||
TRI_aql_node_t* node;
|
TRI_aql_node_t* node;
|
||||||
char* strval;
|
char* strval;
|
||||||
bool boolval;
|
bool boolval;
|
||||||
int64_t intval;
|
int64_t intval;
|
||||||
|
|
||||||
|
#line 121 "arangod/Ahuacatl/ahuacatl-grammar.h" /* yacc.c:1915 */
|
||||||
/* Line 2058 of yacc.c */
|
};
|
||||||
#line 124 "arangod/Ahuacatl/ahuacatl-grammar.h"
|
|
||||||
} YYSTYPE;
|
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Location type. */
|
||||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||||
typedef struct YYLTYPE
|
typedef struct YYLTYPE YYLTYPE;
|
||||||
|
struct YYLTYPE
|
||||||
{
|
{
|
||||||
int first_line;
|
int first_line;
|
||||||
int first_column;
|
int first_column;
|
||||||
int last_line;
|
int last_line;
|
||||||
int last_column;
|
int last_column;
|
||||||
} YYLTYPE;
|
};
|
||||||
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
|
|
||||||
# define YYLTYPE_IS_DECLARED 1
|
# define YYLTYPE_IS_DECLARED 1
|
||||||
# define YYLTYPE_IS_TRIVIAL 1
|
# define YYLTYPE_IS_TRIVIAL 1
|
||||||
#endif
|
#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);
|
int Ahuacatlparse (TRI_aql_context_t* const context);
|
||||||
#else
|
|
||||||
int Ahuacatlparse ();
|
|
||||||
#endif
|
|
||||||
#endif /* ! YYPARSE_PARAM */
|
|
||||||
|
|
||||||
#endif /* !YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED */
|
#endif /* !YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED */
|
||||||
|
|
|
@ -169,19 +169,15 @@ FLEXXX_FILES += \
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
BISON_FILES += \
|
BISON_FILES += \
|
||||||
arangod/Ahuacatl/ahuacatl-grammar.c
|
arangod/Ahuacatl/ahuacatl-grammar.cpp
|
||||||
|
|
||||||
if ENABLE_MAINTAINER_MODE
|
if ENABLE_MAINTAINER_MODE
|
||||||
|
|
||||||
CLEANUP += \
|
CLEANUP += \
|
||||||
arangod/Ahuacatl/ahuacatl-grammar.h \
|
arangod/Ahuacatl/ahuacatl-grammar.h \
|
||||||
arangod/Ahuacatl/ahuacatl-grammar.c \
|
|
||||||
arangod/Ahuacatl/ahuacatl-grammar.cpp
|
arangod/Ahuacatl/ahuacatl-grammar.cpp
|
||||||
endif
|
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
|
## --SECTION-- END-OF-FILE
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -806,7 +806,6 @@ ArangoCollection.prototype.fulltext = function (attribute, query, iid) {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief iterators over some elements of a collection
|
/// @brief iterators over some elements of a collection
|
||||||
/// @startDocuBlock collectionIterate
|
|
||||||
/// `collection.iterate(iterator, options)`
|
/// `collection.iterate(iterator, options)`
|
||||||
///
|
///
|
||||||
/// Iterates over some elements of the collection and apply the function
|
/// 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");
|
/// arango> db.example.index("93013/0");
|
||||||
/// { "id" : "93013/0", "type" : "primary", "fields" : ["_id"] }
|
/// { "id" : "93013/0", "type" : "primary", "fields" : ["_id"] }
|
||||||
/// ```
|
/// ```
|
||||||
/// @endDocuBlock
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ArangoCollection.prototype.iterate = function (iterator, options) {
|
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
|
## 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}.h || exit 1
|
||||||
test -f ${PREFIX}.c || exit 1
|
test -f ${PREFIX}.cpp || exit 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue