changed the grammar to require brackets and improved parsing