[ 
https://issues.apache.org/jira/browse/GEODE-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15768252#comment-15768252
 ] 

ASF GitHub Bot commented on GEODE-165:
--------------------------------------

Github user upthewaterspout commented on the issue:

    https://github.com/apache/geode/pull/322
  
    @agingade  - Yeah, they'll get generated every time you do a clean followed 
a by a build. Presumably if you don't do a clean the antlr plugin will detect 
if the files are up to date.
    
    Prior to this fix I don't think there was even a README on how to generate 
these files. This fix is really the ideal solution - generated files should 
never be checked in to the source. This way everyone knows they need to modify 
oql.g, and everyone knows how to generate the resulting files because it 
happens automatically as part of the build.


> Add build support for generating antlr classes from grammar
> -----------------------------------------------------------
>
>                 Key: GEODE-165
>                 URL: https://issues.apache.org/jira/browse/GEODE-165
>             Project: Geode
>          Issue Type: Bug
>          Components: build
>            Reporter: Dan Smith
>            Assignee: Mark Bretl
>
> The OQL engine currently uses antlr to generate some parsing classes from 
> gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/parse/oql.g
> These are the generated classes. They are currently checked into the source.
> OQLLexer.java
> OQLLexerTokenTypes.java
> OQLLexerTokenTypes.txt
> OQLParser.java
> They can be generated manually by running antlr.Tool on the provided grammar.
> cd gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/parse/
> java -cp antlr.jar antlr.Tool oql.g
> We should add support to the gradle build to generate these classes.
> In my opinion we should also remove the checked in classes. With gradle we 
> can configure things so that the gradle eclipse target will generate these 
> classes and make them available to the IDE as well. Look at 
> gemfire-core/build.gradle for how we do this with the version properties file:
> sourceSets {
>   main {
>     output.dir(generatedResources, builtBy: 'createVersionPropertiesFile')
>   }
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to