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.  Basically 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.  This 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


UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to