segment: New library for low-level phase of lexical syntax analysis.
[pspp-builds.git] / tests / language / lexer / segment.at
1 AT_BANNER([syntax segmentation])
2 m4_define([PSPP_CHECK_SEGMENT],
3   [AT_CHECK([segment-test $1 input], [0], [expout])
4    AT_CHECK([segment-test -1 $1 input], [0], [expout])])
5 \f
6 AT_SETUP([identifiers])
7 AT_KEYWORDS([segment])
8 AT_DATA([input], [dnl
9 a ab abc abcd
10 A AB ABC ABCD
11 aB aBC aBcD
12 $x $y $z
13 grève@<00A0>@Ângstrom@<00A0>@poté
14 #a #b #c ## #d
15 @efg @ @@. @#@ @&t@
16 ## # #12345 #.#
17 f@#_.#6
18 GhIjK
19 .x 1y _z
20 ])
21 AT_DATA([expout], [dnl
22 identifier      a    space
23 identifier      ab    space
24 identifier      abc    space
25 identifier      abcd
26 newline         \n (later)
27
28 identifier      A    space
29 identifier      AB    space
30 identifier      ABC    space
31 identifier      ABCD
32 newline         \n (later)
33
34 identifier      aB    space
35 identifier      aBC    space
36 identifier      aBcD
37 newline         \n (later)
38
39 identifier      $x    space
40 identifier      $y    space
41 identifier      $z
42 newline         \n (later)
43
44 identifier      grève
45 spaces          <U+00A0>
46 identifier      Ângstrom
47 spaces          <U+00A0>
48 identifier      poté
49 newline         \n (later)
50
51 identifier      #a    space
52 identifier      #b    space
53 identifier      #c    space
54 identifier      ##    space
55 identifier      #d
56 newline         \n (later)
57
58 identifier      @efg    space
59 identifier      @    space
60 identifier      @@.    space
61 identifier      @#@    space
62 newline         \n (later)
63
64 identifier      ##    space
65 identifier      #    space
66 identifier      #12345    space
67 identifier      #.#
68 newline         \n (later)
69
70 identifier      f@#\_.#6
71 newline         \n (later)
72
73 identifier      GhIjK
74 newline         \n (later)
75
76 start_command   .
77 identifier      x    space
78 number          1
79 identifier      y    space
80 unexpected_char \_
81 identifier      z
82 newline         \n (later)
83
84 end             <U+0000>
85 ])
86 PSPP_CHECK_SEGMENT([-i])
87 AT_CLEANUP
88 \f
89 AT_SETUP([identifiers that end in '.'])
90 AT_KEYWORDS([segment])
91 AT_DATA([input], [dnl
92 abcd. abcd.
93 ABCD. ABCD.
94 aBcD. aBcD. @&t@
95 $y. $z. あいうえお.
96 #c. #d..
97 @@. @@....
98 #.#.
99 #abcd.
100 .
101 . @&t@
102 LMNOP. @&t@
103 QRSTUV./* end of line comment */
104 qrstuv. /* end of line comment */
105 QrStUv./* end of line comment */ @&t@
106 wxyz./* unterminated end of line comment
107 WXYZ. /* unterminated end of line comment
108 WxYz./* unterminated end of line comment @&t@
109 ])
110 AT_DATA([expout], [dnl
111 identifier      abcd.    space
112 identifier      abcd
113 end_command     .
114 newline         \n (first)
115
116 identifier      ABCD.    space
117 identifier      ABCD
118 end_command     .
119 newline         \n (first)
120
121 identifier      aBcD.    space
122 identifier      aBcD
123 end_command     .    space
124 newline         \n (first)
125
126 identifier      $y.    space
127 identifier      $z.    space
128 identifier      あいうえお
129 end_command     .
130 newline         \n (first)
131
132 identifier      #c.    space
133 identifier      #d.
134 end_command     .
135 newline         \n (first)
136
137 identifier      @@.    space
138 identifier      @@...
139 end_command     .
140 newline         \n (first)
141
142 identifier      #.#
143 end_command     .
144 newline         \n (first)
145
146 identifier      #abcd
147 end_command     .
148 newline         \n (first)
149
150 start_command   .
151 newline         \n (first)
152
153 start_command   .    space
154 newline         \n (first)
155
156 identifier      LMNOP
157 end_command     .    space
158 newline         \n (first)
159
160 identifier      QRSTUV
161 end_command     .
162 comment         /*_end_of_line_comment_*/
163 newline         \n (first)
164
165 identifier      qrstuv
166 end_command     .    space
167 comment         /*_end_of_line_comment_*/
168 newline         \n (first)
169
170 identifier      QrStUv
171 end_command     .
172 comment         /*_end_of_line_comment_*/    space
173 newline         \n (first)
174
175 identifier      wxyz
176 end_command     .
177 comment         /*_unterminated_end_of_line_comment
178 newline         \n (first)
179
180 identifier      WXYZ
181 end_command     .    space
182 comment         /*_unterminated_end_of_line_comment
183 newline         \n (first)
184
185 identifier      WxYz
186 end_command     .
187 comment         /*_unterminated_end_of_line_comment_
188 newline         \n (first)
189
190 end             <U+0000>
191 ])
192 PSPP_CHECK_SEGMENT([-i])
193 AT_CLEANUP
194 \f
195 AT_SETUP([reserved words])
196 AT_KEYWORDS([segment])
197 AT_DATA([input], [dnl
198 and or not eq ge gt le lt ne all by to with
199 AND OR NOT EQ GE GT LE LT NE ALL BY TO WITH
200 andx orx notx eqx gex gtx lex ltx nex allx byx tox withx
201 and. with.
202 ])
203 AT_DATA([expout], [dnl
204 reserved_word   and    space
205 reserved_word   or    space
206 reserved_word   not    space
207 reserved_word   eq    space
208 reserved_word   ge    space
209 reserved_word   gt    space
210 reserved_word   le    space
211 reserved_word   lt    space
212 reserved_word   ne    space
213 reserved_word   all    space
214 reserved_word   by    space
215 reserved_word   to    space
216 reserved_word   with
217 newline         \n (later)
218
219 reserved_word   AND    space
220 reserved_word   OR    space
221 reserved_word   NOT    space
222 reserved_word   EQ    space
223 reserved_word   GE    space
224 reserved_word   GT    space
225 reserved_word   LE    space
226 reserved_word   LT    space
227 reserved_word   NE    space
228 reserved_word   ALL    space
229 reserved_word   BY    space
230 reserved_word   TO    space
231 reserved_word   WITH
232 newline         \n (later)
233
234 identifier      andx    space
235 identifier      orx    space
236 identifier      notx    space
237 identifier      eqx    space
238 identifier      gex    space
239 identifier      gtx    space
240 identifier      lex    space
241 identifier      ltx    space
242 identifier      nex    space
243 identifier      allx    space
244 identifier      byx    space
245 identifier      tox    space
246 identifier      withx
247 newline         \n (later)
248
249 identifier      and.    space
250 reserved_word   with
251 end_command     .
252 newline         \n (first)
253
254 end             <U+0000>
255 ])
256 PSPP_CHECK_SEGMENT([-i])
257 AT_CLEANUP
258 \f
259 AT_SETUP([punctuation])
260 AT_KEYWORDS([segment])
261 AT_DATA([input], [dnl
262 ~ & | = >= > <= < ~= <> ( ) , - + * / [[ ]] **
263 ~&|=>=><=<~=<>(),-+*/[[]]**
264 ])
265 AT_DATA([expout], [dnl
266 punct           ~    space
267 punct           &    space
268 punct           |    space
269 punct           =    space
270 punct           >=    space
271 punct           >    space
272 punct           <=    space
273 punct           <    space
274 punct           ~=    space
275 punct           <>    space
276 punct           (    space
277 punct           )    space
278 punct           ,    space
279 punct           -    space
280 punct           +    space
281 punct           *    space
282 punct           /    space
283 punct           [[    space
284 punct           ]]    space
285 punct           **
286 newline         \n (later)
287
288 punct           ~
289 punct           &
290 punct           |
291 punct           =
292 punct           >=
293 punct           >
294 punct           <=
295 punct           <
296 punct           ~=
297 punct           <>
298 punct           (
299 punct           )
300 punct           ,
301 punct           -
302 punct           +
303 punct           *
304 punct           /
305 punct           [[
306 punct           ]]
307 punct           **
308 newline         \n (later)
309
310 end             <U+0000>
311 ])
312 PSPP_CHECK_SEGMENT([-i])
313 AT_CLEANUP
314 \f
315 AT_SETUP([numbers])
316 AT_KEYWORDS([segment])
317 AT_DATA([input], [dnl
318 0 1 01 001. 1.
319 123. /* comment 1 */ /* comment 2 */
320 .1 0.1 00.1 00.10
321 5e1 6E-1 7e+1 6E+01 6e-03
322 .3E1 .4e-1 .5E+1 .6e+01 .7E-03
323 1.23e1 45.6E-1 78.9e+1 99.9E+01 11.2e-03
324 . 1e e1 1e+ 1e-
325 ])
326 AT_DATA([expout], [dnl
327 number          0    space
328 number          1    space
329 number          01    space
330 number          001.    space
331 number          1
332 end_command     .
333 newline         \n (first)
334
335 number          123
336 end_command     .    space
337 comment         /*_comment_1_*/    space
338 comment         /*_comment_2_*/
339 newline         \n (first)
340
341 start_command   .
342 number          1    space
343 number          0.1    space
344 number          00.1    space
345 number          00.10
346 newline         \n (later)
347
348 number          5e1    space
349 number          6E-1    space
350 number          7e+1    space
351 number          6E+01    space
352 number          6e-03
353 newline         \n (later)
354
355 start_command   .
356 number          3E1    space
357 number          .4e-1    space
358 number          .5E+1    space
359 number          .6e+01    space
360 number          .7E-03
361 newline         \n (later)
362
363 number          1.23e1    space
364 number          45.6E-1    space
365 number          78.9e+1    space
366 number          99.9E+01    space
367 number          11.2e-03
368 newline         \n (later)
369
370 start_command   .    space
371 expected_exponent 1e    space
372 identifier      e1    space
373 expected_exponent 1e+    space
374 expected_exponent 1e-
375 newline         \n (later)
376
377 end             <U+0000>
378 ])
379 PSPP_CHECK_SEGMENT([-i])
380 AT_CLEANUP
381 \f
382 AT_SETUP([strings])
383 AT_KEYWORDS([segment])
384 AT_DATA([input], [dnl
385 'x' "y" 'abc'
386 'Don''t' "Can't" 'Won''t'
387 """quoted""" '"quoted"'
388 '' ""
389 'missing end quote
390 "missing double quote
391 x"4142" X'5152'
392 u'fffd' U"041"
393 + new command
394 + /* comment */ 'string continuation'
395 + /* also a punctuator on blank line
396 - 'new command'
397 ])
398 AT_DATA([expout], [dnl
399 quoted_string   'x'    space
400 quoted_string   "y"    space
401 quoted_string   'abc'
402 newline         \n (later)
403
404 quoted_string   'Don''t'    space
405 quoted_string   "Can't"    space
406 quoted_string   'Won''t'
407 newline         \n (later)
408
409 quoted_string   """quoted"""    space
410 quoted_string   '"quoted"'
411 newline         \n (later)
412
413 quoted_string   ''    space
414 quoted_string   ""
415 newline         \n (later)
416
417 expected_quote  'missing_end_quote
418 newline         \n (later)
419
420 expected_quote  "missing_double_quote
421 newline         \n (later)
422
423 hex_string      x"4142"    space
424 hex_string      X'5152'
425 newline         \n (later)
426
427 unicode_string  u'fffd'    space
428 unicode_string  U"041"
429 newline         \n (later)
430
431 start_command   +    space
432 identifier      new    space
433 identifier      command
434 newline         \n (later)
435
436 punct           +    space
437 comment         /*_comment_*/    space
438 quoted_string   'string_continuation'
439 newline         \n (later)
440
441 punct           +    space
442 comment         /*_also_a_punctuator_on_blank_line
443 newline         \n (later)
444
445 start_command   -    space
446 quoted_string   'new_command'
447 newline         \n (later)
448
449 end             <U+0000>
450 ])
451 PSPP_CHECK_SEGMENT([-i])
452 AT_CLEANUP
453 \f
454 AT_SETUP([@%:@! construct])
455 AT_KEYWORDS([segment])
456 AT_DATA([input], [dnl
457 #! /usr/bin/pspp
458 title my title.
459 #! /usr/bin/pspp
460 ])
461 AT_DATA([expout], [dnl
462 shbang          #!_/usr/bin/pspp
463 newline         \n (first)
464
465 identifier      title    space
466 unquoted_string my_title
467 end_command     .
468 newline         \n (first)
469
470 identifier      #
471 unexpected_char !    space
472 punct           /
473 identifier      usr
474 punct           /
475 identifier      bin
476 punct           /
477 identifier      pspp
478 newline         \n (later)
479
480 end             <U+0000>
481 ])
482 PSPP_CHECK_SEGMENT([-i])
483 AT_CLEANUP
484 \f
485 AT_SETUP([* and COMMENT commands])
486 AT_KEYWORDS([segment])
487 AT_DATA([input], [dnl
488 * Comment commands "don't
489 have to contain valid tokens.
490
491 ** Check ambiguity with ** token.
492 ****************.
493
494 comment keyword works too.
495 COMM also.
496 com is ambiguous with COMPUTE.
497
498    * Comment need not start at left margin.
499
500 * Comment ends with blank line
501
502 next command.
503
504 ])
505 AT_DATA([expout], [dnl
506 comment_command *_Comment_commands_"don't
507 newline         \n (COMMENT)
508
509 comment_command have_to_contain_valid_tokens
510 end_command     .
511 newline         \n (first)
512
513 separate_commands
514 newline         \n (first)
515
516 comment_command **_Check_ambiguity_with_**_token
517 end_command     .
518 newline         \n (first)
519
520 comment_command ****************
521 end_command     .
522 newline         \n (first)
523
524 separate_commands
525 newline         \n (first)
526
527 comment_command comment_keyword_works_too
528 end_command     .
529 newline         \n (first)
530
531 comment_command COMM_also
532 end_command     .
533 newline         \n (first)
534
535 identifier      com    space
536 identifier      is    space
537 identifier      ambiguous    space
538 reserved_word   with    space
539 identifier      COMPUTE
540 end_command     .
541 newline         \n (first)
542
543 separate_commands 
544 newline         \n (first)
545
546 spaces          ___
547 comment_command *_Comment_need_not_start_at_left_margin
548 end_command     .
549 newline         \n (first)
550
551 separate_commands 
552 newline         \n (first)
553
554 comment_command *_Comment_ends_with_blank_line
555 newline         \n (COMMENT)
556
557 separate_commands
558 newline         \n (first)
559
560 identifier      next    space
561 identifier      command
562 end_command     .
563 newline         \n (first)
564
565 separate_commands
566 newline         \n (first)
567
568 end             <U+0000>
569 ])
570 PSPP_CHECK_SEGMENT([-i])
571 AT_CLEANUP
572 \f
573 AT_SETUP([DOCUMENT command])
574 AT_KEYWORDS([segment])
575 AT_DATA([input], [dnl
576 DOCUMENT one line.
577 DOC more
578     than
579         one
580             line.
581 docu
582 first.paragraph
583 isn't parsed as tokens
584
585 second paragraph.
586 ])
587 AT_DATA([expout], [dnl
588 start_document
589 document        DOCUMENT_one_line.
590 end_command     
591 separate_commands
592 newline         \n (first)
593
594 start_document
595 document        DOC_more
596 newline         \n (DOCUMENT)
597
598 document        ____than
599 newline         \n (DOCUMENT)
600
601 document        ________one
602 newline         \n (DOCUMENT)
603
604 document        ____________line.
605 end_command     
606 separate_commands
607 newline         \n (first)
608
609 start_document
610 document        docu
611 newline         \n (DOCUMENT)
612
613 document        first.paragraph
614 newline         \n (DOCUMENT)
615
616 document        isn't_parsed_as_tokens
617 newline         \n (DOCUMENT)
618
619 document
620 newline         \n (DOCUMENT)
621
622 document        second_paragraph.
623 end_command     
624 separate_commands
625 newline         \n (first)
626  
627 end             <U+0000>
628 ])
629 PSPP_CHECK_SEGMENT([-i])
630 AT_CLEANUP
631 \f
632 AT_SETUP([TITLE, SUBTITLE, FILE LABEL commands])
633 AT_KEYWORDS([segment])
634 AT_DATA([input], [dnl
635 title/**/'Quoted string title'.
636 tit /*
637 "Quoted string on second line".
638 sub "Quoted string subtitle"
639  .
640
641 TITL /* Not a */ quoted string title.
642 SUBT Not a quoted string /* subtitle
643
644 FIL label isn't quoted.
645 FILE
646   lab 'is quoted'.
647 FILE /*
648 /**/  lab not quoted here either
649
650 ])
651 AT_DATA([expout], [dnl
652 identifier      title
653 comment         /**/
654 quoted_string   'Quoted_string_title'
655 end_command     .
656 newline         \n (first)
657
658 identifier      tit    space
659 comment         /*
660 newline         \n (later)
661
662 quoted_string   "Quoted_string_on_second_line"
663 end_command     .
664 newline         \n (first)
665
666 identifier      sub    space
667 quoted_string   "Quoted_string_subtitle"
668 newline         \n (later)
669     space
670 end_command     .
671 newline         \n (first)
672
673 separate_commands
674 newline         \n (first)
675
676 identifier      TITL    space
677 unquoted_string /*_Not_a_*/_quoted_string_title
678 end_command     .
679 newline         \n (first)
680
681 identifier      SUBT    space
682 unquoted_string Not_a_quoted_string_/*_subtitle
683 newline         \n (later)
684
685 separate_commands
686 newline         \n (first)
687
688 identifier      FIL    space
689 identifier      label    space
690 unquoted_string isn't_quoted
691 end_command     .
692 newline         \n (first)
693
694 identifier      FILE
695 newline         \n (later)
696
697 spaces          __
698 identifier      lab    space
699 quoted_string   'is_quoted'
700 end_command     .
701 newline         \n (first)
702
703 identifier      FILE    space
704 comment         /*
705 newline         \n (later)
706
707 comment         /**/
708 spaces          __
709 identifier      lab    space
710 unquoted_string not_quoted_here_either
711 newline         \n (later)
712
713 separate_commands
714 newline         \n (first)
715
716 end             <U+0000>
717 ])
718 PSPP_CHECK_SEGMENT([-i])
719 AT_CLEANUP
720 \f
721 AT_SETUP([BEGIN DATA command])
722 AT_KEYWORDS([segment])
723 AT_DATA([input], [dnl
724 begin data.
725 end data.
726
727 begin data. /*
728 123
729 xxx
730 end data.
731
732 BEG /**/ DAT /*
733 5 6 7 /* x
734
735 end  data
736 end data
737 .
738
739 begin
740  data.
741 data
742 end data.
743
744 begin data "xxx".
745 begin data 123.
746 not data
747 ])
748 AT_DATA([expout], [dnl
749 identifier      begin    space
750 identifier      data
751 end_command     .
752 newline         \n (data)
753
754 identifier      end    space
755 identifier      data
756 end_command     .
757 newline         \n (first)
758
759 separate_commands
760 newline         \n (first)
761
762 identifier      begin    space
763 identifier      data
764 end_command     .    space
765 comment         /*
766 newline         \n (data)
767
768 inline_data     123
769 newline         \n (data)
770
771 inline_data     xxx
772 newline         \n (data)
773
774 identifier      end    space
775 identifier      data
776 end_command     .
777 newline         \n (first)
778
779 separate_commands
780 newline         \n (first)
781
782 identifier      BEG    space
783 comment         /**/    space
784 identifier      DAT    space
785 comment         /*
786 newline         \n (data)
787
788 inline_data     5_6_7_/*_x
789 newline         \n (data)
790
791 inline_data     
792 newline         \n (data)
793
794 inline_data     end__data
795 newline         \n (data)
796
797 identifier      end    space
798 identifier      data
799 newline         \n (later)
800
801 start_command   .
802 newline         \n (first)
803
804 separate_commands
805 newline         \n (first)
806
807 identifier      begin
808 newline         \n (later)
809     space
810 identifier      data
811 end_command     .
812 newline         \n (data)
813
814 inline_data     data
815 newline         \n (data)
816
817 identifier      end    space
818 identifier      data
819 end_command     .
820 newline         \n (first)
821
822 separate_commands
823 newline         \n (first)
824
825 identifier      begin    space
826 identifier      data    space
827 quoted_string   "xxx"
828 end_command     .
829 newline         \n (first)
830
831 identifier      begin    space
832 identifier      data    space
833 number          123
834 end_command     .
835 newline         \n (first)
836
837 reserved_word   not    space
838 identifier      data
839 newline         \n (later)
840
841 end             <U+0000>
842 ])
843 PSPP_CHECK_SEGMENT([-i])
844 AT_CLEANUP
845 \f
846 AT_SETUP([DO REPEAT command])
847 AT_KEYWORDS([segment])
848 AT_DATA([input], [dnl
849 do repeat x=a b c
850           y=d e f.
851   do repeat a=1 thru 5.
852 another command.
853 second command
854 + third command.
855 end /* x */ /* y */ repeat print.
856 end
857  repeat.
858 do
859   repeat #a=1.
860   inner command.
861 end repeat.
862 ])
863 AT_DATA([expout], [dnl
864 identifier      do    space
865 identifier      repeat    space
866 identifier      x
867 punct           =
868 identifier      a    space
869 identifier      b    space
870 identifier      c
871 newline         \n (later)
872
873 spaces          __________
874 identifier      y
875 punct           =
876 identifier      d    space
877 identifier      e    space
878 identifier      f
879 end_command     .
880 newline         \n (DO REPEAT)
881
882 do_repeat_command __do_repeat_a=1_thru_5.
883 newline         \n (DO REPEAT)
884
885 do_repeat_command another_command.
886 newline         \n (DO REPEAT)
887
888 do_repeat_command second_command
889 newline         \n (DO REPEAT)
890
891 do_repeat_command +_third_command.
892 newline         \n (DO REPEAT)
893
894 do_repeat_command end_/*_x_*/_/*_y_*/_repeat_print.
895 newline         \n (DO REPEAT)
896
897 identifier      end
898 newline         \n (later)
899     space
900 identifier      repeat
901 end_command     .
902 newline         \n (first)
903
904 identifier      do
905 newline         \n (later)
906
907 spaces          __
908 identifier      repeat    space
909 identifier      #a
910 punct           =
911 number          1
912 end_command     .
913 newline         \n (DO REPEAT)
914
915 do_repeat_command __inner_command.
916 newline         \n (DO REPEAT)
917
918 identifier      end    space
919 identifier      repeat
920 end_command     .
921 newline         \n (first)
922
923 end             <U+0000>
924 ])
925 PSPP_CHECK_SEGMENT([-i])
926 AT_CLEANUP
927 \f
928 AT_SETUP([batch mode])
929 AT_KEYWORDS([segment])
930 AT_DATA([input], [dnl
931 first command
932      another line of first command
933 +  second command
934 third command
935
936 fourth command.
937    fifth command.
938 ])
939 AT_DATA([expout], [dnl
940 identifier      first    space
941 identifier      command
942 newline         \n (later)
943
944 spaces          _____
945 identifier      another    space
946 identifier      line    space
947 identifier      of    space
948 identifier      first    space
949 identifier      command
950 newline         \n (later)
951
952 start_command   +
953 spaces          __
954 identifier      second    space
955 identifier      command
956 newline         \n (later)
957
958 start_command
959 identifier      third    space
960 identifier      command
961 newline         \n (later)
962
963 separate_commands
964 newline         \n (first)
965
966 identifier      fourth    space
967 identifier      command
968 end_command     .
969 newline         \n (first)
970
971 spaces          ___
972 identifier      fifth    space
973 identifier      command
974 end_command     .
975 newline         \n (first)
976
977 end             <U+0000>
978 ])
979 PSPP_CHECK_SEGMENT([-b])
980 AT_CLEANUP
981 \f
982 AT_SETUP([auto mode])
983 AT_KEYWORDS([segment])
984 AT_DATA([input], [dnl
985 command
986      another line of command
987 2sls
988 +  another command
989 another line of second command
990 data list /x 1
991 aggregate.
992 print eject.
993 twostep cluster
994
995
996 fourth command.
997    fifth command.
998 ])
999 AT_DATA([expout], [dnl
1000 identifier      command
1001 newline         \n (later)
1002
1003 spaces          _____
1004 identifier      another    space
1005 identifier      line    space
1006 identifier      of    space
1007 identifier      command
1008 newline         \n (later)
1009
1010 start_command
1011 number          2
1012 identifier      sls
1013 newline         \n (later)
1014
1015 start_command   +
1016 spaces          __
1017 identifier      another    space
1018 identifier      command
1019 newline         \n (later)
1020
1021 identifier      another    space
1022 identifier      line    space
1023 identifier      of    space
1024 identifier      second    space
1025 identifier      command
1026 newline         \n (later)
1027
1028 start_command
1029 identifier      data    space
1030 identifier      list    space
1031 punct           /
1032 identifier      x    space
1033 number          1
1034 newline         \n (later)
1035
1036 start_command
1037 identifier      aggregate
1038 end_command     .
1039 newline         \n (first)
1040
1041 identifier      print    space
1042 identifier      eject
1043 end_command     .
1044 newline         \n (first)
1045
1046 identifier      twostep    space
1047 identifier      cluster
1048 newline         \n (later)
1049
1050 separate_commands
1051 newline         \n (first)
1052
1053 separate_commands
1054 newline         \n (first)
1055
1056 identifier      fourth    space
1057 identifier      command
1058 end_command     .
1059 newline         \n (first)
1060
1061 spaces          ___
1062 identifier      fifth    space
1063 identifier      command
1064 end_command     .
1065 newline         \n (first)
1066
1067 end             <U+0000>
1068 ])
1069 PSPP_CHECK_SEGMENT([-a])
1070 AT_CLEANUP