[antlr-interest] ANTLR 3.1.2: Simplest action

Bart Kiers bkiers at gmail.com
Wed Jul 13 12:59:59 PDT 2011


Try:

INTEGER
  :  DIGIT+ { print($text) }
  ;


Regards,

Bart.


On Wed, Jul 13, 2011 at 9:57 PM, Udo Weik <WeikEngOff at aol.com> wrote:

> Hello,
>
> I just want to access the attributes of INTEGER
> and DIGIT - but how?
>
> INTEGER: DIGIT+ { print( "L: (INTEGER): " ) } ;
>
> fragment
> DIGIT: '0'..'9' { print( "L: (DIGIT): " ) } ;
>
>
> Thanks and greetings
> Udo
>
> 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