Most of the methods on ParseError were moved to Input as they were actually just calling them on Input objects anyways. This creates cleaner encapsulation of Input objects, and even makes them reusable after a ParseError has been raised with one of them (simply call Input#reset to reuse).
Reduced the use of Kernel#eval and created cleaner encapsulation of rule responsibilities in the hierarchy. Introduced Citrus#parse as an intermediary that is useful for performing parsing using Citrus::File and inspecting match results. Citrus::SyntaxError was created to report errors from parsing a Citrus grammar. Citrus#eval and Citrus::Rule#eval now throws a SyntaxError on failed parse. Also, created Citrus::Error and made all Citrus error classes subclasses. This enables more consistent error handling for clients.
Added a section to the README about testing and debugging.
Exposed Input#lines, Input#each_line, and ParseError#line_index just because there's no real advantage to keeping them private.
Calculating the offset every time a match is created can slow down the parse dramatically. Also, the actual offset of a match is not usually very useful during interpretation. The functionality was moved into citrus/debug.rb to preserve the ability to inspect the offset of a match when debugging.
Citrus::Input now extends StringScanner which provides a big boost to performance. As part of this refactoring, Citrus::FixedWidth and Citrus::Expression were merged into Citrus::Terminal. Also, Citrus::ParseError now provides much more detailed information for debugging parse failures. It is now very easy to discover the line, line number, and exact character where the error occurred.
The argument list to Repeat#new and Label#new needed to be reordered to follow a more sane model. Instead of accepting the rule as the last argument, they now accept the rule as the first argument just like all other Rule types.
If no methods are specified in an extension block, it is assumed that the block is to be used to define a "value" method on an anonymous module. This helps syntax to be much less verbose, and may be used in the vast majority of cases.