Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by Matts (1087) on 2002.04.23 9:53 (#7379) Journal
    Yes, I knew it was coming, ultimately Larry's plan is merely to encode regexps as XML! This will make things so much easier in porting from Perl 5 to Perl 6. No longer will you need uglinesses like:

    /^
      (\d+)        # id
      (T?)         # TP
      _
      (\d+)        # SeqNo
      X
    /xg


    And instead we can have beautiful XML regexps like:

    /
      <start-of-string/>
      <capture>
        <one-or-more>
          <number/>    <!-- id -->
        </one-or-more>
      </capture>
      <capture>
        <optional>
          <string>T</string>  <!-- TP -->
        </optional>
      </capture>
      <string>_</string>
      <capture>
        <one-or-more>
          <number/>        <!-- Seq No. -->
        </one-or-more>
      </capture>
      <string>X</string>
    /xml

    (and yes, I'm just kidding)

    • The replacement version was far too concise to be real XML. ;-p

      This, or something like it, was my April Fool's joke for this year. The scary thing was it turned out to mirror a real proposal for XML regexes...
    • I heard that this was one of the examples they're going to use in ORA's upcoming release, How to convert absolutely everything to XML (and like it).
    • Hey, that looks like RELAX-NG!
    • Hmm, that looks rather similar to Regexp::English [cpan.org]. I'm not sure whether to be impressed or frightened.
      • Heh. Cool.

        (This post is nearly content free, but I'm posting it because I just accidentally modded your comment as overrrated when I meant to put underrated, so I'm hoping that by posting I'll negate the mis-moderation. If it doesn't work, I apologize...)

        --


        --
        DO NOT LEAVE IT IS NOT REAL.

    • Beware, someone could take that seriously ;-)
    • I know Perl is used for many things, but a lot of what Perl is used for is dealing with tag based languages on some level. The use of angle brackets I think is sure to cause headaches and line noise. On the other hand, maybe most people will stop trying to roll their own parsers.
      • That is actually a genuine concern of mine - all of a sudden anything used for parsing angle-brackets stuff has to use \< instead of plain <

        *shrug*, it's no bigger or smaller a concern for me than the entire thing that is Perl6.
      • sounds like a decent argument for including more XML/HTML manip modules in the basic distribution, and referencing them in the docs (particularly the faq)

        -matt
        • What I'd like to see are more articles on what one can do with XML and the XML modules and *why* you'd use XML for it rather than any other method.

          I've been casually observing XML for a while (and had to study it for half a semester or so, which means my knowledge went down rather than up) but it hasn't energised me into doing anything with it. The most I do is aggregate some RSS/RDF feeds for regular news emails.

          So what is the practical side of XML? Can we see more XML and Perl articles on perl.com? Shou
          --
            ---ict / Spoon