Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added optional repetition to parser.
Any item can now be optionally repeated by adding the special sequence "[...]" after it. This is can be used with Token (or any derived version), AnyToken, Sequence or Alternation. Attempting to place it after AnyTokenString or another Repeater will result in a parse error, as these cases are nonsensical. As a result of the possiblity of repetition, the "fields" dictionary is now populated with a list of values in the order they were matched from the commandline. Unit tests have been updated with basic functional tests for repetition but, as always, more cases might be useful. Also, additional tracing possibilities have been added for debugging parse errors.
- Loading branch information
Showing
2 changed files
with
176 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters