Next: Extensions to the Java
Up: The abc scanner and
Previous: Tokens in pointcuts
In this section we outline the grammar of AspectJ. If you have a colour
version of this document, you will see that all references to
productions in the original Java grammar are given in red. The base
Java grammar was originally developed by Scott Ananian and is distributed
with Polyglot. In terms of the
polyglot implementation, all red productions are part of the base Java
grammar, whereas the blue productions are those that are added as part
of abc's AspectJ grammar.
The abc AspectJ grammar is LALR(1) with no shift-reduce or
In order to achieve this conflict-free grammar there are several places
where a slightly too large language is specified, and these are places
where further weeding must be used to weed out invalid programs.