1package main 2 3import ( 4 "fmt" 5 "math" 6 "sort" 7 "strconv" 8) 9 10const endSymbol rune = 1114112 11 12/* The rule types inferred from the grammar are below. */ 13type pegRule uint8 14 15const ( 16 ruleUnknown pegRule = iota 17 ruleAsmFile 18 ruleStatement 19 ruleGlobalDirective 20 ruleDirective 21 ruleDirectiveName 22 ruleLocationDirective 23 ruleArgs 24 ruleArg 25 ruleQuotedArg 26 ruleQuotedText 27 ruleLabelContainingDirective 28 ruleLabelContainingDirectiveName 29 ruleSymbolArgs 30 ruleSymbolArg 31 ruleSymbolType 32 ruleDot 33 ruleTCMarker 34 ruleEscapedChar 35 ruleWS 36 ruleComment 37 ruleLabel 38 ruleSymbolName 39 ruleLocalSymbol 40 ruleLocalLabel 41 ruleLocalLabelRef 42 ruleInstruction 43 ruleInstructionName 44 ruleInstructionArg 45 ruleTOCRefHigh 46 ruleTOCRefLow 47 ruleIndirectionIndicator 48 ruleRegisterOrConstant 49 ruleMemoryRef 50 ruleSymbolRef 51 ruleBaseIndexScale 52 ruleOperator 53 ruleOffset 54 ruleSection 55 ruleSegmentRegister 56) 57 58var rul3s = [...]string{ 59 "Unknown", 60 "AsmFile", 61 "Statement", 62 "GlobalDirective", 63 "Directive", 64 "DirectiveName", 65 "LocationDirective", 66 "Args", 67 "Arg", 68 "QuotedArg", 69 "QuotedText", 70 "LabelContainingDirective", 71 "LabelContainingDirectiveName", 72 "SymbolArgs", 73 "SymbolArg", 74 "SymbolType", 75 "Dot", 76 "TCMarker", 77 "EscapedChar", 78 "WS", 79 "Comment", 80 "Label", 81 "SymbolName", 82 "LocalSymbol", 83 "LocalLabel", 84 "LocalLabelRef", 85 "Instruction", 86 "InstructionName", 87 "InstructionArg", 88 "TOCRefHigh", 89 "TOCRefLow", 90 "IndirectionIndicator", 91 "RegisterOrConstant", 92 "MemoryRef", 93 "SymbolRef", 94 "BaseIndexScale", 95 "Operator", 96 "Offset", 97 "Section", 98 "SegmentRegister", 99} 100 101type token32 struct { 102 pegRule 103 begin, end uint32 104} 105 106func (t *token32) String() string { 107 return fmt.Sprintf("\x1B[34m%v\x1B[m %v %v", rul3s[t.pegRule], t.begin, t.end) 108} 109 110type node32 struct { 111 token32 112 up, next *node32 113} 114 115func (node *node32) print(pretty bool, buffer string) { 116 var print func(node *node32, depth int) 117 print = func(node *node32, depth int) { 118 for node != nil { 119 for c := 0; c < depth; c++ { 120 fmt.Printf(" ") 121 } 122 rule := rul3s[node.pegRule] 123 quote := strconv.Quote(string(([]rune(buffer)[node.begin:node.end]))) 124 if !pretty { 125 fmt.Printf("%v %v\n", rule, quote) 126 } else { 127 fmt.Printf("\x1B[34m%v\x1B[m %v\n", rule, quote) 128 } 129 if node.up != nil { 130 print(node.up, depth+1) 131 } 132 node = node.next 133 } 134 } 135 print(node, 0) 136} 137 138func (node *node32) Print(buffer string) { 139 node.print(false, buffer) 140} 141 142func (node *node32) PrettyPrint(buffer string) { 143 node.print(true, buffer) 144} 145 146type tokens32 struct { 147 tree []token32 148} 149 150func (t *tokens32) Trim(length uint32) { 151 t.tree = t.tree[:length] 152} 153 154func (t *tokens32) Print() { 155 for _, token := range t.tree { 156 fmt.Println(token.String()) 157 } 158} 159 160func (t *tokens32) AST() *node32 { 161 type element struct { 162 node *node32 163 down *element 164 } 165 tokens := t.Tokens() 166 var stack *element 167 for _, token := range tokens { 168 if token.begin == token.end { 169 continue 170 } 171 node := &node32{token32: token} 172 for stack != nil && stack.node.begin >= token.begin && stack.node.end <= token.end { 173 stack.node.next = node.up 174 node.up = stack.node 175 stack = stack.down 176 } 177 stack = &element{node: node, down: stack} 178 } 179 if stack != nil { 180 return stack.node 181 } 182 return nil 183} 184 185func (t *tokens32) PrintSyntaxTree(buffer string) { 186 t.AST().Print(buffer) 187} 188 189func (t *tokens32) PrettyPrintSyntaxTree(buffer string) { 190 t.AST().PrettyPrint(buffer) 191} 192 193func (t *tokens32) Add(rule pegRule, begin, end, index uint32) { 194 if tree := t.tree; int(index) >= len(tree) { 195 expanded := make([]token32, 2*len(tree)) 196 copy(expanded, tree) 197 t.tree = expanded 198 } 199 t.tree[index] = token32{ 200 pegRule: rule, 201 begin: begin, 202 end: end, 203 } 204} 205 206func (t *tokens32) Tokens() []token32 { 207 return t.tree 208} 209 210type Asm struct { 211 Buffer string 212 buffer []rune 213 rules [40]func() bool 214 parse func(rule ...int) error 215 reset func() 216 Pretty bool 217 tokens32 218} 219 220func (p *Asm) Parse(rule ...int) error { 221 return p.parse(rule...) 222} 223 224func (p *Asm) Reset() { 225 p.reset() 226} 227 228type textPosition struct { 229 line, symbol int 230} 231 232type textPositionMap map[int]textPosition 233 234func translatePositions(buffer []rune, positions []int) textPositionMap { 235 length, translations, j, line, symbol := len(positions), make(textPositionMap, len(positions)), 0, 1, 0 236 sort.Ints(positions) 237 238search: 239 for i, c := range buffer { 240 if c == '\n' { 241 line, symbol = line+1, 0 242 } else { 243 symbol++ 244 } 245 if i == positions[j] { 246 translations[positions[j]] = textPosition{line, symbol} 247 for j++; j < length; j++ { 248 if i != positions[j] { 249 continue search 250 } 251 } 252 break search 253 } 254 } 255 256 return translations 257} 258 259type parseError struct { 260 p *Asm 261 max token32 262} 263 264func (e *parseError) Error() string { 265 tokens, error := []token32{e.max}, "\n" 266 positions, p := make([]int, 2*len(tokens)), 0 267 for _, token := range tokens { 268 positions[p], p = int(token.begin), p+1 269 positions[p], p = int(token.end), p+1 270 } 271 translations := translatePositions(e.p.buffer, positions) 272 format := "parse error near %v (line %v symbol %v - line %v symbol %v):\n%v\n" 273 if e.p.Pretty { 274 format = "parse error near \x1B[34m%v\x1B[m (line %v symbol %v - line %v symbol %v):\n%v\n" 275 } 276 for _, token := range tokens { 277 begin, end := int(token.begin), int(token.end) 278 error += fmt.Sprintf(format, 279 rul3s[token.pegRule], 280 translations[begin].line, translations[begin].symbol, 281 translations[end].line, translations[end].symbol, 282 strconv.Quote(string(e.p.buffer[begin:end]))) 283 } 284 285 return error 286} 287 288func (p *Asm) PrintSyntaxTree() { 289 if p.Pretty { 290 p.tokens32.PrettyPrintSyntaxTree(p.Buffer) 291 } else { 292 p.tokens32.PrintSyntaxTree(p.Buffer) 293 } 294} 295 296func (p *Asm) Init() { 297 var ( 298 max token32 299 position, tokenIndex uint32 300 buffer []rune 301 ) 302 p.reset = func() { 303 max = token32{} 304 position, tokenIndex = 0, 0 305 306 p.buffer = []rune(p.Buffer) 307 if len(p.buffer) == 0 || p.buffer[len(p.buffer)-1] != endSymbol { 308 p.buffer = append(p.buffer, endSymbol) 309 } 310 buffer = p.buffer 311 } 312 p.reset() 313 314 _rules := p.rules 315 tree := tokens32{tree: make([]token32, math.MaxInt16)} 316 p.parse = func(rule ...int) error { 317 r := 1 318 if len(rule) > 0 { 319 r = rule[0] 320 } 321 matches := p.rules[r]() 322 p.tokens32 = tree 323 if matches { 324 p.Trim(tokenIndex) 325 return nil 326 } 327 return &parseError{p, max} 328 } 329 330 add := func(rule pegRule, begin uint32) { 331 tree.Add(rule, begin, position, tokenIndex) 332 tokenIndex++ 333 if begin != position && position > max.end { 334 max = token32{rule, begin, position} 335 } 336 } 337 338 matchDot := func() bool { 339 if buffer[position] != endSymbol { 340 position++ 341 return true 342 } 343 return false 344 } 345 346 /*matchChar := func(c byte) bool { 347 if buffer[position] == c { 348 position++ 349 return true 350 } 351 return false 352 }*/ 353 354 /*matchRange := func(lower byte, upper byte) bool { 355 if c := buffer[position]; c >= lower && c <= upper { 356 position++ 357 return true 358 } 359 return false 360 }*/ 361 362 _rules = [...]func() bool{ 363 nil, 364 /* 0 AsmFile <- <(Statement* !.)> */ 365 func() bool { 366 position0, tokenIndex0 := position, tokenIndex 367 { 368 position1 := position 369 l2: 370 { 371 position3, tokenIndex3 := position, tokenIndex 372 if !_rules[ruleStatement]() { 373 goto l3 374 } 375 goto l2 376 l3: 377 position, tokenIndex = position3, tokenIndex3 378 } 379 { 380 position4, tokenIndex4 := position, tokenIndex 381 if !matchDot() { 382 goto l4 383 } 384 goto l0 385 l4: 386 position, tokenIndex = position4, tokenIndex4 387 } 388 add(ruleAsmFile, position1) 389 } 390 return true 391 l0: 392 position, tokenIndex = position0, tokenIndex0 393 return false 394 }, 395 /* 1 Statement <- <(WS? (Label / ((GlobalDirective / LocationDirective / LabelContainingDirective / Instruction / Directive / Comment / ) WS? ((Comment? '\n') / ';'))))> */ 396 func() bool { 397 position5, tokenIndex5 := position, tokenIndex 398 { 399 position6 := position 400 { 401 position7, tokenIndex7 := position, tokenIndex 402 if !_rules[ruleWS]() { 403 goto l7 404 } 405 goto l8 406 l7: 407 position, tokenIndex = position7, tokenIndex7 408 } 409 l8: 410 { 411 position9, tokenIndex9 := position, tokenIndex 412 if !_rules[ruleLabel]() { 413 goto l10 414 } 415 goto l9 416 l10: 417 position, tokenIndex = position9, tokenIndex9 418 { 419 position11, tokenIndex11 := position, tokenIndex 420 if !_rules[ruleGlobalDirective]() { 421 goto l12 422 } 423 goto l11 424 l12: 425 position, tokenIndex = position11, tokenIndex11 426 if !_rules[ruleLocationDirective]() { 427 goto l13 428 } 429 goto l11 430 l13: 431 position, tokenIndex = position11, tokenIndex11 432 if !_rules[ruleLabelContainingDirective]() { 433 goto l14 434 } 435 goto l11 436 l14: 437 position, tokenIndex = position11, tokenIndex11 438 if !_rules[ruleInstruction]() { 439 goto l15 440 } 441 goto l11 442 l15: 443 position, tokenIndex = position11, tokenIndex11 444 if !_rules[ruleDirective]() { 445 goto l16 446 } 447 goto l11 448 l16: 449 position, tokenIndex = position11, tokenIndex11 450 if !_rules[ruleComment]() { 451 goto l17 452 } 453 goto l11 454 l17: 455 position, tokenIndex = position11, tokenIndex11 456 } 457 l11: 458 { 459 position18, tokenIndex18 := position, tokenIndex 460 if !_rules[ruleWS]() { 461 goto l18 462 } 463 goto l19 464 l18: 465 position, tokenIndex = position18, tokenIndex18 466 } 467 l19: 468 { 469 position20, tokenIndex20 := position, tokenIndex 470 { 471 position22, tokenIndex22 := position, tokenIndex 472 if !_rules[ruleComment]() { 473 goto l22 474 } 475 goto l23 476 l22: 477 position, tokenIndex = position22, tokenIndex22 478 } 479 l23: 480 if buffer[position] != rune('\n') { 481 goto l21 482 } 483 position++ 484 goto l20 485 l21: 486 position, tokenIndex = position20, tokenIndex20 487 if buffer[position] != rune(';') { 488 goto l5 489 } 490 position++ 491 } 492 l20: 493 } 494 l9: 495 add(ruleStatement, position6) 496 } 497 return true 498 l5: 499 position, tokenIndex = position5, tokenIndex5 500 return false 501 }, 502 /* 2 GlobalDirective <- <((('.' ('g' / 'G') ('l' / 'L') ('o' / 'O') ('b' / 'B') ('a' / 'A') ('l' / 'L')) / ('.' ('g' / 'G') ('l' / 'L') ('o' / 'O') ('b' / 'B') ('l' / 'L'))) WS SymbolName)> */ 503 func() bool { 504 position24, tokenIndex24 := position, tokenIndex 505 { 506 position25 := position 507 { 508 position26, tokenIndex26 := position, tokenIndex 509 if buffer[position] != rune('.') { 510 goto l27 511 } 512 position++ 513 { 514 position28, tokenIndex28 := position, tokenIndex 515 if buffer[position] != rune('g') { 516 goto l29 517 } 518 position++ 519 goto l28 520 l29: 521 position, tokenIndex = position28, tokenIndex28 522 if buffer[position] != rune('G') { 523 goto l27 524 } 525 position++ 526 } 527 l28: 528 { 529 position30, tokenIndex30 := position, tokenIndex 530 if buffer[position] != rune('l') { 531 goto l31 532 } 533 position++ 534 goto l30 535 l31: 536 position, tokenIndex = position30, tokenIndex30 537 if buffer[position] != rune('L') { 538 goto l27 539 } 540 position++ 541 } 542 l30: 543 { 544 position32, tokenIndex32 := position, tokenIndex 545 if buffer[position] != rune('o') { 546 goto l33 547 } 548 position++ 549 goto l32 550 l33: 551 position, tokenIndex = position32, tokenIndex32 552 if buffer[position] != rune('O') { 553 goto l27 554 } 555 position++ 556 } 557 l32: 558 { 559 position34, tokenIndex34 := position, tokenIndex 560 if buffer[position] != rune('b') { 561 goto l35 562 } 563 position++ 564 goto l34 565 l35: 566 position, tokenIndex = position34, tokenIndex34 567 if buffer[position] != rune('B') { 568 goto l27 569 } 570 position++ 571 } 572 l34: 573 { 574 position36, tokenIndex36 := position, tokenIndex 575 if buffer[position] != rune('a') { 576 goto l37 577 } 578 position++ 579 goto l36 580 l37: 581 position, tokenIndex = position36, tokenIndex36 582 if buffer[position] != rune('A') { 583 goto l27 584 } 585 position++ 586 } 587 l36: 588 { 589 position38, tokenIndex38 := position, tokenIndex 590 if buffer[position] != rune('l') { 591 goto l39 592 } 593 position++ 594 goto l38 595 l39: 596 position, tokenIndex = position38, tokenIndex38 597 if buffer[position] != rune('L') { 598 goto l27 599 } 600 position++ 601 } 602 l38: 603 goto l26 604 l27: 605 position, tokenIndex = position26, tokenIndex26 606 if buffer[position] != rune('.') { 607 goto l24 608 } 609 position++ 610 { 611 position40, tokenIndex40 := position, tokenIndex 612 if buffer[position] != rune('g') { 613 goto l41 614 } 615 position++ 616 goto l40 617 l41: 618 position, tokenIndex = position40, tokenIndex40 619 if buffer[position] != rune('G') { 620 goto l24 621 } 622 position++ 623 } 624 l40: 625 { 626 position42, tokenIndex42 := position, tokenIndex 627 if buffer[position] != rune('l') { 628 goto l43 629 } 630 position++ 631 goto l42 632 l43: 633 position, tokenIndex = position42, tokenIndex42 634 if buffer[position] != rune('L') { 635 goto l24 636 } 637 position++ 638 } 639 l42: 640 { 641 position44, tokenIndex44 := position, tokenIndex 642 if buffer[position] != rune('o') { 643 goto l45 644 } 645 position++ 646 goto l44 647 l45: 648 position, tokenIndex = position44, tokenIndex44 649 if buffer[position] != rune('O') { 650 goto l24 651 } 652 position++ 653 } 654 l44: 655 { 656 position46, tokenIndex46 := position, tokenIndex 657 if buffer[position] != rune('b') { 658 goto l47 659 } 660 position++ 661 goto l46 662 l47: 663 position, tokenIndex = position46, tokenIndex46 664 if buffer[position] != rune('B') { 665 goto l24 666 } 667 position++ 668 } 669 l46: 670 { 671 position48, tokenIndex48 := position, tokenIndex 672 if buffer[position] != rune('l') { 673 goto l49 674 } 675 position++ 676 goto l48 677 l49: 678 position, tokenIndex = position48, tokenIndex48 679 if buffer[position] != rune('L') { 680 goto l24 681 } 682 position++ 683 } 684 l48: 685 } 686 l26: 687 if !_rules[ruleWS]() { 688 goto l24 689 } 690 if !_rules[ruleSymbolName]() { 691 goto l24 692 } 693 add(ruleGlobalDirective, position25) 694 } 695 return true 696 l24: 697 position, tokenIndex = position24, tokenIndex24 698 return false 699 }, 700 /* 3 Directive <- <('.' DirectiveName (WS Args)?)> */ 701 func() bool { 702 position50, tokenIndex50 := position, tokenIndex 703 { 704 position51 := position 705 if buffer[position] != rune('.') { 706 goto l50 707 } 708 position++ 709 if !_rules[ruleDirectiveName]() { 710 goto l50 711 } 712 { 713 position52, tokenIndex52 := position, tokenIndex 714 if !_rules[ruleWS]() { 715 goto l52 716 } 717 if !_rules[ruleArgs]() { 718 goto l52 719 } 720 goto l53 721 l52: 722 position, tokenIndex = position52, tokenIndex52 723 } 724 l53: 725 add(ruleDirective, position51) 726 } 727 return true 728 l50: 729 position, tokenIndex = position50, tokenIndex50 730 return false 731 }, 732 /* 4 DirectiveName <- <([a-z] / [A-Z] / ([0-9] / [0-9]) / '_')+> */ 733 func() bool { 734 position54, tokenIndex54 := position, tokenIndex 735 { 736 position55 := position 737 { 738 position58, tokenIndex58 := position, tokenIndex 739 if c := buffer[position]; c < rune('a') || c > rune('z') { 740 goto l59 741 } 742 position++ 743 goto l58 744 l59: 745 position, tokenIndex = position58, tokenIndex58 746 if c := buffer[position]; c < rune('A') || c > rune('Z') { 747 goto l60 748 } 749 position++ 750 goto l58 751 l60: 752 position, tokenIndex = position58, tokenIndex58 753 { 754 position62, tokenIndex62 := position, tokenIndex 755 if c := buffer[position]; c < rune('0') || c > rune('9') { 756 goto l63 757 } 758 position++ 759 goto l62 760 l63: 761 position, tokenIndex = position62, tokenIndex62 762 if c := buffer[position]; c < rune('0') || c > rune('9') { 763 goto l61 764 } 765 position++ 766 } 767 l62: 768 goto l58 769 l61: 770 position, tokenIndex = position58, tokenIndex58 771 if buffer[position] != rune('_') { 772 goto l54 773 } 774 position++ 775 } 776 l58: 777 l56: 778 { 779 position57, tokenIndex57 := position, tokenIndex 780 { 781 position64, tokenIndex64 := position, tokenIndex 782 if c := buffer[position]; c < rune('a') || c > rune('z') { 783 goto l65 784 } 785 position++ 786 goto l64 787 l65: 788 position, tokenIndex = position64, tokenIndex64 789 if c := buffer[position]; c < rune('A') || c > rune('Z') { 790 goto l66 791 } 792 position++ 793 goto l64 794 l66: 795 position, tokenIndex = position64, tokenIndex64 796 { 797 position68, tokenIndex68 := position, tokenIndex 798 if c := buffer[position]; c < rune('0') || c > rune('9') { 799 goto l69 800 } 801 position++ 802 goto l68 803 l69: 804 position, tokenIndex = position68, tokenIndex68 805 if c := buffer[position]; c < rune('0') || c > rune('9') { 806 goto l67 807 } 808 position++ 809 } 810 l68: 811 goto l64 812 l67: 813 position, tokenIndex = position64, tokenIndex64 814 if buffer[position] != rune('_') { 815 goto l57 816 } 817 position++ 818 } 819 l64: 820 goto l56 821 l57: 822 position, tokenIndex = position57, tokenIndex57 823 } 824 add(ruleDirectiveName, position55) 825 } 826 return true 827 l54: 828 position, tokenIndex = position54, tokenIndex54 829 return false 830 }, 831 /* 5 LocationDirective <- <((('.' ('f' / 'F') ('i' / 'I') ('l' / 'L') ('e' / 'E')) / ('.' ('l' / 'L') ('o' / 'O') ('c' / 'C'))) WS (!('#' / '\n') .)+)> */ 832 func() bool { 833 position70, tokenIndex70 := position, tokenIndex 834 { 835 position71 := position 836 { 837 position72, tokenIndex72 := position, tokenIndex 838 if buffer[position] != rune('.') { 839 goto l73 840 } 841 position++ 842 { 843 position74, tokenIndex74 := position, tokenIndex 844 if buffer[position] != rune('f') { 845 goto l75 846 } 847 position++ 848 goto l74 849 l75: 850 position, tokenIndex = position74, tokenIndex74 851 if buffer[position] != rune('F') { 852 goto l73 853 } 854 position++ 855 } 856 l74: 857 { 858 position76, tokenIndex76 := position, tokenIndex 859 if buffer[position] != rune('i') { 860 goto l77 861 } 862 position++ 863 goto l76 864 l77: 865 position, tokenIndex = position76, tokenIndex76 866 if buffer[position] != rune('I') { 867 goto l73 868 } 869 position++ 870 } 871 l76: 872 { 873 position78, tokenIndex78 := position, tokenIndex 874 if buffer[position] != rune('l') { 875 goto l79 876 } 877 position++ 878 goto l78 879 l79: 880 position, tokenIndex = position78, tokenIndex78 881 if buffer[position] != rune('L') { 882 goto l73 883 } 884 position++ 885 } 886 l78: 887 { 888 position80, tokenIndex80 := position, tokenIndex 889 if buffer[position] != rune('e') { 890 goto l81 891 } 892 position++ 893 goto l80 894 l81: 895 position, tokenIndex = position80, tokenIndex80 896 if buffer[position] != rune('E') { 897 goto l73 898 } 899 position++ 900 } 901 l80: 902 goto l72 903 l73: 904 position, tokenIndex = position72, tokenIndex72 905 if buffer[position] != rune('.') { 906 goto l70 907 } 908 position++ 909 { 910 position82, tokenIndex82 := position, tokenIndex 911 if buffer[position] != rune('l') { 912 goto l83 913 } 914 position++ 915 goto l82 916 l83: 917 position, tokenIndex = position82, tokenIndex82 918 if buffer[position] != rune('L') { 919 goto l70 920 } 921 position++ 922 } 923 l82: 924 { 925 position84, tokenIndex84 := position, tokenIndex 926 if buffer[position] != rune('o') { 927 goto l85 928 } 929 position++ 930 goto l84 931 l85: 932 position, tokenIndex = position84, tokenIndex84 933 if buffer[position] != rune('O') { 934 goto l70 935 } 936 position++ 937 } 938 l84: 939 { 940 position86, tokenIndex86 := position, tokenIndex 941 if buffer[position] != rune('c') { 942 goto l87 943 } 944 position++ 945 goto l86 946 l87: 947 position, tokenIndex = position86, tokenIndex86 948 if buffer[position] != rune('C') { 949 goto l70 950 } 951 position++ 952 } 953 l86: 954 } 955 l72: 956 if !_rules[ruleWS]() { 957 goto l70 958 } 959 { 960 position90, tokenIndex90 := position, tokenIndex 961 { 962 position91, tokenIndex91 := position, tokenIndex 963 if buffer[position] != rune('#') { 964 goto l92 965 } 966 position++ 967 goto l91 968 l92: 969 position, tokenIndex = position91, tokenIndex91 970 if buffer[position] != rune('\n') { 971 goto l90 972 } 973 position++ 974 } 975 l91: 976 goto l70 977 l90: 978 position, tokenIndex = position90, tokenIndex90 979 } 980 if !matchDot() { 981 goto l70 982 } 983 l88: 984 { 985 position89, tokenIndex89 := position, tokenIndex 986 { 987 position93, tokenIndex93 := position, tokenIndex 988 { 989 position94, tokenIndex94 := position, tokenIndex 990 if buffer[position] != rune('#') { 991 goto l95 992 } 993 position++ 994 goto l94 995 l95: 996 position, tokenIndex = position94, tokenIndex94 997 if buffer[position] != rune('\n') { 998 goto l93 999 } 1000 position++ 1001 } 1002 l94: 1003 goto l89 1004 l93: 1005 position, tokenIndex = position93, tokenIndex93 1006 } 1007 if !matchDot() { 1008 goto l89 1009 } 1010 goto l88 1011 l89: 1012 position, tokenIndex = position89, tokenIndex89 1013 } 1014 add(ruleLocationDirective, position71) 1015 } 1016 return true 1017 l70: 1018 position, tokenIndex = position70, tokenIndex70 1019 return false 1020 }, 1021 /* 6 Args <- <(Arg (WS? ',' WS? Arg)*)> */ 1022 func() bool { 1023 position96, tokenIndex96 := position, tokenIndex 1024 { 1025 position97 := position 1026 if !_rules[ruleArg]() { 1027 goto l96 1028 } 1029 l98: 1030 { 1031 position99, tokenIndex99 := position, tokenIndex 1032 { 1033 position100, tokenIndex100 := position, tokenIndex 1034 if !_rules[ruleWS]() { 1035 goto l100 1036 } 1037 goto l101 1038 l100: 1039 position, tokenIndex = position100, tokenIndex100 1040 } 1041 l101: 1042 if buffer[position] != rune(',') { 1043 goto l99 1044 } 1045 position++ 1046 { 1047 position102, tokenIndex102 := position, tokenIndex 1048 if !_rules[ruleWS]() { 1049 goto l102 1050 } 1051 goto l103 1052 l102: 1053 position, tokenIndex = position102, tokenIndex102 1054 } 1055 l103: 1056 if !_rules[ruleArg]() { 1057 goto l99 1058 } 1059 goto l98 1060 l99: 1061 position, tokenIndex = position99, tokenIndex99 1062 } 1063 add(ruleArgs, position97) 1064 } 1065 return true 1066 l96: 1067 position, tokenIndex = position96, tokenIndex96 1068 return false 1069 }, 1070 /* 7 Arg <- <(QuotedArg / ([0-9] / [0-9] / ([a-z] / [A-Z]) / '%' / '+' / '-' / '_' / '@' / '.')*)> */ 1071 func() bool { 1072 { 1073 position105 := position 1074 { 1075 position106, tokenIndex106 := position, tokenIndex 1076 if !_rules[ruleQuotedArg]() { 1077 goto l107 1078 } 1079 goto l106 1080 l107: 1081 position, tokenIndex = position106, tokenIndex106 1082 l108: 1083 { 1084 position109, tokenIndex109 := position, tokenIndex 1085 { 1086 position110, tokenIndex110 := position, tokenIndex 1087 if c := buffer[position]; c < rune('0') || c > rune('9') { 1088 goto l111 1089 } 1090 position++ 1091 goto l110 1092 l111: 1093 position, tokenIndex = position110, tokenIndex110 1094 if c := buffer[position]; c < rune('0') || c > rune('9') { 1095 goto l112 1096 } 1097 position++ 1098 goto l110 1099 l112: 1100 position, tokenIndex = position110, tokenIndex110 1101 { 1102 position114, tokenIndex114 := position, tokenIndex 1103 if c := buffer[position]; c < rune('a') || c > rune('z') { 1104 goto l115 1105 } 1106 position++ 1107 goto l114 1108 l115: 1109 position, tokenIndex = position114, tokenIndex114 1110 if c := buffer[position]; c < rune('A') || c > rune('Z') { 1111 goto l113 1112 } 1113 position++ 1114 } 1115 l114: 1116 goto l110 1117 l113: 1118 position, tokenIndex = position110, tokenIndex110 1119 if buffer[position] != rune('%') { 1120 goto l116 1121 } 1122 position++ 1123 goto l110 1124 l116: 1125 position, tokenIndex = position110, tokenIndex110 1126 if buffer[position] != rune('+') { 1127 goto l117 1128 } 1129 position++ 1130 goto l110 1131 l117: 1132 position, tokenIndex = position110, tokenIndex110 1133 if buffer[position] != rune('-') { 1134 goto l118 1135 } 1136 position++ 1137 goto l110 1138 l118: 1139 position, tokenIndex = position110, tokenIndex110 1140 if buffer[position] != rune('_') { 1141 goto l119 1142 } 1143 position++ 1144 goto l110 1145 l119: 1146 position, tokenIndex = position110, tokenIndex110 1147 if buffer[position] != rune('@') { 1148 goto l120 1149 } 1150 position++ 1151 goto l110 1152 l120: 1153 position, tokenIndex = position110, tokenIndex110 1154 if buffer[position] != rune('.') { 1155 goto l109 1156 } 1157 position++ 1158 } 1159 l110: 1160 goto l108 1161 l109: 1162 position, tokenIndex = position109, tokenIndex109 1163 } 1164 } 1165 l106: 1166 add(ruleArg, position105) 1167 } 1168 return true 1169 }, 1170 /* 8 QuotedArg <- <('"' QuotedText '"')> */ 1171 func() bool { 1172 position121, tokenIndex121 := position, tokenIndex 1173 { 1174 position122 := position 1175 if buffer[position] != rune('"') { 1176 goto l121 1177 } 1178 position++ 1179 if !_rules[ruleQuotedText]() { 1180 goto l121 1181 } 1182 if buffer[position] != rune('"') { 1183 goto l121 1184 } 1185 position++ 1186 add(ruleQuotedArg, position122) 1187 } 1188 return true 1189 l121: 1190 position, tokenIndex = position121, tokenIndex121 1191 return false 1192 }, 1193 /* 9 QuotedText <- <(EscapedChar / (!'"' .))*> */ 1194 func() bool { 1195 { 1196 position124 := position 1197 l125: 1198 { 1199 position126, tokenIndex126 := position, tokenIndex 1200 { 1201 position127, tokenIndex127 := position, tokenIndex 1202 if !_rules[ruleEscapedChar]() { 1203 goto l128 1204 } 1205 goto l127 1206 l128: 1207 position, tokenIndex = position127, tokenIndex127 1208 { 1209 position129, tokenIndex129 := position, tokenIndex 1210 if buffer[position] != rune('"') { 1211 goto l129 1212 } 1213 position++ 1214 goto l126 1215 l129: 1216 position, tokenIndex = position129, tokenIndex129 1217 } 1218 if !matchDot() { 1219 goto l126 1220 } 1221 } 1222 l127: 1223 goto l125 1224 l126: 1225 position, tokenIndex = position126, tokenIndex126 1226 } 1227 add(ruleQuotedText, position124) 1228 } 1229 return true 1230 }, 1231 /* 10 LabelContainingDirective <- <(LabelContainingDirectiveName WS SymbolArgs)> */ 1232 func() bool { 1233 position130, tokenIndex130 := position, tokenIndex 1234 { 1235 position131 := position 1236 if !_rules[ruleLabelContainingDirectiveName]() { 1237 goto l130 1238 } 1239 if !_rules[ruleWS]() { 1240 goto l130 1241 } 1242 if !_rules[ruleSymbolArgs]() { 1243 goto l130 1244 } 1245 add(ruleLabelContainingDirective, position131) 1246 } 1247 return true 1248 l130: 1249 position, tokenIndex = position130, tokenIndex130 1250 return false 1251 }, 1252 /* 11 LabelContainingDirectiveName <- <(('.' ('l' / 'L') ('o' / 'O') ('n' / 'N') ('g' / 'G')) / ('.' ('s' / 'S') ('e' / 'E') ('t' / 'T')) / ('.' '8' ('b' / 'B') ('y' / 'Y') ('t' / 'T') ('e' / 'E')) / ('.' '4' ('b' / 'B') ('y' / 'Y') ('t' / 'T') ('e' / 'E')) / ('.' ('q' / 'Q') ('u' / 'U') ('a' / 'A') ('d' / 'D')) / ('.' ('t' / 'T') ('c' / 'C')) / ('.' ('l' / 'L') ('o' / 'O') ('c' / 'C') ('a' / 'A') ('l' / 'L') ('e' / 'E') ('n' / 'N') ('t' / 'T') ('r' / 'R') ('y' / 'Y')) / ('.' ('s' / 'S') ('i' / 'I') ('z' / 'Z') ('e' / 'E')) / ('.' ('t' / 'T') ('y' / 'Y') ('p' / 'P') ('e' / 'E')))> */ 1253 func() bool { 1254 position132, tokenIndex132 := position, tokenIndex 1255 { 1256 position133 := position 1257 { 1258 position134, tokenIndex134 := position, tokenIndex 1259 if buffer[position] != rune('.') { 1260 goto l135 1261 } 1262 position++ 1263 { 1264 position136, tokenIndex136 := position, tokenIndex 1265 if buffer[position] != rune('l') { 1266 goto l137 1267 } 1268 position++ 1269 goto l136 1270 l137: 1271 position, tokenIndex = position136, tokenIndex136 1272 if buffer[position] != rune('L') { 1273 goto l135 1274 } 1275 position++ 1276 } 1277 l136: 1278 { 1279 position138, tokenIndex138 := position, tokenIndex 1280 if buffer[position] != rune('o') { 1281 goto l139 1282 } 1283 position++ 1284 goto l138 1285 l139: 1286 position, tokenIndex = position138, tokenIndex138 1287 if buffer[position] != rune('O') { 1288 goto l135 1289 } 1290 position++ 1291 } 1292 l138: 1293 { 1294 position140, tokenIndex140 := position, tokenIndex 1295 if buffer[position] != rune('n') { 1296 goto l141 1297 } 1298 position++ 1299 goto l140 1300 l141: 1301 position, tokenIndex = position140, tokenIndex140 1302 if buffer[position] != rune('N') { 1303 goto l135 1304 } 1305 position++ 1306 } 1307 l140: 1308 { 1309 position142, tokenIndex142 := position, tokenIndex 1310 if buffer[position] != rune('g') { 1311 goto l143 1312 } 1313 position++ 1314 goto l142 1315 l143: 1316 position, tokenIndex = position142, tokenIndex142 1317 if buffer[position] != rune('G') { 1318 goto l135 1319 } 1320 position++ 1321 } 1322 l142: 1323 goto l134 1324 l135: 1325 position, tokenIndex = position134, tokenIndex134 1326 if buffer[position] != rune('.') { 1327 goto l144 1328 } 1329 position++ 1330 { 1331 position145, tokenIndex145 := position, tokenIndex 1332 if buffer[position] != rune('s') { 1333 goto l146 1334 } 1335 position++ 1336 goto l145 1337 l146: 1338 position, tokenIndex = position145, tokenIndex145 1339 if buffer[position] != rune('S') { 1340 goto l144 1341 } 1342 position++ 1343 } 1344 l145: 1345 { 1346 position147, tokenIndex147 := position, tokenIndex 1347 if buffer[position] != rune('e') { 1348 goto l148 1349 } 1350 position++ 1351 goto l147 1352 l148: 1353 position, tokenIndex = position147, tokenIndex147 1354 if buffer[position] != rune('E') { 1355 goto l144 1356 } 1357 position++ 1358 } 1359 l147: 1360 { 1361 position149, tokenIndex149 := position, tokenIndex 1362 if buffer[position] != rune('t') { 1363 goto l150 1364 } 1365 position++ 1366 goto l149 1367 l150: 1368 position, tokenIndex = position149, tokenIndex149 1369 if buffer[position] != rune('T') { 1370 goto l144 1371 } 1372 position++ 1373 } 1374 l149: 1375 goto l134 1376 l144: 1377 position, tokenIndex = position134, tokenIndex134 1378 if buffer[position] != rune('.') { 1379 goto l151 1380 } 1381 position++ 1382 if buffer[position] != rune('8') { 1383 goto l151 1384 } 1385 position++ 1386 { 1387 position152, tokenIndex152 := position, tokenIndex 1388 if buffer[position] != rune('b') { 1389 goto l153 1390 } 1391 position++ 1392 goto l152 1393 l153: 1394 position, tokenIndex = position152, tokenIndex152 1395 if buffer[position] != rune('B') { 1396 goto l151 1397 } 1398 position++ 1399 } 1400 l152: 1401 { 1402 position154, tokenIndex154 := position, tokenIndex 1403 if buffer[position] != rune('y') { 1404 goto l155 1405 } 1406 position++ 1407 goto l154 1408 l155: 1409 position, tokenIndex = position154, tokenIndex154 1410 if buffer[position] != rune('Y') { 1411 goto l151 1412 } 1413 position++ 1414 } 1415 l154: 1416 { 1417 position156, tokenIndex156 := position, tokenIndex 1418 if buffer[position] != rune('t') { 1419 goto l157 1420 } 1421 position++ 1422 goto l156 1423 l157: 1424 position, tokenIndex = position156, tokenIndex156 1425 if buffer[position] != rune('T') { 1426 goto l151 1427 } 1428 position++ 1429 } 1430 l156: 1431 { 1432 position158, tokenIndex158 := position, tokenIndex 1433 if buffer[position] != rune('e') { 1434 goto l159 1435 } 1436 position++ 1437 goto l158 1438 l159: 1439 position, tokenIndex = position158, tokenIndex158 1440 if buffer[position] != rune('E') { 1441 goto l151 1442 } 1443 position++ 1444 } 1445 l158: 1446 goto l134 1447 l151: 1448 position, tokenIndex = position134, tokenIndex134 1449 if buffer[position] != rune('.') { 1450 goto l160 1451 } 1452 position++ 1453 if buffer[position] != rune('4') { 1454 goto l160 1455 } 1456 position++ 1457 { 1458 position161, tokenIndex161 := position, tokenIndex 1459 if buffer[position] != rune('b') { 1460 goto l162 1461 } 1462 position++ 1463 goto l161 1464 l162: 1465 position, tokenIndex = position161, tokenIndex161 1466 if buffer[position] != rune('B') { 1467 goto l160 1468 } 1469 position++ 1470 } 1471 l161: 1472 { 1473 position163, tokenIndex163 := position, tokenIndex 1474 if buffer[position] != rune('y') { 1475 goto l164 1476 } 1477 position++ 1478 goto l163 1479 l164: 1480 position, tokenIndex = position163, tokenIndex163 1481 if buffer[position] != rune('Y') { 1482 goto l160 1483 } 1484 position++ 1485 } 1486 l163: 1487 { 1488 position165, tokenIndex165 := position, tokenIndex 1489 if buffer[position] != rune('t') { 1490 goto l166 1491 } 1492 position++ 1493 goto l165 1494 l166: 1495 position, tokenIndex = position165, tokenIndex165 1496 if buffer[position] != rune('T') { 1497 goto l160 1498 } 1499 position++ 1500 } 1501 l165: 1502 { 1503 position167, tokenIndex167 := position, tokenIndex 1504 if buffer[position] != rune('e') { 1505 goto l168 1506 } 1507 position++ 1508 goto l167 1509 l168: 1510 position, tokenIndex = position167, tokenIndex167 1511 if buffer[position] != rune('E') { 1512 goto l160 1513 } 1514 position++ 1515 } 1516 l167: 1517 goto l134 1518 l160: 1519 position, tokenIndex = position134, tokenIndex134 1520 if buffer[position] != rune('.') { 1521 goto l169 1522 } 1523 position++ 1524 { 1525 position170, tokenIndex170 := position, tokenIndex 1526 if buffer[position] != rune('q') { 1527 goto l171 1528 } 1529 position++ 1530 goto l170 1531 l171: 1532 position, tokenIndex = position170, tokenIndex170 1533 if buffer[position] != rune('Q') { 1534 goto l169 1535 } 1536 position++ 1537 } 1538 l170: 1539 { 1540 position172, tokenIndex172 := position, tokenIndex 1541 if buffer[position] != rune('u') { 1542 goto l173 1543 } 1544 position++ 1545 goto l172 1546 l173: 1547 position, tokenIndex = position172, tokenIndex172 1548 if buffer[position] != rune('U') { 1549 goto l169 1550 } 1551 position++ 1552 } 1553 l172: 1554 { 1555 position174, tokenIndex174 := position, tokenIndex 1556 if buffer[position] != rune('a') { 1557 goto l175 1558 } 1559 position++ 1560 goto l174 1561 l175: 1562 position, tokenIndex = position174, tokenIndex174 1563 if buffer[position] != rune('A') { 1564 goto l169 1565 } 1566 position++ 1567 } 1568 l174: 1569 { 1570 position176, tokenIndex176 := position, tokenIndex 1571 if buffer[position] != rune('d') { 1572 goto l177 1573 } 1574 position++ 1575 goto l176 1576 l177: 1577 position, tokenIndex = position176, tokenIndex176 1578 if buffer[position] != rune('D') { 1579 goto l169 1580 } 1581 position++ 1582 } 1583 l176: 1584 goto l134 1585 l169: 1586 position, tokenIndex = position134, tokenIndex134 1587 if buffer[position] != rune('.') { 1588 goto l178 1589 } 1590 position++ 1591 { 1592 position179, tokenIndex179 := position, tokenIndex 1593 if buffer[position] != rune('t') { 1594 goto l180 1595 } 1596 position++ 1597 goto l179 1598 l180: 1599 position, tokenIndex = position179, tokenIndex179 1600 if buffer[position] != rune('T') { 1601 goto l178 1602 } 1603 position++ 1604 } 1605 l179: 1606 { 1607 position181, tokenIndex181 := position, tokenIndex 1608 if buffer[position] != rune('c') { 1609 goto l182 1610 } 1611 position++ 1612 goto l181 1613 l182: 1614 position, tokenIndex = position181, tokenIndex181 1615 if buffer[position] != rune('C') { 1616 goto l178 1617 } 1618 position++ 1619 } 1620 l181: 1621 goto l134 1622 l178: 1623 position, tokenIndex = position134, tokenIndex134 1624 if buffer[position] != rune('.') { 1625 goto l183 1626 } 1627 position++ 1628 { 1629 position184, tokenIndex184 := position, tokenIndex 1630 if buffer[position] != rune('l') { 1631 goto l185 1632 } 1633 position++ 1634 goto l184 1635 l185: 1636 position, tokenIndex = position184, tokenIndex184 1637 if buffer[position] != rune('L') { 1638 goto l183 1639 } 1640 position++ 1641 } 1642 l184: 1643 { 1644 position186, tokenIndex186 := position, tokenIndex 1645 if buffer[position] != rune('o') { 1646 goto l187 1647 } 1648 position++ 1649 goto l186 1650 l187: 1651 position, tokenIndex = position186, tokenIndex186 1652 if buffer[position] != rune('O') { 1653 goto l183 1654 } 1655 position++ 1656 } 1657 l186: 1658 { 1659 position188, tokenIndex188 := position, tokenIndex 1660 if buffer[position] != rune('c') { 1661 goto l189 1662 } 1663 position++ 1664 goto l188 1665 l189: 1666 position, tokenIndex = position188, tokenIndex188 1667 if buffer[position] != rune('C') { 1668 goto l183 1669 } 1670 position++ 1671 } 1672 l188: 1673 { 1674 position190, tokenIndex190 := position, tokenIndex 1675 if buffer[position] != rune('a') { 1676 goto l191 1677 } 1678 position++ 1679 goto l190 1680 l191: 1681 position, tokenIndex = position190, tokenIndex190 1682 if buffer[position] != rune('A') { 1683 goto l183 1684 } 1685 position++ 1686 } 1687 l190: 1688 { 1689 position192, tokenIndex192 := position, tokenIndex 1690 if buffer[position] != rune('l') { 1691 goto l193 1692 } 1693 position++ 1694 goto l192 1695 l193: 1696 position, tokenIndex = position192, tokenIndex192 1697 if buffer[position] != rune('L') { 1698 goto l183 1699 } 1700 position++ 1701 } 1702 l192: 1703 { 1704 position194, tokenIndex194 := position, tokenIndex 1705 if buffer[position] != rune('e') { 1706 goto l195 1707 } 1708 position++ 1709 goto l194 1710 l195: 1711 position, tokenIndex = position194, tokenIndex194 1712 if buffer[position] != rune('E') { 1713 goto l183 1714 } 1715 position++ 1716 } 1717 l194: 1718 { 1719 position196, tokenIndex196 := position, tokenIndex 1720 if buffer[position] != rune('n') { 1721 goto l197 1722 } 1723 position++ 1724 goto l196 1725 l197: 1726 position, tokenIndex = position196, tokenIndex196 1727 if buffer[position] != rune('N') { 1728 goto l183 1729 } 1730 position++ 1731 } 1732 l196: 1733 { 1734 position198, tokenIndex198 := position, tokenIndex 1735 if buffer[position] != rune('t') { 1736 goto l199 1737 } 1738 position++ 1739 goto l198 1740 l199: 1741 position, tokenIndex = position198, tokenIndex198 1742 if buffer[position] != rune('T') { 1743 goto l183 1744 } 1745 position++ 1746 } 1747 l198: 1748 { 1749 position200, tokenIndex200 := position, tokenIndex 1750 if buffer[position] != rune('r') { 1751 goto l201 1752 } 1753 position++ 1754 goto l200 1755 l201: 1756 position, tokenIndex = position200, tokenIndex200 1757 if buffer[position] != rune('R') { 1758 goto l183 1759 } 1760 position++ 1761 } 1762 l200: 1763 { 1764 position202, tokenIndex202 := position, tokenIndex 1765 if buffer[position] != rune('y') { 1766 goto l203 1767 } 1768 position++ 1769 goto l202 1770 l203: 1771 position, tokenIndex = position202, tokenIndex202 1772 if buffer[position] != rune('Y') { 1773 goto l183 1774 } 1775 position++ 1776 } 1777 l202: 1778 goto l134 1779 l183: 1780 position, tokenIndex = position134, tokenIndex134 1781 if buffer[position] != rune('.') { 1782 goto l204 1783 } 1784 position++ 1785 { 1786 position205, tokenIndex205 := position, tokenIndex 1787 if buffer[position] != rune('s') { 1788 goto l206 1789 } 1790 position++ 1791 goto l205 1792 l206: 1793 position, tokenIndex = position205, tokenIndex205 1794 if buffer[position] != rune('S') { 1795 goto l204 1796 } 1797 position++ 1798 } 1799 l205: 1800 { 1801 position207, tokenIndex207 := position, tokenIndex 1802 if buffer[position] != rune('i') { 1803 goto l208 1804 } 1805 position++ 1806 goto l207 1807 l208: 1808 position, tokenIndex = position207, tokenIndex207 1809 if buffer[position] != rune('I') { 1810 goto l204 1811 } 1812 position++ 1813 } 1814 l207: 1815 { 1816 position209, tokenIndex209 := position, tokenIndex 1817 if buffer[position] != rune('z') { 1818 goto l210 1819 } 1820 position++ 1821 goto l209 1822 l210: 1823 position, tokenIndex = position209, tokenIndex209 1824 if buffer[position] != rune('Z') { 1825 goto l204 1826 } 1827 position++ 1828 } 1829 l209: 1830 { 1831 position211, tokenIndex211 := position, tokenIndex 1832 if buffer[position] != rune('e') { 1833 goto l212 1834 } 1835 position++ 1836 goto l211 1837 l212: 1838 position, tokenIndex = position211, tokenIndex211 1839 if buffer[position] != rune('E') { 1840 goto l204 1841 } 1842 position++ 1843 } 1844 l211: 1845 goto l134 1846 l204: 1847 position, tokenIndex = position134, tokenIndex134 1848 if buffer[position] != rune('.') { 1849 goto l132 1850 } 1851 position++ 1852 { 1853 position213, tokenIndex213 := position, tokenIndex 1854 if buffer[position] != rune('t') { 1855 goto l214 1856 } 1857 position++ 1858 goto l213 1859 l214: 1860 position, tokenIndex = position213, tokenIndex213 1861 if buffer[position] != rune('T') { 1862 goto l132 1863 } 1864 position++ 1865 } 1866 l213: 1867 { 1868 position215, tokenIndex215 := position, tokenIndex 1869 if buffer[position] != rune('y') { 1870 goto l216 1871 } 1872 position++ 1873 goto l215 1874 l216: 1875 position, tokenIndex = position215, tokenIndex215 1876 if buffer[position] != rune('Y') { 1877 goto l132 1878 } 1879 position++ 1880 } 1881 l215: 1882 { 1883 position217, tokenIndex217 := position, tokenIndex 1884 if buffer[position] != rune('p') { 1885 goto l218 1886 } 1887 position++ 1888 goto l217 1889 l218: 1890 position, tokenIndex = position217, tokenIndex217 1891 if buffer[position] != rune('P') { 1892 goto l132 1893 } 1894 position++ 1895 } 1896 l217: 1897 { 1898 position219, tokenIndex219 := position, tokenIndex 1899 if buffer[position] != rune('e') { 1900 goto l220 1901 } 1902 position++ 1903 goto l219 1904 l220: 1905 position, tokenIndex = position219, tokenIndex219 1906 if buffer[position] != rune('E') { 1907 goto l132 1908 } 1909 position++ 1910 } 1911 l219: 1912 } 1913 l134: 1914 add(ruleLabelContainingDirectiveName, position133) 1915 } 1916 return true 1917 l132: 1918 position, tokenIndex = position132, tokenIndex132 1919 return false 1920 }, 1921 /* 12 SymbolArgs <- <(SymbolArg (WS? ',' WS? SymbolArg)*)> */ 1922 func() bool { 1923 position221, tokenIndex221 := position, tokenIndex 1924 { 1925 position222 := position 1926 if !_rules[ruleSymbolArg]() { 1927 goto l221 1928 } 1929 l223: 1930 { 1931 position224, tokenIndex224 := position, tokenIndex 1932 { 1933 position225, tokenIndex225 := position, tokenIndex 1934 if !_rules[ruleWS]() { 1935 goto l225 1936 } 1937 goto l226 1938 l225: 1939 position, tokenIndex = position225, tokenIndex225 1940 } 1941 l226: 1942 if buffer[position] != rune(',') { 1943 goto l224 1944 } 1945 position++ 1946 { 1947 position227, tokenIndex227 := position, tokenIndex 1948 if !_rules[ruleWS]() { 1949 goto l227 1950 } 1951 goto l228 1952 l227: 1953 position, tokenIndex = position227, tokenIndex227 1954 } 1955 l228: 1956 if !_rules[ruleSymbolArg]() { 1957 goto l224 1958 } 1959 goto l223 1960 l224: 1961 position, tokenIndex = position224, tokenIndex224 1962 } 1963 add(ruleSymbolArgs, position222) 1964 } 1965 return true 1966 l221: 1967 position, tokenIndex = position221, tokenIndex221 1968 return false 1969 }, 1970 /* 13 SymbolArg <- <(Offset / SymbolType / ((Offset / LocalSymbol / SymbolName / Dot) WS? Operator WS? (Offset / LocalSymbol / SymbolName)) / (LocalSymbol TCMarker?) / (SymbolName Offset) / (SymbolName TCMarker?))> */ 1971 func() bool { 1972 position229, tokenIndex229 := position, tokenIndex 1973 { 1974 position230 := position 1975 { 1976 position231, tokenIndex231 := position, tokenIndex 1977 if !_rules[ruleOffset]() { 1978 goto l232 1979 } 1980 goto l231 1981 l232: 1982 position, tokenIndex = position231, tokenIndex231 1983 if !_rules[ruleSymbolType]() { 1984 goto l233 1985 } 1986 goto l231 1987 l233: 1988 position, tokenIndex = position231, tokenIndex231 1989 { 1990 position235, tokenIndex235 := position, tokenIndex 1991 if !_rules[ruleOffset]() { 1992 goto l236 1993 } 1994 goto l235 1995 l236: 1996 position, tokenIndex = position235, tokenIndex235 1997 if !_rules[ruleLocalSymbol]() { 1998 goto l237 1999 } 2000 goto l235 2001 l237: 2002 position, tokenIndex = position235, tokenIndex235 2003 if !_rules[ruleSymbolName]() { 2004 goto l238 2005 } 2006 goto l235 2007 l238: 2008 position, tokenIndex = position235, tokenIndex235 2009 if !_rules[ruleDot]() { 2010 goto l234 2011 } 2012 } 2013 l235: 2014 { 2015 position239, tokenIndex239 := position, tokenIndex 2016 if !_rules[ruleWS]() { 2017 goto l239 2018 } 2019 goto l240 2020 l239: 2021 position, tokenIndex = position239, tokenIndex239 2022 } 2023 l240: 2024 if !_rules[ruleOperator]() { 2025 goto l234 2026 } 2027 { 2028 position241, tokenIndex241 := position, tokenIndex 2029 if !_rules[ruleWS]() { 2030 goto l241 2031 } 2032 goto l242 2033 l241: 2034 position, tokenIndex = position241, tokenIndex241 2035 } 2036 l242: 2037 { 2038 position243, tokenIndex243 := position, tokenIndex 2039 if !_rules[ruleOffset]() { 2040 goto l244 2041 } 2042 goto l243 2043 l244: 2044 position, tokenIndex = position243, tokenIndex243 2045 if !_rules[ruleLocalSymbol]() { 2046 goto l245 2047 } 2048 goto l243 2049 l245: 2050 position, tokenIndex = position243, tokenIndex243 2051 if !_rules[ruleSymbolName]() { 2052 goto l234 2053 } 2054 } 2055 l243: 2056 goto l231 2057 l234: 2058 position, tokenIndex = position231, tokenIndex231 2059 if !_rules[ruleLocalSymbol]() { 2060 goto l246 2061 } 2062 { 2063 position247, tokenIndex247 := position, tokenIndex 2064 if !_rules[ruleTCMarker]() { 2065 goto l247 2066 } 2067 goto l248 2068 l247: 2069 position, tokenIndex = position247, tokenIndex247 2070 } 2071 l248: 2072 goto l231 2073 l246: 2074 position, tokenIndex = position231, tokenIndex231 2075 if !_rules[ruleSymbolName]() { 2076 goto l249 2077 } 2078 if !_rules[ruleOffset]() { 2079 goto l249 2080 } 2081 goto l231 2082 l249: 2083 position, tokenIndex = position231, tokenIndex231 2084 if !_rules[ruleSymbolName]() { 2085 goto l229 2086 } 2087 { 2088 position250, tokenIndex250 := position, tokenIndex 2089 if !_rules[ruleTCMarker]() { 2090 goto l250 2091 } 2092 goto l251 2093 l250: 2094 position, tokenIndex = position250, tokenIndex250 2095 } 2096 l251: 2097 } 2098 l231: 2099 add(ruleSymbolArg, position230) 2100 } 2101 return true 2102 l229: 2103 position, tokenIndex = position229, tokenIndex229 2104 return false 2105 }, 2106 /* 14 SymbolType <- <(('@' 'f' 'u' 'n' 'c' 't' 'i' 'o' 'n') / ('@' 'o' 'b' 'j' 'e' 'c' 't'))> */ 2107 func() bool { 2108 position252, tokenIndex252 := position, tokenIndex 2109 { 2110 position253 := position 2111 { 2112 position254, tokenIndex254 := position, tokenIndex 2113 if buffer[position] != rune('@') { 2114 goto l255 2115 } 2116 position++ 2117 if buffer[position] != rune('f') { 2118 goto l255 2119 } 2120 position++ 2121 if buffer[position] != rune('u') { 2122 goto l255 2123 } 2124 position++ 2125 if buffer[position] != rune('n') { 2126 goto l255 2127 } 2128 position++ 2129 if buffer[position] != rune('c') { 2130 goto l255 2131 } 2132 position++ 2133 if buffer[position] != rune('t') { 2134 goto l255 2135 } 2136 position++ 2137 if buffer[position] != rune('i') { 2138 goto l255 2139 } 2140 position++ 2141 if buffer[position] != rune('o') { 2142 goto l255 2143 } 2144 position++ 2145 if buffer[position] != rune('n') { 2146 goto l255 2147 } 2148 position++ 2149 goto l254 2150 l255: 2151 position, tokenIndex = position254, tokenIndex254 2152 if buffer[position] != rune('@') { 2153 goto l252 2154 } 2155 position++ 2156 if buffer[position] != rune('o') { 2157 goto l252 2158 } 2159 position++ 2160 if buffer[position] != rune('b') { 2161 goto l252 2162 } 2163 position++ 2164 if buffer[position] != rune('j') { 2165 goto l252 2166 } 2167 position++ 2168 if buffer[position] != rune('e') { 2169 goto l252 2170 } 2171 position++ 2172 if buffer[position] != rune('c') { 2173 goto l252 2174 } 2175 position++ 2176 if buffer[position] != rune('t') { 2177 goto l252 2178 } 2179 position++ 2180 } 2181 l254: 2182 add(ruleSymbolType, position253) 2183 } 2184 return true 2185 l252: 2186 position, tokenIndex = position252, tokenIndex252 2187 return false 2188 }, 2189 /* 15 Dot <- <'.'> */ 2190 func() bool { 2191 position256, tokenIndex256 := position, tokenIndex 2192 { 2193 position257 := position 2194 if buffer[position] != rune('.') { 2195 goto l256 2196 } 2197 position++ 2198 add(ruleDot, position257) 2199 } 2200 return true 2201 l256: 2202 position, tokenIndex = position256, tokenIndex256 2203 return false 2204 }, 2205 /* 16 TCMarker <- <('[' 'T' 'C' ']')> */ 2206 func() bool { 2207 position258, tokenIndex258 := position, tokenIndex 2208 { 2209 position259 := position 2210 if buffer[position] != rune('[') { 2211 goto l258 2212 } 2213 position++ 2214 if buffer[position] != rune('T') { 2215 goto l258 2216 } 2217 position++ 2218 if buffer[position] != rune('C') { 2219 goto l258 2220 } 2221 position++ 2222 if buffer[position] != rune(']') { 2223 goto l258 2224 } 2225 position++ 2226 add(ruleTCMarker, position259) 2227 } 2228 return true 2229 l258: 2230 position, tokenIndex = position258, tokenIndex258 2231 return false 2232 }, 2233 /* 17 EscapedChar <- <('\\' .)> */ 2234 func() bool { 2235 position260, tokenIndex260 := position, tokenIndex 2236 { 2237 position261 := position 2238 if buffer[position] != rune('\\') { 2239 goto l260 2240 } 2241 position++ 2242 if !matchDot() { 2243 goto l260 2244 } 2245 add(ruleEscapedChar, position261) 2246 } 2247 return true 2248 l260: 2249 position, tokenIndex = position260, tokenIndex260 2250 return false 2251 }, 2252 /* 18 WS <- <(' ' / '\t')+> */ 2253 func() bool { 2254 position262, tokenIndex262 := position, tokenIndex 2255 { 2256 position263 := position 2257 { 2258 position266, tokenIndex266 := position, tokenIndex 2259 if buffer[position] != rune(' ') { 2260 goto l267 2261 } 2262 position++ 2263 goto l266 2264 l267: 2265 position, tokenIndex = position266, tokenIndex266 2266 if buffer[position] != rune('\t') { 2267 goto l262 2268 } 2269 position++ 2270 } 2271 l266: 2272 l264: 2273 { 2274 position265, tokenIndex265 := position, tokenIndex 2275 { 2276 position268, tokenIndex268 := position, tokenIndex 2277 if buffer[position] != rune(' ') { 2278 goto l269 2279 } 2280 position++ 2281 goto l268 2282 l269: 2283 position, tokenIndex = position268, tokenIndex268 2284 if buffer[position] != rune('\t') { 2285 goto l265 2286 } 2287 position++ 2288 } 2289 l268: 2290 goto l264 2291 l265: 2292 position, tokenIndex = position265, tokenIndex265 2293 } 2294 add(ruleWS, position263) 2295 } 2296 return true 2297 l262: 2298 position, tokenIndex = position262, tokenIndex262 2299 return false 2300 }, 2301 /* 19 Comment <- <('#' (!'\n' .)*)> */ 2302 func() bool { 2303 position270, tokenIndex270 := position, tokenIndex 2304 { 2305 position271 := position 2306 if buffer[position] != rune('#') { 2307 goto l270 2308 } 2309 position++ 2310 l272: 2311 { 2312 position273, tokenIndex273 := position, tokenIndex 2313 { 2314 position274, tokenIndex274 := position, tokenIndex 2315 if buffer[position] != rune('\n') { 2316 goto l274 2317 } 2318 position++ 2319 goto l273 2320 l274: 2321 position, tokenIndex = position274, tokenIndex274 2322 } 2323 if !matchDot() { 2324 goto l273 2325 } 2326 goto l272 2327 l273: 2328 position, tokenIndex = position273, tokenIndex273 2329 } 2330 add(ruleComment, position271) 2331 } 2332 return true 2333 l270: 2334 position, tokenIndex = position270, tokenIndex270 2335 return false 2336 }, 2337 /* 20 Label <- <((LocalSymbol / LocalLabel / SymbolName) ':')> */ 2338 func() bool { 2339 position275, tokenIndex275 := position, tokenIndex 2340 { 2341 position276 := position 2342 { 2343 position277, tokenIndex277 := position, tokenIndex 2344 if !_rules[ruleLocalSymbol]() { 2345 goto l278 2346 } 2347 goto l277 2348 l278: 2349 position, tokenIndex = position277, tokenIndex277 2350 if !_rules[ruleLocalLabel]() { 2351 goto l279 2352 } 2353 goto l277 2354 l279: 2355 position, tokenIndex = position277, tokenIndex277 2356 if !_rules[ruleSymbolName]() { 2357 goto l275 2358 } 2359 } 2360 l277: 2361 if buffer[position] != rune(':') { 2362 goto l275 2363 } 2364 position++ 2365 add(ruleLabel, position276) 2366 } 2367 return true 2368 l275: 2369 position, tokenIndex = position275, tokenIndex275 2370 return false 2371 }, 2372 /* 21 SymbolName <- <(([a-z] / [A-Z] / '.' / '_') ([a-z] / [A-Z] / '.' / ([0-9] / [0-9]) / '$' / '_')*)> */ 2373 func() bool { 2374 position280, tokenIndex280 := position, tokenIndex 2375 { 2376 position281 := position 2377 { 2378 position282, tokenIndex282 := position, tokenIndex 2379 if c := buffer[position]; c < rune('a') || c > rune('z') { 2380 goto l283 2381 } 2382 position++ 2383 goto l282 2384 l283: 2385 position, tokenIndex = position282, tokenIndex282 2386 if c := buffer[position]; c < rune('A') || c > rune('Z') { 2387 goto l284 2388 } 2389 position++ 2390 goto l282 2391 l284: 2392 position, tokenIndex = position282, tokenIndex282 2393 if buffer[position] != rune('.') { 2394 goto l285 2395 } 2396 position++ 2397 goto l282 2398 l285: 2399 position, tokenIndex = position282, tokenIndex282 2400 if buffer[position] != rune('_') { 2401 goto l280 2402 } 2403 position++ 2404 } 2405 l282: 2406 l286: 2407 { 2408 position287, tokenIndex287 := position, tokenIndex 2409 { 2410 position288, tokenIndex288 := position, tokenIndex 2411 if c := buffer[position]; c < rune('a') || c > rune('z') { 2412 goto l289 2413 } 2414 position++ 2415 goto l288 2416 l289: 2417 position, tokenIndex = position288, tokenIndex288 2418 if c := buffer[position]; c < rune('A') || c > rune('Z') { 2419 goto l290 2420 } 2421 position++ 2422 goto l288 2423 l290: 2424 position, tokenIndex = position288, tokenIndex288 2425 if buffer[position] != rune('.') { 2426 goto l291 2427 } 2428 position++ 2429 goto l288 2430 l291: 2431 position, tokenIndex = position288, tokenIndex288 2432 { 2433 position293, tokenIndex293 := position, tokenIndex 2434 if c := buffer[position]; c < rune('0') || c > rune('9') { 2435 goto l294 2436 } 2437 position++ 2438 goto l293 2439 l294: 2440 position, tokenIndex = position293, tokenIndex293 2441 if c := buffer[position]; c < rune('0') || c > rune('9') { 2442 goto l292 2443 } 2444 position++ 2445 } 2446 l293: 2447 goto l288 2448 l292: 2449 position, tokenIndex = position288, tokenIndex288 2450 if buffer[position] != rune('$') { 2451 goto l295 2452 } 2453 position++ 2454 goto l288 2455 l295: 2456 position, tokenIndex = position288, tokenIndex288 2457 if buffer[position] != rune('_') { 2458 goto l287 2459 } 2460 position++ 2461 } 2462 l288: 2463 goto l286 2464 l287: 2465 position, tokenIndex = position287, tokenIndex287 2466 } 2467 add(ruleSymbolName, position281) 2468 } 2469 return true 2470 l280: 2471 position, tokenIndex = position280, tokenIndex280 2472 return false 2473 }, 2474 /* 22 LocalSymbol <- <('.' 'L' ([a-z] / [A-Z] / '.' / ([0-9] / [0-9]) / '$' / '_')+)> */ 2475 func() bool { 2476 position296, tokenIndex296 := position, tokenIndex 2477 { 2478 position297 := position 2479 if buffer[position] != rune('.') { 2480 goto l296 2481 } 2482 position++ 2483 if buffer[position] != rune('L') { 2484 goto l296 2485 } 2486 position++ 2487 { 2488 position300, tokenIndex300 := position, tokenIndex 2489 if c := buffer[position]; c < rune('a') || c > rune('z') { 2490 goto l301 2491 } 2492 position++ 2493 goto l300 2494 l301: 2495 position, tokenIndex = position300, tokenIndex300 2496 if c := buffer[position]; c < rune('A') || c > rune('Z') { 2497 goto l302 2498 } 2499 position++ 2500 goto l300 2501 l302: 2502 position, tokenIndex = position300, tokenIndex300 2503 if buffer[position] != rune('.') { 2504 goto l303 2505 } 2506 position++ 2507 goto l300 2508 l303: 2509 position, tokenIndex = position300, tokenIndex300 2510 { 2511 position305, tokenIndex305 := position, tokenIndex 2512 if c := buffer[position]; c < rune('0') || c > rune('9') { 2513 goto l306 2514 } 2515 position++ 2516 goto l305 2517 l306: 2518 position, tokenIndex = position305, tokenIndex305 2519 if c := buffer[position]; c < rune('0') || c > rune('9') { 2520 goto l304 2521 } 2522 position++ 2523 } 2524 l305: 2525 goto l300 2526 l304: 2527 position, tokenIndex = position300, tokenIndex300 2528 if buffer[position] != rune('$') { 2529 goto l307 2530 } 2531 position++ 2532 goto l300 2533 l307: 2534 position, tokenIndex = position300, tokenIndex300 2535 if buffer[position] != rune('_') { 2536 goto l296 2537 } 2538 position++ 2539 } 2540 l300: 2541 l298: 2542 { 2543 position299, tokenIndex299 := position, tokenIndex 2544 { 2545 position308, tokenIndex308 := position, tokenIndex 2546 if c := buffer[position]; c < rune('a') || c > rune('z') { 2547 goto l309 2548 } 2549 position++ 2550 goto l308 2551 l309: 2552 position, tokenIndex = position308, tokenIndex308 2553 if c := buffer[position]; c < rune('A') || c > rune('Z') { 2554 goto l310 2555 } 2556 position++ 2557 goto l308 2558 l310: 2559 position, tokenIndex = position308, tokenIndex308 2560 if buffer[position] != rune('.') { 2561 goto l311 2562 } 2563 position++ 2564 goto l308 2565 l311: 2566 position, tokenIndex = position308, tokenIndex308 2567 { 2568 position313, tokenIndex313 := position, tokenIndex 2569 if c := buffer[position]; c < rune('0') || c > rune('9') { 2570 goto l314 2571 } 2572 position++ 2573 goto l313 2574 l314: 2575 position, tokenIndex = position313, tokenIndex313 2576 if c := buffer[position]; c < rune('0') || c > rune('9') { 2577 goto l312 2578 } 2579 position++ 2580 } 2581 l313: 2582 goto l308 2583 l312: 2584 position, tokenIndex = position308, tokenIndex308 2585 if buffer[position] != rune('$') { 2586 goto l315 2587 } 2588 position++ 2589 goto l308 2590 l315: 2591 position, tokenIndex = position308, tokenIndex308 2592 if buffer[position] != rune('_') { 2593 goto l299 2594 } 2595 position++ 2596 } 2597 l308: 2598 goto l298 2599 l299: 2600 position, tokenIndex = position299, tokenIndex299 2601 } 2602 add(ruleLocalSymbol, position297) 2603 } 2604 return true 2605 l296: 2606 position, tokenIndex = position296, tokenIndex296 2607 return false 2608 }, 2609 /* 23 LocalLabel <- <([0-9] ([0-9] / '$')*)> */ 2610 func() bool { 2611 position316, tokenIndex316 := position, tokenIndex 2612 { 2613 position317 := position 2614 if c := buffer[position]; c < rune('0') || c > rune('9') { 2615 goto l316 2616 } 2617 position++ 2618 l318: 2619 { 2620 position319, tokenIndex319 := position, tokenIndex 2621 { 2622 position320, tokenIndex320 := position, tokenIndex 2623 if c := buffer[position]; c < rune('0') || c > rune('9') { 2624 goto l321 2625 } 2626 position++ 2627 goto l320 2628 l321: 2629 position, tokenIndex = position320, tokenIndex320 2630 if buffer[position] != rune('$') { 2631 goto l319 2632 } 2633 position++ 2634 } 2635 l320: 2636 goto l318 2637 l319: 2638 position, tokenIndex = position319, tokenIndex319 2639 } 2640 add(ruleLocalLabel, position317) 2641 } 2642 return true 2643 l316: 2644 position, tokenIndex = position316, tokenIndex316 2645 return false 2646 }, 2647 /* 24 LocalLabelRef <- <([0-9] ([0-9] / '$')* ('b' / 'f'))> */ 2648 func() bool { 2649 position322, tokenIndex322 := position, tokenIndex 2650 { 2651 position323 := position 2652 if c := buffer[position]; c < rune('0') || c > rune('9') { 2653 goto l322 2654 } 2655 position++ 2656 l324: 2657 { 2658 position325, tokenIndex325 := position, tokenIndex 2659 { 2660 position326, tokenIndex326 := position, tokenIndex 2661 if c := buffer[position]; c < rune('0') || c > rune('9') { 2662 goto l327 2663 } 2664 position++ 2665 goto l326 2666 l327: 2667 position, tokenIndex = position326, tokenIndex326 2668 if buffer[position] != rune('$') { 2669 goto l325 2670 } 2671 position++ 2672 } 2673 l326: 2674 goto l324 2675 l325: 2676 position, tokenIndex = position325, tokenIndex325 2677 } 2678 { 2679 position328, tokenIndex328 := position, tokenIndex 2680 if buffer[position] != rune('b') { 2681 goto l329 2682 } 2683 position++ 2684 goto l328 2685 l329: 2686 position, tokenIndex = position328, tokenIndex328 2687 if buffer[position] != rune('f') { 2688 goto l322 2689 } 2690 position++ 2691 } 2692 l328: 2693 add(ruleLocalLabelRef, position323) 2694 } 2695 return true 2696 l322: 2697 position, tokenIndex = position322, tokenIndex322 2698 return false 2699 }, 2700 /* 25 Instruction <- <(InstructionName (WS InstructionArg (WS? ',' WS? InstructionArg)*)?)> */ 2701 func() bool { 2702 position330, tokenIndex330 := position, tokenIndex 2703 { 2704 position331 := position 2705 if !_rules[ruleInstructionName]() { 2706 goto l330 2707 } 2708 { 2709 position332, tokenIndex332 := position, tokenIndex 2710 if !_rules[ruleWS]() { 2711 goto l332 2712 } 2713 if !_rules[ruleInstructionArg]() { 2714 goto l332 2715 } 2716 l334: 2717 { 2718 position335, tokenIndex335 := position, tokenIndex 2719 { 2720 position336, tokenIndex336 := position, tokenIndex 2721 if !_rules[ruleWS]() { 2722 goto l336 2723 } 2724 goto l337 2725 l336: 2726 position, tokenIndex = position336, tokenIndex336 2727 } 2728 l337: 2729 if buffer[position] != rune(',') { 2730 goto l335 2731 } 2732 position++ 2733 { 2734 position338, tokenIndex338 := position, tokenIndex 2735 if !_rules[ruleWS]() { 2736 goto l338 2737 } 2738 goto l339 2739 l338: 2740 position, tokenIndex = position338, tokenIndex338 2741 } 2742 l339: 2743 if !_rules[ruleInstructionArg]() { 2744 goto l335 2745 } 2746 goto l334 2747 l335: 2748 position, tokenIndex = position335, tokenIndex335 2749 } 2750 goto l333 2751 l332: 2752 position, tokenIndex = position332, tokenIndex332 2753 } 2754 l333: 2755 add(ruleInstruction, position331) 2756 } 2757 return true 2758 l330: 2759 position, tokenIndex = position330, tokenIndex330 2760 return false 2761 }, 2762 /* 26 InstructionName <- <(([a-z] / [A-Z]) ([a-z] / [A-Z] / ([0-9] / [0-9]))* ('.' / '+' / '-')?)> */ 2763 func() bool { 2764 position340, tokenIndex340 := position, tokenIndex 2765 { 2766 position341 := position 2767 { 2768 position342, tokenIndex342 := position, tokenIndex 2769 if c := buffer[position]; c < rune('a') || c > rune('z') { 2770 goto l343 2771 } 2772 position++ 2773 goto l342 2774 l343: 2775 position, tokenIndex = position342, tokenIndex342 2776 if c := buffer[position]; c < rune('A') || c > rune('Z') { 2777 goto l340 2778 } 2779 position++ 2780 } 2781 l342: 2782 l344: 2783 { 2784 position345, tokenIndex345 := position, tokenIndex 2785 { 2786 position346, tokenIndex346 := position, tokenIndex 2787 if c := buffer[position]; c < rune('a') || c > rune('z') { 2788 goto l347 2789 } 2790 position++ 2791 goto l346 2792 l347: 2793 position, tokenIndex = position346, tokenIndex346 2794 if c := buffer[position]; c < rune('A') || c > rune('Z') { 2795 goto l348 2796 } 2797 position++ 2798 goto l346 2799 l348: 2800 position, tokenIndex = position346, tokenIndex346 2801 { 2802 position349, tokenIndex349 := position, tokenIndex 2803 if c := buffer[position]; c < rune('0') || c > rune('9') { 2804 goto l350 2805 } 2806 position++ 2807 goto l349 2808 l350: 2809 position, tokenIndex = position349, tokenIndex349 2810 if c := buffer[position]; c < rune('0') || c > rune('9') { 2811 goto l345 2812 } 2813 position++ 2814 } 2815 l349: 2816 } 2817 l346: 2818 goto l344 2819 l345: 2820 position, tokenIndex = position345, tokenIndex345 2821 } 2822 { 2823 position351, tokenIndex351 := position, tokenIndex 2824 { 2825 position353, tokenIndex353 := position, tokenIndex 2826 if buffer[position] != rune('.') { 2827 goto l354 2828 } 2829 position++ 2830 goto l353 2831 l354: 2832 position, tokenIndex = position353, tokenIndex353 2833 if buffer[position] != rune('+') { 2834 goto l355 2835 } 2836 position++ 2837 goto l353 2838 l355: 2839 position, tokenIndex = position353, tokenIndex353 2840 if buffer[position] != rune('-') { 2841 goto l351 2842 } 2843 position++ 2844 } 2845 l353: 2846 goto l352 2847 l351: 2848 position, tokenIndex = position351, tokenIndex351 2849 } 2850 l352: 2851 add(ruleInstructionName, position341) 2852 } 2853 return true 2854 l340: 2855 position, tokenIndex = position340, tokenIndex340 2856 return false 2857 }, 2858 /* 27 InstructionArg <- <(IndirectionIndicator? (RegisterOrConstant / LocalLabelRef / TOCRefHigh / TOCRefLow / MemoryRef))> */ 2859 func() bool { 2860 position356, tokenIndex356 := position, tokenIndex 2861 { 2862 position357 := position 2863 { 2864 position358, tokenIndex358 := position, tokenIndex 2865 if !_rules[ruleIndirectionIndicator]() { 2866 goto l358 2867 } 2868 goto l359 2869 l358: 2870 position, tokenIndex = position358, tokenIndex358 2871 } 2872 l359: 2873 { 2874 position360, tokenIndex360 := position, tokenIndex 2875 if !_rules[ruleRegisterOrConstant]() { 2876 goto l361 2877 } 2878 goto l360 2879 l361: 2880 position, tokenIndex = position360, tokenIndex360 2881 if !_rules[ruleLocalLabelRef]() { 2882 goto l362 2883 } 2884 goto l360 2885 l362: 2886 position, tokenIndex = position360, tokenIndex360 2887 if !_rules[ruleTOCRefHigh]() { 2888 goto l363 2889 } 2890 goto l360 2891 l363: 2892 position, tokenIndex = position360, tokenIndex360 2893 if !_rules[ruleTOCRefLow]() { 2894 goto l364 2895 } 2896 goto l360 2897 l364: 2898 position, tokenIndex = position360, tokenIndex360 2899 if !_rules[ruleMemoryRef]() { 2900 goto l356 2901 } 2902 } 2903 l360: 2904 add(ruleInstructionArg, position357) 2905 } 2906 return true 2907 l356: 2908 position, tokenIndex = position356, tokenIndex356 2909 return false 2910 }, 2911 /* 28 TOCRefHigh <- <('.' 'T' 'O' 'C' '.' '-' (('0' 'b') / ('.' 'L' ([a-z] / [A-Z] / '_' / [0-9])+)) ('@' ('h' / 'H') ('a' / 'A')))> */ 2912 func() bool { 2913 position365, tokenIndex365 := position, tokenIndex 2914 { 2915 position366 := position 2916 if buffer[position] != rune('.') { 2917 goto l365 2918 } 2919 position++ 2920 if buffer[position] != rune('T') { 2921 goto l365 2922 } 2923 position++ 2924 if buffer[position] != rune('O') { 2925 goto l365 2926 } 2927 position++ 2928 if buffer[position] != rune('C') { 2929 goto l365 2930 } 2931 position++ 2932 if buffer[position] != rune('.') { 2933 goto l365 2934 } 2935 position++ 2936 if buffer[position] != rune('-') { 2937 goto l365 2938 } 2939 position++ 2940 { 2941 position367, tokenIndex367 := position, tokenIndex 2942 if buffer[position] != rune('0') { 2943 goto l368 2944 } 2945 position++ 2946 if buffer[position] != rune('b') { 2947 goto l368 2948 } 2949 position++ 2950 goto l367 2951 l368: 2952 position, tokenIndex = position367, tokenIndex367 2953 if buffer[position] != rune('.') { 2954 goto l365 2955 } 2956 position++ 2957 if buffer[position] != rune('L') { 2958 goto l365 2959 } 2960 position++ 2961 { 2962 position371, tokenIndex371 := position, tokenIndex 2963 if c := buffer[position]; c < rune('a') || c > rune('z') { 2964 goto l372 2965 } 2966 position++ 2967 goto l371 2968 l372: 2969 position, tokenIndex = position371, tokenIndex371 2970 if c := buffer[position]; c < rune('A') || c > rune('Z') { 2971 goto l373 2972 } 2973 position++ 2974 goto l371 2975 l373: 2976 position, tokenIndex = position371, tokenIndex371 2977 if buffer[position] != rune('_') { 2978 goto l374 2979 } 2980 position++ 2981 goto l371 2982 l374: 2983 position, tokenIndex = position371, tokenIndex371 2984 if c := buffer[position]; c < rune('0') || c > rune('9') { 2985 goto l365 2986 } 2987 position++ 2988 } 2989 l371: 2990 l369: 2991 { 2992 position370, tokenIndex370 := position, tokenIndex 2993 { 2994 position375, tokenIndex375 := position, tokenIndex 2995 if c := buffer[position]; c < rune('a') || c > rune('z') { 2996 goto l376 2997 } 2998 position++ 2999 goto l375 3000 l376: 3001 position, tokenIndex = position375, tokenIndex375 3002 if c := buffer[position]; c < rune('A') || c > rune('Z') { 3003 goto l377 3004 } 3005 position++ 3006 goto l375 3007 l377: 3008 position, tokenIndex = position375, tokenIndex375 3009 if buffer[position] != rune('_') { 3010 goto l378 3011 } 3012 position++ 3013 goto l375 3014 l378: 3015 position, tokenIndex = position375, tokenIndex375 3016 if c := buffer[position]; c < rune('0') || c > rune('9') { 3017 goto l370 3018 } 3019 position++ 3020 } 3021 l375: 3022 goto l369 3023 l370: 3024 position, tokenIndex = position370, tokenIndex370 3025 } 3026 } 3027 l367: 3028 if buffer[position] != rune('@') { 3029 goto l365 3030 } 3031 position++ 3032 { 3033 position379, tokenIndex379 := position, tokenIndex 3034 if buffer[position] != rune('h') { 3035 goto l380 3036 } 3037 position++ 3038 goto l379 3039 l380: 3040 position, tokenIndex = position379, tokenIndex379 3041 if buffer[position] != rune('H') { 3042 goto l365 3043 } 3044 position++ 3045 } 3046 l379: 3047 { 3048 position381, tokenIndex381 := position, tokenIndex 3049 if buffer[position] != rune('a') { 3050 goto l382 3051 } 3052 position++ 3053 goto l381 3054 l382: 3055 position, tokenIndex = position381, tokenIndex381 3056 if buffer[position] != rune('A') { 3057 goto l365 3058 } 3059 position++ 3060 } 3061 l381: 3062 add(ruleTOCRefHigh, position366) 3063 } 3064 return true 3065 l365: 3066 position, tokenIndex = position365, tokenIndex365 3067 return false 3068 }, 3069 /* 29 TOCRefLow <- <('.' 'T' 'O' 'C' '.' '-' (('0' 'b') / ('.' 'L' ([a-z] / [A-Z] / '_' / [0-9])+)) ('@' ('l' / 'L')))> */ 3070 func() bool { 3071 position383, tokenIndex383 := position, tokenIndex 3072 { 3073 position384 := position 3074 if buffer[position] != rune('.') { 3075 goto l383 3076 } 3077 position++ 3078 if buffer[position] != rune('T') { 3079 goto l383 3080 } 3081 position++ 3082 if buffer[position] != rune('O') { 3083 goto l383 3084 } 3085 position++ 3086 if buffer[position] != rune('C') { 3087 goto l383 3088 } 3089 position++ 3090 if buffer[position] != rune('.') { 3091 goto l383 3092 } 3093 position++ 3094 if buffer[position] != rune('-') { 3095 goto l383 3096 } 3097 position++ 3098 { 3099 position385, tokenIndex385 := position, tokenIndex 3100 if buffer[position] != rune('0') { 3101 goto l386 3102 } 3103 position++ 3104 if buffer[position] != rune('b') { 3105 goto l386 3106 } 3107 position++ 3108 goto l385 3109 l386: 3110 position, tokenIndex = position385, tokenIndex385 3111 if buffer[position] != rune('.') { 3112 goto l383 3113 } 3114 position++ 3115 if buffer[position] != rune('L') { 3116 goto l383 3117 } 3118 position++ 3119 { 3120 position389, tokenIndex389 := position, tokenIndex 3121 if c := buffer[position]; c < rune('a') || c > rune('z') { 3122 goto l390 3123 } 3124 position++ 3125 goto l389 3126 l390: 3127 position, tokenIndex = position389, tokenIndex389 3128 if c := buffer[position]; c < rune('A') || c > rune('Z') { 3129 goto l391 3130 } 3131 position++ 3132 goto l389 3133 l391: 3134 position, tokenIndex = position389, tokenIndex389 3135 if buffer[position] != rune('_') { 3136 goto l392 3137 } 3138 position++ 3139 goto l389 3140 l392: 3141 position, tokenIndex = position389, tokenIndex389 3142 if c := buffer[position]; c < rune('0') || c > rune('9') { 3143 goto l383 3144 } 3145 position++ 3146 } 3147 l389: 3148 l387: 3149 { 3150 position388, tokenIndex388 := position, tokenIndex 3151 { 3152 position393, tokenIndex393 := position, tokenIndex 3153 if c := buffer[position]; c < rune('a') || c > rune('z') { 3154 goto l394 3155 } 3156 position++ 3157 goto l393 3158 l394: 3159 position, tokenIndex = position393, tokenIndex393 3160 if c := buffer[position]; c < rune('A') || c > rune('Z') { 3161 goto l395 3162 } 3163 position++ 3164 goto l393 3165 l395: 3166 position, tokenIndex = position393, tokenIndex393 3167 if buffer[position] != rune('_') { 3168 goto l396 3169 } 3170 position++ 3171 goto l393 3172 l396: 3173 position, tokenIndex = position393, tokenIndex393 3174 if c := buffer[position]; c < rune('0') || c > rune('9') { 3175 goto l388 3176 } 3177 position++ 3178 } 3179 l393: 3180 goto l387 3181 l388: 3182 position, tokenIndex = position388, tokenIndex388 3183 } 3184 } 3185 l385: 3186 if buffer[position] != rune('@') { 3187 goto l383 3188 } 3189 position++ 3190 { 3191 position397, tokenIndex397 := position, tokenIndex 3192 if buffer[position] != rune('l') { 3193 goto l398 3194 } 3195 position++ 3196 goto l397 3197 l398: 3198 position, tokenIndex = position397, tokenIndex397 3199 if buffer[position] != rune('L') { 3200 goto l383 3201 } 3202 position++ 3203 } 3204 l397: 3205 add(ruleTOCRefLow, position384) 3206 } 3207 return true 3208 l383: 3209 position, tokenIndex = position383, tokenIndex383 3210 return false 3211 }, 3212 /* 30 IndirectionIndicator <- <'*'> */ 3213 func() bool { 3214 position399, tokenIndex399 := position, tokenIndex 3215 { 3216 position400 := position 3217 if buffer[position] != rune('*') { 3218 goto l399 3219 } 3220 position++ 3221 add(ruleIndirectionIndicator, position400) 3222 } 3223 return true 3224 l399: 3225 position, tokenIndex = position399, tokenIndex399 3226 return false 3227 }, 3228 /* 31 RegisterOrConstant <- <((('%' ([a-z] / [A-Z]) ([a-z] / [A-Z] / ([0-9] / [0-9]))*) / ('$'? ((Offset Offset) / Offset))) !('f' / 'b' / ':' / '(' / '+' / '-'))> */ 3229 func() bool { 3230 position401, tokenIndex401 := position, tokenIndex 3231 { 3232 position402 := position 3233 { 3234 position403, tokenIndex403 := position, tokenIndex 3235 if buffer[position] != rune('%') { 3236 goto l404 3237 } 3238 position++ 3239 { 3240 position405, tokenIndex405 := position, tokenIndex 3241 if c := buffer[position]; c < rune('a') || c > rune('z') { 3242 goto l406 3243 } 3244 position++ 3245 goto l405 3246 l406: 3247 position, tokenIndex = position405, tokenIndex405 3248 if c := buffer[position]; c < rune('A') || c > rune('Z') { 3249 goto l404 3250 } 3251 position++ 3252 } 3253 l405: 3254 l407: 3255 { 3256 position408, tokenIndex408 := position, tokenIndex 3257 { 3258 position409, tokenIndex409 := position, tokenIndex 3259 if c := buffer[position]; c < rune('a') || c > rune('z') { 3260 goto l410 3261 } 3262 position++ 3263 goto l409 3264 l410: 3265 position, tokenIndex = position409, tokenIndex409 3266 if c := buffer[position]; c < rune('A') || c > rune('Z') { 3267 goto l411 3268 } 3269 position++ 3270 goto l409 3271 l411: 3272 position, tokenIndex = position409, tokenIndex409 3273 { 3274 position412, tokenIndex412 := position, tokenIndex 3275 if c := buffer[position]; c < rune('0') || c > rune('9') { 3276 goto l413 3277 } 3278 position++ 3279 goto l412 3280 l413: 3281 position, tokenIndex = position412, tokenIndex412 3282 if c := buffer[position]; c < rune('0') || c > rune('9') { 3283 goto l408 3284 } 3285 position++ 3286 } 3287 l412: 3288 } 3289 l409: 3290 goto l407 3291 l408: 3292 position, tokenIndex = position408, tokenIndex408 3293 } 3294 goto l403 3295 l404: 3296 position, tokenIndex = position403, tokenIndex403 3297 { 3298 position414, tokenIndex414 := position, tokenIndex 3299 if buffer[position] != rune('$') { 3300 goto l414 3301 } 3302 position++ 3303 goto l415 3304 l414: 3305 position, tokenIndex = position414, tokenIndex414 3306 } 3307 l415: 3308 { 3309 position416, tokenIndex416 := position, tokenIndex 3310 if !_rules[ruleOffset]() { 3311 goto l417 3312 } 3313 if !_rules[ruleOffset]() { 3314 goto l417 3315 } 3316 goto l416 3317 l417: 3318 position, tokenIndex = position416, tokenIndex416 3319 if !_rules[ruleOffset]() { 3320 goto l401 3321 } 3322 } 3323 l416: 3324 } 3325 l403: 3326 { 3327 position418, tokenIndex418 := position, tokenIndex 3328 { 3329 position419, tokenIndex419 := position, tokenIndex 3330 if buffer[position] != rune('f') { 3331 goto l420 3332 } 3333 position++ 3334 goto l419 3335 l420: 3336 position, tokenIndex = position419, tokenIndex419 3337 if buffer[position] != rune('b') { 3338 goto l421 3339 } 3340 position++ 3341 goto l419 3342 l421: 3343 position, tokenIndex = position419, tokenIndex419 3344 if buffer[position] != rune(':') { 3345 goto l422 3346 } 3347 position++ 3348 goto l419 3349 l422: 3350 position, tokenIndex = position419, tokenIndex419 3351 if buffer[position] != rune('(') { 3352 goto l423 3353 } 3354 position++ 3355 goto l419 3356 l423: 3357 position, tokenIndex = position419, tokenIndex419 3358 if buffer[position] != rune('+') { 3359 goto l424 3360 } 3361 position++ 3362 goto l419 3363 l424: 3364 position, tokenIndex = position419, tokenIndex419 3365 if buffer[position] != rune('-') { 3366 goto l418 3367 } 3368 position++ 3369 } 3370 l419: 3371 goto l401 3372 l418: 3373 position, tokenIndex = position418, tokenIndex418 3374 } 3375 add(ruleRegisterOrConstant, position402) 3376 } 3377 return true 3378 l401: 3379 position, tokenIndex = position401, tokenIndex401 3380 return false 3381 }, 3382 /* 32 MemoryRef <- <((SymbolRef BaseIndexScale) / SymbolRef / (Offset* BaseIndexScale) / (SegmentRegister Offset BaseIndexScale) / (SegmentRegister BaseIndexScale) / (SegmentRegister Offset) / BaseIndexScale)> */ 3383 func() bool { 3384 position425, tokenIndex425 := position, tokenIndex 3385 { 3386 position426 := position 3387 { 3388 position427, tokenIndex427 := position, tokenIndex 3389 if !_rules[ruleSymbolRef]() { 3390 goto l428 3391 } 3392 if !_rules[ruleBaseIndexScale]() { 3393 goto l428 3394 } 3395 goto l427 3396 l428: 3397 position, tokenIndex = position427, tokenIndex427 3398 if !_rules[ruleSymbolRef]() { 3399 goto l429 3400 } 3401 goto l427 3402 l429: 3403 position, tokenIndex = position427, tokenIndex427 3404 l431: 3405 { 3406 position432, tokenIndex432 := position, tokenIndex 3407 if !_rules[ruleOffset]() { 3408 goto l432 3409 } 3410 goto l431 3411 l432: 3412 position, tokenIndex = position432, tokenIndex432 3413 } 3414 if !_rules[ruleBaseIndexScale]() { 3415 goto l430 3416 } 3417 goto l427 3418 l430: 3419 position, tokenIndex = position427, tokenIndex427 3420 if !_rules[ruleSegmentRegister]() { 3421 goto l433 3422 } 3423 if !_rules[ruleOffset]() { 3424 goto l433 3425 } 3426 if !_rules[ruleBaseIndexScale]() { 3427 goto l433 3428 } 3429 goto l427 3430 l433: 3431 position, tokenIndex = position427, tokenIndex427 3432 if !_rules[ruleSegmentRegister]() { 3433 goto l434 3434 } 3435 if !_rules[ruleBaseIndexScale]() { 3436 goto l434 3437 } 3438 goto l427 3439 l434: 3440 position, tokenIndex = position427, tokenIndex427 3441 if !_rules[ruleSegmentRegister]() { 3442 goto l435 3443 } 3444 if !_rules[ruleOffset]() { 3445 goto l435 3446 } 3447 goto l427 3448 l435: 3449 position, tokenIndex = position427, tokenIndex427 3450 if !_rules[ruleBaseIndexScale]() { 3451 goto l425 3452 } 3453 } 3454 l427: 3455 add(ruleMemoryRef, position426) 3456 } 3457 return true 3458 l425: 3459 position, tokenIndex = position425, tokenIndex425 3460 return false 3461 }, 3462 /* 33 SymbolRef <- <((Offset* '+')? (LocalSymbol / SymbolName) Offset* ('@' Section Offset*)?)> */ 3463 func() bool { 3464 position436, tokenIndex436 := position, tokenIndex 3465 { 3466 position437 := position 3467 { 3468 position438, tokenIndex438 := position, tokenIndex 3469 l440: 3470 { 3471 position441, tokenIndex441 := position, tokenIndex 3472 if !_rules[ruleOffset]() { 3473 goto l441 3474 } 3475 goto l440 3476 l441: 3477 position, tokenIndex = position441, tokenIndex441 3478 } 3479 if buffer[position] != rune('+') { 3480 goto l438 3481 } 3482 position++ 3483 goto l439 3484 l438: 3485 position, tokenIndex = position438, tokenIndex438 3486 } 3487 l439: 3488 { 3489 position442, tokenIndex442 := position, tokenIndex 3490 if !_rules[ruleLocalSymbol]() { 3491 goto l443 3492 } 3493 goto l442 3494 l443: 3495 position, tokenIndex = position442, tokenIndex442 3496 if !_rules[ruleSymbolName]() { 3497 goto l436 3498 } 3499 } 3500 l442: 3501 l444: 3502 { 3503 position445, tokenIndex445 := position, tokenIndex 3504 if !_rules[ruleOffset]() { 3505 goto l445 3506 } 3507 goto l444 3508 l445: 3509 position, tokenIndex = position445, tokenIndex445 3510 } 3511 { 3512 position446, tokenIndex446 := position, tokenIndex 3513 if buffer[position] != rune('@') { 3514 goto l446 3515 } 3516 position++ 3517 if !_rules[ruleSection]() { 3518 goto l446 3519 } 3520 l448: 3521 { 3522 position449, tokenIndex449 := position, tokenIndex 3523 if !_rules[ruleOffset]() { 3524 goto l449 3525 } 3526 goto l448 3527 l449: 3528 position, tokenIndex = position449, tokenIndex449 3529 } 3530 goto l447 3531 l446: 3532 position, tokenIndex = position446, tokenIndex446 3533 } 3534 l447: 3535 add(ruleSymbolRef, position437) 3536 } 3537 return true 3538 l436: 3539 position, tokenIndex = position436, tokenIndex436 3540 return false 3541 }, 3542 /* 34 BaseIndexScale <- <('(' RegisterOrConstant? WS? (',' WS? RegisterOrConstant WS? (',' [0-9]+)?)? ')')> */ 3543 func() bool { 3544 position450, tokenIndex450 := position, tokenIndex 3545 { 3546 position451 := position 3547 if buffer[position] != rune('(') { 3548 goto l450 3549 } 3550 position++ 3551 { 3552 position452, tokenIndex452 := position, tokenIndex 3553 if !_rules[ruleRegisterOrConstant]() { 3554 goto l452 3555 } 3556 goto l453 3557 l452: 3558 position, tokenIndex = position452, tokenIndex452 3559 } 3560 l453: 3561 { 3562 position454, tokenIndex454 := position, tokenIndex 3563 if !_rules[ruleWS]() { 3564 goto l454 3565 } 3566 goto l455 3567 l454: 3568 position, tokenIndex = position454, tokenIndex454 3569 } 3570 l455: 3571 { 3572 position456, tokenIndex456 := position, tokenIndex 3573 if buffer[position] != rune(',') { 3574 goto l456 3575 } 3576 position++ 3577 { 3578 position458, tokenIndex458 := position, tokenIndex 3579 if !_rules[ruleWS]() { 3580 goto l458 3581 } 3582 goto l459 3583 l458: 3584 position, tokenIndex = position458, tokenIndex458 3585 } 3586 l459: 3587 if !_rules[ruleRegisterOrConstant]() { 3588 goto l456 3589 } 3590 { 3591 position460, tokenIndex460 := position, tokenIndex 3592 if !_rules[ruleWS]() { 3593 goto l460 3594 } 3595 goto l461 3596 l460: 3597 position, tokenIndex = position460, tokenIndex460 3598 } 3599 l461: 3600 { 3601 position462, tokenIndex462 := position, tokenIndex 3602 if buffer[position] != rune(',') { 3603 goto l462 3604 } 3605 position++ 3606 if c := buffer[position]; c < rune('0') || c > rune('9') { 3607 goto l462 3608 } 3609 position++ 3610 l464: 3611 { 3612 position465, tokenIndex465 := position, tokenIndex 3613 if c := buffer[position]; c < rune('0') || c > rune('9') { 3614 goto l465 3615 } 3616 position++ 3617 goto l464 3618 l465: 3619 position, tokenIndex = position465, tokenIndex465 3620 } 3621 goto l463 3622 l462: 3623 position, tokenIndex = position462, tokenIndex462 3624 } 3625 l463: 3626 goto l457 3627 l456: 3628 position, tokenIndex = position456, tokenIndex456 3629 } 3630 l457: 3631 if buffer[position] != rune(')') { 3632 goto l450 3633 } 3634 position++ 3635 add(ruleBaseIndexScale, position451) 3636 } 3637 return true 3638 l450: 3639 position, tokenIndex = position450, tokenIndex450 3640 return false 3641 }, 3642 /* 35 Operator <- <('+' / '-')> */ 3643 func() bool { 3644 position466, tokenIndex466 := position, tokenIndex 3645 { 3646 position467 := position 3647 { 3648 position468, tokenIndex468 := position, tokenIndex 3649 if buffer[position] != rune('+') { 3650 goto l469 3651 } 3652 position++ 3653 goto l468 3654 l469: 3655 position, tokenIndex = position468, tokenIndex468 3656 if buffer[position] != rune('-') { 3657 goto l466 3658 } 3659 position++ 3660 } 3661 l468: 3662 add(ruleOperator, position467) 3663 } 3664 return true 3665 l466: 3666 position, tokenIndex = position466, tokenIndex466 3667 return false 3668 }, 3669 /* 36 Offset <- <('+'? '-'? (('0' ('b' / 'B') ('0' / '1')+) / ('0' ('x' / 'X') ([0-9] / [0-9] / ([a-f] / [A-F]))+) / [0-9]+))> */ 3670 func() bool { 3671 position470, tokenIndex470 := position, tokenIndex 3672 { 3673 position471 := position 3674 { 3675 position472, tokenIndex472 := position, tokenIndex 3676 if buffer[position] != rune('+') { 3677 goto l472 3678 } 3679 position++ 3680 goto l473 3681 l472: 3682 position, tokenIndex = position472, tokenIndex472 3683 } 3684 l473: 3685 { 3686 position474, tokenIndex474 := position, tokenIndex 3687 if buffer[position] != rune('-') { 3688 goto l474 3689 } 3690 position++ 3691 goto l475 3692 l474: 3693 position, tokenIndex = position474, tokenIndex474 3694 } 3695 l475: 3696 { 3697 position476, tokenIndex476 := position, tokenIndex 3698 if buffer[position] != rune('0') { 3699 goto l477 3700 } 3701 position++ 3702 { 3703 position478, tokenIndex478 := position, tokenIndex 3704 if buffer[position] != rune('b') { 3705 goto l479 3706 } 3707 position++ 3708 goto l478 3709 l479: 3710 position, tokenIndex = position478, tokenIndex478 3711 if buffer[position] != rune('B') { 3712 goto l477 3713 } 3714 position++ 3715 } 3716 l478: 3717 { 3718 position482, tokenIndex482 := position, tokenIndex 3719 if buffer[position] != rune('0') { 3720 goto l483 3721 } 3722 position++ 3723 goto l482 3724 l483: 3725 position, tokenIndex = position482, tokenIndex482 3726 if buffer[position] != rune('1') { 3727 goto l477 3728 } 3729 position++ 3730 } 3731 l482: 3732 l480: 3733 { 3734 position481, tokenIndex481 := position, tokenIndex 3735 { 3736 position484, tokenIndex484 := position, tokenIndex 3737 if buffer[position] != rune('0') { 3738 goto l485 3739 } 3740 position++ 3741 goto l484 3742 l485: 3743 position, tokenIndex = position484, tokenIndex484 3744 if buffer[position] != rune('1') { 3745 goto l481 3746 } 3747 position++ 3748 } 3749 l484: 3750 goto l480 3751 l481: 3752 position, tokenIndex = position481, tokenIndex481 3753 } 3754 goto l476 3755 l477: 3756 position, tokenIndex = position476, tokenIndex476 3757 if buffer[position] != rune('0') { 3758 goto l486 3759 } 3760 position++ 3761 { 3762 position487, tokenIndex487 := position, tokenIndex 3763 if buffer[position] != rune('x') { 3764 goto l488 3765 } 3766 position++ 3767 goto l487 3768 l488: 3769 position, tokenIndex = position487, tokenIndex487 3770 if buffer[position] != rune('X') { 3771 goto l486 3772 } 3773 position++ 3774 } 3775 l487: 3776 { 3777 position491, tokenIndex491 := position, tokenIndex 3778 if c := buffer[position]; c < rune('0') || c > rune('9') { 3779 goto l492 3780 } 3781 position++ 3782 goto l491 3783 l492: 3784 position, tokenIndex = position491, tokenIndex491 3785 if c := buffer[position]; c < rune('0') || c > rune('9') { 3786 goto l493 3787 } 3788 position++ 3789 goto l491 3790 l493: 3791 position, tokenIndex = position491, tokenIndex491 3792 { 3793 position494, tokenIndex494 := position, tokenIndex 3794 if c := buffer[position]; c < rune('a') || c > rune('f') { 3795 goto l495 3796 } 3797 position++ 3798 goto l494 3799 l495: 3800 position, tokenIndex = position494, tokenIndex494 3801 if c := buffer[position]; c < rune('A') || c > rune('F') { 3802 goto l486 3803 } 3804 position++ 3805 } 3806 l494: 3807 } 3808 l491: 3809 l489: 3810 { 3811 position490, tokenIndex490 := position, tokenIndex 3812 { 3813 position496, tokenIndex496 := position, tokenIndex 3814 if c := buffer[position]; c < rune('0') || c > rune('9') { 3815 goto l497 3816 } 3817 position++ 3818 goto l496 3819 l497: 3820 position, tokenIndex = position496, tokenIndex496 3821 if c := buffer[position]; c < rune('0') || c > rune('9') { 3822 goto l498 3823 } 3824 position++ 3825 goto l496 3826 l498: 3827 position, tokenIndex = position496, tokenIndex496 3828 { 3829 position499, tokenIndex499 := position, tokenIndex 3830 if c := buffer[position]; c < rune('a') || c > rune('f') { 3831 goto l500 3832 } 3833 position++ 3834 goto l499 3835 l500: 3836 position, tokenIndex = position499, tokenIndex499 3837 if c := buffer[position]; c < rune('A') || c > rune('F') { 3838 goto l490 3839 } 3840 position++ 3841 } 3842 l499: 3843 } 3844 l496: 3845 goto l489 3846 l490: 3847 position, tokenIndex = position490, tokenIndex490 3848 } 3849 goto l476 3850 l486: 3851 position, tokenIndex = position476, tokenIndex476 3852 if c := buffer[position]; c < rune('0') || c > rune('9') { 3853 goto l470 3854 } 3855 position++ 3856 l501: 3857 { 3858 position502, tokenIndex502 := position, tokenIndex 3859 if c := buffer[position]; c < rune('0') || c > rune('9') { 3860 goto l502 3861 } 3862 position++ 3863 goto l501 3864 l502: 3865 position, tokenIndex = position502, tokenIndex502 3866 } 3867 } 3868 l476: 3869 add(ruleOffset, position471) 3870 } 3871 return true 3872 l470: 3873 position, tokenIndex = position470, tokenIndex470 3874 return false 3875 }, 3876 /* 37 Section <- <([a-z] / [A-Z] / '@')+> */ 3877 func() bool { 3878 position503, tokenIndex503 := position, tokenIndex 3879 { 3880 position504 := position 3881 { 3882 position507, tokenIndex507 := position, tokenIndex 3883 if c := buffer[position]; c < rune('a') || c > rune('z') { 3884 goto l508 3885 } 3886 position++ 3887 goto l507 3888 l508: 3889 position, tokenIndex = position507, tokenIndex507 3890 if c := buffer[position]; c < rune('A') || c > rune('Z') { 3891 goto l509 3892 } 3893 position++ 3894 goto l507 3895 l509: 3896 position, tokenIndex = position507, tokenIndex507 3897 if buffer[position] != rune('@') { 3898 goto l503 3899 } 3900 position++ 3901 } 3902 l507: 3903 l505: 3904 { 3905 position506, tokenIndex506 := position, tokenIndex 3906 { 3907 position510, tokenIndex510 := position, tokenIndex 3908 if c := buffer[position]; c < rune('a') || c > rune('z') { 3909 goto l511 3910 } 3911 position++ 3912 goto l510 3913 l511: 3914 position, tokenIndex = position510, tokenIndex510 3915 if c := buffer[position]; c < rune('A') || c > rune('Z') { 3916 goto l512 3917 } 3918 position++ 3919 goto l510 3920 l512: 3921 position, tokenIndex = position510, tokenIndex510 3922 if buffer[position] != rune('@') { 3923 goto l506 3924 } 3925 position++ 3926 } 3927 l510: 3928 goto l505 3929 l506: 3930 position, tokenIndex = position506, tokenIndex506 3931 } 3932 add(ruleSection, position504) 3933 } 3934 return true 3935 l503: 3936 position, tokenIndex = position503, tokenIndex503 3937 return false 3938 }, 3939 /* 38 SegmentRegister <- <('%' ([c-g] / 's') ('s' ':'))> */ 3940 func() bool { 3941 position513, tokenIndex513 := position, tokenIndex 3942 { 3943 position514 := position 3944 if buffer[position] != rune('%') { 3945 goto l513 3946 } 3947 position++ 3948 { 3949 position515, tokenIndex515 := position, tokenIndex 3950 if c := buffer[position]; c < rune('c') || c > rune('g') { 3951 goto l516 3952 } 3953 position++ 3954 goto l515 3955 l516: 3956 position, tokenIndex = position515, tokenIndex515 3957 if buffer[position] != rune('s') { 3958 goto l513 3959 } 3960 position++ 3961 } 3962 l515: 3963 if buffer[position] != rune('s') { 3964 goto l513 3965 } 3966 position++ 3967 if buffer[position] != rune(':') { 3968 goto l513 3969 } 3970 position++ 3971 add(ruleSegmentRegister, position514) 3972 } 3973 return true 3974 l513: 3975 position, tokenIndex = position513, tokenIndex513 3976 return false 3977 }, 3978 } 3979 p.rules = _rules 3980} 3981