[antlr-interest] ANTLR 3 & hidden token management?

Loring Craymer lgcraymer at yahoo.com
Mon Aug 7 02:24:33 PDT 2006


Kay--

>From what I've seen, Martin tends to complain about design missteps, and most of his complaints are accurate.  The complaint here is that numbered channels are non-intuitive and it would be better to support symbolic names.  I have to agree--and Ter probably will too when he thinks about it.  One solution would be to add a lexer option, "channels", which takes a string with comma-separated names or some such.  ( channels = "HIDDEN, COMMENTS"; )  Or have a "channels" section in the lexer.

Often the issue with interface design is not "this is bad" but rather "this is not as good as it could be".  That is the case here.  Channels look to be a useful abstraction, but support for symbolic names would be convenient.

--Loring

Kay Roepke <kroepke at classdump.org> wrote: 
On 7. Aug 2006, at 10:39 Uhr, Martin Probst wrote:

>> I think the syntax is pretty consistent and powerful. Not hard to  
>> remember, and not hard to learn.
>
> Well, consistent maybe, but a syntax that uses ! ^ ^^ $ { } ( ) | - 
> >, i.e. nearly all symbols imaginable, is certainly not easy to  
> learn and remember. However that is in the nature of grammars,  
> everyone uses RegExp syntax to be more concise (or something?), so  
> not going with the others would probably be more irritating than  
> anything else.

mmmh. I think regexp syntax is used because it is widely known. It is  
a concise way of describing things, yes, but I still maintain that it  
is not hard to learn.

The basic syntax of matching things is not really difficult. Ok, the  
concepts of predicates need a bit intuition, but still I find them  
consistent and their symbols pretty easy to remember.

My question then is, what in particular do you guys find irritating?  
(Maybe I do you wrong, Martin, and you don't find it confusing, but  
the question remains ;))

-k


 		
---------------------------------
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060807/1ef21b82/attachment.html


More information about the antlr-interest mailing list