Fix issue 12, variable dimension issue.
Also added a parsertest.
Fixed remaining variable_dimension issues in grammar.