Open SKalt opened 3 years ago
Where is the pre-converted grammar?
But, it doesn't work for either grammar at grammars-v4/sql/postgresql. For the parser grammar, it crashes here, which is definitely wrong code. I need to refamiliarize myself with this unification code.
You can create the grammar I'm converting by
curl -L https://raw.githubusercontent.com/postgres/postgres/master/src/backend/parser/gram.y > /tmp/gram.y
trparse /tmp/gram.y | trconvert | trprint > /tmp/gram.g4
trparse /tmp/gram.g4 | trgroup | trprint > /tmp/done.g4
# trprint is required since piping from trparse $x.y | trconvert | other_trash_command
# seems to be missing nodes, according to error messages that I forgot how to reproduce
# maybe piping to trrename or trkleene would do it?
Ok, I will try that after I fix the LCS diffing algorithm. It's broken in one place as I noted above.
I pointed the sharp end of
trgroup
v0.11.2 at thetrconvert
ed postgres grammar, and I gotI'm unable to parse what's going wrong. Also, it's worth noting the
System.Exception
did not halt the program in a way that exited my grammar-trasnform pipeline despite havingset -eo pipefail
in my shell.trgroup
ran for 10+ minutes with low/no CPU consumption after the error occurred.Do you know what's happening here?