public final boolean match(CharStream cs, boolean ignore, boolean tentative) {
        handler.start(this, cs);
        Label labelStart = cs.mark();
        Label labelFinish;
        boolean ret;
        ret = doMatch(cs, ignore, tentative);
        if (ret) {
            labelFinish = cs.mark();
            // todo fix this, this does not work with AST builder.
            //final String string = cs.getString(labelStart, labelFinish);
            //if(!keywords.isEmpty())System.out.println(string);
//            if(keywords.contains(string))
//                handler.failed(this, cs);
//                if (!tentative) {
//                    String msg = "";
//                    final int[] la = new int[16];
//                    for(int i = 0;i<la.length;i++) {
//                        la[i] = cs.lookahead(i);
//                        msg += "\'" + (char) la[i] + "\'(" + la[i] + ")";
//                    }
//                    Utils.warning(this, "Matching failed at " + cs.position() + ". Expected " + this + ", encountered "+msg);
//                }
//            else {
                handler.handle(this, cs, labelStart, labelFinish);
//            }
            cs.unmark(labelFinish);
        } else {
            handler.failed(this, cs);
            if (!tentative && DEBUG) {
                String msg = "";
                final int[] la = new int[16];
                for(int i = 0;i<la.length;i++) {
                    la[i] = cs.lookahead(i);
                    msg += "\'" + (char) la[i] + "\'(" + la[i] + ")";
                }
                Utils.warning(this, "Matching failed at " + cs.position() + ". Expected " + this + ", encountered "+msg);
            }
        }
        cs.unmark(labelStart);
        return ret;

    }