in reply to Re^3: Converting Oracle report language code into perl
in thread Converting Oracle report language code into perl

Utter rubbish! It would take 3 times as long to work out how to do this use P::RD than with regexes--and that's if you understand recursive grammar definitions, perl references and that modules bewildering documentation.

I agree that the OP hasn't show much understanding of regexes, nor much willingness to learn, but pointing him at P::RD is just sadistic.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^4: Converting Oracle report language code into perl

Replies are listed 'Best First'.
Re^5: Converting Oracle report language code into perl
by GrandFather (Saint) on Jun 26, 2007 at 12:34 UTC

    Judging by the way the requirements have evolved and by OP's Re^2: Oracle report converter reply in his other relate thread, so far we have only seen the very tip of the iceberg - there is a lot more to come. Palming the OP off with a bunch of regexen solves a short term problem in a "look what I can do" fashion, but doesn't seem to be helping the OP very much at present and will lead to a maintenance nightmare for him in the longer term.

    It is hard to know what the OP's motivation for this task is, but leading him along by offering tempting morsels that will either frustrate the OP because they don't provide all of the solution, or transfer a large development project over to PerlMonks, is unlikely to get the OP to a satisfactory endpoint. In fact, that's just sadistic. Much better to be up front and say "That's a big job. Here's the tool for it." and let the OP figure out sooner rather than later that either he's not up to it, or that some serious learning needs to be done. 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.


    DWIM is Perl's answer to Gödel
      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.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.