The code content is exactly the same as in the single test. However, when running the unit test via run(parser), I get an error (I have enabled LOG=parse):
Are you configuring the parser precisely the same in both situations? If you have GLR parsing (~ markers) in your grammar, and multiple parses match the input, it will be hard to predict which one you get, but you should still consistently get the same one when parsing the precise same input. There no nondeterministic code in the parser.
If you can isolate this to something that’s easy to reproduce, I could take a look.
Yep, I made a mistake before, now it’s the same code. But, it’s interesting, I created a new development environment, and the unit test passed. Let me double check. Thank you so much.
Hi @marijn , it’s very interesting, I have updated my code as you said, when I’m running the test by pnpm test it failed on the windows based system, and could succeed on the Linux based system.