ometa G { num = anything:n -> (self.acc += n), nums = num* } G.acc = "" G.matchAll([1, 2, 3, 4], "nums") G.matchAll("1 2 3 4", "nums") G.matchAll("1234", "nums") ometa N { num = anything:n -> (self.acc += n), nump = ' ' num | num , nums = nump* } N.acc = "" N.matchAll([1, 2, 3, 4], "nums") [1, 12, 123, 1234] N.matchAll("1 2 3 4", "nums") [1, 12, 123, 1234] N.matchAll("1234", "nums") [1, 12, 123, 1234] ometa M { num = anything:n -> (self.acc += n), nums = num ' ' nums | num } M.acc = "" M.matchAll("1 2 3 4", "nums") 1234