mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-26 10:35:38 +00:00
Added Verilog lexer and parser support for real values
This commit is contained in:
parent
482d9208aa
commit
7ef0da32cd
4 changed files with 31 additions and 3 deletions
|
@ -179,6 +179,16 @@ namespace VERILOG_FRONTEND {
|
|||
return TOK_CONST;
|
||||
}
|
||||
|
||||
[0-9][0-9_]*\.[0-9][0-9_]*([eE][-+]?[0-9_]+)? {
|
||||
frontend_verilog_yylval.string = new std::string(yytext);
|
||||
return TOK_REAL;
|
||||
}
|
||||
|
||||
[0-9][0-9_]*[eE][-+]?[0-9_]+ {
|
||||
frontend_verilog_yylval.string = new std::string(yytext);
|
||||
return TOK_REAL;
|
||||
}
|
||||
|
||||
\" { BEGIN(STRING); }
|
||||
<STRING>\\. { yymore(); }
|
||||
<STRING>\" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue