@@ -753,6 +753,83 @@ public static class ReferenceToATN_2 extends BaseParserTestDescriptor {
753
753
*/
754
754
@ CommentHasStringValue
755
755
public String grammar ;
756
+ }
757
+
758
+ /**
759
+ * This is a regression test for antlr/antlr4#1545, case 1.
760
+ */
761
+ public static class OpenDeviceStatement_Case1 extends BaseParserTestDescriptor {
762
+ public String input = "OPEN DEVICE DEVICE" ;
763
+ public String output = "OPEN DEVICE DEVICE\n " ;
764
+ public String errors = null ;
765
+ public String startRule = "statement" ;
766
+ public String grammarName = "OpenDeviceStatement" ;
767
+
768
+ /**
769
+ grammar OpenDeviceStatement;
770
+ program : statement+ '.' ;
771
+
772
+ statement : 'OPEN' ( 'DEVICE' ( OPT1 | OPT2 | OPT3 )? )+ {<writeln("$text")>} ;
773
+
774
+ OPT1 : 'OPT-1';
775
+ OPT2 : 'OPT-2';
776
+ OPT3 : 'OPT-3';
777
+
778
+ WS : (' '|'\n')+ -> channel(HIDDEN);
779
+ */
780
+ @ CommentHasStringValue
781
+ public String grammar ;
782
+ }
783
+
784
+ /**
785
+ * This is a regression test for antlr/antlr4#1545, case 2.
786
+ */
787
+ public static class OpenDeviceStatement_Case2 extends BaseParserTestDescriptor {
788
+ public String input = "OPEN DEVICE DEVICE" ;
789
+ public String output = "OPEN DEVICE DEVICE\n " ;
790
+ public String errors = null ;
791
+ public String startRule = "statement" ;
792
+ public String grammarName = "OpenDeviceStatement" ;
793
+
794
+ /**
795
+ grammar OpenDeviceStatement;
796
+ program : statement+ '.' ;
797
+
798
+ statement : 'OPEN' ( 'DEVICE' ( (OPT1) | OPT2 | OPT3 )? )+ {<writeln("$text")>} ;
799
+
800
+ OPT1 : 'OPT-1';
801
+ OPT2 : 'OPT-2';
802
+ OPT3 : 'OPT-3';
803
+
804
+ WS : (' '|'\n')+ -> channel(HIDDEN);
805
+ */
806
+ @ CommentHasStringValue
807
+ public String grammar ;
808
+ }
756
809
810
+ /**
811
+ * This is a regression test for antlr/antlr4#1545, case 3.
812
+ */
813
+ public static class OpenDeviceStatement_Case3 extends BaseParserTestDescriptor {
814
+ public String input = "OPEN DEVICE DEVICE." ;
815
+ public String output = "OPEN DEVICE DEVICE\n " ;
816
+ public String errors = null ;
817
+ public String startRule = "statement" ;
818
+ public String grammarName = "OpenDeviceStatement" ;
819
+
820
+ /**
821
+ grammar OpenDeviceStatement;
822
+ program : statement+ '.' ;
823
+
824
+ statement : 'OPEN' ( 'DEVICE' ( (OPT1) | OPT2 | OPT3 )? )+ {<writeln("$text")>} ;
825
+
826
+ OPT1 : 'OPT-1';
827
+ OPT2 : 'OPT-2';
828
+ OPT3 : 'OPT-3';
829
+
830
+ WS : (' '|'\n')+ -> channel(HIDDEN);
831
+ */
832
+ @ CommentHasStringValue
833
+ public String grammar ;
757
834
}
758
835
}
0 commit comments