summaryrefslogtreecommitdiff
path: root/test/colm.d/redef5.lm
blob: aa19d3f57004422881fc85b7782de1d9a20b48ee (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
	token ident /[a-z]+/
	ignore /[ \t\n]+/
end

lex
	token alt_ident /[a-z]+/
	ignore /[ \t\n]+/
end

def main
	[ident]

redef main
	[alt_ident]
|	[...]

parse Main: main[stdin]
if Main {
	AI: alt_ident = alt_ident in Main
	if AI
		print "found alt [^AI]
}
##### IN #####
a
##### EXP #####
found alt a