1

I generated the C# code from tree grammar using ANTLR and I cannot find the method downup(). Is the sequence of calls:

topdown();
bottomup();

equivalent to downup() method? Why the method does exist in Java but not in C#? And why do they (the authors) advise to override the following methods:

protected override void Topdown() { topdown(); }
protected override void Bottomup() { bottomup(); }

whereas C# says there are no such methods to override?

Marc Andreson
  • 3,405
  • 5
  • 35
  • 51
  • I noticed the same thing with the ActionScript target, I asked a question of the developer but have not heard anything back yet (couple weeks already). – WayneH Aug 19 '10 at 19:45
  • It seems that the filter option doesn't work in official release of antlr when target language is not Java. However, I found an alternative implementation of TreeFilter class @ http://sandbox.fisheye.atlassian.com/browse/antlr/runtime/CSharp3/Sources/Antlr3.Runtime/Tree/TreeFilter.cs#r6061 . I have downloaded TreeFilter class and each time I generate code, I manualy change the base class from TreeParser to my TreeFilter. It works fine now. – Marc Andreson Aug 19 '10 at 22:43
  • 1
    If still of interest, you can set the `superClass=TreeFilter` option to avoid the manual editing. – Jens Nolte Oct 27 '10 at 01:44

0 Answers0