summaryrefslogtreecommitdiff
path: root/test/namespace1.lm
blob: a608fe118d19ec8f9c258d0656f8e0a2f1a303c6 (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
##### LM #####
namespace n1

	lex
		token id / 'a' .. 'z' /
		ignore / '\n' | '\t' | ' ' /
	end

	def start
		[id*]
end

parse P: n1::start[stdin]
print( P '\n' )
##### IN #####
a
  b
  c
d
##### EXP #####
a
  b
  c
d