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