blob: 2308b764dad9bec7df192019f73b7357eef621a5 (
plain)
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
|
##### LM #####
lex
ignore /space+/
literal '*', '(', ')'
token id /[a-zA-Z_]+/
end
def item
[id]
| ['(' item* ')']
def start
[item*]
parse Input: item*[ stdin ]
S: start = cons start[ Input ]
parse Again: start[ %Input ]
print( %Again )
##### IN #####
a b c ( chocolate fudge ) d e
##### EXP #####
a b c ( chocolate fudge ) d e
|