summaryrefslogtreecommitdiff
path: root/frontends/verilog/lexer.l
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-06-14 12:00:47 +0200
committerClifford Wolf <clifford@clifford.at>2014-06-14 12:00:47 +0200
commit9bd7d5c46856f25fd7befcdfe20198fd8eb59ccd (patch)
treefc0c4ef322d2b3598d89b8b6926987a7d6292701 /frontends/verilog/lexer.l
parentfc7b6d172a67965c89d84696e5f2cf1218855ea5 (diff)
Added handling of real-valued parameters/localparams
Diffstat (limited to 'frontends/verilog/lexer.l')
-rw-r--r--frontends/verilog/lexer.l5
1 files changed, 3 insertions, 2 deletions
diff --git a/frontends/verilog/lexer.l b/frontends/verilog/lexer.l
index ed304572..0839f5cf 100644
--- a/frontends/verilog/lexer.l
+++ b/frontends/verilog/lexer.l
@@ -168,6 +168,7 @@ namespace VERILOG_FRONTEND {
"integer" { return TOK_INTEGER; }
"signed" { return TOK_SIGNED; }
"genvar" { return TOK_GENVAR; }
+"real" { return TOK_REAL; }
[0-9]+ {
frontend_verilog_yylval.string = new std::string(yytext);
@@ -181,12 +182,12 @@ namespace VERILOG_FRONTEND {
[0-9][0-9_]*\.[0-9][0-9_]*([eE][-+]?[0-9_]+)? {
frontend_verilog_yylval.string = new std::string(yytext);
- return TOK_REAL;
+ return TOK_REALVAL;
}
[0-9][0-9_]*[eE][-+]?[0-9_]+ {
frontend_verilog_yylval.string = new std::string(yytext);
- return TOK_REAL;
+ return TOK_REALVAL;
}
\" { BEGIN(STRING); }