in reply to Re^6: Is an aXML compiler possible?
in thread Is an aXML compiler possible?

Replies are listed 'Best First'.
Re^8: Is an aXML compiler possible?
by Logicus (Initiate) on Oct 30, 2011 at 17:02 UTC

    Well that's because I've never used BNF before and I don't really know what I'm doing with it.

    As for the special chars, they are not used in aXML, only in the Perl plugins. They exist solely so Perl can correctly work with aXML. aXML itself does not need them or care about them at all, hence they don't belong in a formal specification of aXML.

      Don't make excuses; fix it.

      I don't really know what I'm doing with it

      You're specifying your language's syntax.

      Well that's because I've never used BNF before

      No, you didn't have any problem with BNF. The problem is that you didn't describe aXML.

      As for the special chars, they are not used in aXML, only in the Perl plugins.

      Are you back to saying one has to use

      sub escape { my ($s) = @_; for ($s) { die "\"$1\" can't be produced by aXML safely" if /([<>()\[\]])/; return $_; } }
      instead of
      sub escape { my ($s) = @_; for ($s) { die "\"$1\" can't be produced by aXML safely" if /(&(?:lab|rab|lcb|rcb|lsb|rsb);)/; s/\</&lab;/g; s/\>/&rab;/g; s/\(/&lcb;/g; s/\)/&lcb;/g; s/\[/&lsb;/g; s/\]/&rsb;/g; return $_; } }

      If it's not builtin, then a plugin can't rely on the person using aXML having provided a plugin to handle &lab;, which means you can't use anyone else's plugins, which means you can't reuse code, which means your comparison with TT was an outright lie.

        >Don't make excuses; fix it.

        Why should I bother... I don't need a compiler for it since now I'm using Plack, the processing cost per page rendered has been reduced by such an amazing amount that even my $20 a month dev server is sufficient to get me started. (and I have that typical lazy-ass perl programmer gene)

        I ask if a compiler is possible for intellectual reasons and because I've heard both that it can be compiled and that it cannot be compiled from two people who are apparently highly respected. One of you is wrong, and I know who my money is on.

        As for your code examples, I really have no idea what the problem is with that, and why you feel that the delimiter chars need constricting in some way. I've never needed any such constrictions and I don't believe anyone else needs them either!

        Perhaps the way aXML really works will become clearer to you once I have finished working on PerlNights.com and you can download the complete source-code for it. I'm 6 days into the project now, and I've nearly finished replicating the bulk of PerlMonks feature set.

        It wouldn't of even taken that long if I didn't have to take some time out to help my Mum organise her furniture and stuff now that we have just moved again, and also I had to spend a few hours fixing a very subtle bug in the parser, but that's sorted now and I have dozens of aXML docs now rendering correctly.

        The standard plugin set aXML::Engine is currently 915 lines of code, a few hundred of which have also been written in the last few days taking up some of the site development time.

        As for comparing aXML to TT, your right it's not a fair comparison, aXML is infinitely superior, as you will see soon enough.