Commit b6ac7737 authored by Francis Dupont's avatar Francis Dupont
Browse files

[5060] yy prefix -> eval

parent d3682634
......@@ -94,7 +94,7 @@ location.hh position.hh stack.hh parser.cc parser.h: parser.yy
$(YACC) --defines=parser.h -o parser.cc parser.yy
lexer.cc: lexer.ll
$(LEX) -o lexer.cc lexer.ll
$(LEX) --prefix eval -o lexer.cc lexer.ll
else
......
......@@ -13,7 +13,8 @@
#include <exceptions/exceptions.h>
// Tell Flex the lexer's prototype ...
#define YY_DECL isc::eval::EvalParser::symbol_type yylex (EvalContext& driver)
#define YY_DECL \
isc::eval::EvalParser::symbol_type evallex (EvalContext& driver)
// ... and declare it for the parser's sake.
YY_DECL;
......
This diff is collapsed.
This diff is collapsed.
......@@ -37,10 +37,10 @@
// C++ LALR(1) parser skeleton written by Akim Demaille.
#ifndef YY_YY_PARSER_H_INCLUDED
# define YY_YY_PARSER_H_INCLUDED
#ifndef YY_EVAL_PARSER_H_INCLUDED
# define YY_EVAL_PARSER_H_INCLUDED
// // "%code requires" blocks.
#line 16 "parser.yy" // lalr1.cc:377
#line 17 "parser.yy" // lalr1.cc:392
#include <string>
#include <eval/token.h>
......@@ -51,7 +51,7 @@
using namespace isc::dhcp;
using namespace isc::eval;
#line 55 "parser.h" // lalr1.cc:377
#line 55 "parser.h" // lalr1.cc:392
# include <cassert>
# include <cstdlib> // std::abort
......@@ -122,13 +122,21 @@ using namespace isc::eval;
#endif
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif
#line 13 "parser.yy" // lalr1.cc:377
#ifndef EVALDEBUG
# if defined YYDEBUG
#if YYDEBUG
# define EVALDEBUG 1
# else
# define EVALDEBUG 0
# endif
# else /* ! defined YYDEBUG */
# define EVALDEBUG 1
# endif /* ! defined YYDEBUG */
#endif /* ! defined EVALDEBUG */
#line 14 "parser.yy" // lalr1.cc:392
namespace isc { namespace eval {
#line 132 "parser.h" // lalr1.cc:377
#line 140 "parser.h" // lalr1.cc:392
......@@ -291,7 +299,7 @@ namespace isc { namespace eval {
class EvalParser
{
public:
#ifndef YYSTYPE
#ifndef EVALSTYPE
/// An auxiliary type to compute the largest semantic type.
union union_type
{
......@@ -331,7 +339,7 @@ namespace isc { namespace eval {
/// Symbol semantic values.
typedef variant<sizeof(union_type)> semantic_type;
#else
typedef YYSTYPE semantic_type;
typedef EVALSTYPE semantic_type;
#endif
/// Symbol locations.
typedef location location_type;
......@@ -719,7 +727,7 @@ namespace isc { namespace eval {
/// \returns 0 iff parsing succeeded.
virtual int parse ();
#if YYDEBUG
#if EVALDEBUG
/// The current debugging stream.
std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
/// Set the current debugging stream.
......@@ -814,7 +822,7 @@ namespace isc { namespace eval {
/// For a symbol, its name in clear.
static const char* const yytname_[];
#if YYDEBUG
#if EVALDEBUG
// YYRLINE[YYN] -- Source line where rule number YYN was defined.
static const unsigned short int yyrline_[];
/// Report on the debug stream that the rule \a r is going to be reduced.
......@@ -1663,11 +1671,11 @@ namespace isc { namespace eval {
}
#line 13 "parser.yy" // lalr1.cc:377
#line 14 "parser.yy" // lalr1.cc:392
} } // isc::eval
#line 1669 "parser.h" // lalr1.cc:377
#line 1677 "parser.h" // lalr1.cc:392
#endif // !YY_YY_PARSER_H_INCLUDED
#endif // !YY_EVAL_PARSER_H_INCLUDED
......@@ -8,6 +8,7 @@
%require "3.0.0"
%defines
%define parser_class_name {EvalParser}
%define api.prefix {eval}
%define api.token.constructor
%define api.value.type variant
%define api.namespace {isc::eval}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment