%start Yang
%title "Yang grammar"
%comment "YANG grammar by `parol`"
%line_comment "//"
%block_comment "/\*" "\*/"
%scanner DQString {
%auto_newline_off
%auto_ws_off
}
%scanner SQString {
%auto_newline_off
%auto_ws_off
}
%scanner Esc {
%auto_newline_off
%auto_ws_off
}
%scanner Keyword {}
%scanner YVersion {}
%scanner Range {}
%scanner Enum {}
%scanner Default {}
%scanner Revision {}
%scanner Mandatory {}
%scanner IfFeature {}
%scanner Status {}
%scanner Value {}
%scanner Fraction {}
%scanner Ordered {}
%%
/* 0 */ Yang: ModuleStmt;
/* 1 */ Yang: SubmoduleStmt;
/* 2 */ ModuleStmt: 'module'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ ModuleStmtList /* Vec */ ModuleStmtList0 /* Vec */ ModuleStmtList1 /* Vec */ ModuleStmtList2 /* Vec */ ModuleStmtList3 /* Vec */ '}'^ /* Clipped */;
/* 3 */ ModuleStmtList3 /* Vec<T>::Push */: BodyStmts ModuleStmtList3;
/* 4 */ ModuleStmtList3 /* Vec<T>::New */: ;
/* 5 */ ModuleStmtList2 /* Vec<T>::Push */: RevisionStmt ModuleStmtList2;
/* 6 */ ModuleStmtList2 /* Vec<T>::New */: ;
/* 7 */ ModuleStmtList1 /* Vec<T>::Push */: MetaStmts ModuleStmtList1;
/* 8 */ ModuleStmtList1 /* Vec<T>::New */: ;
/* 9 */ ModuleStmtList0 /* Vec<T>::Push */: LinkageStmts ModuleStmtList0;
/* 10 */ ModuleStmtList0 /* Vec<T>::New */: ;
/* 11 */ ModuleStmtList /* Vec<T>::Push */: ModuleHeaderStmts ModuleStmtList;
/* 12 */ ModuleStmtList /* Vec<T>::New */: ;
/* 13 */ SubmoduleStmt: 'submodule'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ SubmoduleStmtList /* Vec */ SubmoduleStmtList0 /* Vec */ SubmoduleStmtList1 /* Vec */ SubmoduleStmtList2 /* Vec */ SubmoduleStmtList3 /* Vec */ '}'^ /* Clipped */;
/* 14 */ SubmoduleStmtList3 /* Vec<T>::Push */: BodyStmts SubmoduleStmtList3;
/* 15 */ SubmoduleStmtList3 /* Vec<T>::New */: ;
/* 16 */ SubmoduleStmtList2 /* Vec<T>::Push */: RevisionStmt SubmoduleStmtList2;
/* 17 */ SubmoduleStmtList2 /* Vec<T>::New */: ;
/* 18 */ SubmoduleStmtList1 /* Vec<T>::Push */: MetaStmts SubmoduleStmtList1;
/* 19 */ SubmoduleStmtList1 /* Vec<T>::New */: ;
/* 20 */ SubmoduleStmtList0 /* Vec<T>::Push */: LinkageStmts SubmoduleStmtList0;
/* 21 */ SubmoduleStmtList0 /* Vec<T>::New */: ;
/* 22 */ SubmoduleStmtList /* Vec<T>::Push */: SubmoduleHeaderStmts SubmoduleStmtList;
/* 23 */ SubmoduleStmtList /* Vec<T>::New */: ;
/* 24 */ ModuleHeaderStmts: YangVersionStmt;
/* 25 */ ModuleHeaderStmts: NamespaceStmt;
/* 26 */ ModuleHeaderStmts: PrefixStmt;
/* 27 */ SubmoduleHeaderStmts: YangVersionStmt;
/* 28 */ SubmoduleHeaderStmts: BelongsToStmt;
/* 29 */ MetaStmts: OrganizationStmt;
/* 30 */ MetaStmts: ContactStmt;
/* 31 */ MetaStmts: DescriptionStmt;
/* 32 */ MetaStmts: ReferenceStmt;
/* 33 */ LinkageStmts: ImportStmt;
/* 34 */ LinkageStmts: IncludeStmt;
/* 35 */ BodyStmts: ExtensionStmt;
/* 36 */ BodyStmts: FeatureStmt;
/* 37 */ BodyStmts: IdentityStmt;
/* 38 */ BodyStmts: TypedefStmt;
/* 39 */ BodyStmts: GroupingStmt;
/* 40 */ BodyStmts: DataDefStmt;
/* 41 */ BodyStmts: AugmentStmt;
/* 42 */ BodyStmts: RpcStmt;
/* 43 */ BodyStmts: NotificationStmt;
/* 44 */ BodyStmts: DeviationStmt;
/* 45 */ BodyStmts: UnknownStmt;
/* 46 */ DataDefStmt: ContainerStmt;
/* 47 */ DataDefStmt: LeafStmt;
/* 48 */ DataDefStmt: LeafListStmt;
/* 49 */ DataDefStmt: ListStmt;
/* 50 */ DataDefStmt: ChoiceStmt;
/* 51 */ DataDefStmt: AnydataStmt;
/* 52 */ DataDefStmt: AnyxmlStmt;
/* 53 */ DataDefStmt: UsesStmt;
/* 54 */ YangVersionStmt: 'yang-version'^ /* Clipped */ YangVersionArgStr Semicolon^ /* Clipped */;
/* 55 */ YangVersionArgStr: %push(YVersion) YangVersionArgStrSuffix;
/* 56 */ YangVersionArgStrSuffix: YangVersionArg %sc();
/* 57 */ YangVersionArgStrSuffix: <YVersion>'"'^ /* Clipped */ YangVersionArg <YVersion>'"'^ /* Clipped */ %sc();
/* 58 */ DeviationStmt: 'deviation' AbsoluteSchemaNodeid Semicolon;
/* 59 */ RpcStmt: 'rpc' IdentifierArgStr RpcStmtSuffix;
/* 60 */ RpcStmtSuffix: Semicolon;
/* 61 */ RpcStmtSuffix: '{' RpcStmtList /* Vec */ '}';
/* 62 */ RpcStmtList /* Vec<T>::Push */: RpcStmtListGroup RpcStmtList;
/* 63 */ RpcStmtListGroup: IfFeatureStmt;
/* 64 */ RpcStmtListGroup: StatusStmt;
/* 65 */ RpcStmtListGroup: DescriptionStmt;
/* 66 */ RpcStmtListGroup: ReferenceStmt;
/* 67 */ RpcStmtListGroup: TypedefStmt;
/* 68 */ RpcStmtListGroup: GroupingStmt;
/* 69 */ RpcStmtListGroup: InputStmt;
/* 70 */ RpcStmtListGroup: OutputStmt;
/* 71 */ RpcStmtList /* Vec<T>::New */: ;
/* 72 */ ExtensionStmt: 'extension'^ /* Clipped */ IdentifierArgStr ExtensionStmtSuffix;
/* 73 */ ExtensionStmtSuffix: Semicolon^ /* Clipped */;
/* 74 */ ExtensionStmtSuffix: '{'^ /* Clipped */ ExtensionStmtList /* Vec */ '}'^ /* Clipped */;
/* 75 */ ExtensionStmtList /* Vec<T>::Push */: ExtensionStmtListGroup ExtensionStmtList;
/* 76 */ ExtensionStmtListGroup: ArgumentStmt;
/* 77 */ ExtensionStmtListGroup: StatusStmt;
/* 78 */ ExtensionStmtListGroup: DescriptionStmt;
/* 79 */ ExtensionStmtListGroup: ReferenceStmt;
/* 80 */ ExtensionStmtList /* Vec<T>::New */: ;
/* 81 */ ArgumentStmt: 'argument'^ /* Clipped */ IdentifierArgStr Semicolon^ /* Clipped */;
/* 82 */ FeatureStmt: 'feature'^ /* Clipped */ IdentifierArgStr FeatureStmtSuffix;
/* 83 */ FeatureStmtSuffix: Semicolon^ /* Clipped */;
/* 84 */ FeatureStmtSuffix: '{' FeatureStmtList /* Vec */ '}';
/* 85 */ FeatureStmtList /* Vec<T>::Push */: FeatureStmtListGroup FeatureStmtList;
/* 86 */ FeatureStmtListGroup: IfFeatureStmt;
/* 87 */ FeatureStmtListGroup: StatusStmt;
/* 88 */ FeatureStmtListGroup: DescriptionStmt;
/* 89 */ FeatureStmtListGroup: ReferenceStmt;
/* 90 */ FeatureStmtList /* Vec<T>::New */: ;
/* 91 */ TypedefStmt: 'typedef'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ TypedefStmtList /* Vec */ '}'^ /* Clipped */;
/* 92 */ TypedefStmtList /* Vec<T>::Push */: TypedefStmtListGroup TypedefStmtList;
/* 93 */ TypedefStmtListGroup: TypeStmt;
/* 94 */ TypedefStmtListGroup: UnitsStmt;
/* 95 */ TypedefStmtListGroup: DefaultStmt;
/* 96 */ TypedefStmtListGroup: StatusStmt;
/* 97 */ TypedefStmtListGroup: DescriptionStmt;
/* 98 */ TypedefStmtListGroup: ReferenceStmt;
/* 99 */ TypedefStmtList /* Vec<T>::New */: ;
/* 100 */ AugmentStmt: 'augment'^ /* Clipped */ AugmentArgStr '{'^ /* Clipped */ AugmentStmtList /* Vec */ '}'^ /* Clipped */;
/* 101 */ AugmentStmtList /* Vec<T>::Push */: AugmentStmtListGroup AugmentStmtList;
/* 102 */ AugmentStmtListGroup: WhenStmt;
/* 103 */ AugmentStmtListGroup: IfFeatureStmt;
/* 104 */ AugmentStmtListGroup: StatusStmt;
/* 105 */ AugmentStmtListGroup: DescriptionStmt;
/* 106 */ AugmentStmtListGroup: ReferenceStmt;
/* 107 */ AugmentStmtListGroup: DataDefStmt;
/* 108 */ AugmentStmtListGroup: CaseStmt;
/* 109 */ AugmentStmtListGroup: ActionStmt;
/* 110 */ AugmentStmtListGroup: NotificationStmt;
/* 111 */ AugmentStmtList /* Vec<T>::New */: ;
/* 112 */ AugmentArgStr: Ystring;
/* 113 */ WhenStmt: 'when'^ /* Clipped */ Ystring WhenStmtSuffix;
/* 114 */ WhenStmtSuffix: Semicolon^ /* Clipped */;
/* 115 */ WhenStmtSuffix: '{' WhenStmtList /* Vec */ '}';
/* 116 */ WhenStmtList /* Vec<T>::Push */: WhenStmtListGroup WhenStmtList;
/* 117 */ WhenStmtListGroup: DescriptionStmt;
/* 118 */ WhenStmtListGroup: ReferenceStmt;
/* 119 */ WhenStmtList /* Vec<T>::New */: ;
/* 120 */ GroupingStmt: 'grouping'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ GroupingStmtList /* Vec */ '}'^ /* Clipped */;
/* 121 */ GroupingStmtList /* Vec<T>::Push */: GroupingStmtListGroup GroupingStmtList;
/* 122 */ GroupingStmtListGroup: StatusStmt;
/* 123 */ GroupingStmtListGroup: DescriptionStmt;
/* 124 */ GroupingStmtListGroup: ReferenceStmt;
/* 125 */ GroupingStmtListGroup: TypedefStmt;
/* 126 */ GroupingStmtListGroup: GroupingStmt;
/* 127 */ GroupingStmtListGroup: DataDefStmt;
/* 128 */ GroupingStmtListGroup: ActionStmt;
/* 129 */ GroupingStmtListGroup: NotificationStmt;
/* 130 */ GroupingStmtListGroup: UnknownStmt;
/* 131 */ GroupingStmtList /* Vec<T>::New */: ;
/* 132 */ IdentityStmt: 'identity'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ IdentityStmtList /* Vec */ '}'^ /* Clipped */;
/* 133 */ IdentityStmtList /* Vec<T>::Push */: IdentityStmtListGroup IdentityStmtList;
/* 134 */ IdentityStmtListGroup: IfFeatureStmt;
/* 135 */ IdentityStmtListGroup: BaseStmt;
/* 136 */ IdentityStmtListGroup: DescriptionStmt;
/* 137 */ IdentityStmtListGroup: ReferenceStmt;
/* 138 */ IdentityStmtList /* Vec<T>::New */: ;
/* 139 */ BaseStmt: 'base'^ /* Clipped */ IdentifierRefArgStr Semicolon^ /* Clipped */;
/* 140 */ AnyxmlStmt: 'anyxml'^ /* Clipped */ IdentifierArgStr AnyxmlStmtSuffix;
/* 141 */ AnyxmlStmtSuffix: Semicolon^ /* Clipped */;
/* 142 */ AnyxmlStmtSuffix: '{'^ /* Clipped */ AnyxmlStmtList /* Vec */ '}'^ /* Clipped */;
/* 143 */ AnyxmlStmtList /* Vec<T>::Push */: AnyxmlStmtListGroup AnyxmlStmtList;
/* 144 */ AnyxmlStmtListGroup: WhenStmt;
/* 145 */ AnyxmlStmtListGroup: IfFeatureStmt;
/* 146 */ AnyxmlStmtListGroup: MustStmt;
/* 147 */ AnyxmlStmtListGroup: ConfigStmt;
/* 148 */ AnyxmlStmtListGroup: MandatoryStmt;
/* 149 */ AnyxmlStmtListGroup: StatusStmt;
/* 150 */ AnyxmlStmtListGroup: DescriptionStmt;
/* 151 */ AnyxmlStmtListGroup: ReferenceStmt;
/* 152 */ AnyxmlStmtList /* Vec<T>::New */: ;
/* 153 */ ChoiceStmt: 'choice'^ /* Clipped */ IdentifierRefArgStr ChoiceStmtSuffix;
/* 154 */ ChoiceStmtSuffix: Semicolon^ /* Clipped */;
/* 155 */ ChoiceStmtSuffix: '{' ChoiceStmtList /* Vec */ '}';
/* 156 */ ChoiceStmtList /* Vec<T>::Push */: ChoiceStmtListGroup ChoiceStmtList;
/* 157 */ ChoiceStmtListGroup: WhenStmt;
/* 158 */ ChoiceStmtListGroup: IfFeatureStmt;
/* 159 */ ChoiceStmtListGroup: DefaultStmt;
/* 160 */ ChoiceStmtListGroup: ConfigStmt;
/* 161 */ ChoiceStmtListGroup: MandatoryStmt;
/* 162 */ ChoiceStmtListGroup: StatusStmt;
/* 163 */ ChoiceStmtListGroup: DescriptionStmt;
/* 164 */ ChoiceStmtListGroup: ReferenceStmt;
/* 165 */ ChoiceStmtListGroup: ShortCaseStmt;
/* 166 */ ChoiceStmtListGroup: CaseStmt;
/* 167 */ ChoiceStmtList /* Vec<T>::New */: ;
/* 168 */ ShortCaseStmt: ChoiceStmt;
/* 169 */ ShortCaseStmt: ContainerStmt;
/* 170 */ ShortCaseStmt: LeafStmt;
/* 171 */ ShortCaseStmt: LeafListStmt;
/* 172 */ ShortCaseStmt: ListStmt;
/* 173 */ ShortCaseStmt: AnydataStmt;
/* 174 */ ShortCaseStmt: AnyxmlStmt;
/* 175 */ AnydataStmt: 'anydata'^ /* Clipped */ IdentifierArgStr AnydataStmtSuffix;
/* 176 */ AnydataStmtSuffix: Semicolon^ /* Clipped */;
/* 177 */ AnydataStmtSuffix: '{'^ /* Clipped */ AnydataStmtList /* Vec */ '}'^ /* Clipped */;
/* 178 */ AnydataStmtList /* Vec<T>::Push */: AnydataStmtListGroup AnydataStmtList;
/* 179 */ AnydataStmtListGroup: WhenStmt;
/* 180 */ AnydataStmtListGroup: IfFeatureStmt;
/* 181 */ AnydataStmtListGroup: MustStmt;
/* 182 */ AnydataStmtListGroup: ConfigStmt;
/* 183 */ AnydataStmtListGroup: MandatoryStmt;
/* 184 */ AnydataStmtListGroup: StatusStmt;
/* 185 */ AnydataStmtListGroup: DescriptionStmt;
/* 186 */ AnydataStmtListGroup: ReferenceStmt;
/* 187 */ AnydataStmtList /* Vec<T>::New */: ;
/* 188 */ CaseStmt: 'case'^ /* Clipped */ IdentifierArgStr CaseStmtSuffix;
/* 189 */ CaseStmtSuffix: Semicolon^ /* Clipped */;
/* 190 */ CaseStmtSuffix: '{'^ /* Clipped */ CaseStmtList /* Vec */ '}'^ /* Clipped */;
/* 191 */ CaseStmtList /* Vec<T>::Push */: CaseStmtListGroup CaseStmtList;
/* 192 */ CaseStmtListGroup: WhenStmt;
/* 193 */ CaseStmtListGroup: IfFeatureStmt;
/* 194 */ CaseStmtListGroup: DataDefStmt;
/* 195 */ CaseStmtListGroup: DescriptionStmt;
/* 196 */ CaseStmtListGroup: ReferenceStmt;
/* 197 */ CaseStmtList /* Vec<T>::New */: ;
/* 198 */ StatusStmt: 'status'^ /* Clipped */ StatusArgStr Semicolon^ /* Clipped */;
/* 199 */ StatusArgStr: %sc(Status) StatusArgStrSuffix;
/* 200 */ StatusArgStrSuffix: StatusArg %sc();
/* 201 */ StatusArgStrSuffix: <Status>'"'^ /* Clipped */ StatusArg <Status>'"'^ /* Clipped */ %sc();
/* 202 */ StatusArg: <Status>/current|obsolete|deprecated/;
/* 203 */ ContainerStmt: 'container'^ /* Clipped */ IdentifierArgStr ContainerStmtSuffix;
/* 204 */ ContainerStmtSuffix: Semicolon^ /* Clipped */;
/* 205 */ ContainerStmtSuffix: '{'^ /* Clipped */ ContainerStmtList /* Vec */ '}'^ /* Clipped */;
/* 206 */ ContainerStmtList /* Vec<T>::Push */: ContainerStmtListGroup ContainerStmtList;
/* 207 */ ContainerStmtListGroup: WhenStmt;
/* 208 */ ContainerStmtListGroup: IfFeatureStmt;
/* 209 */ ContainerStmtListGroup: MustStmt;
/* 210 */ ContainerStmtListGroup: PresenceStmt;
/* 211 */ ContainerStmtListGroup: ConfigStmt;
/* 212 */ ContainerStmtListGroup: StatusStmt;
/* 213 */ ContainerStmtListGroup: DescriptionStmt;
/* 214 */ ContainerStmtListGroup: ReferenceStmt;
/* 215 */ ContainerStmtListGroup: DataDefStmt;
/* 216 */ ContainerStmtListGroup: ActionStmt;
/* 217 */ ContainerStmtListGroup: NotificationStmt;
/* 218 */ ContainerStmtListGroup: UnknownStmt;
/* 219 */ ContainerStmtList /* Vec<T>::New */: ;
/* 220 */ ActionStmt: 'action' IdentifierArgStr ActionStmtSuffix;
/* 221 */ ActionStmtSuffix: Semicolon;
/* 222 */ ActionStmtSuffix: '{' ActionStmtList /* Vec */ '}';
/* 223 */ ActionStmtList /* Vec<T>::Push */: ActionStmtListGroup ActionStmtList;
/* 224 */ ActionStmtListGroup: IfFeatureStmt;
/* 225 */ ActionStmtListGroup: StatusStmt;
/* 226 */ ActionStmtListGroup: DescriptionStmt;
/* 227 */ ActionStmtListGroup: ReferenceStmt;
/* 228 */ ActionStmtListGroup: InputStmt;
/* 229 */ ActionStmtListGroup: OutputStmt;
/* 230 */ ActionStmtList /* Vec<T>::New */: ;
/* 231 */ InputStmt: 'input' '{' InputStmtList /* Vec */ '}';
/* 232 */ InputStmtList /* Vec<T>::Push */: DataDefStmt InputStmtList;
/* 233 */ InputStmtList /* Vec<T>::New */: ;
/* 234 */ OutputStmt: 'output' '{' OutputStmtList /* Vec */ '}';
/* 235 */ OutputStmtList /* Vec<T>::Push */: DataDefStmt OutputStmtList;
/* 236 */ OutputStmtList /* Vec<T>::New */: ;
/* 237 */ NotificationStmt: 'notification' IdentifierArgStr '{' NotificationStmtList /* Vec */ '}';
/* 238 */ NotificationStmtList /* Vec<T>::Push */: NotificationStmtListGroup NotificationStmtList;
/* 239 */ NotificationStmtListGroup: IfFeatureStmt;
/* 240 */ NotificationStmtListGroup: MustStmt;
/* 241 */ NotificationStmtListGroup: StatusStmt;
/* 242 */ NotificationStmtListGroup: DescriptionStmt;
/* 243 */ NotificationStmtListGroup: ReferenceStmt;
/* 244 */ NotificationStmtListGroup: TypedefStmt;
/* 245 */ NotificationStmtListGroup: GroupingStmt;
/* 246 */ NotificationStmtListGroup: DataDefStmt;
/* 247 */ NotificationStmtList /* Vec<T>::New */: ;
/* 248 */ IfFeatureStmt: 'if-feature'^ /* Clipped */ IfFeatureExprStr Semicolon^ /* Clipped */;
/* 249 */ IfFeatureExprStr: %sc(IfFeature) IfFeatureExpr %sc();
/* 250 */ IfFeatureExpr: IfFeatureTerm IfFeatureExprOpt /* Option */;
/* 251 */ IfFeatureExprOpt /* Option<T>::Some */: <IfFeature>'or' IfFeatureExpr;
/* 252 */ IfFeatureExprOpt /* Option<T>::None */: ;
/* 253 */ IfFeatureTerm: IfFeatureFactor IfFeatureTermOpt /* Option */;
/* 254 */ IfFeatureTermOpt /* Option<T>::Some */: <IfFeature>'and' IfFeatureTerm;
/* 255 */ IfFeatureTermOpt /* Option<T>::None */: ;
/* 256 */ IfFeatureFactor: <IfFeature>'not' IfFeatureFactor;
/* 257 */ IfFeatureFactor: <IfFeature>'(' IfFeatureExpr <IfFeature>')';
/* 258 */ IfFeatureFactor: Identifier;
/* 259 */ IfFeatureFactor: <IfFeature>'"' Identifier <IfFeature>'"';
/* 260 */ PresenceStmt: 'presence'^ /* Clipped */ Ystring Semicolon^ /* Clipped */;
/* 261 */ UsesStmt: 'uses'^ /* Clipped */ IdentifierRefArgStr UsesStmtSuffix;
/* 262 */ UsesStmtSuffix: Semicolon^ /* Clipped */;
/* 263 */ UsesStmtSuffix: '{'^ /* Clipped */ UsesStmtList /* Vec */ '}'^ /* Clipped */;
/* 264 */ UsesStmtList /* Vec<T>::Push */: UsesStmtListGroup UsesStmtList;
/* 265 */ UsesStmtListGroup: WhenStmt;
/* 266 */ UsesStmtListGroup: IfFeatureStmt;
/* 267 */ UsesStmtListGroup: StatusStmt;
/* 268 */ UsesStmtListGroup: DescriptionStmt;
/* 269 */ UsesStmtListGroup: ReferenceStmt;
/* 270 */ UsesStmtListGroup: RefineStmt;
/* 271 */ UsesStmtListGroup: AugmentStmt;
/* 272 */ UsesStmtList /* Vec<T>::New */: ;
/* 273 */ RefineStmt: 'refine'^ /* Clipped */ RefineArgStr RefineStmtSuffix;
/* 274 */ RefineStmtSuffix: Semicolon^ /* Clipped */;
/* 275 */ RefineStmtSuffix: '{'^ /* Clipped */ RefineStmtList /* Vec */ '}'^ /* Clipped */;
/* 276 */ RefineStmtList /* Vec<T>::Push */: RefineStmtListGroup RefineStmtList;
/* 277 */ RefineStmtListGroup: IfFeatureStmt;
/* 278 */ RefineStmtListGroup: MustStmt;
/* 279 */ RefineStmtListGroup: PresenceStmt;
/* 280 */ RefineStmtListGroup: DefaultStmt;
/* 281 */ RefineStmtListGroup: ConfigStmt;
/* 282 */ RefineStmtListGroup: MandatoryStmt;
/* 283 */ RefineStmtListGroup: MinElementsStmt;
/* 284 */ RefineStmtListGroup: MaxElementsStmt;
/* 285 */ RefineStmtListGroup: DescriptionStmt;
/* 286 */ RefineStmtListGroup: ReferenceStmt;
/* 287 */ RefineStmtList /* Vec<T>::New */: ;
/* 288 */ RefineArgStr: %sc(Keyword) RefineArgStrSuffix;
/* 289 */ RefineArgStrSuffix: RefineArg %sc();
/* 290 */ RefineArgStrSuffix: <Keyword>'"' RefineArg <Keyword>'"' %sc();
/* 291 */ RefineArg: DescendantSchemaNodeid;
/* 292 */ DescendantSchemaNodeid: IdentifierRef;
/* 293 */ DescendantSchemaNodeid: AbsoluteSchemaNodeid;
/* 294 */ UnknownStmt: IdentifierRef Ystring UnknownStmtSuffix;
/* 295 */ UnknownStmtSuffix: Semicolon^ /* Clipped */;
/* 296 */ UnknownStmtSuffix: '{'^ /* Clipped */ UnknownStmtList /* Vec */ '}'^ /* Clipped */;
/* 297 */ UnknownStmtList /* Vec<T>::Push */: UnknownStmtListGroup UnknownStmtList;
/* 298 */ UnknownStmtListGroup: TypeStmt;
/* 299 */ UnknownStmtListGroup: DescriptionStmt;
/* 300 */ UnknownStmtList /* Vec<T>::New */: ;
/* 301 */ LeafListStmt: 'leaf-list'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ LeafListStmtList /* Vec */ '}'^ /* Clipped */;
/* 302 */ LeafListStmtList /* Vec<T>::Push */: LeafListStmtListGroup LeafListStmtList;
/* 303 */ LeafListStmtListGroup: WhenStmt;
/* 304 */ LeafListStmtListGroup: IfFeatureStmt;
/* 305 */ LeafListStmtListGroup: TypeStmt;
/* 306 */ LeafListStmtListGroup: UnitsStmt;
/* 307 */ LeafListStmtListGroup: MustStmt;
/* 308 */ LeafListStmtListGroup: DefaultStmt;
/* 309 */ LeafListStmtListGroup: ConfigStmt;
/* 310 */ LeafListStmtListGroup: MinElementsStmt;
/* 311 */ LeafListStmtListGroup: MaxElementsStmt;
/* 312 */ LeafListStmtListGroup: OrderedByStmt;
/* 313 */ LeafListStmtListGroup: StatusStmt;
/* 314 */ LeafListStmtListGroup: DescriptionStmt;
/* 315 */ LeafListStmtListGroup: ReferenceStmt;
/* 316 */ LeafListStmtListGroup: UnknownStmt;
/* 317 */ LeafListStmtList /* Vec<T>::New */: ;
/* 318 */ LeafStmt: 'leaf'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ LeafStmtList /* Vec */ '}'^ /* Clipped */;
/* 319 */ LeafStmtList /* Vec<T>::Push */: LeafStmtListGroup LeafStmtList;
/* 320 */ LeafStmtListGroup: WhenStmt;
/* 321 */ LeafStmtListGroup: StatusStmt;
/* 322 */ LeafStmtListGroup: IfFeatureStmt;
/* 323 */ LeafStmtListGroup: TypeStmt;
/* 324 */ LeafStmtListGroup: UnitsStmt;
/* 325 */ LeafStmtListGroup: MustStmt;
/* 326 */ LeafStmtListGroup: DefaultStmt;
/* 327 */ LeafStmtListGroup: ConfigStmt;
/* 328 */ LeafStmtListGroup: MandatoryStmt;
/* 329 */ LeafStmtListGroup: DescriptionStmt;
/* 330 */ LeafStmtListGroup: ReferenceStmt;
/* 331 */ LeafStmtListGroup: UnknownStmt;
/* 332 */ LeafStmtList /* Vec<T>::New */: ;
/* 333 */ MustStmt: 'must'^ /* Clipped */ Ystring MustStmtSuffix;
/* 334 */ MustStmtSuffix: Semicolon^ /* Clipped */;
/* 335 */ MustStmtSuffix: '{'^ /* Clipped */ MustStmtList /* Vec */ '}'^ /* Clipped */;
/* 336 */ MustStmtList /* Vec<T>::Push */: MustStmtListGroup MustStmtList;
/* 337 */ MustStmtListGroup: ErrorMessage;
/* 338 */ MustStmtListGroup: DescriptionStmt;
/* 339 */ MustStmtList /* Vec<T>::New */: ;
/* 340 */ ErrorMessage: 'error-message' Ystring Semicolon;
/* 341 */ UnitsStmt: 'units' Ystring Semicolon;
/* 342 */ ConfigStmt: 'config' MandatoryArgStr Semicolon;
/* 343 */ MandatoryStmt: 'mandatory' MandatoryArgStr Semicolon;
/* 344 */ MandatoryArgStr: %push(Mandatory) MandatoryArgStrSuffix;
/* 345 */ MandatoryArgStrSuffix: MandatoryArg %sc();
/* 346 */ MandatoryArgStrSuffix: <Mandatory>'"' MandatoryArg <Mandatory>'"' %sc();
/* 347 */ MandatoryArg: <Mandatory>/true|false/;
/* 348 */ ListStmt: 'list'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ ListStmtList /* Vec */ '}'^ /* Clipped */;
/* 349 */ ListStmtList /* Vec<T>::Push */: ListStmtListGroup ListStmtList;
/* 350 */ ListStmtListGroup: WhenStmt;
/* 351 */ ListStmtListGroup: IfFeatureStmt;
/* 352 */ ListStmtListGroup: MustStmt;
/* 353 */ ListStmtListGroup: KeyStmt;
/* 354 */ ListStmtListGroup: ConfigStmt;
/* 355 */ ListStmtListGroup: MinElementsStmt;
/* 356 */ ListStmtListGroup: MaxElementsStmt;
/* 357 */ ListStmtListGroup: OrderedByStmt;
/* 358 */ ListStmtListGroup: StatusStmt;
/* 359 */ ListStmtListGroup: DescriptionStmt;
/* 360 */ ListStmtListGroup: ReferenceStmt;
/* 361 */ ListStmtListGroup: DataDefStmt;
/* 362 */ ListStmtListGroup: ActionStmt;
/* 363 */ ListStmtListGroup: NotificationStmt;
/* 364 */ ListStmtListGroup: UnknownStmt;
/* 365 */ ListStmtList /* Vec<T>::New */: ;
/* 366 */ OrderedByStmt: 'ordered-by'^ /* Clipped */ OrderedByArgStr Semicolon^ /* Clipped */;
/* 367 */ OrderedByArgStr: %sc(Ordered) OrderedByArgStrSuffix;
/* 368 */ OrderedByArgStrSuffix: OrderedByArg %sc();
/* 369 */ OrderedByArgStrSuffix: <Ordered>'"' OrderedByArg <Ordered>'"' %sc();
/* 370 */ OrderedByArg: <Ordered>/user|system/;
/* 371 */ DefaultStmt: 'default'^ /* Clipped */ %sc(Default) DefaultStmtSuffix;
/* 372 */ DefaultStmtSuffix: AsciiNoSemicolon %sc() Semicolon^ /* Clipped */;
/* 373 */ DefaultStmtSuffix: <Default>'"' AsciiNoSemicolon <Default>'"' %sc() Semicolon^ /* Clipped */;
/* 374 */ MaxElementsStmt: 'max-elements'^ /* Clipped */ /[1-9][0-9]*/ Semicolon^ /* Clipped */;
/* 375 */ MinElementsStmt: 'min-elements'^ /* Clipped */ /[1-9][0-9]*/ Semicolon^ /* Clipped */;
/* 376 */ TypeStmt: 'type'^ /* Clipped */ IdentifierRefArgStr TypeStmtSuffix;
/* 377 */ TypeStmtSuffix: Semicolon^ /* Clipped */;
/* 378 */ TypeStmtSuffix: <INITIAL, Keyword>'{'^ /* Clipped */ TypeStmtList /* Vec */ <INITIAL, Keyword>'}'^ /* Clipped */;
/* 379 */ TypeStmtList /* Vec<T>::Push */: TypeStmtListGroup TypeStmtList;
/* 380 */ TypeStmtListGroup: FractionDigitsStmt;
/* 381 */ TypeStmtListGroup: EnumStmt;
/* 382 */ TypeStmtListGroup: BaseStmt;
/* 383 */ TypeStmtListGroup: LeafrefSpecification;
/* 384 */ TypeStmtListGroup: StringRestrictions;
/* 385 */ TypeStmtListGroup: RangeStmt;
/* 386 */ TypeStmtListGroup: BitStmt;
/* 387 */ TypeStmtListGroup: TypeStmt;
/* 388 */ TypeStmtList /* Vec<T>::New */: ;
/* 389 */ FractionDigitsStmt: 'fraction-digits'^ /* Clipped */ %sc(Fraction) FractionDigitsArg %sc() Semicolon^ /* Clipped */;
/* 390 */ FractionDigitsArg: <Fraction>/1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|/;
/* 391 */ BitStmt: 'bit'^ /* Clipped */ IdentifierArgStr BitStmtSuffix;
/* 392 */ BitStmtSuffix: Semicolon^ /* Clipped */;
/* 393 */ BitStmtSuffix: '{'^ /* Clipped */ BitStmtList /* Vec */ '}'^ /* Clipped */;
/* 394 */ BitStmtList /* Vec<T>::Push */: BitStmtListGroup BitStmtList;
/* 395 */ BitStmtListGroup: PositionStmt;
/* 396 */ BitStmtListGroup: DescriptionStmt;
/* 397 */ BitStmtListGroup: ReferenceStmt;
/* 398 */ BitStmtList /* Vec<T>::New */: ;
/* 399 */ PositionStmt: 'position'^ /* Clipped */ IntegerValueStr Semicolon^ /* Clipped */;
/* 400 */ LeafrefSpecification: PathStmt;
/* 401 */ LeafrefSpecification: RequireInstanceStmt;
/* 402 */ RequireInstanceStmt: 'require-instance' RequireInstanceArgStr Semicolon;
/* 403 */ RequireInstanceArgStr: %push(Mandatory) RequireInstanceArgStrSuffix;
/* 404 */ RequireInstanceArgStrSuffix: MandatoryArg %sc();
/* 405 */ RequireInstanceArgStrSuffix: <Mandatory>'"' MandatoryArg <Mandatory>'"' %sc();
/* 406 */ PathStmt: 'path'^ /* Clipped */ Ystring Semicolon^ /* Clipped */;
/* 407 */ StringRestrictions: LengthStmt;
/* 408 */ StringRestrictions: PatternStmt;
/* 409 */ PatternStmt: 'pattern' Ystring Semicolon;
/* 410 */ LengthStmt: 'length'^ /* Clipped */ %sc(Range) RangeArgStr %sc() Semicolon^ /* Clipped */;
/* 411 */ EnumStmt: 'enum'^ /* Clipped */ EnumArgStr EnumStmtSuffix;
/* 412 */ EnumStmtSuffix: Semicolon^ /* Clipped */;
/* 413 */ EnumStmtSuffix: '{'^ /* Clipped */ EnumStmtList /* Vec */ '}'^ /* Clipped */;
/* 414 */ EnumStmtList /* Vec<T>::Push */: EnumStmtListGroup EnumStmtList;
/* 415 */ EnumStmtListGroup: IfFeatureStmt;
/* 416 */ EnumStmtListGroup: DescriptionStmt;
/* 417 */ EnumStmtListGroup: ValueStmt;
/* 418 */ EnumStmtListGroup: ReferenceStmt;
/* 419 */ EnumStmtList /* Vec<T>::New */: ;
/* 420 */ ValueStmt: 'value'^ /* Clipped */ IntegerValueStr Semicolon^ /* Clipped */;
/* 421 */ IntegerValueStr: %sc(Value) IntegerValueStrSuffix;
/* 422 */ IntegerValueStrSuffix: IntegerValue %sc();
/* 423 */ IntegerValueStrSuffix: <Value>'"' IntegerValue <Value>'"' %sc();
/* 424 */ IntegerValue: <Value>/[0-9]+/;
/* 425 */ EnumArgStr: %sc(Enum) EnumArgStrSuffix;
/* 426 */ EnumArgStrSuffix: AsciiNoBrace %sc();
/* 427 */ EnumArgStrSuffix: <Enum>'"'^ /* Clipped */ AsciiNoBrace <Enum>'"'^ /* Clipped */ %sc();
/* 428 */ RangeStmt: 'range'^ /* Clipped */ %sc(Range) RangeArgStr %sc() Semicolon^ /* Clipped */;
/* 429 */ RangeArgStr: RangeArg;
/* 430 */ RangeArgStr: <Range>'"'^ /* Clipped */ RangeArg <Range>'"'^ /* Clipped */;
/* 431 */ RangeArg: RangePart RangeArgOpt /* Option */;
/* 432 */ RangeArgOpt /* Option<T>::Some */: <Range>'|' RangeArg;
/* 433 */ RangeArgOpt /* Option<T>::None */: ;
/* 434 */ RangePart: RangeBoundary RangePartOpt /* Option */;
/* 435 */ RangePartOpt /* Option<T>::Some */: <Range>'..' RangeBoundary;
/* 436 */ RangePartOpt /* Option<T>::None */: ;
/* 437 */ RangeBoundary: <Range>'min';
/* 438 */ RangeBoundary: <Range>'max';
/* 439 */ RangeBoundary: <Range>"-?[0-9]+";
/* 440 */ IdentifierRefArgStr: %push(Keyword) IdentifierRefArgStrSuffix;
/* 441 */ IdentifierRefArgStrSuffix: IdentifierRef %sc();
/* 442 */ IdentifierRefArgStrSuffix: <Keyword, IfFeature>'"' IdentifierRef <Keyword, IfFeature>'"' %sc();
/* 443 */ IdentifierRef: IdentifierRefOpt /* Option */ Identifier;
/* 444 */ IdentifierRefOpt /* Option<T>::Some */: Identifier <Keyword, IfFeature>':';
/* 445 */ IdentifierRefOpt /* Option<T>::None */: ;
/* 446 */ KeyStmt: 'key'^ /* Clipped */ KeyArgStr Semicolon^ /* Clipped */;
/* 447 */ KeyArgStr: %push(Keyword) KeyArgStrSuffix;
/* 448 */ KeyArgStrSuffix: KeyArg %pop();
/* 449 */ KeyArgStrSuffix: <Keyword>'"'^ /* Clipped */ KeyArg <Keyword>'"'^ /* Clipped */ %pop();
/* 450 */ Semicolon: <INITIAL, Keyword, YVersion, Range, Enum, Revision, Mandatory, IfFeature>';';
/* 451 */ KeyArg: IdentifierRef KeyArgOpt /* Option */;
/* 452 */ KeyArgOpt /* Option<T>::Some */: KeyArg;
/* 453 */ KeyArgOpt /* Option<T>::None */: ;
/* 454 */ AbsoluteSchemaNodeid: <Keyword, IfFeature>'/' IdentifierRef;
/* 455 */ ImportStmt: 'import'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ ImportStmtList /* Vec */ '}'^ /* Clipped */;
/* 456 */ ImportStmtList /* Vec<T>::Push */: ImportStmtListGroup ImportStmtList;
/* 457 */ ImportStmtListGroup: PrefixStmt;
/* 458 */ ImportStmtListGroup: RevisionDateStmt;
/* 459 */ ImportStmtListGroup: DescriptionStmt;
/* 460 */ ImportStmtListGroup: ReferenceStmt;
/* 461 */ ImportStmtList /* Vec<T>::New */: ;
/* 462 */ IncludeStmt: 'include'^ /* Clipped */ IdentifierArgStr IncludeStmtSuffix;
/* 463 */ IncludeStmtSuffix: Semicolon^ /* Clipped */;
/* 464 */ IncludeStmtSuffix: '{'^ /* Clipped */ IncludeStmtList /* Vec */ '}'^ /* Clipped */;
/* 465 */ IncludeStmtList /* Vec<T>::Push */: IncludeStmtListGroup IncludeStmtList;
/* 466 */ IncludeStmtListGroup: RevisionDateStmt;
/* 467 */ IncludeStmtListGroup: DescriptionStmt;
/* 468 */ IncludeStmtListGroup: ReferenceStmt;
/* 469 */ IncludeStmtList /* Vec<T>::New */: ;
/* 470 */ RevisionDateStmt: 'revision-date'^ /* Clipped */ DateArgStr Semicolon^ /* Clipped */;
/* 471 */ NamespaceStmt: 'namespace'^ /* Clipped */ UriStr Semicolon^ /* Clipped */;
/* 472 */ UriStr: UriArg;
/* 473 */ UriStr: '"'^ /* Clipped */ UriArg '"'^ /* Clipped */;
/* 474 */ UriArg: "urn:[a-zA-Z0-9\-\.:]+";
/* 475 */ PrefixStmt: 'prefix'^ /* Clipped */ IdentifierArgStr Semicolon^ /* Clipped */;
/* 476 */ BelongsToStmt: 'belongs-to'^ /* Clipped */ IdentifierArgStr '{'^ /* Clipped */ PrefixStmt '}'^ /* Clipped */;
/* 477 */ OrganizationStmt: 'organization'^ /* Clipped */ Ystring Semicolon;
/* 478 */ ContactStmt: 'contact'^ /* Clipped */ Ystring Semicolon;
/* 479 */ DescriptionStmt: 'description'^ /* Clipped */ Ystring Semicolon^ /* Clipped */;
/* 480 */ ReferenceStmt: 'reference'^ /* Clipped */ Ystring Semicolon^ /* Clipped */;
/* 481 */ RevisionStmt: 'revision'^ /* Clipped */ DateArgStr '{'^ /* Clipped */ RevisionStmtList /* Vec */ '}'^ /* Clipped */;
/* 482 */ RevisionStmtList /* Vec<T>::Push */: RevisionStmtListGroup RevisionStmtList;
/* 483 */ RevisionStmtListGroup: DescriptionStmt;
/* 484 */ RevisionStmtListGroup: ReferenceStmt;
/* 485 */ RevisionStmtList /* Vec<T>::New */: ;
/* 486 */ DateArgStr: %sc(Revision) DateArgStrSuffix;
/* 487 */ DateArgStrSuffix: DateArg %sc();
/* 488 */ DateArgStrSuffix: <Revision>'"'^ /* Clipped */ DateArg <Revision>'"'^ /* Clipped */ %sc();
/* 489 */ DateArg: <Revision>/\d{4}-\d{2}-\d{2}/;
/* 490 */ Ystring: BasicString YstringOpt /* Option */;
/* 491 */ Ystring: Identifier;
/* 492 */ YstringOpt /* Option<T>::Some */: '+' Ystring;
/* 493 */ YstringOpt /* Option<T>::None */: ;
/* 494 */ BasicString: DQString;
/* 495 */ BasicString: SQString;
/* 496 */ DoubleQuotation: <INITIAL, DQString, Esc>'"';
/* 497 */ DQString: DoubleQuotation^ /* Clipped */ %push(DQString) DQStringList /* Vec */ %pop() DoubleQuotation^ /* Clipped */;
/* 498 */ DQStringList /* Vec<T>::Push */: DQChar DQStringList;
/* 499 */ DQStringList /* Vec<T>::New */: ;
/* 500 */ DQChar: DQUnescaped;
/* 501 */ DQChar: %push(Esc) DQEscaped %pop();
/* 502 */ DQUnescaped: DQNoEscape;
/* 503 */ DQUnescaped: NonAscii;
/* 504 */ DQEscaped: Escape DQEscapeSeqChar;
/* 505 */ DQEscapeSeqChar: Escape;
/* 506 */ DQEscapeSeqChar: DoubleQuotation;
/* 507 */ DQEscapeSeqChar: <Esc>"n";
/* 508 */ DQEscapeSeqChar: <Esc>"t";
/* 509 */ Escape: <DQString, SQString, Esc>"\u{5C}";
/* 510 */ NonAscii: <DQString, SQString>"[\n\r\u{80}-\u{D7FF}\u{E000}-\u{10FFFF}]";
/* 511 */ DQNoEscape: <DQString>"[ \n\r\t\u{21}\u{23}-\u{5B}\u{5D}-\u{7E}]+";
/* 512 */ SQString: SingleQuotation %push(SQString) SQStringList /* Vec */ %pop() SingleQuotation;
/* 513 */ SQStringList /* Vec<T>::Push */: SQChar SQStringList;
/* 514 */ SQStringList /* Vec<T>::New */: ;
/* 515 */ SQChar: SQUnescaped;
/* 516 */ SQChar: %push(Esc) SQEscaped %pop();
/* 517 */ SQEscaped: Escape SQEscapeSeqChar;
/* 518 */ SQEscapeSeqChar: <Esc>".";
/* 519 */ SQUnescaped: SQNoEscape;
/* 520 */ SQUnescaped: NonAscii;
/* 521 */ SQNoEscape: <SQString>"[ \t\u{21}-\u{26}\u{28}-\u{5B}\u{5D}-\u{7E}]+";
/* 522 */ SingleQuotation: <INITIAL, SQString>"\u{27}";
/* 523 */ IdentifierArgStr: %push(Keyword) IdentifierArgStrSuffix;
/* 524 */ IdentifierArgStrSuffix: Identifier %pop();
/* 525 */ IdentifierArgStrSuffix: <Keyword>'"'^ /* Clipped */ Identifier <Keyword>'"'^ /* Clipped */ %pop();
/* 526 */ Identifier: <INITIAL, Keyword, IfFeature>/[a-zA-Z_][a-zA-Z0-9_\-\/.:]*/;
/* 527 */ AsciiNoSemicolon: <Default>/[ \t\u{21}\u{23}-\u{3a}\u{3c}-\u{5b}\u{5d}-\u{7e}]+/;
/* 528 */ AsciiNoBrace: <Enum>/[\t\u{21}\u{23}-\u{3a}\u{3c}-\u{5b}\u{5d}-\u{7a}\u{7c}\u{7e}]+/;
/* 529 */ YangVersionArg: <YVersion>"1.1|1";