next up previous
Next: LALR(1) Grammar Up: Lexical Structure of Pointcuts Previous: Examples of differences from

Tokens in pointcuts

Since the Java lexical structure clearly doesn't match the pointcut language very well, a completely different lexical structure is defined for pointcuts. This can be summarized as follows.

Keywords: All of the keywords in JAVA mode (including aspect and privileged), plus the following: adviceexecution, args, call, cflow, cflowbelow, error, execution, get, handler, initialization, parents, precedence, preinitialization, returning, set, soft, staticinitialization, target, throwing, warning, within, withincode.

Note that extra keywords in ASPECT mode, such as before, are not keywords in the POINTCUT mode, and similarly the extra keywords in POINTCUT mode are not keywords in ASPECT mode.

Symbols: The symbols recognized in pointcuts are: op("("), op(")"), op("["), op("."), op(","), op(":"), op(";"), op("{"), op("""), op("!"), op("&SPMamp;"), op("||"), op(".."), op("+").

Identifiers and Identifier Patterns: Identifiers are matched using the same regular expression as in JAVA mode, namely:

Identifier = [:jletter:][:jletterdigit:]*

Identifier patterns are recognized as:

IdentifierPattern = ( "*" | [:jletter:] ) ( "*" | [:jletterdigit:] )*

Since identifiers and identifier patterns are used in pointcuts to specify names that may occur anywhere, including Java code that has been defined in a library, it is possible that a pattern might want to refer to something with the same name as one of the extra keywords. This is handled later by the grammar, where the extra keywords are explicitly allowed as one alternative of the rule for simple_name_pattern, see Section 3.5.1.


next up previous
Next: LALR(1) Grammar Up: Lexical Structure of Pointcuts Previous: Examples of differences from
hendren 2004-09-02