3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-26 02:25:35 +00:00

Added handling of real-valued parameters/localparams

This commit is contained in:
Clifford Wolf 2014-06-14 12:00:47 +02:00
parent fc7b6d172a
commit 9bd7d5c468
4 changed files with 62 additions and 24 deletions

View file

@ -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); }