@Override
    public Object dupNode(Object t) {
        if ( t==null ) return null;
        return ((GrammarAST)t).dupNode(); //create(((GrammarAST)t).token);
    }
Make sure even imaginary nodes know the input stream
tool/src/org/antlr/v4/parse/GrammarASTAdaptor.java