forked from phoedos/pmd
Using the JavaCC CACHE_TOKENS option to optimize the parser slightly. This option makes the parser slightly smaller (about 2KB) and very slightly faster
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4448 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -53,13 +53,14 @@
|
||||
|
||||
options {
|
||||
JAVA_UNICODE_ESCAPE = true;
|
||||
CACHE_TOKENS = true;
|
||||
STATIC = false;
|
||||
USER_CHAR_STREAM = true;
|
||||
MULTI=true;
|
||||
VISITOR=true;
|
||||
NODE_USES_PARSER=true;
|
||||
|
||||
MULTI = true;
|
||||
VISITOR = true;
|
||||
NODE_USES_PARSER = true;
|
||||
NODE_PACKAGE="net.sourceforge.pmd.ast";
|
||||
DEBUG_TOKEN_MANAGER = false;
|
||||
STATIC=false;
|
||||
}
|
||||
|
||||
PARSER_BEGIN(JavaParser)
|
||||
|
@ -26,6 +26,7 @@
|
||||
options {
|
||||
STATIC=false;
|
||||
BUILD_PARSER=false;
|
||||
CACHE_TOKENS=true;
|
||||
}
|
||||
|
||||
PARSER_BEGIN(CPPParser)
|
||||
|
@ -10,13 +10,22 @@ These are new rules that are still in progress
|
||||
</description>
|
||||
|
||||
|
||||
<rule name="RowSetClose"
|
||||
message="Avoid invoking the ''close'' method on the RowSet object ''{0}''"
|
||||
class="net.sourceforge.pmd.rules.RowSetClose">
|
||||
<rule name="TryWithoutCatch"
|
||||
message="Try stmt w/o catch block"
|
||||
class="net.sourceforge.pmd.rules.XPathRule">
|
||||
<description>
|
||||
Avoid invoking the 'close' method on a RowSet object
|
||||
Try stmt w/o catch block
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//TryStatement[count(CatchStatement)=0]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Foo {
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user