01_test_regexes.md 7.59 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
168
169
170
171
172
173
174
175
176

### Test-code:
    
    
    

### AST
    (LÜCKE
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
            )
        )
    )

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

### Test-code:
    
    
di68kap's avatar
di68kap committed
183
    // Kommentar
184
185
186
187
188
189
190
191
192
193
194
195
    

### AST
    (LÜCKE
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
            )
            (:RE
                (:Whitespace
di68kap's avatar
di68kap committed
196
                    "// Kommentar"
197
198
199
200
201
202
203
204
205
                )
                (:RegExp
                    ""
                    ""
                )
            )
        )
    )

di68kap's avatar
di68kap committed
206
207
Match-test "m3"
---------------
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226

### Test-code:
    
    
    
    

### AST
    (LÜCKE
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
                ""
            )
        )
    )

di68kap's avatar
di68kap committed
227
228
Match-test "m4"
---------------
229
230
231
232

### Test-code:
    
    
di68kap's avatar
di68kap committed
233
    // Kommentar
234
    
di68kap's avatar
di68kap committed
235
    // Kommentar
236
237
238
239
240
241
242
243
244
245
246
247
    

### AST
    (LÜCKE
        (LEERZEILE
            (:RegExp
                ""
                ""
                ""
            )
            (:RE
                (:Whitespace
di68kap's avatar
di68kap committed
248
                    "// Kommentar"
249
250
251
252
253
254
255
256
257
                )
                (:RegExp
                    ""
                    ""
                )
            )
        )
    )

di68kap's avatar
di68kap committed
258
259
Match-test "m5"
---------------
260
261

### Test-code:
di68kap's avatar
di68kap committed
262
263
     //Kommentar
    //Kommentar
264
    
di68kap's avatar
di68kap committed
265
    // Kommentar
266
267
268
269
270
271
272
273
274

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

di68kap's avatar
di68kap committed
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
Fail-test "f1"
--------------

### Test-code:
     

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

### Test-code:
    
    

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

### Test-code:
    
di68kap's avatar
di68kap committed
318
    // Kommentar
di68kap's avatar
di68kap committed
319
320
321
322
323

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

### Test-code:
di68kap's avatar
di68kap committed
324
325
326
327
328
329
330
331
332
333
334
335
     //Kommentar
    // Kommentar
    // Kommentar

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

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

337

di68kap's avatar
di68kap committed
338
339
Test of parser: "LZ"
====================
340
341


di68kap's avatar
di68kap committed
342
343
Match-test "m1"
---------------
344
345
346
347
348

### Test-code:
     

### AST
di68kap's avatar
di68kap committed
349
    (LZ
350
351
352
353
354
        (:RegExp
            " "
        )
    )

di68kap's avatar
di68kap committed
355
356
Match-test "m2"
---------------
357
358

### Test-code:
di68kap's avatar
di68kap committed
359
     // Kommentar
360
361

### AST
di68kap's avatar
di68kap committed
362
    (LZ
363
364
365
366
        (:RegExp
            " "
        )
        (:RegExp
di68kap's avatar
di68kap committed
367
            "// Kommentar"
368
369
370
        )
    )

di68kap's avatar
di68kap committed
371
372
Match-test "m3"
---------------
373
374
375
376
377

### Test-code:
      

### AST
di68kap's avatar
di68kap committed
378
    (LZ
379
380
381
382
383
        (:RegExp
            "  "
        )
    )

di68kap's avatar
di68kap committed
384
385
Match-test "m4"
---------------
386
387

### Test-code:
di68kap's avatar
di68kap committed
388
    // Kommentar
389
390

### AST
di68kap's avatar
di68kap committed
391
    (LZ
392
        (:RegExp
di68kap's avatar
di68kap committed
393
            "// Kommentar"
394
395
396
        )
    )

di68kap's avatar
di68kap committed
397
398
Match-test "m5"
---------------
399
400

### Test-code:
di68kap's avatar
di68kap committed
401
    // Kommentar
402
403
404
    

### AST
di68kap's avatar
di68kap committed
405
    (LZ
406
        (:RegExp
di68kap's avatar
di68kap committed
407
            "// Kommentar"
408
409
410
411
412
413
414
        )
        (:RegExp
            ""
            ""
        )
    )

di68kap's avatar
di68kap committed
415
416
Match-test "m6"
---------------
417
418
419

### Test-code:
    
di68kap's avatar
di68kap committed
420
    // Kommentar
421
    
di68kap's avatar
di68kap committed
422
    // Kommentar
423
424
425
426
    
    

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

di68kap's avatar
di68kap committed
450
451
Match-test "m7"
---------------
452
453
454
455
456
457
458
459

### Test-code:
    
    
    
    

### AST
di68kap's avatar
di68kap committed
460
    (LZ
461
462
463
464
465
466
467
468
        (:RegExp
            ""
            ""
            ""
            ""
        )
    )

di68kap's avatar
di68kap committed
469
470
471
472
473
474
Fail-test "f1"
--------------

### Test-code:
    X

475
476
477
478
479

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


di68kap's avatar
di68kap committed
480
481
Match-test "m1"
---------------
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496

### Test-code:
    
    

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

di68kap's avatar
di68kap committed
497
498
Match-test "m2"
---------------
499
500
501

### Test-code:
    
di68kap's avatar
di68kap committed
502
    // Kommentar
503
504
505
506
507
508
509
510
511

### AST
    (ZWW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
            (:Whitespace
di68kap's avatar
di68kap committed
512
                "// Kommentar"
513
514
515
516
            )
        )
    )

di68kap's avatar
di68kap committed
517
518
Match-test "m3"
---------------
519
520
521

### Test-code:
    
di68kap's avatar
di68kap committed
522
    // Kommentar
523
524
525
526
527
528
529
530
531
532
    

### AST
    (ZWW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
            (:Whitespace
di68kap's avatar
di68kap committed
533
                "// Kommentar"
534
535
536
537
            )
        )
    )

di68kap's avatar
di68kap committed
538
539
Match-test "m4"
---------------
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556

### Test-code:
    
    
    
    

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

di68kap's avatar
di68kap committed
557
558
559
560
561
562
Fail-test "f1"
--------------

### Test-code:
     

563
564
565
566
567

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


di68kap's avatar
di68kap committed
568
569
Match-test "m1"
---------------
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584

### Test-code:
    
    

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

di68kap's avatar
di68kap committed
585
586
Match-test "m2"
---------------
587
588
589

### Test-code:
    
di68kap's avatar
di68kap committed
590
    // Kommentar
591
592
593
594
595
596
597
598
599

### AST
    (ZW
        (ZEILENSPRUNG
            (:RegExp
                ""
                ""
            )
            (:Whitespace
di68kap's avatar
di68kap committed
600
                "// Kommentar"
601
602
            )
        )
di68kap's avatar
di68kap committed
603
604
605
606
607
608
609
610
    )

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

### Test-code:
    
    
di68kap's avatar
di68kap committed
611
612
613
614
615
616
617
618
619
620
621
    


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


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

### Test-code:
di68kap's avatar
di68kap committed
622
623
624
625
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
659
660
    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:
    4^{capit.}

### AST
    (SEITENZAHL
        "4^{capit.}"
    )