combine icon indicating copy to clipboard operation
combine copied to clipboard

Python-esque parser example

Open VinnyVicious opened this issue 8 months ago • 1 comments

Would be very useful to have an example on how to parse grammars like Python, where indentation is important.

VinnyVicious avatar Apr 18 '25 20:04 VinnyVicious

Usually I believe handling the indentation is handled in the lexing stage where indentation gets transformed into BLOCK_START and BLOCK_END tokens which are then parsed much as you would non-indentation based languages. It could still be a useful example on how to integrate custom lexers though in combine (even if the specific details are somewhat parser agnostic).

Marwes avatar Apr 22 '25 08:04 Marwes