Lines Matching refs:Stream
653 Stream: ITreeNodeStream;
661 Stream := CreateCommonTreeNodeStream(T);
662 CheckEquals(GetStringOfEntireStreamContentsWithNodeTypesOnly(Stream),' 101 102 103 104');
663 CheckEquals(Stream.ToString, ' 101 2 102 2 103 3 104 3');
669 Stream: ITreeNodeStream;
674 Stream := CreateCommonTreeNodeStream(T);
675 CheckEquals(GetStringOfEntireStreamContentsWithNodeTypesOnly(Stream),' 101 102');
676 CheckEquals(Stream.ToString, ' 101 2 102 3');
682 Stream: ITreeNodeStream;
707 Stream := CreateUnBufferedTreeNodeStream(T);
708 CheckEquals(GetStringOfEntireStreamContentsWithNodeTypesOnly(Stream), Buf.ToString);
709 CheckEquals(Stream.ToString, Buf2.ToString);
735 Stream: ITreeNodeStream;
744 Stream := CreateUnBufferedTreeNodeStream(T);
748 Node := Stream.LT(1) as ITree;
750 Stream.Consume;
759 Node := Stream.LT(I) as ITree; // look ahead to ith token
767 Stream: ITreeNodeStream;
774 Stream := CreateCommonTreeNodeStream(Root);
775 CheckEquals(GetStringOfEntireStreamContentsWithNodeTypesOnly(Stream),' 101 102 103');
776 CheckEquals(Stream.ToString, ' 101 102 103');
782 Stream: ITreeNodeStream;
796 Stream := CreateCommonTreeNodeStream(Root);
797 CheckEquals(GetStringOfEntireStreamContentsWithNodeTypesOnly(Stream),' 101 102 103 104 105');
798 CheckEquals(Stream.ToString, ' 101 2 102 2 103 3 104 3 105');
804 Stream: ITreeNodeStream;
809 Stream := CreateCommonTreeNodeStream(Root);
810 CheckEquals(GetStringOfEntireStreamContentsWithNodeTypesOnly(Stream),' 101');
811 CheckEquals(Stream.ToString, ' 101');
817 Stream: ITreeNodeStream;
825 Stream := CreateCommonTreeNodeStream(T);
826 CheckEquals((Stream.LT(1) as ITree).TokenType,101);
827 CheckEquals((Stream.LT(2) as ITree).TokenType,TToken.DOWN);
828 CheckEquals((Stream.LT(3) as ITree).TokenType,102);
829 CheckEquals((Stream.LT(4) as ITree).TokenType,TToken.DOWN);
830 CheckEquals((Stream.LT(5) as ITree).TokenType,103);
831 CheckEquals((Stream.LT(6) as ITree).TokenType,TToken.UP);
832 CheckEquals((Stream.LT(7) as ITree).TokenType,104);
833 CheckEquals((Stream.LT(8) as ITree).TokenType,TToken.UP);
834 CheckEquals((Stream.LT(9) as ITree).TokenType,TToken.EOF);
836 CheckEquals((Stream.LT(100) as ITree).TokenType,TToken.EOF);
842 Stream: ICommonTreeNodeStream;
846 // stream has 7 real + 6 nav nodes
858 Stream := TCommonTreeNodeStream.Create(R0);
859 M := Stream.Mark;
863 Stream.LT(1);
864 Stream.Consume;
866 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.EOF);
867 CheckEquals((Stream.LT(-1) as ITree).TokenType,TToken.UP);
868 Stream.Rewind(M);
873 Stream.LT(1);
874 Stream.Consume;
876 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.EOF);
877 CheckEquals((Stream.LT(-1) as ITree).TokenType,TToken.UP);
883 Stream: ICommonTreeNodeStream;
887 // stream has 7 real + 6 nav nodes
899 Stream := TCommonTreeNodeStream.Create(R0);
903 Stream.Consume;
905 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
906 M := Stream.Mark;
907 Stream.Consume; // consume 107
908 Stream.Consume; // consume UP
909 Stream.Consume; // consume UP
910 Stream.Consume; // consume 104
911 Stream.Rewind(M);
913 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
914 Stream.Consume;
915 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
916 Stream.Consume;
917 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
918 Stream.Consume;
919 CheckEquals((Stream.LT(1) as ITree).TokenType,104);
920 Stream.Consume;
922 CheckEquals((Stream.LT(1) as ITree).TokenType,105);
923 Stream.Consume;
924 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
925 Stream.Consume;
926 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.EOF);
927 CheckEquals((Stream.LT(-1) as ITree).TokenType,TToken.UP);
933 Stream: ICommonTreeNodeStream;
937 // stream has 7 real + 6 nav nodes
949 Stream := TCommonTreeNodeStream.Create(R0);
950 M := Stream.Mark; // MARK at start
951 Stream.Consume; // consume 101
952 Stream.Consume; // consume DN
953 M2:= Stream.Mark; // MARK on 102
954 Stream.Consume; // consume 102
955 Stream.Consume; // consume DN
956 Stream.Consume; // consume 103
957 Stream.Consume; // consume 106
958 Stream.Rewind(M2);
959 CheckEquals((Stream.LT(1) as ITree).TokenType,102);
960 Stream.Consume;
961 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
962 Stream.Consume;
964 Stream.Rewind(M); // REWIND to 101
965 CheckEquals((Stream.LT(1) as ITree).TokenType,101);
966 Stream.Consume;
967 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
968 Stream.Consume;
969 CheckEquals((Stream.LT(1) as ITree).TokenType,102);
970 Stream.Consume;
971 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
981 Stream: ICommonTreeNodeStream;
985 // stream has 9 real + 8 nav nodes
1000 Stream := TCommonTreeNodeStream.Create(R0);
1001 CheckEquals(Stream.ToString, ' 101 2 102 2 103 3 104 2 105 3 106 2 107 3 108 109 3');
1007 Stream.Consume;
1009 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
1011 Stream.Push(IndexOf102);
1012 CheckEquals((Stream.LT(1) as ITree).TokenType,102);
1013 Stream.Consume; // consume 102
1014 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
1015 Stream.Consume; // consume DN
1016 CheckEquals((Stream.LT(1) as ITree).TokenType,103);
1017 Stream.Consume; // consume 103
1020 Stream.Push(IndexOf104);
1021 CheckEquals((Stream.LT(1) as ITree).TokenType,104);
1022 Stream.Consume; // consume 104
1023 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
1024 Stream.Consume; // consume DN
1025 CheckEquals((Stream.LT(1) as ITree).TokenType,105);
1026 Stream.Consume; // consume 1045
1027 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
1030 Stream.Pop;
1031 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
1034 Stream.Pop;
1035 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
1044 Stream: ICommonTreeNodeStream;
1048 // stream has 9 real + 8 nav nodes
1063 Stream := TCommonTreeNodeStream.Create(R0);
1064 CheckEquals(Stream.ToString, ' 101 2 102 2 103 3 104 2 105 3 106 2 107 3 108 109 3');
1069 Stream.Consume;
1072 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
1073 Stream.Push(IndexOf102);
1074 CheckEquals((Stream.LT(1) as ITree).TokenType,102);
1075 Stream.Consume; // consume 102
1076 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
1077 Stream.Consume; // consume DN
1078 CheckEquals((Stream.LT(1) as ITree).TokenType,103);
1079 Stream.Consume; // consume 103
1080 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
1082 Stream.Pop;
1083 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
1092 Stream: ICommonTreeNodeStream;
1095 // stream has 9 real + 8 nav nodes
1110 Stream := TCommonTreeNodeStream.Create(R0);
1111 CheckEquals(Stream.ToString, ' 101 2 102 2 103 3 104 2 105 3 106 2 107 3 108 109 3');
1113 while (Stream.LA(1) <> TToken.EOF) do
1114 Stream.Consume;
1115 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.EOF);
1118 Stream.Push(IndexOf102);
1119 CheckEquals((Stream.LT(1) as ITree).TokenType,102);
1120 Stream.Consume; // consume 102
1121 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
1122 Stream.Consume; // consume DN
1123 CheckEquals((Stream.LT(1) as ITree).TokenType,103);
1124 Stream.Consume; // consume 103
1125 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
1127 Stream.Pop;
1128 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.EOF);
1131 Stream.Push(IndexOf104);
1132 CheckEquals((Stream.LT(1) as ITree).TokenType,104);
1133 Stream.Consume; // consume 104
1134 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.DOWN);
1135 Stream.Consume; // consume DN
1136 CheckEquals((Stream.LT(1) as ITree).TokenType,105);
1137 Stream.Consume; // consume 105
1138 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.UP);
1140 Stream.Pop;
1141 CheckEquals((Stream.LT(1) as ITree).TokenType,TToken.EOF);
1147 Stream: ICommonTreeNodeStream;
1150 // stream has 7 real + 6 nav nodes
1162 Stream := TCommonTreeNodeStream.Create(R0);
1163 Stream.Consume; // consume 101
1164 Stream.Consume; // consume DN
1165 Stream.Consume; // consume 102
1166 Stream.Seek(7); // seek to 107
1167 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
1168 Stream.Consume; // consume 107
1169 Stream.Consume; // consume UP
1170 Stream.Consume; // consume UP
1171 CheckEquals((Stream.LT(1) as ITree).TokenType,104);
1177 Stream: ICommonTreeNodeStream;
1180 // stream has 7 real + 6 nav nodes
1192 Stream := TCommonTreeNodeStream.Create(R0);
1193 Stream.Seek(7); // seek to 107
1194 CheckEquals((Stream.LT(1) as ITree).TokenType,107);
1195 Stream.Consume; // consume 107
1196 Stream.Consume; // consume UP
1197 Stream.Consume; // consume UP
1198 CheckEquals((Stream.LT(1) as ITree).TokenType,104);
1204 Stream: ITreeNodeStream;
1207 Stream := CreateCommonTreeNodeStream(T);
1208 CheckEquals(GetStringOfEntireStreamContentsWithNodeTypesOnly(Stream),' 101');
1209 CheckEquals(Stream.ToString, ' 101');
1215 Stream: ICommonTreeNodeStream;
1220 Stream := TCommonTreeNodeStream.Create(R0);
1224 Stream.Push(I);
1226 CheckEquals(Stream.Pop, 10);
1227 CheckEquals(Stream.Pop, 9);