Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/test1.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 /* | |
25 int c; | |
26 init_test2(); | |
27 do { | |
28 c = getchar(); | |
29 PCB.input_code = c; | |
30 test2(); | |
31 } while ( c != '\n'); | |
32 */ | |
33 test1(); | |
34 return 0; | |
35 } | |
36 } | |
37 |