01_test_regexes.md 7.87 KB
Newer Older
1
2


di68kap's avatar
di68kap committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Test of parser: "SCHLUESSELWORT"
================================


Match-test "m1"
---------------

### Test-code:
    
    AUTORIN 

### AST
    (SCHLUESSELWORT
        (:RegExp
            ""
            ""
        )
        (:RegExp
            "AUTORIN "
        )
    )


26
27
28
29
Test of parser: "RZS"
=====================


di68kap's avatar
di68kap committed
30
31
Match-test "m1"
---------------
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

### Test-code:
    
    

### CST
    (RZS
        ""
        ""
    )


Test of parser: "LEERZEILE"
===========================


di68kap's avatar
di68kap committed
48
49
Match-test "m1"
---------------
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

### Test-code:
    
    
    

### AST
    (LEERZEILE
        (:RegExp
            ""
            ""
            ""
        )
    )

di68kap's avatar
di68kap committed
65
66
Match-test "m2"
---------------
67
68
69
70

### Test-code:
    
    
di68kap's avatar
di68kap committed
71
    // Kommentar
72
73
74
75
76
77
78
79

### AST
    (LEERZEILE
        (:RegExp
            ""
            ""
            ""
        )
80
        (:Whitespace
di68kap's avatar
di68kap committed
81
            "// Kommentar"
82
83
84
        )
    )

di68kap's avatar
di68kap committed
85
86
Match-test "m3"
---------------
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

### Test-code:
    
    
    
    

### AST
    (LEERZEILE
        (:RegExp
            ""
            ""
            ""
            ""
        )
    )

di68kap's avatar
di68kap committed
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Match-test "m4"
---------------

### Test-code:
    
    
    /* Kommentar
    
    Kommentar fortsetzung */
    

### CST
    (LEERZEILE
        (:RegExp
            ""
            ""
            ""
        )
        (:RE
            (:Whitespace
                "/* Kommentar"
                ""
                "Kommentar fortsetzung */"
            )
            (:RegExp
                ""
                ""
            )
        )
    )

di68kap's avatar
di68kap committed
135
136
137
138
139
140
141
142
143
144
145
146
147
Fail-test "f1"
--------------

### Test-code:
    
    

Fail-test "f2"
--------------

### Test-code:
    
    
di68kap's avatar
di68kap committed
148
    // Kommentar
di68kap's avatar
di68kap committed
149
    
di68kap's avatar
di68kap committed
150
    // Kommentar
di68kap's avatar
di68kap committed
151
152
    

153
154
155
156
157

Test of parser: "LÜCKE"
=======================


di68kap's avatar
di68kap committed
158
159
Match-test "m1"
---------------
160
161
162
163
164
165
166
167

### Test-code:
    
    
    

### AST
    (LÜCKE
di68kap's avatar
di68kap committed
168
        (KOMMENTARZEILEN)
169
170
171
172
173
174
175
176
177
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
            )
        )
    )

di68kap's avatar
di68kap committed
178
179
Match-test "m2"
---------------
180
181
182
183

### Test-code:
    
    
di68kap's avatar
di68kap committed
184
    // Kommentar
185
186
187
188
    

### AST
    (LÜCKE
di68kap's avatar
di68kap committed
189
        (KOMMENTARZEILEN)
190
191
192
193
194
195
196
197
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
            )
            (:RE
                (:Whitespace
di68kap's avatar
di68kap committed
198
                    "// Kommentar"
199
200
201
202
203
204
205
206
207
                )
                (:RegExp
                    ""
                    ""
                )
            )
        )
    )

di68kap's avatar
di68kap committed
208
209
Match-test "m3"
---------------
210
211
212
213
214
215
216
217
218

### Test-code:
    
    
    
    

### AST
    (LÜCKE
di68kap's avatar
di68kap committed
219
        (KOMMENTARZEILEN)
220
221
222
223
224
225
226
227
228
229
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
                ""
            )
        )
    )

di68kap's avatar
di68kap committed
230
231
Match-test "m4"
---------------
232
233
234
235

### Test-code:
    
    
di68kap's avatar
di68kap committed
236
    // Kommentar
237
    
di68kap's avatar
di68kap committed
238
    // Kommentar
239
240
241
242
    

### AST
    (LÜCKE
di68kap's avatar
di68kap committed
243
        (KOMMENTARZEILEN)
244
245
246
247
248
249
250
251
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
            )
            (:RE
                (:Whitespace
di68kap's avatar
di68kap committed
252
                    "// Kommentar"
253
254
255
256
257
258
259
260
261
                )
                (:RegExp
                    ""
                    ""
                )
            )
        )
    )

di68kap's avatar
di68kap committed
262
263
Match-test "m5"
---------------
264
265

### Test-code:
di68kap's avatar
di68kap committed
266
267
     //Kommentar
    //Kommentar
268
    
di68kap's avatar
di68kap committed
269
    // Kommentar
270
271
272
273
274
275
276
277
278

### AST
    (LÜCKE
        (KOMMENTARZEILEN
            (:Series
                (:RegExp
                    " "
                )
                (:RegExp
di68kap's avatar
di68kap committed
279
                    "//Kommentar"
280
281
282
283
284
285
286
287
                )
            )
            (:Series
                (:RegExp
                    ""
                    ""
                )
                (:RegExp
di68kap's avatar
di68kap committed
288
                    "//Kommentar"
289
290
291
292
293
294
295
296
297
                )
            )
        )
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
            )
298
            (:Whitespace
di68kap's avatar
di68kap committed
299
                "// Kommentar"
300
301
302
303
            )
        )
    )

di68kap's avatar
di68kap committed
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
Fail-test "f1"
--------------

### Test-code:
     

Fail-test "f2"
--------------

### Test-code:
    
    

Fail-test "f3"
--------------

### Test-code:
    
di68kap's avatar
di68kap committed
322
    // Kommentar
di68kap's avatar
di68kap committed
323
324
325
326
327

Fail-test "f4"
--------------

### Test-code:
di68kap's avatar
di68kap committed
328
329
330
331
332
333
334
335
336
337
338
339
     //Kommentar
    // Kommentar
    // Kommentar

Fail-test "f5"
--------------

### Test-code:
     //Kommentar
    /* Kommentar
    
    Kommentar */
di68kap's avatar
di68kap committed
340

341

di68kap's avatar
di68kap committed
342
343
Test of parser: "LZ"
====================
344
345


di68kap's avatar
di68kap committed
346
347
Match-test "m1"
---------------
348
349
350
351
352

### Test-code:
     

### AST
di68kap's avatar
di68kap committed
353
    (LZ
354
355
356
357
358
        (:RegExp
            " "
        )
    )

di68kap's avatar
di68kap committed
359
360
Match-test "m2"
---------------
361
362

### Test-code:
di68kap's avatar
di68kap committed
363
     // Kommentar
364
365

### AST
di68kap's avatar
di68kap committed
366
    (LZ
367
368
369
370
        (:RegExp
            " "
        )
        (:RegExp
di68kap's avatar
di68kap committed
371
            "// Kommentar"
372
373
374
        )
    )

di68kap's avatar
di68kap committed
375
376
Match-test "m3"
---------------
377
378
379
380
381

### Test-code:
      

### AST
di68kap's avatar
di68kap committed
382
    (LZ
383
384
385
386
387
        (:RegExp
            "  "
        )
    )

di68kap's avatar
di68kap committed
388
389
Match-test "m4"
---------------
390
391

### Test-code:
di68kap's avatar
di68kap committed
392
    // Kommentar
393
394

### AST
di68kap's avatar
di68kap committed
395
    (LZ
396
        (:RegExp
di68kap's avatar
di68kap committed
397
            "// Kommentar"
398
399
400
        )
    )

di68kap's avatar
di68kap committed
401
402
Match-test "m5"
---------------
403
404

### Test-code:
di68kap's avatar
di68kap committed
405
    // Kommentar
406
407
408
    

### AST
di68kap's avatar
di68kap committed
409
    (LZ
410
        (:RegExp
di68kap's avatar
di68kap committed
411
            "// Kommentar"
412
413
414
415
416
417
418
        )
        (:RegExp
            ""
            ""
        )
    )

di68kap's avatar
di68kap committed
419
420
Match-test "m6"
---------------
421
422
423

### Test-code:
    
di68kap's avatar
di68kap committed
424
    // Kommentar
425
    
di68kap's avatar
di68kap committed
426
    // Kommentar
427
428
429
430
    
    

### AST
di68kap's avatar
di68kap committed
431
    (LZ
432
433
434
435
436
        (:RegExp
            ""
            ""
        )
        (:RegExp
di68kap's avatar
di68kap committed
437
            "// Kommentar"
438
439
440
441
442
443
444
        )
        (:RegExp
            ""
            ""
            ""
        )
        (:RegExp
di68kap's avatar
di68kap committed
445
            "// Kommentar"
446
447
448
449
450
451
452
453
        )
        (:RegExp
            ""
            ""
            ""
        )
    )

di68kap's avatar
di68kap committed
454
455
Match-test "m7"
---------------
456
457
458
459
460
461
462
463

### Test-code:
    
    
    
    

### AST
di68kap's avatar
di68kap committed
464
    (LZ
465
466
467
468
469
470
471
472
        (:RegExp
            ""
            ""
            ""
            ""
        )
    )

di68kap's avatar
di68kap committed
473
474
475
476
477
478
Fail-test "f1"
--------------

### Test-code:
    X

479
480
481
482
483

Test of parser: "ZWW"
=====================


di68kap's avatar
di68kap committed
484
485
Match-test "m1"
---------------
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500

### Test-code:
    
    

### AST
    (ZWW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
        )
    )

di68kap's avatar
di68kap committed
501
502
Match-test "m2"
---------------
503
504
505

### Test-code:
    
di68kap's avatar
di68kap committed
506
    // Kommentar
507
508
509
510
511
512
513
514
515

### AST
    (ZWW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
            (:Whitespace
di68kap's avatar
di68kap committed
516
                "// Kommentar"
517
518
519
520
            )
        )
    )

di68kap's avatar
di68kap committed
521
522
Match-test "m3"
---------------
523
524
525

### Test-code:
    
di68kap's avatar
di68kap committed
526
    // Kommentar
527
528
529
530
531
532
533
534
535
536
    

### AST
    (ZWW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
            (:Whitespace
di68kap's avatar
di68kap committed
537
                "// Kommentar"
538
539
540
541
            )
        )
    )

di68kap's avatar
di68kap committed
542
543
Match-test "m4"
---------------
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560

### Test-code:
    
    
    
    

### AST
    (ZWW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
        )
    )

di68kap's avatar
di68kap committed
561
562
563
564
565
566
Fail-test "f1"
--------------

### Test-code:
     

567
568
569
570
571

Test of parser: "ZW"
====================


di68kap's avatar
di68kap committed
572
573
Match-test "m1"
---------------
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588

### Test-code:
    
    

### AST
    (ZW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
        )
    )

di68kap's avatar
di68kap committed
589
590
Match-test "m2"
---------------
591
592
593

### Test-code:
    
di68kap's avatar
di68kap committed
594
    // Kommentar
595
596
597
598
599
600
601
602
603

### AST
    (ZW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
            (:Whitespace
di68kap's avatar
di68kap committed
604
                "// Kommentar"
605
606
            )
        )
di68kap's avatar
di68kap committed
607
608
609
610
611
612
613
614
    )

Fail-test "f1"
--------------

### Test-code:
    
    
di68kap's avatar
di68kap committed
615
616
617
618
619
620
621
622
623
624
625
    


Test of parser: "FREITEXT"
==========================


Fail-test "f1"
--------------

### Test-code:
di68kap's avatar
di68kap committed
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
    Text -> Verweis


Test of parser: "SEITENZAHL"
============================


Match-test "m1"
---------------

### Test-code:
    123

### AST
    (SEITENZAHL
        "123"
    )

Match-test "m2"
---------------

### Test-code:
    123^b

### AST
    (SEITENZAHL
        "123^b"
    )

Match-test "m3"
---------------

### Test-code:
di68kap's avatar
di68kap committed
659
    4^capit.
di68kap's avatar
di68kap committed
660
661
662

### AST
    (SEITENZAHL
di68kap's avatar
di68kap committed
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
        "4^capit."
    )

Match-test "m4"
---------------

### Test-code:
    4^{bona fide}

### AST
    (SEITENZAHL
        "4^{bona fide}"
    )

Fail-test "f1"
--------------

### Test-code:
    4^bona fide