Skip to content

Conversation

@zesterer
Copy link
Owner

This PR adds experimental support for walking parse trees to extract information about them. The resulting node graph can be used to generate both EBNF for arbitrary chumsky parsers, or railroad diagrams.

For example, here is the EBNF for the example Brainfuck parser.

def_1 ::= { '<'
  | '>'
  | '+'
  | '-'
  | ','
  | '.'
  | ('[' def_1) ']' };

def_1

And here is the railroad diagram for the example JSON parser.

test

@zesterer zesterer force-pushed the debug_nodes branch 2 times, most recently from 70b72c9 to e25fdc1 Compare December 2, 2025 13:33
@zesterer zesterer merged commit 145f128 into main Dec 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants