#38 Support for latest ANTLR versions

release_2.1
closed
None
5
2012-10-10
2002-02-20
Anonymous
No

I'm trying to get checkstyle working in a complex build
environment with many dependant external libraries. One
of the problems I've run into is the fact that
checkstyle appears to not support the latest ANTLR
versions.

Granted, 2.7.1 is the current stable release but since
lots of other tools (iContract, for example) appears to
use the unstable releases, it wouldn't hurt if
checkstyle was forward-compatible.

Anyway, just an opinion.

Discussion

  • Lars Kühne

    Lars Kühne - 2002-02-22

    Logged In: YES
    user_id=401384

    I tried to compile checkstyle with the current unstable
    version of antlr, 2.7.2a2 - no success, ANTLR compiles the
    grammar into syntactically incorrect Java code:

    build.antlr:
    [java] ANTLR Parser Generator Version 2.7.2a2
    (20020112-1) 1989-2002 jGuru.com

    compile.checkstyle:
    ...
    [javac]
    .../src/checkstyle/com/puppycrawl/tools/checkstyle/GeneratedJavaRecognizer.java:1807:
    cannot resolve symbol
    [javac] symbol : variable tmp57_AST
    [javac] location: class
    com.puppycrawl.tools.checkstyle.GeneratedJavaRecognizer
    [javac] ver.verifyDot(tmp57_AST);

    I also tried to run a precompiled checkstyle.jar against a
    precompiled antlr-272a2.jar. My only problem was that the
    new version seems to treat tab characters differently, this
    results in StringIndexOutOfBoundsExceptions all over the place.

    Reporter, is this the problem you have? A workaround might
    be to use ANT's fixCRLF task or a perl/python script to
    convert tabs to spaces before you check source.

     
  • Oliver Burn

    Oliver Burn - 2002-02-23

    Logged In: YES
    user_id=218824

    lkuehne has added patch to treat tabs as 1 space. In the
    light of no further requests/problems, I will close this
    rfe.

     

Log in to post a comment.