Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
preprocessor
Commits
10c4b8a0
Commit
10c4b8a0
authored
Dec 28, 2013
by
Sébastien Villemot
Browse files
Fix compatibility issue with Bison 3.
Closes #570
parent
57d62a31
Changes
2
Hide whitespace changes
Inline
Side-by-side
DynareBison.yy
View file @
10c4b8a0
...
...
@@ -38,23 +38,23 @@ class ParsingDriver;
/*
Little
hack
:
we
redefine
the
macro
which
computes
the
locations
,
because
we
need
to
access
the
location
from
within
the
parsing
driver
for
error
and
warning
messages
.
*/
#
define
YYLLOC_DEFAULT
(
Current
,
Rhs
,
N
)
\
do
{
\
if
(
N
)
\
{
\
(
Current
).
begin
=
(
Rhs
)[
1
]
.
begin
;
\
(
Current
).
end
=
(
Rhs
)[
N
]
.
end
;
\
}
\
else
\
{
\
(
Current
).
begin
=
(
Current
).
end
=
(
Rhs
)[
0
]
.
end
;
\
}
\
driver
.
location
=
(
Current
);
\
#
define
YYLLOC_DEFAULT
(
Current
,
Rhs
,
N
)
\
do
{
\
if
(
N
)
\
{
\
(
Current
).
begin
=
YYRHSLOC
(
Rhs
,
1
)
.
begin
;
\
(
Current
).
end
=
YYRHSLOC
(
Rhs
,
N
)
.
end
;
\
}
\
else
\
{
\
(
Current
).
begin
=
(
Current
).
end
=
YYRHSLOC
(
Rhs
,
0
)
.
end
;
\
}
\
driver
.
location
=
(
Current
);
\
}
while
(
false
)
%}
%
name
-
prefix
=
"Dynare"
%
name
-
prefix
"Dynare"
%
parse
-
param
{
ParsingDriver
&
driver
}
%
lex
-
param
{
ParsingDriver
&
driver
}
...
...
macro/MacroBison.yy
View file @
10c4b8a0
...
...
@@ -35,7 +35,7 @@ using namespace std;
class MacroDriver;
%}
%name-prefix
=
"Macro"
%name-prefix
"Macro"
%parse-param { MacroDriver &driver }
%parse-param { ostream &out }
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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