435
|
1 |
"{ Encoding: utf8 }"
|
|
2 |
|
|
3 |
"{ Package: 'stx:goodies/petitparser/parsers/java' }"
|
|
4 |
|
|
5 |
"{ NameSpace: Smalltalk }"
|
|
6 |
|
|
7 |
PPCompositeParserTest subclass:#PPJavaLexiconTest
|
|
8 |
instanceVariableNames:''
|
|
9 |
classVariableNames:''
|
|
10 |
poolDictionaries:''
|
|
11 |
category:'PetitJava-Tests'
|
|
12 |
!
|
|
13 |
|
|
14 |
!PPJavaLexiconTest methodsFor:'accessing'!
|
|
15 |
|
|
16 |
parserClass
|
|
17 |
^ PPJavaLexicon
|
|
18 |
! !
|
|
19 |
|
|
20 |
!PPJavaLexiconTest methodsFor:'testing'!
|
|
21 |
|
|
22 |
testIdentifier6
|
|
23 |
|
|
24 |
self
|
|
25 |
fail: 'super'
|
|
26 |
rule: #identifier
|
|
27 |
! !
|
|
28 |
|
|
29 |
!PPJavaLexiconTest methodsFor:'testing-comments'!
|
|
30 |
|
|
31 |
testComment1
|
|
32 |
|
|
33 |
self
|
|
34 |
parse: '//'
|
|
35 |
rule: #comment
|
|
36 |
!
|
|
37 |
|
|
38 |
testComment2
|
|
39 |
|
|
40 |
self
|
|
41 |
parse: '//comment'
|
|
42 |
rule: #comment
|
|
43 |
!
|
|
44 |
|
|
45 |
testComment3
|
|
46 |
|
|
47 |
self
|
|
48 |
parse: '// comment'
|
|
49 |
rule: #comment
|
|
50 |
!
|
|
51 |
|
|
52 |
testComment4
|
|
53 |
|
|
54 |
self
|
|
55 |
parse: '/* comment */'
|
|
56 |
rule: #comment
|
|
57 |
!
|
|
58 |
|
|
59 |
testComment5
|
|
60 |
|
|
61 |
self
|
|
62 |
fail: '/* comment '
|
|
63 |
rule: #comment
|
|
64 |
!
|
|
65 |
|
|
66 |
testComment6
|
|
67 |
|
|
68 |
self
|
|
69 |
parse: '/* this comment /* // /** ends here: */'
|
|
70 |
rule: #comment
|
|
71 |
!
|
|
72 |
|
|
73 |
testComment7
|
|
74 |
|
|
75 |
self
|
|
76 |
parse: '/**
|
|
77 |
* @param args
|
|
78 |
* @return void
|
|
79 |
*/'
|
|
80 |
rule: #comment
|
|
81 |
!
|
|
82 |
|
|
83 |
testTraditionalComment1
|
|
84 |
|
|
85 |
self
|
|
86 |
parse: '/* this comment */'
|
|
87 |
rule: #traditionalComment
|
|
88 |
!
|
|
89 |
|
|
90 |
testTraditionalComment2
|
|
91 |
|
|
92 |
self
|
|
93 |
parse: '/* this comment / */'
|
|
94 |
rule: #comment
|
|
95 |
! !
|
|
96 |
|
|
97 |
!PPJavaLexiconTest methodsFor:'testing-identifiers'!
|
|
98 |
|
|
99 |
testIdentifier1
|
|
100 |
|
|
101 |
self
|
|
102 |
parse: 'String'
|
|
103 |
rule: #identifier
|
|
104 |
!
|
|
105 |
|
|
106 |
testIdentifier2
|
|
107 |
|
|
108 |
self
|
|
109 |
parse: 'i3'
|
|
110 |
rule: #identifier
|
|
111 |
!
|
|
112 |
|
|
113 |
testIdentifier3
|
|
114 |
|
|
115 |
self
|
|
116 |
parse: 'ฮฑฯฮตฯฮท'
|
|
117 |
rule: #identifier
|
|
118 |
!
|
|
119 |
|
|
120 |
testIdentifier4
|
|
121 |
|
|
122 |
self
|
|
123 |
parse: 'MAX_VALUE'
|
|
124 |
rule: #identifier
|
|
125 |
!
|
|
126 |
|
|
127 |
testIdentifier5
|
|
128 |
|
|
129 |
self
|
|
130 |
parse: 'isLetterOrDigit'
|
|
131 |
rule: #identifier
|
|
132 |
! !
|
|
133 |
|
|
134 |
!PPJavaLexiconTest methodsFor:'testing-input'!
|
|
135 |
|
|
136 |
testInput1
|
|
137 |
|
|
138 |
self parse: 'package testPackage;
|
|
139 |
class Test {
|
|
140 |
public static void main(String[] args) {
|
|
141 |
String hello = "Hello", lo = "lo";
|
|
142 |
System.out.print((hello == "Hello") + " ");
|
|
143 |
System.out.print((Other.hello == hello) + " ");
|
|
144 |
System.out.print((other.Other.hello == hello) + " ");
|
|
145 |
System.out.print((hello == ("Hel"+"lo")) + " ");
|
|
146 |
System.out.print((hello == ("Hel"+lo)) + " ");
|
|
147 |
System.out.println(hello == ("Hel"+lo).intern());
|
|
148 |
}
|
|
149 |
}
|
|
150 |
class Other { static String hello = "Hello"; }'
|
|
151 |
rule: #input
|
|
152 |
!
|
|
153 |
|
|
154 |
testInput2
|
|
155 |
|
|
156 |
self parse: 'package other;
|
|
157 |
public class Other { static String hello = "Hello"; }'
|
|
158 |
rule: #input
|
|
159 |
!
|
|
160 |
|
|
161 |
testInput3
|
|
162 |
|
|
163 |
self parse: 'class Value { int val; }
|
|
164 |
class Test {
|
|
165 |
public static void main(String[] args) {
|
|
166 |
int i1 = 3;
|
|
167 |
int i2 = i1;
|
|
168 |
i2 = 4;
|
|
169 |
System.out.print("i1==" + i1);
|
|
170 |
System.out.println(" but i2==" + i2);
|
|
171 |
Value v1 = new Value();
|
|
172 |
v1.val = 5;
|
|
173 |
Value v2 = v1;
|
|
174 |
v2.val = 6;
|
|
175 |
System.out.print("v1.val==" + v1.val);
|
|
176 |
System.out.println(" and v2.val==" + v2.val);
|
|
177 |
}
|
|
178 |
}'
|
|
179 |
rule: #input
|
|
180 |
! !
|
|
181 |
|
|
182 |
!PPJavaLexiconTest methodsFor:'testing-lineTerminators'!
|
|
183 |
|
|
184 |
testInputCharacter1
|
|
185 |
|
|
186 |
self
|
|
187 |
parse: '\'
|
|
188 |
rule: #inputCharacter
|
|
189 |
!
|
|
190 |
|
|
191 |
testInputCharacter2
|
|
192 |
|
|
193 |
self
|
|
194 |
fail: (Character cr asString)
|
|
195 |
rule: #inputCharacter
|
|
196 |
!
|
|
197 |
|
|
198 |
testInputCharacter3
|
|
199 |
|
|
200 |
self
|
|
201 |
fail: (Character lf asString)
|
|
202 |
rule: #inputCharacter
|
|
203 |
!
|
|
204 |
|
|
205 |
testLineTerminator1
|
|
206 |
|
|
207 |
self
|
|
208 |
parse: (Character lf asString)
|
|
209 |
rule: #lineTerminator
|
|
210 |
!
|
|
211 |
|
|
212 |
testLineTerminator2
|
|
213 |
|
|
214 |
self
|
|
215 |
parse: (Character cr asString)
|
|
216 |
rule: #lineTerminator
|
|
217 |
!
|
|
218 |
|
|
219 |
testLineTerminator3
|
|
220 |
|
436
|
221 |
self
|
|
222 |
parse: (Character codePoint: 13) asString , (Character codePoint: 10) asString
|
|
223 |
rule: #lineTerminator
|
|
224 |
|
|
225 |
"Modified: / 21-04-2015 / 15:47:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
435
|
226 |
!
|
|
227 |
|
|
228 |
testLineTerminator4
|
|
229 |
|
|
230 |
self
|
|
231 |
fail: (Character space asString)
|
|
232 |
rule: #lineTerminator
|
|
233 |
!
|
|
234 |
|
|
235 |
testLineTerminator5
|
|
236 |
|
|
237 |
self
|
|
238 |
fail: ('a' asString)
|
|
239 |
rule: #lineTerminator
|
|
240 |
! !
|
|
241 |
|
|
242 |
!PPJavaLexiconTest methodsFor:'testing-literal-float'!
|
|
243 |
|
|
244 |
testFloatLiteral1
|
|
245 |
self
|
|
246 |
parse: '1e1f'
|
|
247 |
rule: #floatingPointLiteral
|
|
248 |
!
|
|
249 |
|
|
250 |
testFloatLiteral10
|
|
251 |
self
|
|
252 |
parse: '0.0'
|
|
253 |
rule: #floatingPointLiteral
|
|
254 |
!
|
|
255 |
|
|
256 |
testFloatLiteral11
|
|
257 |
self
|
|
258 |
parse: '3.14'
|
|
259 |
rule: #floatingPointLiteral
|
|
260 |
!
|
|
261 |
|
|
262 |
testFloatLiteral12
|
|
263 |
self
|
|
264 |
parse: '1e-9d'
|
|
265 |
rule: #floatingPointLiteral
|
|
266 |
!
|
|
267 |
|
|
268 |
testFloatLiteral13
|
|
269 |
self
|
|
270 |
parse: '1e137'
|
|
271 |
rule: #floatingPointLiteral
|
|
272 |
!
|
|
273 |
|
|
274 |
testFloatLiteral2
|
|
275 |
self
|
|
276 |
parse: '2.f'
|
|
277 |
rule: #floatingPointLiteral
|
|
278 |
!
|
|
279 |
|
|
280 |
testFloatLiteral3
|
|
281 |
self
|
|
282 |
parse: '.3f'
|
|
283 |
rule: #floatingPointLiteral
|
|
284 |
!
|
|
285 |
|
|
286 |
testFloatLiteral4
|
|
287 |
self
|
|
288 |
parse: '0f'
|
|
289 |
rule: #floatingPointLiteral
|
|
290 |
!
|
|
291 |
|
|
292 |
testFloatLiteral5
|
|
293 |
self
|
|
294 |
parse: '3.14f'
|
|
295 |
rule: #floatingPointLiteral
|
|
296 |
!
|
|
297 |
|
|
298 |
testFloatLiteral6
|
|
299 |
self
|
|
300 |
parse: '6.022137e+23f'
|
|
301 |
rule: #floatingPointLiteral
|
|
302 |
!
|
|
303 |
|
|
304 |
testFloatLiteral7
|
|
305 |
self
|
|
306 |
parse: '1e1'
|
|
307 |
rule: #floatingPointLiteral
|
|
308 |
!
|
|
309 |
|
|
310 |
testFloatLiteral8
|
|
311 |
self
|
|
312 |
parse: '2.'
|
|
313 |
rule: #floatingPointLiteral
|
|
314 |
!
|
|
315 |
|
|
316 |
testFloatLiteral9
|
|
317 |
self
|
|
318 |
parse: '.3'
|
|
319 |
rule: #floatingPointLiteral
|
|
320 |
! !
|
|
321 |
|
|
322 |
!PPJavaLexiconTest methodsFor:'testing-literals'!
|
|
323 |
|
|
324 |
testBooleanLiteral1
|
|
325 |
self
|
|
326 |
parse: 'true'
|
|
327 |
rule: #booleanLiteral
|
|
328 |
!
|
|
329 |
|
|
330 |
testBooleanLiteral2
|
|
331 |
self
|
|
332 |
parse: 'false'
|
|
333 |
rule: #booleanLiteral
|
|
334 |
!
|
|
335 |
|
|
336 |
testLiteral1
|
|
337 |
|
|
338 |
self
|
|
339 |
parse: 'null'
|
|
340 |
rule: #literal
|
|
341 |
!
|
|
342 |
|
|
343 |
testLiteral10
|
|
344 |
|
|
345 |
self
|
|
346 |
fail: '0777 L'
|
|
347 |
rule: #literal
|
|
348 |
!
|
|
349 |
|
|
350 |
testLiteral11
|
|
351 |
|
|
352 |
self
|
|
353 |
fail: '0777 0'
|
|
354 |
rule: #literal
|
|
355 |
!
|
|
356 |
|
|
357 |
testLiteral12
|
|
358 |
|
|
359 |
self
|
|
360 |
fail: '0 x'
|
|
361 |
rule: #literal
|
|
362 |
!
|
|
363 |
|
|
364 |
testLiteral13
|
|
365 |
|
|
366 |
self
|
|
367 |
parse: '"This is a Java string"'
|
|
368 |
rule: #literal
|
|
369 |
!
|
|
370 |
|
|
371 |
testLiteral2
|
|
372 |
|
|
373 |
self
|
|
374 |
parse: 'false'
|
|
375 |
rule: #literal
|
|
376 |
!
|
|
377 |
|
|
378 |
testLiteral3
|
|
379 |
|
|
380 |
self
|
|
381 |
parse: '6.022137e+23f'
|
|
382 |
rule: #literal
|
|
383 |
!
|
|
384 |
|
|
385 |
testLiteral4
|
|
386 |
|
|
387 |
self
|
|
388 |
parse: '1e1'
|
|
389 |
rule: #literal
|
|
390 |
!
|
|
391 |
|
|
392 |
testLiteral5
|
|
393 |
|
|
394 |
self
|
|
395 |
parse: '0x100000000L'
|
|
396 |
rule: #literal
|
|
397 |
!
|
|
398 |
|
|
399 |
testLiteral6
|
|
400 |
|
|
401 |
self
|
|
402 |
parse: '0372'
|
|
403 |
rule: #literal
|
|
404 |
!
|
|
405 |
|
|
406 |
testLiteral7
|
|
407 |
|
|
408 |
self
|
|
409 |
parse: '0xDadaCafe'
|
|
410 |
rule: #literal
|
|
411 |
!
|
|
412 |
|
|
413 |
testLiteral8
|
|
414 |
|
|
415 |
self
|
|
416 |
parse: '0x00FF00FF'
|
|
417 |
rule: #literal
|
|
418 |
!
|
|
419 |
|
|
420 |
testLiteral9
|
|
421 |
|
|
422 |
self
|
|
423 |
parse: '0777L'
|
|
424 |
rule: #literal
|
|
425 |
!
|
|
426 |
|
|
427 |
testNullLiteral1
|
|
428 |
|
|
429 |
self
|
|
430 |
parse: 'null'
|
|
431 |
rule: #nullLiteral
|
|
432 |
!
|
|
433 |
|
|
434 |
testStringLiteral1
|
|
435 |
|
|
436 |
self
|
|
437 |
parse: '""'
|
|
438 |
rule: #stringLiteral
|
|
439 |
!
|
|
440 |
|
|
441 |
testStringLiteral10
|
|
442 |
|
|
443 |
self
|
|
444 |
fail: '"This is a \\
|
|
445 |
two lines Java string"'
|
|
446 |
rule: #stringLiteral
|
|
447 |
!
|
|
448 |
|
|
449 |
testStringLiteral11
|
|
450 |
|
|
451 |
self
|
|
452 |
parse: '"null"'
|
|
453 |
rule: #stringLiteral
|
|
454 |
!
|
|
455 |
|
|
456 |
testStringLiteral2
|
|
457 |
|
|
458 |
self
|
|
459 |
parse: '"\""'
|
|
460 |
rule: #stringLiteral
|
|
461 |
!
|
|
462 |
|
|
463 |
testStringLiteral3
|
|
464 |
|
|
465 |
self
|
|
466 |
parse: '"This is a Java string"'
|
|
467 |
rule: #stringLiteral
|
|
468 |
!
|
|
469 |
|
|
470 |
testStringLiteral4
|
|
471 |
|
|
472 |
self
|
|
473 |
fail: '"This is a
|
|
474 |
two lines Java string"'
|
|
475 |
rule: #stringLiteral
|
|
476 |
!
|
|
477 |
|
|
478 |
testStringLiteral5
|
|
479 |
|
|
480 |
self
|
|
481 |
fail: '"This is a \b
|
|
482 |
two lines Java string"'
|
|
483 |
rule: #stringLiteral
|
|
484 |
!
|
|
485 |
|
|
486 |
testStringLiteral6
|
|
487 |
|
|
488 |
self
|
|
489 |
fail: '"This is a \t
|
|
490 |
two lines Java string"'
|
|
491 |
rule: #stringLiteral
|
|
492 |
!
|
|
493 |
|
|
494 |
testStringLiteral7
|
|
495 |
|
|
496 |
self
|
|
497 |
fail: '"This is a \n
|
|
498 |
two lines Java string"'
|
|
499 |
rule: #stringLiteral
|
|
500 |
!
|
|
501 |
|
|
502 |
testStringLiteral8
|
|
503 |
|
|
504 |
self
|
|
505 |
fail: '"This is a \f
|
|
506 |
two lines Java string"'
|
|
507 |
rule: #stringLiteral
|
|
508 |
!
|
|
509 |
|
|
510 |
testStringLiteral9
|
|
511 |
|
|
512 |
self
|
|
513 |
fail: '"This is a \r
|
|
514 |
two lines Java string"'
|
|
515 |
rule: #stringLiteral
|
|
516 |
! !
|
|
517 |
|
|
518 |
!PPJavaLexiconTest methodsFor:'testing-literals-characters'!
|
|
519 |
|
|
520 |
testCharacterLiteral1
|
|
521 |
self
|
|
522 |
parse: '''a'''
|
|
523 |
rule: #characterLiteral
|
|
524 |
!
|
|
525 |
|
|
526 |
testCharacterLiteral2
|
|
527 |
self
|
|
528 |
parse: '''%'''
|
|
529 |
rule: #characterLiteral
|
|
530 |
!
|
|
531 |
|
|
532 |
testCharacterLiteral3
|
|
533 |
self
|
|
534 |
parse: '''\t'''
|
|
535 |
rule: #characterLiteral
|
|
536 |
!
|
|
537 |
|
|
538 |
testCharacterLiteral4
|
|
539 |
self
|
|
540 |
parse: '''\\'''
|
|
541 |
rule: #characterLiteral
|
|
542 |
!
|
|
543 |
|
|
544 |
testCharacterLiteral5
|
|
545 |
self
|
|
546 |
parse: '''\'''''
|
|
547 |
rule: #characterLiteral
|
|
548 |
!
|
|
549 |
|
|
550 |
testCharacterLiteral6
|
|
551 |
"not clear how this must be supported
|
|
552 |
(see http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.10.6)"
|
|
553 |
|
|
554 |
"self
|
|
555 |
parse: '''\u03a9'''
|
|
556 |
rule: #characterLiteral"
|
|
557 |
!
|
|
558 |
|
|
559 |
testCharacterLiteral7
|
|
560 |
"not clear how this must be supported
|
|
561 |
(see http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.10.6)"
|
|
562 |
"
|
|
563 |
self
|
|
564 |
parse: '''\uFFFF'''
|
|
565 |
rule: #characterLiteral"
|
|
566 |
!
|
|
567 |
|
|
568 |
testCharacterLiteral8
|
|
569 |
self
|
|
570 |
parse: '''\177'''
|
|
571 |
rule: #characterLiteral
|
|
572 |
!
|
|
573 |
|
|
574 |
testSeparator1
|
|
575 |
self
|
|
576 |
parse: '{'
|
|
577 |
rule: #separator
|
|
578 |
! !
|
|
579 |
|
|
580 |
!PPJavaLexiconTest methodsFor:'testing-literals-integer'!
|
|
581 |
|
|
582 |
testHexIntegerLiteral1
|
|
583 |
self
|
|
584 |
parse: '0xC0B0L'
|
|
585 |
rule: #hexIntegerLiteral
|
|
586 |
!
|
|
587 |
|
|
588 |
testIntegerLiteral1
|
|
589 |
self
|
|
590 |
parse: '0'
|
|
591 |
rule: #integerLiteral
|
|
592 |
!
|
|
593 |
|
|
594 |
testIntegerLiteral10
|
|
595 |
self
|
|
596 |
parse: '1996'
|
|
597 |
rule: #integerLiteral
|
|
598 |
!
|
|
599 |
|
|
600 |
testIntegerLiteral11
|
|
601 |
self
|
|
602 |
parse: '0x00FF00FF'
|
|
603 |
rule: #integerLiteral
|
|
604 |
!
|
|
605 |
|
|
606 |
testIntegerLiteral2
|
|
607 |
self
|
|
608 |
parse: '0l'
|
|
609 |
rule: #integerLiteral
|
|
610 |
!
|
|
611 |
|
|
612 |
testIntegerLiteral3
|
|
613 |
self
|
|
614 |
parse: '0777L'
|
|
615 |
rule: #integerLiteral
|
|
616 |
!
|
|
617 |
|
|
618 |
testIntegerLiteral4
|
|
619 |
self
|
|
620 |
parse: '0x100000000L'
|
|
621 |
rule: #integerLiteral
|
|
622 |
!
|
|
623 |
|
|
624 |
testIntegerLiteral5
|
|
625 |
self
|
|
626 |
parse: '2147483648L'
|
|
627 |
rule: #integerLiteral
|
|
628 |
!
|
|
629 |
|
|
630 |
testIntegerLiteral6
|
|
631 |
self
|
|
632 |
parse: '0xC0B0L'
|
|
633 |
rule: #integerLiteral
|
|
634 |
!
|
|
635 |
|
|
636 |
testIntegerLiteral7
|
|
637 |
self
|
|
638 |
parse: '2'
|
|
639 |
rule: #integerLiteral
|
|
640 |
!
|
|
641 |
|
|
642 |
testIntegerLiteral8
|
|
643 |
self
|
|
644 |
parse: '0372'
|
|
645 |
rule: #integerLiteral
|
|
646 |
!
|
|
647 |
|
|
648 |
testIntegerLiteral9
|
|
649 |
self
|
|
650 |
parse: '0xDadaCafe'
|
|
651 |
rule: #integerLiteral
|
|
652 |
!
|
|
653 |
|
|
654 |
testOctalIntegerLiteral1
|
|
655 |
self
|
|
656 |
parse: '0777L'
|
|
657 |
rule: #octalIntegerLiteral
|
|
658 |
!
|
|
659 |
|
|
660 |
testOperator
|
|
661 |
self
|
|
662 |
parse: '>'
|
|
663 |
rule: #operator
|
|
664 |
! !
|
|
665 |
|
|
666 |
!PPJavaLexiconTest methodsFor:'testing-unicode'!
|
|
667 |
|
|
668 |
testUnicodeEscape1
|
|
669 |
|
|
670 |
self
|
|
671 |
parse: '\u0000'
|
|
672 |
rule: #unicodeEscape
|
|
673 |
!
|
|
674 |
|
|
675 |
testUnicodeEscape2
|
|
676 |
|
|
677 |
self
|
|
678 |
fail: '\u000'
|
|
679 |
rule: #unicodeEscape
|
|
680 |
!
|
|
681 |
|
|
682 |
testUnicodeEscape3
|
|
683 |
|
|
684 |
self
|
|
685 |
fail: '\u00000'
|
|
686 |
rule: #unicodeEscape
|
|
687 |
!
|
|
688 |
|
|
689 |
testUnicodeInputCharacter1
|
|
690 |
|
|
691 |
self
|
|
692 |
parse: '\u0000'
|
|
693 |
rule: #unicodeInputCharacter
|
|
694 |
!
|
|
695 |
|
|
696 |
testUnicodeInputCharacter2
|
|
697 |
|
|
698 |
self
|
|
699 |
parse: '\'
|
|
700 |
rule: #unicodeInputCharacter
|
|
701 |
!
|
|
702 |
|
|
703 |
testUnicodeInputCharacter3
|
|
704 |
|
|
705 |
self
|
|
706 |
parse: 'ยต'
|
|
707 |
rule: #unicodeInputCharacter
|
|
708 |
!
|
|
709 |
|
|
710 |
testUnicodeInputCharacter4
|
|
711 |
|
|
712 |
self
|
|
713 |
fail: '\\'
|
|
714 |
rule: #unicodeInputCharacter
|
|
715 |
!
|
|
716 |
|
|
717 |
testUnicodeInputCharacter5
|
|
718 |
self
|
|
719 |
parse: '\u2297'
|
|
720 |
rule: #unicodeInputCharacter
|
|
721 |
!
|
|
722 |
|
|
723 |
testUnicodeInputCharacter6
|
|
724 |
self
|
|
725 |
fail: '\u2H97'
|
|
726 |
rule: #unicodeInputCharacter
|
|
727 |
!
|
|
728 |
|
|
729 |
testUnicodeInputCharacter7
|
|
730 |
"unicode value for \"
|
|
731 |
self
|
|
732 |
parse: '\u005a'
|
|
733 |
rule: #unicodeInputCharacter
|
|
734 |
!
|
|
735 |
|
|
736 |
testWhiteSpace1
|
|
737 |
"Testing whiteSpace parser"
|
|
738 |
self
|
|
739 |
parse: (Character value: 12) asString
|
|
740 |
rule: #whiteSpace
|
|
741 |
!
|
|
742 |
|
|
743 |
testWhiteSpace2
|
|
744 |
"Testing whiteSpace parser"
|
|
745 |
self
|
|
746 |
fail: 'WhiteSpace testing'
|
|
747 |
rule: #whiteSpace
|
|
748 |
! !
|
|
749 |
|