Uses a StatementAccumulator to handle the accumulation of lines until a line terminated with a statement is encountered. Fixes #41