New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How is ppdefine in SigParser used #1661
Comments
Original Redmine Comment Sorry Clicked on create and can't edit it. I'll rewrite below: Whenever I attempt to parse a file using Verilog::SigParser that has preprocessor definitions, I get an error that Define or directive not defined. Is this intended
How do you use ppdefine callback if SigParser will always give an error when a preprocessor definition is present? Is this a bug? Also, not much related but when I run parse() and eof() with Verilog::SigParser, I get "syntax error, unexpected IDENTIFIER". This doesn't happen with Verilog::Parser. Is it intended?
|
Original Redmine Comment To use SigParser you need to pass preprocessed data. See "man Verilog::SigParser": my $pp = Verilog::Preproc->new(keep_comments=>0,); Also see the test files. |
Original Redmine Comment Wilson Snyder wrote:
Ok, I looked at test files and couldn't find ppdefine used anywhere. Below is an example. Please let me know if I am misunderstanding anything.
Based on the documentation,
I should get 3 callbacks to $self->ppdefine($defvar, $definition). However, I am only getting a callback $self->module(). |
Original Redmine Comment ppdefine/ppinclude are very old remnants of a perl preprocessor. I have just removed them. If you want to see defines, override Verilog::Preproc's define() (or Verilog::Getopt's). Your example doesn't see mymeta as it didn't add it to the metacomment hash.
|
Author Name: Topa Tota
Original Redmine Issue: 1661 from https://www.veripool.org
.. below
The text was updated successfully, but these errors were encountered: