Re: question on parsing postgres sql queries

Поиск
Список
Период
Сортировка
От Jerome Wagner
Тема Re: question on parsing postgres sql queries
Дата
Msg-id CA+=V_fPVq_OrTyDcsa7cD5E0mvWmhVaObPrcmos_H5-QWS3zqQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: question on parsing postgres sql queries  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
> What problem are you trying to solve here?​  to whit not everything that can be parsed is documented - usually intentionally.

I am tyring to see whether we could use the documentation as a kind of formal specification of the language but I understand that the devil is
in the details and that even formal specifications can lead to incompatible implementations, 

I would have found it nice if the clean documentation of the project could be used as a meta-grammar sufficient to maybe generate the grammar but I will have to dig further into the Bison grammar files.

The project I mentioned that isolates the parser from PostgreSQL binary as a re-usable library is probably the closest you can get currently to a parser matching the real engine.

Otherwise, yes, parsing the synopsis could maybe lead to a sanity check on the fact that the documentation is in line with the grammar. This could lead to warnings or help uncover unexpected corner cases not mentioned in the documentation.

Thanks for your answers
Jerome


On Tue, Jul 26, 2016 at 9:52 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Tue, Jul 26, 2016 at 3:20 PM, Jerome Wagner <jerome.wagner@laposte.net> wrote:

Would it make sense to use these sgml synopsis as some kind of source of truth, parse them, and automatically generate a parser for a specifc language ?

​What problem are you trying to solve here?​  to whit not everything that can be parsed is documented - usually intentionally.


Could the parser commiters share some lights on how the documentation process interacts with the parser commits ?


​Commits that modify the parser are expected to have manual modifications to the relevant documentation ​as well.

David J.


В списке pgsql-general по дате отправления:

Предыдущее
От: thomas veymont
Дата:
Сообщение: Re: low perfomances migrating from 9.3 to 9.5
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: low perfomances migrating from 9.3 to 9.5