[antlr-interest] Can subrules be set to 'n-to-m'?

Scott Stanchfield scott at javadude.com
Sat Mar 26 11:42:47 PST 2005


All I'm asking is to make it optional. People can always add the parens if
they feel it helps readability.

Just don't force it on everyone... 

It's like if Java required you to have {...} around if-statement bodies.
Some people prefer that, while others (like me) don't want the extra curly's
if not needed.

   if (user wants to do it without parens)
       letThemDoItWithOutParens();
   else {
       (beVeryVerboseAndDoItWithParens();)
   }

Why force verbosity???

Sheesh.
-- Scott 

> -----Original Message-----
> From: John D. Mitchell [mailto:johnm-antlr at non.net] 
> Sent: Saturday, March 26, 2005 1:14 PM
> To: Scott Stanchfield
> Cc: 'antlr-interest Interest'
> Subject: RE: [antlr-interest] Can subrules be set to 'n-to-m'?
> 
> >>>>> "Scott" == Scott Stanchfield <scott at javadude.com> writes:
> [...]
> 
> > Read *my* comments -- it would be _more_ consistent to make them 
> > optional, so they match how people use them in every regex language 
> > that people use...
> 
> You crack me up...
> 
> First, let's be clear that your argument is *against* 
> consistency and for adherence to the simplistifications of 
> popularity.  [Try the dictionary for more. :-)]
> 
> ANTLR is not some little hack tool.  Most people write 
> regexps that are (1) relatively short, (2) hard to read, and 
> (3) hard to maintain.  ANTLR is used to create complete 
> grammars that can be 10s of thousands of lines long.  True 
> consistency and regularity make a huge difference in the 
> readability and maintainability by e.g., removing unnecessary 
> variability.
> 
> Happy Easter,
> 		John





More information about the antlr-interest mailing list