Speed up Boilerplater::Parser and improve test coverage.
--------------------------------------------------------
Key: LUCY-29
URL: https://issues.apache.org/jira/browse/LUCY-29
Project: Lucy
Issue Type: Sub-task
Components: Boilerplater
Reporter: Marvin Humphrey
Assignee: Marvin Humphrey
Attachments: parser_speed_and_coverage.diff
The production for composite types in Boilerplater::Parser is inefficient,
because it builds a simple Type object before failing to match, and this Type
object is subsequently discarded when the parser backtracks. The simple Type
-- which matched, on the way to failing to create a complete composite type --
now must be built up again.
By using the simple Type object rather than discarding it when the composite
type fails to match, we can speed up the parser by around 30%.
This patch also expands the test coverage for the parser, adding tests for
many lower level productions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.