Re: Re: Hand written parsers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: Hand written parsers
Date
Msg-id 3127.987145977@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: Hand written parsers  (ncm@zembu.com (Nathan Myers))
Responses Re: Re: Hand written parsers  (Bruce Guenter <bruceg@em.ca>)
List pgsql-hackers
ncm@zembu.com (Nathan Myers) writes:
> Yacc and yacc-like programs are most useful when the target grammar (or 
> your understanding of it) is not very stable.  With Yacc you can make 
> sweeping changes much more easily; big changes can be a lot of work in 
> a hand-coded parser.

And, in fact, this is precisely the killer reason why we will not switch
to a handwritten parser anytime in the foreseeable future.  Postgres'
grammar is NOT stable.  Compare the gram.y files for any two recent
releases.  I foresee changes at least as large in upcoming releases,
btw, as we implement more of SQL92/99 and drop ancient PostQuel-isms.

I have some interest in proposals to switch to a better parser-generator
tool than yacc ...  but yacc has the advantages of being widely
available and widely understood.  You'd need a pretty significant
improvement over yacc to make it worth switching.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Mark Butler
Date:
Subject: Re: ALTER TABLE MODIFY COLUMN
Next
From: Peter Eisentraut
Date:
Subject: Dump/restore of views containing select distinct fails