Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Pointcut general form

I see the definition for MethodPat and TypePat, but I don't see a definition for either ModifiersPat or IdPat. I'll check out the programming guide.

On Tue, 13 May 2003 13:35:46 -0700, Wes Isberg <wes@xxxxxxxxxxxxxx> wrote:

Hi James -

Good eye!

The definitions for MethodPat, et al. are at the end of that section on the second page, where, e.g., MethodPat is:

[ModifiersPat] TypePat [TypePat . ] IdPat ( TypePat , … ) [ throws ThrowsPat ]

As for execution(* *.*(..))

Thank you for pointing out an omission in the quick reference.  Here:

MethodPat :     *         *    .   *   (    ..    )
MethodPat : {TypePat} {TypePat}.{IdPat}({TypePat?})

We forgot to specify that (..) in method or constructor patterns means the same as it does in the args(..) pattern: any number of arguments.

The best source for grammar and usage is the programming guide. There's a quick reference appendix and a semantics guide which discusses things like args(..). However, we don't publish a grammar in BNF form; the parser is a bit more careful, e.g., to avoid keywords.

Wes


James Howe wrote:

I'm trying to get a better understanding of the various ways that pointcuts
can be defined, particularly when using wildcards.  I was looking at the
Quick Reference PDF and noticed that the definition of the general form for
pointcuts seems to be incomplete (or I'm overlooking something).  In the
section called "Primitive Pointcuts" in the general form section, the
following grammar is given (I'm substituting <> for italicized informatino)
:

execution(<MethodPat>)

where

<MethodPat>: [<ModifiersPat>] <TypePat> [<TypePat> .] <IdPat>(<TypePat> ,
... ) [ throws <ThrowsPat> ]
<TypePat> :  ... type pattern definition

However, I can't find a definition for <MethodPat>, <IdPat> or <ThrowsPat>

I'm also not convinced that the grammar given is accurate.  For example,
I've seen definitions which look like this:

execution(* *.*(..))

but I can't seem to construct that definition from the given grammar
although perhaps what is missing is the definition of IdPat.

Is there a better document which describes the grammar used to parse
pointcut definitions?

Thanks.

--
James Howe
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users





--
James Howe


Back to the top