ometa SAParser { expr :inside = '(' expr(true)* ')' | '[' expr(true)* ']' | '{' expr(true)* '}' | '"' (~'"' ('*' char | '\\' char | char))* '"' | ?inside ~(')' | ']' | '}' | '"') char | letter letterOrDigit* | digit+ | '.', semAction = } SAParser.matchAll("[({1+(2)})]", "semAction") SAParser.matchAll("abc xyz", "semAction") SAParser.matchAll("%1.2%", "semAction") SAParser.matchAll("{ out(\"hello })\"); resultis 5 }", "semAction") SAParser.matchAll('"this is a test\\n"', "semAction") SAParser.matchAll("x+y", "semAction") SAParser.matchAll("(x+y)", "semAction") SAParser.matchAll("foo.bar", "semAction") SAParser.matchAll("this.m(1, 2, 3+4)", "semAction")