Cleanup yang-parser-rfc7950 antlr configuration 90/84990/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 8 Oct 2019 17:08:15 +0000 (19:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 8 Oct 2019 19:23:57 +0000 (21:23 +0200)
This fixes up a long-standing issue with how antlr is configured,
fixing javadoc plugin interaction in the process.

Change-Id: Ia077b7b2f777203baea8aad3400abd484e3e6801
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-impl/pom.xml
yang/yang-parser-rfc7950/pom.xml
yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/IfFeatureExpressionLexer.g4 [moved from yang/yang-parser-rfc7950/src/main/antlr/IfFeatureExpressionLexer.g4 with 87% similarity]
yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/IfFeatureExpressionParser.g4 [moved from yang/yang-parser-rfc7950/src/main/antlr/IfFeatureExpressionParser.g4 with 90% similarity]
yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/LeafRefPathLexer.g4 [moved from yang/yang-parser-rfc7950/src/main/antlr/LeafRefPathLexer.g4 with 81% similarity]
yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/LeafRefPathParser.g4 [moved from yang/yang-parser-rfc7950/src/main/antlr/LeafRefPathParser.g4 with 89% similarity]
yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/YangStatementLexer.g4 [moved from yang/yang-parser-rfc7950/src/main/antlr/YangStatementLexer.g4 with 94% similarity]
yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/YangStatementParser.g4 [moved from yang/yang-parser-rfc7950/src/main/antlr/YangStatementParser.g4 with 80% similarity]

index 1bde916d89b52b5b6d11acea58e96aece5e524c1..a6c70e006a237fa1ecc57ada1b3e61709dca3534 100644 (file)
@@ -39,8 +39,8 @@
                     </execution>
                 </executions>
                 <configuration>
-                    <sourceDirectory>src/main/antlr</sourceDirectory>
-                    <outputDirectory>target/generated-sources/parser/org/opendaylight/yangtools/yang/data/impl/leafref</outputDirectory>
+                    <sourceDirectory>${project.basedir}/src/main/antlr</sourceDirectory>
+                    <outputDirectory>${project.build.directory}/generated-sources/parser/org/opendaylight/yangtools/yang/data/impl/leafref</outputDirectory>
                     <visitor>true</visitor>
                     <listener>true</listener>
                 </configuration>
index 83d0dc3473894f1987b72e2c6e19566e76ddd29d..284fc5e9fe89286aff2ad7da3a659aaaa96c6b82 100644 (file)
@@ -93,7 +93,7 @@
                 </executions>
                 <configuration>
                     <sourceDirectory>src/main/antlr</sourceDirectory>
-                    <outputDirectory>${project.build.directory}/generated-sources/parser/org/opendaylight/yangtools/antlrv4/code/gen</outputDirectory>
+                    <outputDirectory>${project.build.directory}/generated-sources/parser</outputDirectory>
                     <visitor>true</visitor>
                     <listener>false</listener>
                 </configuration>
similarity index 90%
rename from yang/yang-parser-rfc7950/src/main/antlr/IfFeatureExpressionParser.g4
rename to yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/IfFeatureExpressionParser.g4
index 33daa34f4bef42ffb1b9f12c56ed2ca034a386db..8e5cc46d523f612d541750fe1280877c6eaea779 100644 (file)
@@ -7,15 +7,10 @@
 //
 parser grammar IfFeatureExpressionParser;
 
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
-options{
+options {
     tokenVocab = IfFeatureExpressionLexer;
 }
 
-
 if_feature_expr: if_feature_term (SEP OR SEP if_feature_term)*;
 if_feature_term: if_feature_factor (SEP AND SEP if_feature_term)*;
 if_feature_factor: NOT SEP if_feature_factor
similarity index 81%
rename from yang/yang-parser-rfc7950/src/main/antlr/LeafRefPathLexer.g4
rename to yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/LeafRefPathLexer.g4
index f87c5bb03419da093796dbc5fae0a4802331af13..3d63ee9eeaa42e8e3e55fc99d7bff30711fb639e 100644 (file)
@@ -1,9 +1,5 @@
 lexer grammar LeafRefPathLexer;
 
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
 COLON : ':' ;
 SLASH : '/' ;
 DOTS : '..' ;
similarity index 89%
rename from yang/yang-parser-rfc7950/src/main/antlr/LeafRefPathParser.g4
rename to yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/LeafRefPathParser.g4
index 766fc4bd2cfa6c06ab056cf332904dc58f5101d9..ec60a4cc32150afbbc40a00377ac2b2d3cb31145 100644 (file)
@@ -1,11 +1,7 @@
 parser grammar LeafRefPathParser;
 
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
 options {
- tokenVocab = LeafRefPathLexer;
   tokenVocab = LeafRefPathLexer;
 }
 
 path_arg : absolute_path | relative_path;
similarity index 94%
rename from yang/yang-parser-rfc7950/src/main/antlr/YangStatementLexer.g4
rename to yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/YangStatementLexer.g4
index 3ddb6521ecb0552e675685f637b63971b45b72b4..8185545f38b047a9d728420be7ac2c6e0fcf978f 100644 (file)
@@ -7,11 +7,7 @@
 //
 lexer grammar YangStatementLexer;
 
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
-tokens{
+tokens {
     SEMICOLON,
     LEFT_BRACE,
     RIGHT_BRACE,
similarity index 80%
rename from yang/yang-parser-rfc7950/src/main/antlr/YangStatementParser.g4
rename to yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/YangStatementParser.g4
index 9714bda7f8ceca6dc06b66c31bf95d2e9d65a4ce..9f836e2e3210053ccbc39cda5eaccdcfcde9111d 100644 (file)
@@ -7,15 +7,11 @@
 //
 parser grammar YangStatementParser;
 
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
-options{
+options {
     tokenVocab = YangStatementLexer;
 }
 
 statement : SEP* keyword SEP* (argument)? SEP* (SEMICOLON | LEFT_BRACE SEP* (statement)* SEP* RIGHT_BRACE SEP*) SEP*;
 keyword : (IDENTIFIER COLON)? IDENTIFIER;
 
-argument : STRING (SEP* PLUS SEP* STRING)* | IDENTIFIER;
\ No newline at end of file
+argument : STRING (SEP* PLUS SEP* STRING)* | IDENTIFIER;