Pathologically Eclectic Rubbish Lister | |
PerlMonks |
balanced parens regexp hangs - solvedby grizzley (Chaplain) |
on Mar 26, 2009 at 22:11 UTC ( [id://753531]=perlquestion: print w/replies, xml ) | Need Help?? |
grizzley has asked for the wisdom of the Perl Monks concerning the following question: Hi! I am writing a script to parse IDL file and to generate graphviz file from it. I encountered following problem, which I isolated below: Regexp tries to find 'module <module_name> { content };' text globally (//g) and if found, content is parsed recursively to create nested 'subgraph {}' sequences. Code below hangs. And if I remove innemost parens - it works good. Can anyone enlighten me what can be wrong? I am using this regexp (nested parens) for more than year in several scripts and it works (uhm, worked) perfectly since now. With 'use warnings;' it prints 'Use of uninitialized value in pattern match (m//)', but it doesn't help me in any way to understand the problem. Thank for any help.
Back to
Seekers of Perl Wisdom
|
|