summaryrefslogtreecommitdiff
path: root/test/reparse.lm
blob: 340327c9cd0043df7735086c6856164e7f13f6d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
lex start
{
	ignore /space+/
	literal '*', '(', ')'
	token id /[a-zA-Z_]+/
}

def item 
	[id]
|	['(' item* ')']

def start 
	[item*]

Input: item* = parse item*( stdin )

S: start = cons start[ Input ]

Again: start = parse start( Input )

print( Again, '\n' )