kaby76 / one-parser

0 stars 2 forks source link

Implement reset for base classes #1

Closed XzuluX closed 3 months ago

XzuluX commented 3 months ago

Implemented Reset for base classes. Reset for lexer is nerver called. Not quite sure what to do within Reset in Parser.

kaby76 commented 3 months ago

Thanks.

It's used in the standardized driver templates for testing grammars (https://github.com/kaby76/Domemtech.Trash/blob/ef43181c55c5594e0a55f19514f5dded65b5fc77/src/trgen/templates/CSharp/st.Test.cs#L246 https://github.com/kaby76/Domemtech.Trash/blob/ef43181c55c5594e0a55f19514f5dded65b5fc77/src/trgen/templates/Java/st.Test.java#L159). Testing of grammars in grammars-v4 is done with identical drivers across targets so output, and even internal parser tracing, can be compared. This is how we found dozens of major bugs in Antlr4 in the last few years.

For your grammar, I am planning on creating a heat map tool to help show where long "config sets" are kept. I am still not sure why the grammar performs so poorly, but this will be required to quickly find the rules that are creating the issue. There was no ambiguity detected in the grammar for the two test files.

XzuluX commented 3 months ago

Thank you very much, this is really a great help!