[antlr-interest] REAL or int or Range
Jim Idle
jimi at temporal-wave.com
Wed Jan 23 07:53:14 PST 2008
> -----Original Message-----
> From: Gavin Lambert [mailto:antlr at mirality.co.nz]
>
> At 08:09 23/01/2008, Jim Idle wrote:
> >
> >But when you define using fragments, then you will quite
> >often make a function call in the lexer, rather than just
> >matching.
>
> True. Although the ANTLR compiler ought to peephole optimise that
> away. (It doesn't at the moment though, sadly. Still, the target
> compiler might.)
>
There are quite a few codegen optimizations that could be (and I am sure
will be in the end) achieved. Of course, the first thing you want is a
accurate code generation and bugs removed from the analysis engine. Then
effort can be put into the generated code.
In general, I think that the better C compilers would see the fragment
functions as excellent targets for inlining, but some compilers are
better than others of course ;-)
Jim
More information about the antlr-interest
mailing list