</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>
</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>
//
lexer grammar IfFeatureExpressionLexer;
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
NOT : 'not';
LP : '(';
RP : ')';
//
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
lexer grammar LeafRefPathLexer;
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
COLON : ':' ;
SLASH : '/' ;
DOTS : '..' ;
parser grammar LeafRefPathParser;
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
options {
- tokenVocab = LeafRefPathLexer;
+ tokenVocab = LeafRefPathLexer;
}
path_arg : absolute_path | relative_path;
//
lexer grammar YangStatementLexer;
-@header {
-package org.opendaylight.yangtools.antlrv4.code.gen;
-}
-
-tokens{
+tokens {
SEMICOLON,
LEFT_BRACE,
RIGHT_BRACE,
//
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;