Re: Have we out-grown Flex? - Mailing list pgsql-hackers

From Daniel Farina
Subject Re: Have we out-grown Flex?
Date
Msg-id CAAZKuFYciNpMn3YDNDgfuJJHOUstsxewSmZtT_4vrB+EtKg7JA@mail.gmail.com
Whole thread Raw
In response to Re: Have we out-grown Flex?  (james <james@mansionfamily.plus.com>)
Responses Re: Have we out-grown Flex?
List pgsql-hackers
On Thu, May 3, 2012 at 12:51 PM, james <james@mansionfamily.plus.com> wrote:
> I haven't tried quex, but I have tried lemon (which can be broken out of
> SQLite) and re2c and ragel.
>
> I like ragel and lemon, but the combination supports a push-parser style
> from memory, and many tools are inconvenient unless you are prepared to suck
> in a whole message before parsing, or let the parser drive a pull loop, or
> use a coroutine structure.
>
> Could go all trendy and use a PEG tool like, er,, peg
> (http://piumarta.com/software/peg/).  (I haven't tried them tho')

I think the goal is not trendy nor easy to use (but easy to maintain,
at least...), but faster, and even then there is some doubt if any
amount of lexer optimization could possibly matter given everything
else that needs to happen to execute a query.  Better error messages
(with position information) might be a functional enhancement that I'd
like, but I don't think flex is limiting in that regard; rather, a lot
more information already exposed by flex would have to be passed
through the semantic analyzer.

Provided it could matter, are these tools faster than flex? My
limited understanding is "probably not".

--
fdr


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Re: xReader, double-effort (was: Temporary tables under hot standby)
Next
From: james
Date:
Subject: Re: Have we out-grown Flex?