> 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@xxxxxxxxx> 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.