Package easyIO
Interface Recognizer
-
- All Known Implementing Classes:
PredictiveRecognizer
public interface Recognizer
A Recognizer recognizes certain input sequences of characters available on a BacktrackScanner, and invokes a continuation for each recognized sequence.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Recognizer.Continuation
The remainder of a computation that can be performed after recognizing input.static class
Recognizer.Success
Represents successful matching of the input stream by a recognizer.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
recognize(BacktrackScanner inp, Recognizer.Continuation cont)
For each possible way of recognizing the input, advanceinp
past the point where the input is recognized and invokecont
.
-
-
-
Method Detail
-
recognize
void recognize(BacktrackScanner inp, Recognizer.Continuation cont) throws Recognizer.Success
For each possible way of recognizing the input, advanceinp
past the point where the input is recognized and invokecont
. If the continuation throwsSuccess
, leave the input position where it is and throw the same exception to the caller.- Throws:
Recognizer.Success
-
-