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 tokenVocab = IfFeatureExpressionLexer;
14 if_feature_expr: if_feature_term (SEP OR SEP if_feature_term)*;
15 if_feature_term: if_feature_factor (SEP AND SEP if_feature_term)*;
16 if_feature_factor: NOT SEP if_feature_factor
17 | LP SEP? if_feature_expr SEP? RP
20 identifier_ref_arg : (IDENTIFIER COLON)? IDENTIFIER;