comparison tests/agcl/parsifal/tcsoff2.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 ~case sensitive
3 event driven
4 ]
5
6 eof = -1
7 eol = '\n'
8
9 grammar
10 -> [word...|eol...|string 1 | string 2]/..., eof
11
12 word
13 -> "yes" =printf("Input was yes\n");
14 -> "no" =printf("Input was no\n");
15
16 string 1
17 -> 'a-n'... = printf("input was 'a-n'...\n");
18
19 string 2
20 -> 'O-Z'... = printf("input was 'O-Z'...\n");
21
22
23 {
24 int main(void) {
25 int c;
26 do {
27 c = PCB.input_code = getchar();
28 tcsoff2();
29 } while (c != -1);
30 }
31 return 0;
32 }