Beispiel #1
0
        public Config(Writer writer, Format fmt, GetConfig get_new_config)
        {
            m_fmt = fmt;

            m_get_new_config = get_new_config ?? no_new_config;

            file = new VectFormatter(writer);
            file.seperator          = fmt.line_spacing > 0 ? "" : " ";
            file.seperator_spacing  = fmt.line_spacing;
            file.footer_spacing     = 1;

            top_vect = new_vect(writer, fmt.format_vect, "#(", "TV");
            vect     = new_vect(writer, fmt.format_vect, "#(", "V");
            vect_cdr = new_vect(writer, fmt.format_vect, " . #(", "-V");

            cons      = new_cons(writer, fmt.do_abbrev, true, "C");
            top_cons  = new_cons(writer, fmt.do_abbrev, true, "TC");
            vect_cons = new_cons(writer, fmt.do_abbrev, fmt.format_vect, "VC");
            head_cons = new_cons(writer, fmt.do_abbrev, fmt.format_head, "HC");

            vect_cons_cdr = new_cons_cdr(writer, fmt.format_vect, fmt.dot_cdr, fmt.dot_nil, "-VC");
            head_cons_cdr = new_cons_cdr(writer, fmt.format_head, fmt.dot_cdr, fmt.dot_nil, "-HC");
            appl_cons_cdr = new_cons_cdr(writer, fmt.format_appl, fmt.dot_cdr, fmt.dot_nil, "-AC");
            data_cons_cdr = new_cons_cdr(writer, fmt.format_data, fmt.dot_cdr, fmt.dot_nil, "-DC");

            atom = new AtomFormatter(writer);

            atom_cdr = new AtomFormatter(writer);
            atom_cdr.header = " . ";
        }
Beispiel #2
0
        VectFormatter new_vect(Writer writer, bool format, string head, string db)
        {
            VectFormatter f = new VectFormatter(writer);

            f.do_indent         = format;
            f.seperator_spacing = format ? 1 : 0;
            f.seperator         = format ? "" : " ";
            f.header            = debug_str(db) + head;
            f.footer            = ")";

            return f;
        }