better rule parsing with braces