[antlr-interest] v4 "Honey Badger" teaser

Kyle Ferrio kferrio at gmail.com
Thu Dec 29 20:33:39 PST 2011


I was thinking something similar, Jim.  But what if I want to force the
case of some letters?  I know, we should focus on the 90% use cases, but...
A nice thong about Ter's notation is that it allows substitution of
arbitrary characters, not just those related by case flips.
 On Dec 29, 2011 5:16 PM, "Jim Idle" <jimi at temporal-wave.com> wrote:

> What about something like:
>
> EDGE: `EDGE` ;  // Backtick is case insensitive
>
> Jim
>
> > -----Original Message-----
> > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > bounces at antlr.org] On Behalf Of Terence Parr
> > Sent: Thursday, December 29, 2011 4:09 PM
> > To: antlr-interest Interest
> > Subject: Re: [antlr-interest] v4 "Honey Badger" teaser
> >
> > Hi Kyle, I've also implemented the shorthand [] for lexers. :) woot!
> >
> > // "The keywords node, edge, graph, digraph, subgraph, and strict are
> > // case-independent"
> > STRICT      :   [Ss][Tt][Rr][Ii][Cc][Tt] ;
> > GRAPH       :   [Gg][Rr][Aa][Pp][Hh] ;
> > DIGRAPH     :   [Dd][Ii][Gg][Rr][Aa][Pp][Hh] ;
> > NODE        :   [Nn][Oo][Dd][Ee] ;
> > EDGE        :   [Ee][Dd][Gg][Ee] ;
> > SUBGRAPH    :   [Ss][Uu][Bb][Gg][Rr][Aa][Pp][Hh] ;
> >
> > Ter
> >
> > On Dec 29, 2011, at 3:58 PM, Kyle Ferrio wrote:
> >
> > > Excellent.  I always thought that it should be possible to support
> > > left-recursion with LL(*) but I did not presume that it would be
> > > efficient or easy or wise.  Since I tend to think left-recursively a
> > > lot, I am a happy honey badger, and I parse whatever I want!
> > >
> > > Kyle
> >
> >
> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> > email-address
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list