// this fakes the recognition of semanticActions, good enough for a bootstrap ometa M <: Parser { semanticAction = "[" iSemanticAction(0):xs ']' -> xs.join(''), iSemanticAction :n = ( '[' {n++} -> '[' | ']' ?(n > 0) {n--} -> ']' | ~(']' ?(n <= 0)) anything )* } M.matchAll("[3]", "semanticAction") M.matchAll("[3 > 5 ifTrue: [1 to: 10 do: [:x | self inform: x]]]", "semanticAction")