diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2016-06-18 10:24:21 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2016-06-18 10:53:55 +0200 |
commit | 178ff3e7f6f9766f0b1a3e8dcc96e030aea59b15 (patch) | |
tree | 0da57cc51ffbe1f20d7ca326753b1ab8c5585769 /frontends/verilog/verilog_lexer.l | |
parent | 3380281e15ca61cec8beda70938fb7b6f4c121d6 (diff) | |
download | yosys-178ff3e7f6f9766f0b1a3e8dcc96e030aea59b15.tar.gz yosys-178ff3e7f6f9766f0b1a3e8dcc96e030aea59b15.tar.bz2 yosys-178ff3e7f6f9766f0b1a3e8dcc96e030aea59b15.zip |
Added support for SystemVerilog packages with localparam definitions
Diffstat (limited to 'frontends/verilog/verilog_lexer.l')
-rw-r--r-- | frontends/verilog/verilog_lexer.l | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/frontends/verilog/verilog_lexer.l b/frontends/verilog/verilog_lexer.l index 69a8ddaad..107a2dfdd 100644 --- a/frontends/verilog/verilog_lexer.l +++ b/frontends/verilog/verilog_lexer.l @@ -141,6 +141,8 @@ YOSYS_NAMESPACE_END "endfunction" { return TOK_ENDFUNCTION; } "task" { return TOK_TASK; } "endtask" { return TOK_ENDTASK; } +"package" { SV_KEYWORD(TOK_PACKAGE); } +"endpackage" { SV_KEYWORD(TOK_ENDPACKAGE); } "parameter" { return TOK_PARAMETER; } "localparam" { return TOK_LOCALPARAM; } "defparam" { return TOK_DEFPARAM; } @@ -351,6 +353,8 @@ import[ \t\r\n]+\"(DPI|DPI-C)\"[ \t\r\n]+function[ \t\r\n]+ { "<<<" { return OP_SSHL; } ">>>" { return OP_SSHR; } +"::" { SV_KEYWORD(TOK_PACKAGESEP); } + "+:" { return TOK_POS_INDEXED; } "-:" { return TOK_NEG_INDEXED; } |