Re: Quick question about 408 project code

Skip to first unread message

David James

Apr 5, 2005, 10:01:07 PM4/5/05
to Gilbert Ho,
On Apr 5, 2005 2:12 PM, Gilbert Ho <> wrote:
> Hi, I just read through *.properties file for metrics that are located
> inside the src folder. I'm just wondering, while there's a API page listing
> out all possible characters for raw source code matching, is there a similar
> one for java syntax?
> For example :
> ?
Hi Gilbert,

Thanks for pointing out that link! That's the official grammar for Java.

JCVSReport uses PMD to parse Java source code. PMD creates a syntax
tree based on the source code. We then export this tree to text, and
run regular expressions on it. I don't think this text format is
documented anywhere, but we made good use of it anyway. If you want to
look deeply into how the format works, I'd recommend trying out the
PMD designer and looking at the PMD 2.3 source code.

The PMD 2.3 source code is available from my website at:



P.S. PMD 3.0 is apparently quite different from PMD 2.3 -- I recommend
sticking with PMD 2.3 for this assignment.

Reply all
Reply to author
0 new messages