Thanks for the idea TC, another alternative would be to give the
parser a bias to lean on as an extra argument but that doesn't feel
100% right. I can't see how ":key" would create any conflicts either.

/Henrik


On Fri, Sep 4, 2009 at 8:23 AM, Tomas Hlavaty<t...@logand.com> wrote:
> Hi Henrik,
>
>> First of all, to offload the server from having to build json all
>> the time.
>
> your server must be very popular when it struggles to generate json;-)
>
>>> 1) Parsing sexp: function parse(S) in http://ondoc.logand.com/ondoc.js
>>> 2) Parsing PDFs in OnDoc: works surprisingly well & fast in picolisp.
>>> 3) Parsing postscript: function PsParser() in
>
> Another case where I built a parser on top of simple picolisp
> functions peek & char (i.e. without regular expressions, the picolisp
> way:-) is the xml parser now part of picolisp distribution in
> lib/xml.l. =A0Basically every picolisp webserver generates html or xml
> on the server side so I cannot see how generating json is any
> different performance-wise.
>
> Also, your code loops over all characters in the string and calls
> regular expression matcher many times. =A0This matching is redundant and
> the code can be faster by removing the regexp matcher lookehead and
> determining the state directly because sexp have very simple grammar
> anyway.
>
> Regards,
>
> Tomas
> --
> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe
>
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to