-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialogue.rm
64 lines (52 loc) · 1.02 KB
/
dialogue.rm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "grammar.rm"
package dialogue;
import cap from util;
import adv,adj from eng;
main: (
(c1 = eng.noun_name)
(c2 = eng.noun_name)
((speaker = c1) dialogue
(speaker = c2) dialogue){1,5}
){1,20};
dialogue: (
"\"" cap[k? statement] ",\"" " " said_speaker ".\n" 2|
"\"" statement > util.xcap ",\"" " " said_speaker ", \"" k statement ".\"\n"
);
said_speaker: said " " speaker (" " qualification)?;
speaker: eng.noun_name;
k: grammar.cc " ";
subject: grammar.subj;
sub_clause: (
grammar.sc " " statement
);
statement:
subject " " grammar.vp_past
;
said:
"thought"|
"said"|
"testified"|
"proclaimed"|
"quipped"|
"mused"|
"screamed"|
"insisted"|
"complained"|
"argued"|
"muttered"|
"whispered"|
"shrieked"|
"drawled"|
"cried"|
"exclaimed"|
"protested"|
"declared"|
"grumbled"|
"spat"
;
qualification: (
("as"|"as if"|"so that"|"while"|"when"|"after") " " grammar.subj " " grammar.vp_past |
"between " eng.noun_plural " of " eng.noun_singular |
"despite being " adv " " adj |
"even though " statement
);