-
I want to know what course the parser took through a given input and why it applied a given rule at a given position. How do I do that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't know about figuring out the precise rule, but the I have some introductory notes on these bits here and here. Not sure how much help those will be but FWIW. There's also a |
Beta Was this translation helpful? Give feedback.
I don't know about figuring out the precise rule, but the
--debug
and--debug-graph
(this one makes alog.html
file with svg in it) flags of theparse
subcommand for thetree-sitter
cli gives some detailed info about parsing.I have some introductory notes on these bits here and here. Not sure how much help those will be but FWIW.
There's also a
--report-states-for-rule
option for thegenerate
subcommand, but I'm not sure what it does in detail.