Reader cannot be reused by fallback lexer, it would
never see the characters that have been consumed before
the RecognitionException in the first parsing attempt.
Also added comment why the JDK 1.4 grammar is tried first.
I question using the Java14 lexer/recognizer first. Is this because most of
the time it will succeed (especially with 1.4 source:-). Be great if a
comment could be added to the code.
grammar changes inspired by John Pybus on the antlr-interest mailing list,
see http://groups.yahoo.com/group/antlr-interest/message/4968
the changes to Checker.java are not very clean, but I don't see a better
solution unless the ANTLR api is improved (compilationUnit() should be an
abstract member of Parser, error reporting should be pluggable)
- all classes that contribute to Configuration are now Serializable
- use in-memory serialization to compute a hashcode of the Configuration
- store the hashcode in the cache file
- compare cached hashcode with current hashcode and invalidate cache accordingly
This change is compatible for command line, Ant, and API.
The API compatibility resulted in some deprecated methods in Configuration,
you can remove them if you think that API compatibility is not as
important as clean code.
This allows declaritions of the taskdef in ant 1.4+ as:
<taskdef resource="anttasks.properties">
<classpath refid="run.classpath"/>
</taskdef>
Also, in a moment of madness, I re-indented the build.xml file to 4 spaces.
/**
* @param aTwo
* This is a multiline piece of javadoc
**/
Also changes the wording of "is not proceeded with whitespace" to
"is not followed by whitespace". This makes things a tad clearer.
Details:
466756 - Check for package.html:
- new parameter requirePackageHtml, default is false
500378 - Check names of methods + local variables
- new parameters methodPattern and localVarPattern,
default is ^[a-z][a-zA-Z0-9]*$
504964 - no default access
510441 - allowprotect should incl. packageprivate (requests the same feature)
- new parameter allowPackage, default is false
Sorry that I did not split this into separate patches, I had this in
my local tree as is and it would require too much work to split it. I
think the changes are easy enough to review three feature
implementations in one go.