> [switching to dev]
> 
> On May 15, 2008, at 3:42 PM, Johannes Luber wrote:
> 
> > Hi!
> >
> > Thinking about the "first comes first"-rule precendence in  
> > inheriting the grammars, I came up with a case that doesn't seem to  
> > be supported. If grammar A defines the rules r and s, as does  
> > grammar B, then the rules in B are ignored. What if you want only  
> > the rule s in B instead of s in A taking precedence? Switching the  
> > grammars around doesn't help.
> 
> would have to split delegate grammars.

What about the case that you take the grammars from two different people? 
asking them to split their grammars regarding one's own conveniences won't be 
done. If one does split the grammars yourself then you have to repeat the step 
for every update again. I suppose it is simpler to be able to specify overrides 
explicitly - even if the root grammar simply specifies:

s : B.s;
> 
> > Also did you see my suggestion regarding CommonToken? If you add a  
> > string field then "!" can be made work in the lexer without  
> > sacrificing speed for the normal cases. It just requires an overhead  
> > for the pointer.
> 
> there is a text override already in there...i have a bug in for adding !

Found the bug report. Still, setText isn't as convenient as the "!" syntax.

Johannes
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org:8080/mailman/listinfo/antlr-dev

Reply via email to