#62 verilog parser tags errors

open
nobody
None
5
2010-04-20
2010-04-20
Nicolas Vincent
No

With the following line :
parameter PADDED_INPUTS = GRAIN*GetAdderTreeWidth(INPUTS,GRAIN,0);
PADDED_INPUTS, GRAIN and 0 are tagged. Only PADDED_INPUTS should be tagged.

The attached patch fix that. It also adds localparam to the list of keyword to be defined as constants.

Discussion

  •  
    Attachments
  • Steve
    Steve
    2012-06-21

    I think this is a better, more general fix to the root cause:

    Index: verilog.c

    --- verilog.c (revision 778)
    +++ verilog.c (working copy)
    @@ -238,7 +238,11 @@
    else
    {
    do
    + {
    c = vGetc ();
    + if (c== '(')
    + c = skipPastMatch ("()");
    + }
    while (c != ',' && c != ';');
    }
    }

     
  • Steve
    Steve
    2012-06-22

    Sorry, that was tested against version 5.8 and I didn't notice that a patch since broke it. The do()while loop needs to change to:

    do
    {
    if (c== '(')
    c = skipPastMatch ("()");
    else
    c = vGetc ();
    }
    while (c != ',' && c != ';');

    (And yes, the leading spaces get munched by the web tracker viewer, sorry.)