Create a new stateful matching machine
matcher to start using. This can be changed by the callback methods in this class
optional observer
Stream-oriented matching. The observer can match in parallel with the main matcher.
context for the whole parsing operation
listeners observing input characters as they are read
Observe a match. The return can change the matcher in use, or return the current matcher.
pattern to observe
React to a match. The return can change the matcher, or return the current matcher.
matcher
Generated using TypeDoc
Single use, usually stateful, class for matching input. Offers the ability to observe a match, as well as match one, and to change the matcher in use depending on observation and matching. E.g. it's possible to choose to start matching pattern B after finding pattern A, or after seeing pattern A, even if starting off matching something else. This enables us, for example, to parse XML, with the observer watching element open and close to maintain the current path, while the matcher matches anything we want.