throw exception not null

This commit is contained in:
Terence Parr 2013-11-21 09:02:53 -08:00
parent 33d11709df
commit 599896cf1b
1 changed files with 5 additions and 3 deletions

View File

@ -64,10 +64,12 @@ public abstract class Recognizer<Symbol, ATNInterpreter extends ATNSimulator> {
*
* Provide a dummy return value here to support backward compatibility.
*
* For interpreters, we don't know their serialized ATN despite having
* created the interpreter from it.
* For interpreters, we don't know their serialized ATN despite having
* created the interpreter from it.
*/
public String getSerializedATN() { return null; }
public String getSerializedATN() {
throw new UnsupportedOperationException("there is no serialized ATN");
}
/** For debugging and other purposes, might want the grammar name.
* Have ANTLR generate an implementation for this method.