public int getUnexpectedType() {
if ( input instanceof TokenStream ) {
return token.getType();
}
else if ( input instanceof TreeNodeStream ) {
TreeNodeStream nodes = (TreeNodeStream)input;
TreeAdaptor adaptor = nodes.getTreeAdaptor();
return adaptor.getType(node);
}
else {
return c;
}