antlr3 - An antlr problem with embedded comments -


I am trying to implement nested comment in D.

  Nation block comment: '/ +' (option {greedy = wrong;}: Nationballcomments) * '+ /' {$ channel = HIDDEN;}; // Line 58 NationBelcomments: (Nationbell commentary; '/' ~ '+' | ~ '/'); // line 61  

For me, it would be logical that this should work ...

  This is the error message I received: [21: 06 : 34] Warning (200): DG: 58: 64: Decision can match "/ / 'input using many options: 1, 2 as a result, optional (s) 1 disabled for that input [21: 06: 34] Warning (200): DG: 61: 7: Decision can match "/ + 'input using several options: 1, 3 result, alternative (they) 3 that Inp Unable to file  

Does anyone give me clarification to correct those error messages?

Thank you.

Comments