1
0
Fork 0

generate .cpp file instead of .c file

This commit is contained in:
Frank Celler 2014-07-10 19:13:12 +02:00
parent ea236ec3a8
commit cf81e3ff00
9 changed files with 887 additions and 4901 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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
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
@ -32,7 +32,7 @@
#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,12 +40,11 @@
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 {
enum yytokentype
{
T_END = 0,
T_FOR = 258,
T_LET = 259,
@ -98,61 +97,48 @@ extern int Ahuacatldebug;
T_DOC_CLOSE = 306,
T_LIST_OPEN = 307,
T_LIST_CLOSE = 308,
UPLUS = 309,
UMINUS = 310,
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 */

View File

@ -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
################################################################################

View 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) {

View File

@ -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:

View File

@ -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