[antlr-interest] do we need "..." and '.' ??

Akhilesh Mritunjai mritun at gmail.com
Wed Nov 23 01:29:24 PST 2005


Hi

No, we don't need both. I have not been able to come up with a use case  
for both.

However, in several place we need embedded quotes or double quotes. So it  
might be worthwhile to ponder over making it python like where single  
quotes and double quotes are equivalent when used as string delimiters.

- Akhilesh


On Wed, 23 Nov 2005 12:08:59 +0530, Terence Parr <parrt at cs.usfca.edu>  
wrote:

> howdy.  For string literals like keywords in ANTLR v3, I use "void" and  
> "int" in double quotes.  For single char like semi-colon etc... I use  
> single quotes like ';' and '{'.  Is there a real reason to do this?   
> None from ANTLR's point of view.  I'm even thinking that it really  
> complicates my code.  Programmers used to C/Java family will grok it  
> immediately but many languages don't distinguish between one and  
> multi-lettered strings.  All they do is get dumped down into the lexer  
> for matching anyway.
>
> Can anybody think of a reason to have single-quote mean single char  
> string?  The single-quotes could be useful for something else in the  
> future.  One must be frugal with the use of symbols ;)
>
> Ter



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the antlr-interest mailing list