[antlr-interest] Generated code dismatch

Johannes Luber jaluber at gmx.de
Mon Nov 10 04:22:09 PST 2008


Sergiy Karpenko schrieb:
> 
> Hi all
> 
> There is a problem, I use antlrworks-1.2.1 which use antlr-3.1.1 and it
> genrate code well.
> 
> But when I use antlr3-maven-plugin with same antlr-3.1.1 it generates
> wrong code
> 
> <dependency>
>  <groupId>org.antlr</groupId>
>  <artifactId>antlr-runtime</artifactId>
>   <version>3.1.1</version>
>   <scope>compile</scope>
> </dependency>
> 
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>antlr3-maven-plugin</artifactId>
> <version>1.0</version>
> <configuration>
> <!--libDirectory>target/generated-sources/antlr/org/exoplatform/services/jcr/impl/core/query/antlr</libDirectory-->
> 
> <includes>
> <include>**/FullText.g</include>
> <include>**/SQL2.g</include>
> </includes>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>antlr</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> 
> There is
> "cannot find symbol : variable _fsp"
> 
> differense between two ganerated code is:
>   state._fsp--; in first case
> and
>   _fsp--;  in second case
> 
> Thanks

The cause lies in a wrong ANLTR version. Somehow your maven plugin still
uses ANTLR 3.0.x. Either the maven plugin is outdated or your classpath
for maven is wrong.

Johannes
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> 



More information about the antlr-interest mailing list