2 // Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 // and is available at http://www.eclipse.org/legal/epl-v10.html
8 parser grammar IfFeatureExpressionParser;
11 package org.opendaylight.yangtools.antlrv4.code.gen;
15 tokenVocab = IfFeatureExpressionLexer;
19 if_feature_expr: if_feature_term (SEP OR SEP if_feature_term)*;
20 if_feature_term: if_feature_factor (SEP AND SEP if_feature_term)*;
21 if_feature_factor: NOT SEP if_feature_factor
22 | LP SEP? if_feature_expr SEP? RP
25 identifier_ref_arg : (IDENTIFIER COLON)? IDENTIFIER;