lib/rley/engine.rb in rley-0.6.04 vs lib/rley/engine.rb in rley-0.6.05
- old
+ new
@@ -59,10 +59,13 @@
a_token.instance_variable_set(:@terminal, term_symb)
tokens << a_token
end
parser = build_parser(grammar)
parser.gf_graph.diagnose if configuration.diagnose
- return parser.parse(tokens)
+ result = parser.parse(tokens)
+ result.tidy_up!
+
+ return result
end
# Convert raw parse result into a more convenient representation
# (parse tree or parse forest) as specified by the configuration.
# @param aRawParse [Parser::GFGParsing]