@@ -65,7 +65,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
65
65
case 11 :
66
66
case 15 :
67
67
case 17 :
68
- case 24 :{
68
+ case 26 :{
69
69
node = SubNode (GraphRelation .ROOT );
70
70
children .add (node );
71
71
label_1 :
@@ -135,7 +135,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
135
135
}
136
136
case 15 :
137
137
case 17 :
138
- case 24 :{
138
+ case 26 :{
139
139
result = ModNode (r );
140
140
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
141
141
case RELATION :
@@ -397,7 +397,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
397
397
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
398
398
case 15 :
399
399
case 17 :
400
- case 24 :{
400
+ case 26 :{
401
401
node = ModNode (reln );
402
402
break ;
403
403
}
@@ -454,7 +454,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
454
454
case 14 :
455
455
case 15 :
456
456
case 17 :
457
- case 24 :{
457
+ case 26 :{
458
458
;
459
459
break ;
460
460
}
@@ -485,7 +485,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
485
485
boolean startUnderNeg ;
486
486
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
487
487
case 17 :
488
- case 24 :{
488
+ case 26 :{
489
489
child = Child (r );
490
490
break ;
491
491
}
@@ -512,7 +512,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
512
512
child = NodeDisj (r );
513
513
break ;
514
514
}
515
- case 24 :{
515
+ case 26 :{
516
516
child = Description (r );
517
517
break ;
518
518
}
@@ -529,6 +529,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
529
529
Token key = null ;
530
530
Token value = null ;
531
531
Token attrType = null ;
532
+ boolean negated = false ;
532
533
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
533
534
case IDENTIFIER :{
534
535
attr = jj_consume_token (IDENTIFIER );
@@ -564,29 +565,28 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
564
565
throw new ParseException ();
565
566
}
566
567
if (attr != null && value != null ) {
567
- boolean negated = attrType .image .equals ("!:" );
568
+ negated = attrType .image .equals ("!:" );
568
569
attributes .setAttribute (attr .image , value .image , negated );
569
570
}
570
571
break ;
571
572
}
572
- case ALIGNRELN :
573
573
case 23 :{
574
+ jj_consume_token (23 );
575
+ key = jj_consume_token (IDENTIFIER );
574
576
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
575
- case ALIGNRELN :{
576
- attrType = jj_consume_token (ALIGNRELN );
577
+ case 10 :{
578
+ attrType = jj_consume_token (10 );
577
579
break ;
578
580
}
579
- case 23 :{
580
- attrType = jj_consume_token (23 );
581
+ case 22 :{
582
+ attrType = jj_consume_token (22 );
581
583
break ;
582
584
}
583
585
default :
584
586
jj_la1 [25 ] = jj_gen ;
585
587
jj_consume_token (-1 );
586
588
throw new ParseException ();
587
589
}
588
- key = jj_consume_token (IDENTIFIER );
589
- jj_consume_token (21 );
590
590
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
591
591
case IDENTIFIER :{
592
592
value = jj_consume_token (IDENTIFIER );
@@ -605,12 +605,61 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
605
605
{if (true ) throw new SemgrexParseException ("null while parsing semgrex expression: attr=" + attr +
606
606
" key=" + key + " value=" + value );}
607
607
}
608
- boolean negated = attrType .image .equals ("!@ " );
608
+ negated = attrType .image .equals ("!: " );
609
609
attributes .addContains (attr .image , key .image , value .image , negated );
610
+ label_6 :
611
+ while (true ) {
612
+ switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
613
+ case 24 :{
614
+ ;
615
+ break ;
616
+ }
617
+ default :
618
+ jj_la1 [27 ] = jj_gen ;
619
+ break label_6 ;
620
+ }
621
+ jj_consume_token (24 );
622
+ key = jj_consume_token (IDENTIFIER );
623
+ switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
624
+ case 10 :{
625
+ attrType = jj_consume_token (10 );
626
+ break ;
627
+ }
628
+ case 22 :{
629
+ attrType = jj_consume_token (22 );
630
+ break ;
631
+ }
632
+ default :
633
+ jj_la1 [28 ] = jj_gen ;
634
+ jj_consume_token (-1 );
635
+ throw new ParseException ();
636
+ }
637
+ switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
638
+ case IDENTIFIER :{
639
+ value = jj_consume_token (IDENTIFIER );
640
+ break ;
641
+ }
642
+ case REGEX :{
643
+ value = jj_consume_token (REGEX );
644
+ break ;
645
+ }
646
+ default :
647
+ jj_la1 [29 ] = jj_gen ;
648
+ jj_consume_token (-1 );
649
+ throw new ParseException ();
650
+ }
651
+ if (attr == null || key == null || value == null ) {
652
+ {if (true ) throw new SemgrexParseException ("null while parsing semgrex expression: attr=" + attr +
653
+ " key=" + key + " value=" + value );}
654
+ }
655
+ negated = attrType .image .equals ("!:" );
656
+ attributes .addContains (attr .image , key .image , value .image , negated );
657
+ }
658
+ jj_consume_token (25 );
610
659
break ;
611
660
}
612
661
default :
613
- jj_la1 [27 ] = jj_gen ;
662
+ jj_la1 [30 ] = jj_gen ;
614
663
jj_consume_token (-1 );
615
664
throw new ParseException ();
616
665
}
@@ -627,7 +676,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
627
676
break ;
628
677
}
629
678
default :
630
- jj_la1 [28 ] = jj_gen ;
679
+ jj_la1 [31 ] = jj_gen ;
631
680
jj_consume_token (-1 );
632
681
throw new ParseException ();
633
682
}
@@ -637,33 +686,33 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
637
686
boolean link = false ;
638
687
NodeAttributes attributes = new NodeAttributes ();
639
688
NodePattern pat ;
640
- jj_consume_token (24 );
689
+ jj_consume_token (26 );
641
690
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
642
691
case IDENTIFIER :
643
692
case EMPTY :
644
693
case ROOT :{
645
694
AddAttribute (attributes );
646
- label_6 :
695
+ label_7 :
647
696
while (true ) {
648
697
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
649
- case 25 :{
698
+ case 24 :{
650
699
;
651
700
break ;
652
701
}
653
702
default :
654
- jj_la1 [29 ] = jj_gen ;
655
- break label_6 ;
703
+ jj_la1 [32 ] = jj_gen ;
704
+ break label_7 ;
656
705
}
657
- jj_consume_token (25 );
706
+ jj_consume_token (24 );
658
707
AddAttribute (attributes );
659
708
}
660
709
break ;
661
710
}
662
711
default :
663
- jj_la1 [30 ] = jj_gen ;
712
+ jj_la1 [33 ] = jj_gen ;
664
713
;
665
714
}
666
- jj_consume_token (26 );
715
+ jj_consume_token (25 );
667
716
switch ((jj_ntk ==-1 )?jj_ntk_f ():jj_ntk ) {
668
717
case 21 :{
669
718
jj_consume_token (21 );
@@ -680,7 +729,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
680
729
break ;
681
730
}
682
731
default :
683
- jj_la1 [31 ] = jj_gen ;
732
+ jj_la1 [34 ] = jj_gen ;
684
733
;
685
734
}
686
735
pat = new NodePattern (r , underNodeNegation , attributes , link , name != null ? name .image : null );
@@ -697,13 +746,13 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
697
746
public Token jj_nt ;
698
747
private int jj_ntk ;
699
748
private int jj_gen ;
700
- final private int [] jj_la1 = new int [32 ];
749
+ final private int [] jj_la1 = new int [35 ];
701
750
static private int [] jj_la1_0 ;
702
751
static {
703
752
jj_la1_init_0 ();
704
753
}
705
754
private static void jj_la1_init_0 () {
706
- jj_la1_0 = new int [] {0x400 ,0x1028808 ,0x3801c ,0x3801c ,0x1028800 ,0x2000 ,0x3c01c ,0x4000 ,0x3801c ,0x2001c ,0x80000 ,0x10 ,0x110 ,0x110 ,0x100000 ,0x200000 ,0x1c ,0x1028800 ,0x2000 ,0x102c000 ,0x4000 ,0x1028000 , 0x1020000 ,0x400400 ,0x110 ,0x800008 ,0x110 ,0xc00408 , 0xd0 ,0x2000000 ,0xd0 ,0x200000 ,};
755
+ jj_la1_0 = new int [] {0x400 ,0x4028808 ,0x3801c ,0x3801c ,0x4028800 ,0x2000 ,0x3c01c ,0x4000 ,0x3801c ,0x2001c ,0x80000 ,0x10 ,0x110 ,0x110 ,0x100000 ,0x200000 ,0x1c ,0x4028800 ,0x2000 ,0x402c000 ,0x4000 ,0x4028000 , 0x4020000 ,0x400400 ,0x110 ,0x400400 ,0x110 ,0x1000000 , 0x400400 , 0x110 , 0xc00400 , 0xd0 ,0x1000000 ,0xd0 ,0x200000 ,};
707
756
}
708
757
709
758
/** Constructor with InputStream. */
@@ -717,7 +766,7 @@ public SemgrexParser(java.io.InputStream stream, String encoding) {
717
766
token = new Token ();
718
767
jj_ntk = -1 ;
719
768
jj_gen = 0 ;
720
- for (int i = 0 ; i < 32 ; i ++) jj_la1 [i ] = -1 ;
769
+ for (int i = 0 ; i < 35 ; i ++) jj_la1 [i ] = -1 ;
721
770
}
722
771
723
772
/** Reinitialise. */
@@ -731,7 +780,7 @@ public void ReInit(java.io.InputStream stream, String encoding) {
731
780
token = new Token ();
732
781
jj_ntk = -1 ;
733
782
jj_gen = 0 ;
734
- for (int i = 0 ; i < 32 ; i ++) jj_la1 [i ] = -1 ;
783
+ for (int i = 0 ; i < 35 ; i ++) jj_la1 [i ] = -1 ;
735
784
}
736
785
737
786
/** Constructor. */
@@ -741,7 +790,7 @@ public SemgrexParser(java.io.Reader stream) {
741
790
token = new Token ();
742
791
jj_ntk = -1 ;
743
792
jj_gen = 0 ;
744
- for (int i = 0 ; i < 32 ; i ++) jj_la1 [i ] = -1 ;
793
+ for (int i = 0 ; i < 35 ; i ++) jj_la1 [i ] = -1 ;
745
794
}
746
795
747
796
/** Reinitialise. */
@@ -759,7 +808,7 @@ public void ReInit(java.io.Reader stream) {
759
808
token = new Token ();
760
809
jj_ntk = -1 ;
761
810
jj_gen = 0 ;
762
- for (int i = 0 ; i < 32 ; i ++) jj_la1 [i ] = -1 ;
811
+ for (int i = 0 ; i < 35 ; i ++) jj_la1 [i ] = -1 ;
763
812
}
764
813
765
814
/** Constructor with generated Token Manager. */
@@ -768,7 +817,7 @@ public SemgrexParser(SemgrexParserTokenManager tm) {
768
817
token = new Token ();
769
818
jj_ntk = -1 ;
770
819
jj_gen = 0 ;
771
- for (int i = 0 ; i < 32 ; i ++) jj_la1 [i ] = -1 ;
820
+ for (int i = 0 ; i < 35 ; i ++) jj_la1 [i ] = -1 ;
772
821
}
773
822
774
823
/** Reinitialise. */
@@ -777,7 +826,7 @@ public void ReInit(SemgrexParserTokenManager tm) {
777
826
token = new Token ();
778
827
jj_ntk = -1 ;
779
828
jj_gen = 0 ;
780
- for (int i = 0 ; i < 32 ; i ++) jj_la1 [i ] = -1 ;
829
+ for (int i = 0 ; i < 35 ; i ++) jj_la1 [i ] = -1 ;
781
830
}
782
831
783
832
private Token jj_consume_token (int kind ) throws ParseException {
@@ -833,7 +882,7 @@ public ParseException generateParseException() {
833
882
la1tokens [jj_kind ] = true ;
834
883
jj_kind = -1 ;
835
884
}
836
- for (int i = 0 ; i < 32 ; i ++) {
885
+ for (int i = 0 ; i < 35 ; i ++) {
837
886
if (jj_la1 [i ] == jj_gen ) {
838
887
for (int j = 0 ; j < 32 ; j ++) {
839
888
if ((jj_la1_0 [i ] & (1 <<j )) != 0 ) {
0 commit comments