For a verilog file, the variables list parses the old (1995) style verilog module declarations. Verilog 2001 enhanced the syntax and seems to confuse Geany....
1995 syntax:
module (foo, bar, buz); input foo; // foo port output bar; // bar port output buz; // buz port reg buz; // buz variable
2001 syntax:
module ( input wire foo, // foo port is a wire output wire bar, // bar port is a wire output reg buz // buz port is a variable );
// note: the "wire" is optional and the ports could have been declared with or without
Geany variables list seems to get confused by the 2001 style. It seems to parse the wire keyword as the variable name if I keep the optional "wire" keyword: ![image](https://cloud.githubusercontent.com/assets/14856598/10121213/521dc426-64af-1...)
If I omit the "wire" keyword, Geany still gets confused, but in a different way. It seems to parse every other variable and then parse the "input" or "output" keywords as variables in some cases: ![image](https://cloud.githubusercontent.com/assets/14856598/10121233/11c50b7c-64b0-1...)
If someone who knows the code base can even point me to the module(s) doing the parsing for the variables, I may be able to help create the fix/enhancement for this. I'd be happy to try anyway. I am not familiar with the Geany code base so just getting started seems like an insurmountable task.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/670
tagmanager/ctags/verilog.c
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/670#issuecomment-143522119
But don't rush to it and see how it is in [Universal CTags](https://github.com/universal-ctags/ctags/blob/master/parsers/verilog.c), there were many changes to the Verilog parser so we might simply need to update our copy.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/670#issuecomment-143545929
Ok - I read through the Verilog parser in tagmanager/ctags/verilog.c and I see (mostly) how it works - and more importantly how it does not work for my specific case. I think I even see an additional case where I suspect it may not work (dealing with multi dimensional arrays, which was also a feature added in the 2001 language update)
I think the next step for me is to look at the Universal CTags for Verilog and see if it would would already address my issues.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/670#issuecomment-143567313
Ok - took me a while. I did look at Universal CTags and it appears that it already addresses the Verilog 2001 syntax (including both Verilog and Structured Verilog). So what are the next steps and how can I help?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/670#issuecomment-144724358
Next step is importing the new version of the parser in Geany, but that's currently a little tricky (esp. because it might mean additional changes as u-ctags added many a thing recently, so infra might have change a little). I'll take a look at this soon -- I'm afraid it might be some kind of a challenge for you to do that (esp. as if it's too large a changeset I'd be probably easier for me to figure it out than review an enormous diff), but you can try if you've got faith ;)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/670#issuecomment-144814869
This is related to #1162. Once the Verilog parser from u-ctags is merged, this issue will most likely be addressed. I looked at this a while back and determined that the u-ctags parser already appears to address the newer Verilog syntax properly.
You 6 I'm kind my
Closed #670 as completed.
Seems to work now, closing.
github-comments@lists.geany.org