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

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.

Replies are listed 'Best First'.
Re^10: Is an aXML compiler possible?
by Logicus (Initiate) on Oct 30, 2011 at 17:59 UTC
    >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.

      Why should I bother...

      Wrong tense. You did bother working on it. Why are you asking me what your reasons were?

        Correct Tense.

        I worked on a compiler because that's what Corion suggested I do. That was the reason behind the "too difficult for me" thread where I made it clear that I was struggling to write such a compiler, and did not believe I was capable of doing so alone without help. That was prior to finding out about Plack, and optimising the runtime parser, thus obviating the need for a compiler given the sheer speed of modern server hardware.

        That particular wild goose chase cost me a good couple of months development time, and I'm not inclined to persue it further in light of the current speed of the new parser which is well fast enough for my uses.

        If after I have proven the value of aXML to the masses, someone feels like creating a compiler for it then they are free to do so, however I will not be bothering as I really have better things to do.

          A reply falls below the community's threshold of quality. You may see it by logging in.