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

TUDump.pm:preChange: regular expression doesn't match expressions it should per description #69

Open
jnpkrn opened this issue Jan 5, 2018 · 1 comment

Comments

@jnpkrn
Copy link

jnpkrn commented Jan 5, 2018

666         $Regex = qr/(\A|\n[^\#\/\n][^\n]*?|\n)(\*\s*|\s+|\@|\,|\()($RegExp_C|$RegExp_F)(\s*([\,\)\;\.\[]|\-\>|\:\s*\d))/;
667         while($Content=~/$Regex/)
668         { # MATCH:
669           # int foo(int new, int class, int (*new)(int));
670           # int foo(char template[], char*);
671           # unsigned private: 8;
672           # DO NOT MATCH:
673           # #pragma GCC visibility push(default)

However, when I try to do

if("int foo(int new, int class, int (*new)(int))"=~/$Regex/) {
  printMsg("ERROR", "Matches");
}

I can conclude the intended case is missed as the error is not shown.

@jnpkrn
Copy link
Author

jnpkrn commented Jan 8, 2018

Hmm, I was pasting the above example at the wrong location where it wasn't
ever executed, which I -- not knowing what last means -- wasn't expecting...

Anyway, see #70 for a solution that would make my use case work again,
however I cannot estimate the risk of accidentally breaking something else.

This is more a question of having existing code respond to known issues,
I am going to give abi-dumper a try and presumably will switch to it fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant