Package easyIO
Class PredictiveRecognizer
- java.lang.Object
-
- easyIO.PredictiveRecognizer
-
- All Implemented Interfaces:
Recognizer
public abstract class PredictiveRecognizer extends java.lang.Object implements Recognizer
A Recognizer that decides what other recognizer to use based on the lookahead character.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface easyIO.Recognizer
Recognizer.Continuation, Recognizer.Success
-
-
Constructor Summary
Constructors Constructor Description PredictiveRecognizer()
-
Method Summary
All Methods Instance Methods Concrete 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
public void recognize(BacktrackScanner inp, Recognizer.Continuation cont) throws Recognizer.Success
Description copied from interface:Recognizer
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.- Specified by:
recognize
in interfaceRecognizer
- Throws:
Recognizer.Success
-
-