Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/test2.syn @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 { | |
2 #include <stdio.h> | |
3 } | |
4 | |
5 [ | |
6 event driven | |
7 distinguish keywords {'a-z' + 'A-Z' + '0-9'} | |
8 ] | |
9 | |
10 line $ | |
11 -> "if", '(', ~(eol + '(')?..., eol =printf("if\n"); | |
12 -> "ifx",'(', ~(eol + '(')?..., eol =printf("ifx\n"); | |
13 -> other stuff, eol | |
14 | |
15 other stuff | |
16 -> ~eol:c =printf("%c", c); | |
17 -> other stuff, ~eol:c =printf("%c", c); | |
18 | |
19 | |
20 eol = '\n' | |
21 | |
22 { | |
23 int main(void) { | |
24 int c; | |
25 init_test2(); | |
26 do { | |
27 c = getchar(); | |
28 PCB.input_code = c; | |
29 test2(); | |
30 } while ( c != '\n'); | |
31 return 0; | |
32 } | |
33 } | |
34 |