[antlr-interest] ANTLR3 Capturing System.out.println

Fırat KÜÇÜK firatkucuk at gmail.com
Thu Mar 29 06:45:59 PDT 2007


In fact i didn't understand what do you want to do?

2007/3/29, Kailey Joanette <kaileyjo at bigbluebubble.com>:
>
>
>
>
> So… I'm sticking to a syntactic translation for now, until I find that I
> definitely need semantic.
>
>
>
> I have a question though… how would I go about capturing things like
> System.out.println() and System.currentTimeMillis()?  I tried putting a
> matching block in 'statement' rule of the Java 1.5 grammar that would match
> 'System''.''out''.''println''(' outputExpression ')' but that ended up
> creating problems with other system calls. Because now when it reaches say
> System.currentTimeMillis I says there is no viable alternative when it
> reaches "System"… which I don't understand because my rule doesn't deal with
> that so it should just default to the same rules it has always used.
>
>
>
> Is there a better way to capture things like this and get the desired
> output?
>
>
>
> Kailey
>
>


-- 
Öğr. Gör. Fırat KÜÇÜK
ADAMYO Distance Learning
SAKARYA University / TURKEY


More information about the antlr-interest mailing list