public String getTypeString() {
        if ( ast==null ) return null;
        return ANTLRParser.tokenNames[getType()].toLowerCase();
    }
Is id a valid token name? Does id start with an uppercase letter?
tool/src/org/antlr/v4/tool/Grammar.java