in reply to Re^5: Converting Oracle report language code into perl
in thread Converting Oracle report language code into perl
Palming the OP off with a bunch of regexen solves a short term problem ... and will lead to a maintenance nightmare for him in the longer term.
Recursive Descent Parsers are great for recursive grammers, but this is self-evidently not a recursive grammar.
You have heard of Practical Extraction and Reporting Language perhaps? Yes, I know its a backronym, but this is bread & butter Perl usage. This is why the every other scripting language advertises itself as having a Perl Compatible Regex Engine.
... or transfer a large development project over to PerlMonks, ...
And you think that he isn't going to need help with P::RD? And isn't going to come back to PM for it?
If you are not interested in helping the guy, rather than preaching at him, move on. Somebody else will come along and be only too happy to help him. CountZero already posted a fairly comprehensive solution before you replied.
... he's not up to it, ...
Maybe he's not, but is that your call?
The nice thing is that this is a pretty good place to do a lot of that learning, or at least to get a lot of guidance toward appropriate learning resources.
I agree, but there is far greater pool of expertise in regex here than in P::RD. And given the OPs apparent expertise level, it will be far easier to educate him in the use of regex than P::RD, which requires a pretty full understanding of context free grammers to even get started. Not to mention that all but the most simple P::RD grammars seem require some use of regex, so he'd have to get to understand them anyway.
It seems his problem isn't likely to go away anytime soon:
Questioner: Dear all... I am willing to listen/read any advise at all. Maybe there are tools out there that can help with this. If you know any please let me know.
Reply: ... if that is really RPT/RPF, just throw away your programs.
Signature: ***** ****** Senior Oracle DBA.
... in a "look what I can do" fashion, but doesn't seem to be helping the OP very much at present ...
Ah! The crux. I am at least willing to try and help the guy help himself--though I'm asking him to make some effort--not just judge him as incompetent and "palm him off" with a pat PC reply.
|
|---|