kursjan / petitparser2

A high-performance top-down parser
MIT License
41 stars 19 forks source link

PP2BenchmarkTest is failing #9

Closed pavel-krivanek closed 7 years ago

pavel-krivanek commented 7 years ago

PP2BenchmarkTest is failing because PP2ContextChangesCache needs to implement message visitPP2Node:

kursjan commented 7 years ago

Thanks for reporting this!

Where is this failing? Could you please provide the test method or at least a link?

In general, the Cache should not implement #visitPP2Node:. It should be responsibility of the superclass, its visitor. I deliberately did not provided the implimentation in this case, because decision when a context is changed is really node-dependend and I would like to decide this for each node.

I wonder, which implementation is missing, because I don't see any failures wrt to this method.

girba commented 7 years ago

I think I have a way to expose the problem. Evaluate this in the latest Moose image:


PP2TextHighlighter new
        parser: PPJavaLexicon new;
        color: 'keyword' with: Color red muchDarker;
        highlight: 'public class A {}'```
kursjan commented 7 years ago

I see, thanks for this... I fixed that particular issue in PetitJava-JanKurs.180.

I close the for now, please reopen if there are other issues.