I am trying to write a simple parser (link to repo) for a language that is indent-sensitive like python. However, I fail at the indentation tracking.
The grammar rules are specially modeled on the python rules. And the external tokenizer is also almost copy and pate but with a few cuts (if I use the custom tokenizer in python, the indentation tracking still works).
for the following example I get this syntax tree (generated with)
Thanks for the answer. LOG=parse does not provide any additional output although I used npx with --names. LOG=lr works unfortunately I don’t see how this could help me.
Am I doing something wrong? Is there any other way to find the error?
Oh ok thanks for the information. I just don’t understand how I should provide the system variable in this case. And how do I then display the logging result? I couldn’t find anything regarding this online.
I finally found the problem: the problem was the wrong order of “@tokens, @context, @external tokens”. It seems that the external tokens must be mentioned before the tokens.