Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Re: [aspectj-users] AspectJ Parser

As Wes suggests, the parsing support is in two parts. For the main body of 
the parsing work, we use an extension of the Eclipse JDT parser. To make 
integration of new versions of the Eclipse JDT easier, this portion of the 
CVS has a slightly unusual structure. You'll find the parser in 
org.aspectj/shadows/org.eclipse.jdt.core, but *not* under HEAD. The 
version in HEAD is a straight copy of the Eclipse JDT. Instead, you want 
to look at the branch "aj_v_494a_head_before_30_maintenance" (the slightly 
unusual naming comes from the name of the release tag in the JDT tree, 
prefixed by "aj_"). In this module you'll find a "compiler" source folder, 
containing the package org.eclipse.jdt.internal.compiler.parser. In that 
package you'll find a class called "TheOriginalJDTParserClass", which is 
extended by our AspectJ parser, "Parser". The grammar for the parser is in 
"grammar/java_1_4.g". See the documentation in the JDT module for how to 
build the Parser classes and "rsc" files from the grammar.

The second part of the parsing story is much easier - look in the weaver 
module to find org.aspectj.weaver.patterns.PatternParser. This is Jim's 
hand-written parser for many of the AspectJ extensions, which the main 
parser delegates to at appropriate points.

-- Adrian
Adrian_Colyer@xxxxxxxxxx



"Wes Isberg" <wes@xxxxxxxxxxxxxx> 
Sent by: aspectj-users-admin@xxxxxxxxxxx
27/08/2004 04:52
Please respond to
aspectj-users@xxxxxxxxxxx


To
steve@xxxxxxxxxxxxxx
cc
aspectj-users@xxxxxxxxxxx
Subject
[aspectj-dev] Re: [aspectj-users] AspectJ Parser






> According to FAQ section 8.8, there exists a handwritten parser.
> Where can I find it?  I've looked through CVS and the AspectJ/AJDT
> installation JARs and all that I've found are the JDT shadows.

This is really a question for Adrian on aspectj-dev@xxxxxxxxxxx,
but since you're almost there, I'll add a little bit in case it's
enough...

The FAQ says:

  In AspectJ 1.0, the PARSER for ajc is written by hand
  [...]

  In AspectJ 1.1, the parser was written as it is for 
  the underlying Eclipse compiler, with some hand-coding 
  of the sort that avoids adding keywords to the language

(But the FAQ was written before the 3.0 upgrade.)

The 1.0 parser is in the 1.0 sources, available as a 
separate zip.

The 1.1 compiler is in the JDT (shadows) and the AspectJ
ajdt core, i.e., in the Eclipse CVS tree:

  org.aspectj/shadows/org.eclipse.jdt.core
  org.aspectj/modules/org.aspectj.adjt.core

Wes

> ------------Original Message------------
> From: Michael Greenberg <mgreenbe@xxxxxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Thu, Aug-26-2004 10:06 AM
> Subject: [aspectj-users] AspectJ Parser
>
> According to FAQ section 8.8, there exists a handwritten parser.
> Where can I find it?  I've looked through CVS and the AspectJ/AJDT
> installation JARs and all that I've found are the JDT shadows.
> 
> 
> 
> Thanks,
> Michael Greenberg
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 


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

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




Back to the top