Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
b6ac7737
Commit
b6ac7737
authored
Nov 01, 2016
by
Francis Dupont
Browse files
[5060] yy prefix -> eval
parent
d3682634
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
src/lib/eval/Makefile.am
View file @
b6ac7737
...
...
@@ -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
...
...
src/lib/eval/eval_context.h
View file @
b6ac7737
...
...
@@ -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
;
...
...
src/lib/eval/lexer.cc
View file @
b6ac7737
This diff is collapsed.
Click to expand it.
src/lib/eval/parser.cc
View file @
b6ac7737
This diff is collapsed.
Click to expand it.
src/lib/eval/parser.h
View file @
b6ac7737
...
...
@@ -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 1
6
"parser.yy" // lalr1.cc:3
77
#line 1
7
"parser.yy" // lalr1.cc:3
92
#include
<string>
#include
<eval/token.h>
...
...
@@ -51,7 +51,7 @@
using
namespace
isc
::
dhcp
;
using
namespace
isc
::
eval
;
#line 55 "parser.h" // lalr1.cc:3
77
#line 55 "parser.h" // lalr1.cc:3
92
# 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 1
32
"parser.h" // lalr1.cc:3
77
#line 1
40
"parser.h" // lalr1.cc:3
92
...
...
@@ -291,7 +299,7 @@ namespace isc { namespace eval {
class
EvalParser
{
public:
#ifndef
YY
STYPE
#ifndef
EVAL
STYPE
/// 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
YY
STYPE
semantic_type
;
typedef
EVAL
STYPE
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
YY
DEBUG
#if
EVAL
DEBUG
/// 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
YY
DEBUG
#if
EVAL
DEBUG
// 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 1
3
"parser.yy" // lalr1.cc:3
77
#line 1
4
"parser.yy" // lalr1.cc:3
92
}
}
// isc::eval
#line 16
69
"parser.h" // lalr1.cc:3
77
#line 16
77
"parser.h" // lalr1.cc:3
92
#endif // !YY_
YY
_PARSER_H_INCLUDED
#endif // !YY_
EVAL
_PARSER_H_INCLUDED
src/lib/eval/parser.yy
View file @
b6ac7737
...
...
@@ -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}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment