Re: Have we out-grown Flex?

From: Daniel Farina <daniel(at)heroku(dot)com>
To: james(at)mansionfamily(dot)plus(dot)com
Cc: Peter Geoghegan <peter(at)2ndquadrant(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Have we out-grown Flex?
Date: 2012-05-03 19:56:55
Message-ID: CAAZKuFYciNpMn3YDNDgfuJJHOUstsxewSmZtT_4vrB+EtKg7JA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 3, 2012 at 12:51 PM, james <james(at)mansionfamily(dot)plus(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message james 2012-05-03 20:03:29 Re: Have we out-grown Flex?
Previous Message Josh Berkus 2012-05-03 19:54:07 Re: Re: xReader, double-effort (was: Temporary tables under hot standby)