christian.opp.exp 33.6 KB
Newer Older
1 2 3 4
%{
%}
%start main
%token ABSENT
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
%token ABSTRACT_SYNTAX
%token ALL
%token APPLICATION
%token AUTOMATIC
%token Assignment
%token At
%token AtDot
%token BEGIN
%token BIT
%token BMPString
%token BOOLEAN
%token BY
%token Bang
%token <string> Bstring
%token CHARACTER
%token CHOICE
%token CLASS
%token COMPONENT
%token COMPONENTS
%token CONSTRAINED
%token CONTAINING
%token Circumflex
%token Colon
%token Comma
%token <string> Cstring
%token DEFAULT
%token DEFINITIONS
%token <string> DefinedSyntax
%token Dot
%token DoubleDot
%token EMBEDDED
%token ENCODED
%token END
%token ENUMERATED
%token EOF
%token EXCEPT
%token EXPLICIT
%token EXPORTS
%token EXTENSIBILITY
%token EXTERNAL
%token Ellipsis
%token FALSE
%token FROM
%token GeneralString
%token GeneralizedTime
%token GraphicString
%token <string> Hstring
%token Hyphen
%token IA5String
%token IDENTIFIER
%token IMPLICIT
%token IMPLIED
%token IMPORTS
%token INCLUDES
%token INSTANCE
%token INTEGER
%token INTERSECTION
%token ISO646String
%token LeftBrace
%token LeftBracket
%token LeftDoubleBracket
%token LeftParen
%token LessThan
%token <string> Lower
%token <string> LowerField
%token MAX
%token MIN
%token MINUS_INFINITY
%token Middle
%token NULL
%token <string> Number
%token NumericString
%token OBJECT
%token OCTET
%token OF
%token OPTIONAL
%token ObjectDescriptor
%token PATTERN
%token PDV
%token PLUS_INFINITY
%token PRESENT
%token PRIVATE
%token PrintableString
%token REAL
%token RELATIVE_OID
%token <string> RealNumber
%token RightBrace
%token RightBracket
%token RightDoubleBracket
%token RightParen
%token SEQUENCE
%token SET
%token SIZE
%token STRING
%token SYNTAX
%token SemiColon
%token T61String
%token TAGS
%token TRUE
%token TYPE_IDENTIFIER
%token TeletexString
%token UNION
%token UNIQUE
%token UNIVERSAL
%token UTCTime
%token UTF8String
%token UniversalString
%token <string> Upper
%token <string> UpperField
%token VideotexString
%token VisibleString
%token WITH
117 118 119
%type <unit> main
%%

120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
option_UNIQUE_:
  
    {    ( None )}
| x = UNIQUE
    {    ( Some x )}

option_objectOptionalitySpec_:
  
    {    ( None )}
| x = objectOptionalitySpec
    {    ( Some x )}

option_objectSetOptionalitySpec_:
  
    {    ( None )}
| x = objectSetOptionalitySpec
    {    ( Some x )}

option_typeOptionalitySpec_:
  
    {    ( None )}
| x = typeOptionalitySpec
    {    ( Some x )}

option_valueOptionalitySpec_:
  
    {    ( None )}
| x = valueOptionalitySpec
    {    ( Some x )}

option_valueSetOptionalitySpec_:
  
    {    ( None )}
| x = valueSetOptionalitySpec
    {    ( Some x )}

option_withSyntaxSpec_:
  
    {    ( None )}
| x = withSyntaxSpec
    {    ( Some x )}

loption_separated_nonempty_list_Comma_fieldSetting__:
  
    {    ( [] )}
| x = separated_nonempty_list_Comma_fieldSetting_
    {    ( x )}

loption_separated_nonempty_list_Comma_userDefinedConstraintParameter__:
  
    {    ( [] )}
| x = separated_nonempty_list_Comma_userDefinedConstraintParameter_
    {    ( x )}

nonempty_list_tokenOrGroupSpec_:
  x = tokenOrGroupSpec
    {    ( [ x ] )}
| x = tokenOrGroupSpec xs = nonempty_list_tokenOrGroupSpec_
    {    ( x :: xs )}

separated_nonempty_list_Comma_actualParameter_:
  x = actualParameter
    {    ( [ x ] )}
| x = actualParameter _2 = Comma xs = separated_nonempty_list_Comma_actualParameter_
    {    ( x :: xs )}

separated_nonempty_list_Comma_atNotation_:
  x = atNotation
    {    ( [ x ] )}
| x = atNotation _2 = Comma xs = separated_nonempty_list_Comma_atNotation_
    {    ( x :: xs )}

separated_nonempty_list_Comma_fieldSetting_:
  x = fieldSetting
    {    ( [ x ] )}
| x = fieldSetting _2 = Comma xs = separated_nonempty_list_Comma_fieldSetting_
    {    ( x :: xs )}

separated_nonempty_list_Comma_fieldSpec_:
  x = fieldSpec
    {    ( [ x ] )}
| x = fieldSpec _2 = Comma xs = separated_nonempty_list_Comma_fieldSpec_
    {    ( x :: xs )}

separated_nonempty_list_Comma_parameter_:
  x = parameter
    {    ( [ x ] )}
| x = parameter _2 = Comma xs = separated_nonempty_list_Comma_parameter_
    {    ( x :: xs )}

separated_nonempty_list_Comma_userDefinedConstraintParameter_:
  x = userDefinedConstraintParameter
    {    ( [ x ] )}
| x = userDefinedConstraintParameter _2 = Comma xs = separated_nonempty_list_Comma_userDefinedConstraintParameter_
    {    ( x :: xs )}

separated_nonempty_list_Dot_Lower_:
  x = Lower
    {    ( [ x ] )}
| x = Lower _2 = Dot xs = separated_nonempty_list_Dot_Lower_
    {    ( x :: xs )}

separated_nonempty_list_Dot_primitiveFieldName_:
  x = primitiveFieldName
    {    ( [ x ] )}
| x = primitiveFieldName _2 = Dot xs = separated_nonempty_list_Dot_primitiveFieldName_
    {    ( x :: xs )}

228
main:
229
  _1 = moduleDefinition _2 = EOF
230
    {  ()}
231 232

moduleDefinition:
233
  _1 = moduleIdentifier _2 = DEFINITIONS _3 = tagDefault _4 = extensionDefault _5 = Assignment _6 = BEGIN _7 = moduleBody _8 = END
234
    {  ()}
235 236

moduleIdentifier:
237
  _1 = Upper _2 = definitiveIdentifier
238
    {  ()}
239 240

definitiveIdentifier:
241
  _1 = LeftBrace _2 = definitiveObjIdComponentList _3 = RightBrace
242
    {  ()}
243 244
| 
    {let _1 =
245
                 ()
246
in
247
  ()}
248 249

definitiveObjIdComponentList:
250
  _1 = definitiveObjIdComponent
251 252 253
    {  ()}
| _1 = definitiveObjIdComponent _2 = definitiveObjIdComponentList
    {  ()}
254 255

definitiveObjIdComponent:
256
  _1 = nameForm
257 258 259 260 261
    {  ()}
| _1 = definitiveNumberForm
    {  ()}
| _1 = definitiveNameAndNumberForm
    {  ()}
262 263

definitiveNumberForm:
264
  _1 = Number
265
    {  ()}
266 267

definitiveNameAndNumberForm:
268
  _1 = Lower _2 = LeftParen _3 = definitiveNumberForm _4 = RightParen
269
    {  ()}
270 271

tagDefault:
272
  _1 = EXPLICIT _2 = TAGS
273 274 275 276 277
    {  ()}
| _1 = IMPLICIT _2 = TAGS
    {  ()}
| _1 = AUTOMATIC _2 = TAGS
    {  ()}
278 279
| 
    {let _1 =
280
                 ()
281
in
282
  ()}
283 284

extensionDefault:
285
  _1 = EXTENSIBILITY _2 = IMPLIED
286
    {  ()}
287 288
| 
    {let _1 =
289
                 ()
290
in
291
  ()}
292 293

moduleBody:
294
  _1 = exports _2 = imports _3 = assignmentList
295
    {  ()}
296 297
| 
    {let _1 =
298
                 ()
299
in
300
  ()}
301 302

exports:
303
  _1 = EXPORTS _2 = symbolsExported _3 = SemiColon
304 305 306
    {  ()}
| _1 = EXPORTS _2 = ALL _3 = SemiColon
    {  ()}
307 308
| 
    {let _1 =
309
                 ()
310
in
311
  ()}
312 313

symbolsExported:
314
  _1 = symbolList
315
    {  ()}
316 317
| 
    {let _1 =
318
                 ()
319
in
320
  ()}
321 322

imports:
323
  _1 = IMPORTS _2 = symbolsImported _3 = SemiColon
324
    {  ()}
325 326
| 
    {let _1 =
327
                 ()
328
in
329
  ()}
330 331

symbolsImported:
332
  _1 = symbolsFromModuleList
333
    {  ()}
334 335
| 
    {let _1 =
336
                 ()
337
in
338
  ()}
339 340

symbolsFromModuleList:
341
  _1 = symbolsFromModule
342 343 344
    {  ()}
| _1 = symbolsFromModuleList _2 = symbolsFromModule
    {  ()}
345 346

symbolsFromModule:
347
  _1 = symbolList _2 = FROM _3 = globalModuleReference
348
    {  ()}
349 350

globalModuleReference:
351
  _1 = Upper _2 = assignedIdentifier
352
    {  ()}
353 354

assignedIdentifier:
355
  _1 = objectIdentifierValue
356 357 358
    {  ()}
| _1 = definedValue
    {  ()}
359 360
| 
    {let _1 =
361
                 ()
362
in
363
  ()}
364 365

symbolList:
366
  _1 = symbol
367 368 369
    {  ()}
| _1 = symbolList _2 = Comma _3 = symbol
    {  ()}
370 371

symbol:
372
  _1 = reference
373 374 375
    {  ()}
| _1 = parameterizedReference
    {  ()}
376 377

reference:
378
  _1 = Upper
379 380 381
    {  ()}
| _1 = Lower
    {  ()}
382 383

assignmentList:
384
  _1 = assignment
385 386 387
    {  ()}
| _1 = assignmentList _2 = assignment
    {  ()}
388 389

assignment:
390
  _1 = typeAssignment
391 392 393 394 395 396 397 398 399 400 401 402 403
    {  ()}
| _1 = valueAssignment
    {  ()}
| _1 = valueSetTypeAssignment
    {  ()}
| _1 = objectClassAssignment
    {  ()}
| _1 = objectAssignment
    {  ()}
| _1 = objectSetAssignment
    {  ()}
| _1 = parameterizedAssignment
    {  ()}
404 405

definedType:
406
  _1 = externalTypeReference
407 408 409 410 411 412 413
    {  ()}
| _1 = Upper
    {  ()}
| _1 = parameterizedType
    {  ()}
| _1 = parameterizedValueSetType
    {  ()}
414 415

externalTypeReference:
416
  _1 = Upper _2 = Dot _3 = Upper
417
    {  ()}
418 419

definedValue:
420
  _1 = externalValueReference
421 422 423 424 425
    {  ()}
| _1 = Lower
    {  ()}
| _1 = parameterizedValue
    {  ()}
426 427

externalValueReference:
428
  _1 = Upper _2 = Dot _3 = Lower
429
    {  ()}
430 431

typeAssignment:
432
  _1 = Upper _2 = Assignment _3 = type_x
433
    {  ()}
434 435

valueAssignment:
436
  _1 = Lower _2 = type_x _3 = Assignment _4 = value
437
    {  ()}
438 439

valueSetTypeAssignment:
440
  _1 = Upper _2 = type_x _3 = Assignment _4 = valueSet
441
    {  ()}
442 443

valueSet:
444
  _1 = LeftBrace _2 = elementSetSpecs _3 = RightBrace
445
    {  ()}
446 447

type_x:
448
  _1 = builtinType
449 450 451 452 453
    {  ()}
| _1 = referencedType
    {  ()}
| _1 = constrainedType
    {  ()}
454 455

builtinType:
456
  _1 = bitStringType
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
    {  ()}
| _1 = booleanType
    {  ()}
| _1 = characterStringType
    {  ()}
| _1 = choiceType
    {  ()}
| _1 = embeddedPDVType
    {  ()}
| _1 = enumeratedType
    {  ()}
| _1 = externalType
    {  ()}
| _1 = instanceOfType
    {  ()}
| _1 = integerType
    {  ()}
| _1 = nullType
    {  ()}
| _1 = objectClassFieldType
    {  ()}
| _1 = objectIdentifierType
    {  ()}
| _1 = octetStringType
    {  ()}
| _1 = realType
    {  ()}
| _1 = relativeOIDType
    {  ()}
| _1 = sequenceType
    {  ()}
| _1 = sequenceOfType
    {  ()}
| _1 = setType
    {  ()}
| _1 = setOfType
    {  ()}
| _1 = taggedType
    {  ()}
496 497

namedType:
498
  _1 = Lower _2 = type_x
499
    {  ()}
500 501

referencedType:
502
  _1 = definedType
503 504 505 506 507 508 509 510 511
    {  ()}
| _1 = usefulType
    {  ()}
| _1 = selectionType
    {  ()}
| _1 = typeFromObject
    {  ()}
| _1 = valueSetFromObjects
    {  ()}
512 513

value:
514
  _1 = builtinValue
515 516 517 518 519
    {  ()}
| _1 = referencedValue
    {  ()}
| _1 = objectClassFieldValue
    {  ()}
520 521

builtinValue:
522
  _1 = bitStringValue
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555
    {  ()}
| _1 = booleanValue
    {  ()}
| _1 = characterStringValue
    {  ()}
| _1 = choiceValue
    {  ()}
| _1 = embeddedPDVValue
    {  ()}
| _1 = enumeratedValue
    {  ()}
| _1 = externalValue
    {  ()}
| _1 = integerValue
    {  ()}
| _1 = nullValue
    {  ()}
| _1 = objectIdentifierValue
    {  ()}
| _1 = octetStringValue
    {  ()}
| _1 = realValue
    {  ()}
| _1 = relativeOIDValue
    {  ()}
| _1 = sequenceValue
    {  ()}
| _1 = sequenceOfValue
    {  ()}
| _1 = setValue
    {  ()}
| _1 = setOfValue
    {  ()}
556 557

referencedValue:
558
  _1 = definedValue
559 560 561
    {  ()}
| _1 = valueFromObject
    {  ()}
562 563

namedValue:
564
  _1 = Lower _2 = value
565
    {  ()}
566 567

booleanType:
568
  _1 = BOOLEAN
569
    {  ()}
570 571

booleanValue:
572
  _1 = TRUE
573 574 575
    {  ()}
| _1 = FALSE
    {  ()}
576 577

integerType:
578
  _1 = INTEGER
579 580 581
    {  ()}
| _1 = INTEGER _2 = LeftBrace _3 = namedNumberList _4 = RightBrace
    {  ()}
582 583

namedNumberList:
584
  _1 = namedNumber
585 586 587
    {  ()}
| _1 = namedNumberList _2 = Comma _3 = namedNumber
    {  ()}
588 589

namedNumber:
590
  _1 = Lower _2 = LeftParen _3 = signedNumber _4 = RightParen
591 592 593
    {  ()}
| _1 = Lower _2 = LeftParen _3 = definedValue _4 = RightParen
    {  ()}
594 595

signedNumber:
596
  _1 = Number
597 598 599
    {  ()}
| _1 = Hyphen _2 = Number
    {  ()}
600 601

integerValue:
602
  _1 = signedNumber
603 604 605
    {  ()}
| _1 = Lower
    {  ()}
606 607

enumeratedType:
608
  _1 = ENUMERATED _2 = LeftBrace _3 = enumerations _4 = RightBrace
609
    {  ()}
610 611

enumerations:
612
  _1 = rootEnumeration
613 614 615 616 617
    {  ()}
| _1 = rootEnumeration _2 = Comma _3 = Ellipsis _4 = exceptionSpec
    {  ()}
| _1 = rootEnumeration _2 = Comma _3 = Ellipsis _4 = exceptionSpec _5 = Comma _6 = additionalEnumeration
    {  ()}
618 619

rootEnumeration:
620
  _1 = enumeration
621
    {  ()}
622 623

additionalEnumeration:
624
  _1 = enumeration
625
    {  ()}
626 627

enumeration:
628
  _1 = enumerationItem
629 630 631
    {  ()}
| _1 = enumerationItem _2 = Comma _3 = enumeration
    {  ()}
632 633

enumerationItem:
634
  _1 = Lower
635 636 637
    {  ()}
| _1 = namedNumber
    {  ()}
638 639

enumeratedValue:
640
  _1 = Lower
641
    {  ()}
642 643

realType:
644
  _1 = REAL
645
    {  ()}
646 647

realValue:
648
  _1 = numericRealValue
649 650 651
    {  ()}
| _1 = specialRealValue
    {  ()}
652 653

numericRealValue:
654
  _1 = RealNumber
655 656 657 658 659
    {  ()}
| _1 = Hyphen _2 = RealNumber
    {  ()}
| _1 = sequenceValue
    {  ()}
660

661 662 663 664 665 666
specialRealValue:
  _1 = PLUS_INFINITY
    {  ()}
| _1 = MINUS_INFINITY
    {  ()}

667
bitStringType:
668
  _1 = BIT _2 = STRING
669 670 671
    {  ()}
| _1 = BIT _2 = STRING _3 = LeftBrace _4 = namedBitList _5 = RightBrace
    {  ()}
672 673

namedBitList:
674
  _1 = namedBit
675 676 677
    {  ()}
| _1 = namedBitList _2 = Comma _3 = namedBit
    {  ()}
678 679

namedBit:
680
  _1 = Lower _2 = LeftParen _3 = Number _4 = RightParen
681 682 683
    {  ()}
| _1 = Lower _2 = LeftParen _3 = definedValue _4 = RightParen
    {  ()}
684 685

bitStringValue:
686
  _1 = Bstring
687 688 689 690 691 692 693 694 695
    {  ()}
| _1 = Hstring
    {  ()}
| _1 = LeftBrace _2 = identifierList _3 = RightBrace
    {  ()}
| _1 = LeftBrace _2 = RightBrace
    {  ()}
| _1 = CONTAINING _2 = value
    {  ()}
696 697

identifierList:
698
  _1 = Lower
699 700 701
    {  ()}
| _1 = identifierList _2 = Comma _3 = Lower
    {  ()}
702

703 704 705 706
octetStringType:
  _1 = OCTET _2 = STRING
    {  ()}

707
octetStringValue:
708
  _1 = Bstring
709 710 711 712 713
    {  ()}
| _1 = Hstring
    {  ()}
| _1 = CONTAINING _2 = value
    {  ()}
714 715

nullType:
716
  _1 = NULL
717
    {  ()}
718 719

nullValue:
720
  _1 = NULL
721
    {  ()}
722

723 724 725 726 727 728 729 730
sequenceType:
  _1 = SEQUENCE _2 = LeftBrace _3 = RightBrace
    {  ()}
| _1 = SEQUENCE _2 = LeftBrace _3 = extensionAndException _4 = optionalExtensionMarker _5 = RightBrace
    {  ()}
| _1 = SEQUENCE _2 = LeftBrace _3 = componentTypeLists _4 = RightBrace
    {  ()}

731
extensionAndException:
732
  _1 = Ellipsis
733 734 735
    {  ()}
| _1 = Ellipsis _2 = exceptionSpec
    {  ()}
736

737 738 739 740 741 742 743 744 745
optionalExtensionMarker:
  _1 = Comma _2 = Ellipsis
    {  ()}
| 
    {let _1 =
                 ()
in
  ()}

746
componentTypeLists:
747
  _1 = rootComponentTypeList
748 749 750 751 752 753 754 755 756
    {  ()}
| _1 = rootComponentTypeList _2 = Comma _3 = extensionAndException _4 = extensionAdditions _5 = optionalExtensionMarker
    {  ()}
| _1 = rootComponentTypeList _2 = Comma _3 = extensionAndException _4 = extensionAdditions _5 = extensionEndMarker _6 = Comma _7 = rootComponentTypeList
    {  ()}
| _1 = extensionAndException _2 = extensionAdditions _3 = extensionEndMarker _4 = Comma _5 = rootComponentTypeList
    {  ()}
| _1 = extensionAndException _2 = extensionAdditions _3 = optionalExtensionMarker
    {  ()}
757 758

rootComponentTypeList:
759
  _1 = componentTypeList
760
    {  ()}
761 762

extensionEndMarker:
763
  _1 = Comma _2 = Ellipsis
764
    {  ()}
765

766 767
extensionAdditions:
  _1 = Comma _2 = extensionAdditionList
768
    {  ()}
769 770
| 
    {let _1 =
771
                 ()
772
in
773
  ()}
774

775 776
extensionAdditionList:
  _1 = extensionAddition
777
    {  ()}
778
| _1 = extensionAdditionList _2 = Comma _3 = extensionAddition
779
    {  ()}
780

781 782
extensionAddition:
  _1 = componentType
783
    {  ()}
784
| _1 = extensionAdditionGroup
785
    {  ()}
786

787 788
extensionAdditionGroup:
  _1 = LeftDoubleBracket _2 = versionNumber _3 = componentTypeList _4 = RightDoubleBracket
789
    {  ()}
790

791 792
versionNumber:
  
793
    {let _1 =
794
                 ()
795
in
796
  ()}
797
| _1 = Number _2 = Colon
798
    {  ()}
799

800 801 802 803
componentTypeList:
  _1 = componentType
    {  ()}
| _1 = componentTypeList _2 = Comma _3 = componentType
804
    {  ()}
805

806 807
componentType:
  _1 = namedType
808
    {  ()}
809
| _1 = namedType _2 = OPTIONAL
810
    {  ()}
811
| _1 = namedType _2 = DEFAULT _3 = value
812
    {  ()}
813
| _1 = COMPONENTS _2 = OF _3 = type_x
814
    {  ()}
815

816 817 818 819 820
sequenceValue:
  _1 = LeftBrace _2 = componentValueList _3 = RightBrace
    {  ()}
| _1 = LeftBrace _2 = RightBrace
    {  ()}
821

822 823 824 825
componentValueList:
  _1 = namedValue
    {  ()}
| _1 = componentValueList _2 = Comma _3 = namedValue
826
    {  ()}
827

828 829
sequenceOfType:
  _1 = SEQUENCE _2 = OF _3 = type_x
830
    {  ()}
831
| _1 = SEQUENCE _2 = OF _3 = namedType
832
    {  ()}
833 834

sequenceOfValue:
835
  _1 = LeftBrace _2 = valueList _3 = RightBrace
836 837 838 839 840
    {  ()}
| _1 = LeftBrace _2 = namedValueList _3 = RightBrace
    {  ()}
| _1 = LeftBrace _2 = RightBrace
    {  ()}
841 842

valueList:
843
  _1 = value
844 845 846
    {  ()}
| _1 = valueList _2 = Comma _3 = value
    {  ()}
847 848

namedValueList:
849
  _1 = namedValue
850 851 852
    {  ()}
| _1 = namedValueList _2 = Comma _3 = namedValue
    {  ()}
853 854

setType:
855
  _1 = SET _2 = LeftBrace _3 = RightBrace
856 857 858 859 860
    {   ()}
| _1 = SET _2 = LeftBrace _3 = extensionAndException _4 = optionalExtensionMarker _5 = RightBrace
    {  ()}
| _1 = SET _2 = LeftBrace _3 = componentTypeLists _4 = RightBrace
    {  ()}
861 862

setValue:
863
  _1 = LeftBrace _2 = componentValueList _3 = RightBrace
864 865 866
    {  ()}
| _1 = LeftBrace _2 = RightBrace
    {  ()}
867

868 869 870 871 872 873
setOfType:
  _1 = SET _2 = OF _3 = type_x
    {  ()}
| _1 = SET _2 = OF _3 = namedType
    {  ()}

874
setOfValue:
875
  _1 = LeftBrace _2 = valueList _3 = RightBrace
876 877 878 879 880
    {  ()}
| _1 = LeftBrace _2 = namedValueList _3 = RightBrace
    {  ()}
| _1 = LeftBrace _2 = RightBrace
    {  ()}
881

882 883
choiceType:
  _1 = CHOICE _2 = LeftBrace _3 = alternativeTypeLists _4 = RightBrace
884
    {  ()}
885

886 887
alternativeTypeLists:
  _1 = rootAlternativeTypeList
888
    {  ()}
889
| _1 = rootAlternativeTypeList _2 = Comma _3 = extensionAndException _4 = extensionAdditionAlternatives _5 = optionalExtensionMarker
890
    {  ()}
891

892 893
rootAlternativeTypeList:
  _1 = alternativeTypeList
894
    {  ()}
895

896 897
extensionAdditionAlternatives:
  _1 = Comma _2 = extensionAdditionAlternativesList
898
    {  ()}
899 900 901 902 903
| 
    {let _1 =
                 ()
in
  ()}
904

905 906
extensionAdditionAlternativesList:
  _1 = extensionAdditionAlternative
907
    {  ()}
908
| _1 = extensionAdditionAlternativesList _2 = Comma _3 = extensionAdditionAlternative
909
    {  ()}
910

911 912
extensionAdditionAlternative:
  _1 = extensionAdditionAlternativesGroup
913
    {  ()}
914
| _1 = namedType
915
    {  ()}
916

917 918
extensionAdditionAlternativesGroup:
  _1 = LeftDoubleBracket _2 = versionNumber _3 = alternativeTypeList _4 = RightDoubleBracket
919
    {  ()}
920

921 922
alternativeTypeList:
  _1 = namedType
923
    {  ()}
924
| _1 = alternativeTypeList _2 = Comma _3 = namedType
925
    {  ()}
926

927 928
choiceValue:
  _1 = Lower _2 = Colon _3 = value
929
    {  ()}
930

931 932
selectionType:
  _1 = Lower _2 = LessThan _3 = type_x
933
    {  ()}
934

935 936
taggedType:
  _1 = tag _2 = type_x
937
    {  ()}
938
| _1 = tag _2 = IMPLICIT _3 = type_x
939
    {  ()}
940
| _1 = tag _2 = EXPLICIT _3 = type_x
941
    {  ()}
942

943 944
tag:
  _1 = LeftBracket _2 = class_x _3 = classNumber _4 = RightBracket
945
    {  ()}
946

947
classNumber:
948
  _1 = Number
949
    {  ()}
950
| _1 = definedValue
951
    {  ()}
952

953 954
class_x:
  _1 = UNIVERSAL
955
    {  ()}
956
| _1 = APPLICATION
957
    {  ()}
958
| _1 = PRIVATE
959
    {  ()}
960 961 962 963 964
| 
    {let _1 =
                 ()
in
  ()}
965

966 967
embeddedPDVType:
  _1 = EMBEDDED _2 = PDV
968
    {  ()}
969

970 971
embeddedPDVValue:
  _1 = sequenceValue
972
    {  ()}
973

974 975
externalType:
  _1 = EXTERNAL
976
    {  ()}
977

978 979
externalValue:
  _1 = sequenceValue
980
    {  ()}
981

982 983
objectIdentifierType:
  _1 = OBJECT _2 = IDENTIFIER
984
    {  ()}
985

986 987
objectIdentifierValue:
  _1 = LeftBrace _2 = objIdComponentsList _3 = RightBrace
988
    {  ()}
989
| _1 = LeftBrace _2 = definedValue _3 = objIdComponentsList _4 = RightBrace
990
    {  ()}
991

992 993
objIdComponentsList:
  _1 = objIdComponents
994
    {  ()}
995
| _1 = objIdComponents _2 = objIdComponentsList
996
    {  ()}
997

998 999
objIdComponents:
  _1 = nameForm
1000
    {  ()}
1001
| _1 = numberForm
1002
    {  ()}
1003
| _1 = nameAndNumberForm
1004
    {  ()}
1005
| _1 = definedValue
1006
    {  ()}
1007

1008 1009
nameForm:
  _1 = Lower
1010
    {  ()}
1011

1012 1013
numberForm:
  _1 = Number
1014
    {  ()}
1015
| _1 = definedValue
1016
    {  ()}
1017

1018 1019
nameAndNumberForm:
  _1 = Lower _2 = LeftParen _3 = numberForm _4 = RightParen
1020
    {  ()}
1021

1022 1023
relativeOIDType:
  _1 = RELATIVE_OID
1024
    {  ()}
1025

1026 1027
relativeOIDValue:
  _1 = LeftBrace _2 = relativeOIDComponentsList _3 = RightBrace
1028
    {  ()}
1029

1030 1031
relativeOIDComponentsList:
  _1 = relativeOIDComponents
1032
    {  ()}
1033
| _1 = relativeOIDComponents _2 = relativeOIDComponentsList
1034
    {  ()}
1035

1036 1037
relativeOIDComponents:
  _1 = numberForm
1038
    {  ()}
1039
| _1 = nameAndNumberForm
1040
    {  ()}
1041
| _1 = definedValue