Skip to content
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

Getopt thinks a path is a comment #1610

Closed
veripoolbot opened this issue Nov 20, 2019 · 4 comments
Closed

Getopt thinks a path is a comment #1610

veripoolbot opened this issue Nov 20, 2019 · 4 comments

Comments

@veripoolbot
Copy link
Collaborator

@veripoolbot veripoolbot commented Nov 20, 2019


Author Name: Peter Nelson
Original Redmine Issue: 1610 from https://www.veripool.org


When passed a -f file.vc Getopt will strip any comments:
https://metacpan.org/release/Verilog-Perl/source/Getopt.pm#L84
$line =~ s///.*$//;

The problem is paths can have // in them - such as /home/foo//bar. This line will spuriously strip the path to be /home/foo.

The regex needs to check the comment has a preceding start-of-line or space:
$line =~ s/(?:^|\s)//.*$//;

@veripoolbot

This comment has been minimized.

Copy link
Collaborator Author

@veripoolbot veripoolbot commented Nov 20, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-11-20T12:07:03Z


Indeed, good point & other simulators handle this.

To give you author credit, do you signoff for me to git commit with your name and email address?

@veripoolbot

This comment has been minimized.

Copy link
Collaborator Author

@veripoolbot veripoolbot commented Nov 21, 2019


Original Redmine Comment
Author Name: Peter Nelson
Original Date: 2019-11-21T02:00:40Z


No need for author credit, I'd rather not have my email address in more places that get spam =p

@veripoolbot

This comment has been minimized.

Copy link
Collaborator Author

@veripoolbot veripoolbot commented Nov 21, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-11-21T02:16:12Z


That's why I ask ;)

Pushed to git towards eventual 3.470 release.

@wsnyder

This comment has been minimized.

Copy link
Member

@wsnyder wsnyder commented Mar 14, 2020

Released in 3.470 on 2020-1-6.

@wsnyder wsnyder closed this Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.