Add support for integer parameter type
Summary
Unsupported parameter type: integer
.
Describe your setup
(Summarize the setup you are using; the more information you provide, the easier it will be to reproduce it and fix it)
TMRG Version
Steps to reproduce
test.v
:
module test;
parameter integer i = 1;
endmodule
$ tmrg test.v
[ERROR ] Error in file 'test.v' around line '2'.
[ERROR ]
[ERROR ] parameter integer i = 1;
[ERROR ] ^
[ERROR ] Expected {module | Group:({"primitive" {baseIdent | escapedIdent} "(" Group:({{baseIdent | escapedIdent} [{Suppress:(",") {baseIdent | escapedIdent}}]...}) ")" ";" {{Group:({"output" Group:([wire | reg | logic]) Group:([signed | real]) Group:([{Suppress:("[") Group:(Forward: {{unop Forward: {{{{unop : ...} | Group:({{{{Group:({{{{{{{{numeric | {{"(" mintypmax} ")"}} | nestedExpr} | {{{baseIdent | escapedIdent} "::"} {baseIdent | escapedIdent}}} | multiConcat} | {["'"] Group:({{Suppress:("{") {Group:(: ...) [{Suppress:(",") Group:(: ...)}]...}} Suppress:("}")})}} | string enclosed in double quotes} | Group:({{{{baseIdent | escapedIdent} "("} Group:([Group:({Group:(: ...) [{Suppress:(",") Group:(: ...)}]...})])} ")"})} | Group:({{baseIdent | escapedIdent} Group:({[{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}] [{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}]})})}) Suppress:("?")} Group:(: ...)} Suppress:(":")} Group:(: ...)})} | {{{{{{{baseIdent | escapedIdent} | {{"(" : ...} ")"}} | ) Suppress:(":") Group:(Forward: {{unop Forward: {{{{unop : ...} | Group:({{{{Group:({{{{{{{{numeric | {{"(" mintypmax} ")"}} | nestedExpr} | {{{baseIdent | escapedIdent} "::"} {baseIdent | escapedIdent}}} | multiConcat} | {["'"] Group:({{Suppress:("{") {Group:(: ...) [{Suppress:(",") Group:(: ...)}]...}} Suppress:("}")})}} | string enclosed in double quotes} | Group:({{{{baseIdent | escapedIdent} "("} Group:([Group:({Group:(: ...) [{Suppress:(",") Group:(: ...)}]...})])} ")"})} | Group:({{baseIdent | escapedIdent} Group:({[{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}] [{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}]})})}) Suppress:("?")} Group:(: ...)} Suppress:(":")} Group:(: ...)})} | {{{{{{{baseIdent | escapedIdent} | {{"(" : ...} ")"}} | ) Suppress:("]")}]) Group:({{baseIdent | escapedIdent} [{Suppress:(",") {baseIdent | escapedIdent}}]...}) Suppress:(";")}) | Group:({"input" Group:([wire | reg | logic]) Group:([signed | real]) Group:([{Suppress:("[") Group:(Forward: {{unop Forward: {{{{unop : ...} | Group:({{{{Group:({{{{{{{{numeric | {{"(" mintypmax} ")"}} | nestedExpr} | {{{baseIdent | escapedIdent} "::"} {baseIdent | escapedIdent}}} | multiConcat} | {["'"] Group:({{Suppress:("{") {Group:(: ...) [{Suppress:(",") Group:(: ...)}]...}} Suppress:("}")})}} | string enclosed in double quotes} | Group:({{{{baseIdent | escapedIdent} "("} Group:([Group:({Group:(: ...) [{Suppress:(",") Group:(: ...)}]...})])} ")"})} | Group:({{baseIdent | escapedIdent} Group:({[{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}] [{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}]})})}) Suppress:("?")} Group:(: ...)} Suppress:(":")} Group:(: ...)})} | {{{{{{{baseIdent | escapedIdent} | {{"(" : ...} ")"}} | ) Suppress:(":") Group:(Forward: {{unop Forward: {{{{unop : ...} | Group:({{{{Group:({{{{{{{{numeric | {{"(" mintypmax} ")"}} | nestedExpr} | {{{baseIdent | escapedIdent} "::"} {baseIdent | escapedIdent}}} | multiConcat} | {["'"] Group:({{Suppress:("{") {Group:(: ...) [{Suppress:(",") Group:(: ...)}]...}} Suppress:("}")})}} | string enclosed in double quotes} | Group:({{{{baseIdent | escapedIdent} "("} Group:([Group:({Group:(: ...) [{Suppress:(",") Group:(: ...)}]...})])} ")"})} | Group:({{baseIdent | escapedIdent} Group:({[{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}] [{Group:({{Suppress:("[") {{{Forward: : ... + | -} ":"} Forward: : ...}} Suppress:("]")}) | Group:({{Suppress:("[") {Group:(: ...) [{Suppress:(":") Group:(: ...)}]...}} Suppress:("]")})}]})})}) Suppress:("?")} Group:(: ...)} Suppress:(":")} Group:(: ...)})} | {{{{{{{baseIdent | escapedIdent} | {{"(" : ...} ")"}} | ) Suppress:("]")}]) Group:({{baseIdent | escapedIdent} [{Suppress:(",") {baseIdent | escapedIdent}}]...}) Suppress:(";")}) | regDecl}}... [udpInitialStmt] table "endprimitive"}) | Group:({Suppress:("__COMP_DIRECTIVE") !W:(;) Suppress:(";")})}, found 'p' (at char 15), (line:2, col:3)
[ERROR ] Error during parsing
What is the current bug behavior?
Crash.
What is the expected correct behavior?
No crash.
Possible fixes
Fix parser.