summaryrefslogtreecommitdiff
path: root/frontends/ilang
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/ilang')
-rw-r--r--frontends/ilang/ilang_frontend.cc4
-rw-r--r--frontends/ilang/ilang_frontend.h6
-rw-r--r--frontends/ilang/parser.y9
3 files changed, 15 insertions, 4 deletions
diff --git a/frontends/ilang/ilang_frontend.cc b/frontends/ilang/ilang_frontend.cc
index 572a3572..2d4b99c5 100644
--- a/frontends/ilang/ilang_frontend.cc
+++ b/frontends/ilang/ilang_frontend.cc
@@ -26,6 +26,8 @@
#include "kernel/register.h"
#include "kernel/log.h"
+YOSYS_NAMESPACE_BEGIN
+
void rtlil_frontend_ilang_yyerror(char const *s)
{
log_error("Parser error in line %d: %s\n", rtlil_frontend_ilang_yyget_lineno(), s);
@@ -57,3 +59,5 @@ struct IlangFrontend : public Frontend {
}
} IlangFrontend;
+YOSYS_NAMESPACE_END
+
diff --git a/frontends/ilang/ilang_frontend.h b/frontends/ilang/ilang_frontend.h
index 5e768c3b..317ec0d5 100644
--- a/frontends/ilang/ilang_frontend.h
+++ b/frontends/ilang/ilang_frontend.h
@@ -25,14 +25,18 @@
#ifndef ILANG_FRONTEND_H
#define ILANG_FRONTEND_H
-#include "kernel/rtlil.h"
+#include "kernel/yosys.h"
#include <stdio.h>
+YOSYS_NAMESPACE_BEGIN
+
namespace ILANG_FRONTEND {
void ilang_frontend(FILE *f, RTLIL::Design *design);
extern RTLIL::Design *current_design;
}
+YOSYS_NAMESPACE_END
+
extern int rtlil_frontend_ilang_yydebug;
int rtlil_frontend_ilang_yylex(void);
void rtlil_frontend_ilang_yyerror(char const *s);
diff --git a/frontends/ilang/parser.y b/frontends/ilang/parser.y
index 38d3054b..ab763b2b 100644
--- a/frontends/ilang/parser.y
+++ b/frontends/ilang/parser.y
@@ -25,6 +25,7 @@
%{
#include <list>
#include "ilang_frontend.h"
+YOSYS_NAMESPACE_BEGIN
namespace ILANG_FRONTEND {
RTLIL::Design *current_design;
RTLIL::Module *current_module;
@@ -37,6 +38,8 @@ namespace ILANG_FRONTEND {
std::map<RTLIL::IdString, RTLIL::Const> attrbuf;
}
using namespace ILANG_FRONTEND;
+YOSYS_NAMESPACE_END
+USING_YOSYS_NAMESPACE
%}
%name-prefix "rtlil_frontend_ilang_yy"
@@ -44,8 +47,8 @@ using namespace ILANG_FRONTEND;
%union {
char *string;
int integer;
- RTLIL::Const *data;
- RTLIL::SigSpec *sigspec;
+ YOSYS_NAMESPACE_PREFIX RTLIL::Const *data;
+ YOSYS_NAMESPACE_PREFIX RTLIL::SigSpec *sigspec;
}
%token <string> TOK_ID TOK_VALUE TOK_STRING
@@ -116,7 +119,7 @@ attr_stmt:
autoidx_stmt:
TOK_AUTOIDX TOK_INT EOL {
- RTLIL::autoidx = std::max(RTLIL::autoidx, $2);
+ autoidx = std::max(autoidx, $2);
};
wire_stmt: