@Override
    public Object errorNode(org.antlr.runtime.TokenStream input, org.antlr.runtime.Token start, org.antlr.runtime.Token stop,
                            org.antlr.runtime.RecognitionException e)
    {
        return new GrammarASTErrorNode(input, start, stop, e);
    }
Make sure even imaginary nodes know the input stream
tool/src/org/antlr/v4/parse/GrammarASTAdaptor.java