Re: ISO TESTS for a Pg lexer+parser

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Kynn Jones <kynnjo(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: ISO TESTS for a Pg lexer+parser
Date: 2007-07-06 23:26:21
Message-ID: 200707062326.l66NQLC19923@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Frost wrote:
-- Start of PGP signed section.
> * Kynn Jones (kynnjo(at)gmail(dot)com) wrote:
> > Hi! I am in the process of writing a PostgreSQL lexer/parser in Perl,
> > because everything else I've found in this area is too buggy. I'm
> > basing this lexer/parser on the lexer and parser encoded respectively
> > in scan.l and gram.y under src/backend/parser.
> >
> > I'm looking for a solid collection of test cases to test my
> > lexer/parser. (I'm hoping that such a collection has already been
> > produced to test the PostgreSQL yacc-generated parser that comes with
> > the PostgreSQL distribution.)
> >
> > (Alternatively, if a non-flaky, rock-solid, and easily customizable Pg
> > parser in Perl already exists please let me know.)
>
> Two things, one, couldn't you just make the lexer/parser in PG into a
> C library and then write bindings for it for use under Perl? Seems like
> that'd be more sane. Second, PG's got a regression test suite that
> would probably work decently for testing your lexer/parser. You might
> have to filter out '\' commands, if there are any, and things like that.

Ditto. Also consider that the grammer changes in every major PostgreSQL
release.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomasz Rakowski 2007-07-06 23:30:28 Re: autovacumm not working ?
Previous Message Andreas 'ads' Scherbaum 2007-07-06 22:12:32 Re: Problem with autovacuum and pg_autovacuum