| Age | Commit message (Collapse) | Author |
|
|
|
Add a simple utility class for easy I/O prompting on triggered readers.
|
|
Adds additional useful block reader types.
* LayeredBlockReader, which represents priority
* SerialBlockReader, which concatenates readers
|
|
|
|
|
|
|
|
|
|
|
|
This allows cool things to be accomplished through chaining BlockReaders
together without having to handle the block plumbing yourself.
The current set of implementations are a simple one that reads blocks
from a scanner delimited by a pattern, one that has a queue of blocks it
will attempt to pull from before reading, and one that triggers an
action before a block is read.
As an example use, for FDS, a combo of simple -> triggered -> pushback
is used where the triggered is used for prompting the user, and the
pushback supports macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forgetful groups are groups which reset the currently allowed nested
openers/closers from enclosing groups. This is useful for things like
quoted strings, where you don't want groups to open inside them.
As a consequence, this also adds nested openers.
However, predicated openers/closers cannot be nested.
|
|
The toString for block had the start/end lines backwards :-(
|
|
|
|
|
|
Adds BlockReader, which allows you to read blocks of characters delimited
by a given sequence from an arbitrary input source.
It provides line numbering relative to that source, as well as block
numbering.
The main caveat is that to prevent spurious NoSuchElementExceptions, EOF
is always treated as a valid delimiter, so blocks may be shorter than you
expect them to be.
This is only meant as a data input utility, not a data validation utility.
|
|
This adds a sample predicated opener/closer pair based off of regular
expressions.
The opener accepts a regular expression and will provide all of its
numbered captured groups.
The closer accepts a format string and uses the parameters (capture
groups) as the format parameters.
|
|
|
|
Two main features were added.
One, various sequence closers can imply a subgroup. This is mainly useful
in contexts like arrays, where you want one subgroup per array element.
Two, predicated opening/closing delimiters. These allow having both an
infinite set of opening delimiters, as well as having a set of closers
that is both infinite and dependant on what the opener was.
Note, however, that predicated openers and closers will be slower than
using normal openers/closers, since every one has to be tried to check if
a token is a opener/closer.
|
|
|
|
|
|
|
|
|
|
This fixes subgroups, by mostly rewriting the way the delimiter works.
|
|
|
|
|
|
Subgroups are essentially things like the , in a function call.
Now, you should be able to properly have function call arguments marked
for you.
|
|
|
|
|
|
|
|
|
|
|
|
An abbreviation map allows you to figure out which of the possible strings
in a given set could be abbreviated by a particular string.
|
|
|
|
|
|
|
|
Adds utility methods to classes that need them.
This covers the cli & component packages.
|
|
Moved the parsing utilities SequenceDelimiter and TokenSplitter to the
parserutils package, instead of the funcutils package.
|
|
Moved a bunch of token-oriented stuff from StringUtils to a new TokenUtils
class.
|
|
Made SequenceDelimiter work for arbitrary sequences of objects. Use the
StringDelimiter class for ease of use on strings.
|
|
|
|
|