summaryrefslogtreecommitdiff
path: root/test/namespace1.lm
blob: eadaba143bcb7d125080b7f1b3bfea55122a6c3a (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.tree '\n' )
##### IN #####
a
  b
  c
d
##### EXP #####
a
  b
  c
d