librelist archives

« back to archive

New lexer/parser

New lexer/parser

From:
David Cournapeau
Date:
2012-09-26 @ 22:52
Hi there,

I have finally spent a few hours to fix the horrible lexer in bento.
It is still not pretty, but it should be more reliable and faster:
  - it handle comments correctly, and should handle arbitrary text in
field values
  - lexer/parser errors are pinned down more reliable (can show the
first character of the error inline in the text)
  - much faster (deals with implicit strings as one token, which can
lead to dramatic improvements for Description field: parsing
bento.info for distribute goes from 3 sec down to 300 ms)

Let me know if you find any issues with it,

regards,

David

Re: [bento] New lexer/parser

From:
Daniel Holth
Date:
2012-09-26 @ 22:58
Thank you!
On Sep 26, 2012 6:52 PM, "David Cournapeau" <cournape@gmail.com> wrote:

> Hi there,
>
> I have finally spent a few hours to fix the horrible lexer in bento.
> It is still not pretty, but it should be more reliable and faster:
>   - it handle comments correctly, and should handle arbitrary text in
> field values
>   - lexer/parser errors are pinned down more reliable (can show the
> first character of the error inline in the text)
>   - much faster (deals with implicit strings as one token, which can
> lead to dramatic improvements for Description field: parsing
> bento.info for distribute goes from 3 sec down to 300 ms)
>
> Let me know if you find any issues with it,
>
> regards,
>
> David
>