Looking thru the documentation for leex, I don't see an example of matching exactly N elements, like (element){n}
?
This fails:
Definitions.
ThreeFoos = foo{3}
The work around is this:
Definitions.
ThreeFoos = foofoofoo
So if I had a case where I want to match 3,000 foo's, the definition ThreeThousandFoos = foofoofoo<2,997 more foos>
would get pretty unwieldy. There are hacks, like constructing increasingly large foo definitions from smaller ones (e.g. SixteenFoos = {EightFoos}{EightFoos}
), but that seems silly.
It looks like the support in
leex
for interval ranges was commented out six years ago in Erlang/OTP and never included back again.