|
|
1.1 root 1: %token WORD COMMA DOT NEG APPEND HEAD PARA STORY PIPE WRITE NL
2: %{
3: /* garbage to let this compile */
4: typedef char * charptr;
5: # define YYSTYPE charptr
6: extern char * svc();
7: %}
8: %%
9: S: T R;
10: | R
11: T: which =defdest();
12: R: ;
13: | R req;
14: req: what where newline which;
15: what: HEAD =svsz(1);
16: | PARA =svsz(2);
17: | STORY =svsz(3);
18: | =svsz(3);
19: where: PIPE =svwh($1);
20: | APPEND = svwh($1);
21: | WRITE = svwh($1);
22: which: story newline =mkstory();
23: | which story newline = mkstory();
24: seq: wkey ;
25: | seq wkey ;
26: sent: seq = mkseq();
27: | sent COMMA seq = mkseq();
28: story: sent = mksent();
29: | story DOT sent = mksent();
30: wkey: WORD ={mkwrd($1, 0);}
31: | NEG WORD ={mkwrd($2, 1);}
32: newline: NL;
33: | newline NL;
34: %%
35: # include "stdio.h"
36: # include "ctype.h"
37: # include "assert.h"
38: # include "lex.yy.c"
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.