summaryrefslogtreecommitdiff
path: root/test/cases/colm.d/parsetree1.lm
blob: ed9c7bbf3540437947caaddaa3ba004cf24b10f6 (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
27
lex
	ignore /space+/
	literal `* `( `)
	token id /[a-zA-Z_]+/
end

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

def item2
	[id]
|	[`( item2* `)]

def start 
	[item*]

parse Item2: item2 "b

parse Input1: start "a [^Item2] c d
print[ @Input1 ]

parse_tree Input2: start "a [^Item2] c d
print[ @Input2 "\n" ]
######### EXP #########
a b c d
NIL