PreviousUpNext

15.4.618  src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.pkg

## latex-print-compiler-state.pkg

# Compiled by:
#     src/lib/compiler/core.sublib

# This is a clone of unparse-compiler-state.pkg
# specialized to produce LaTeX output intended to be
# run through Hevea to produce online HTML docs of
# our interfaces.
#
# We expect to be invoked primarily by   
#     latex_dump_api_reference  filename
# in
#     src/app/makelib/main/makelib-g.pkg


stipulate
    package cms =  compiler_mapstack_set;                                       # compiler_mapstack_set         is from   src/lib/compiler/toplevel/compiler-state/compiler-mapstack-set.pkg
                                                                                # symbol                        is from   src/lib/compiler/front/basics/map/symbol.pkg
                                                                                # type_declaration_types        is from   src/lib/compiler/front/typer-stuff/types/type-declaration-types.pkg
                                                                                # variables_and_constructors    is from   src/lib/compiler/front/typer-stuff/deep-syntax/variables-and-constructors.pkg
                                                                                # symbolmapstack                is from   src/lib/compiler/front/typer-stuff/symbolmapstack/symbolmapstack.pkg
                                                                                # symbolmapstack_entry          is from   src/lib/compiler/front/typer-stuff/symbolmapstack/symbolmapstack-entry.pkg

    package pp  =  standard_prettyprinter;                                      # standard_prettyprinter        is from   src/lib/prettyprint/big/src/standard-prettyprinter.pkg
                                                                                # prettyprint_symbolmapstack    is from   src/lib/compiler/front/typer-stuff/symbolmapstack/prettyprint-symbolmapstack.pkg
herein

    package latex_print_compiler_state:  Latex_Print_Compiler_State {           # Latex_Print_Compiler_State    is from   src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.api
        #
        fun latex_print_compiler_mapstack_set
                #
                { directory:       String,
                  filename_prefix: String,
                  filename_suffix: String
                }
                #
                (compiler_mapstack_set:  cms::Compiler_Mapstack_Set)
            =
            {
                include package  compiler_mapstack_set;

                stipulate

                    prettyprint_filename
                        =
                        directory + "/"   +
                        filename_prefix   +
                        "global-symbols"  +
                        filename_suffix;

                herein
                    pp  = standard_prettyprinter::make_standard_prettyprinter_into_file  prettyprint_filename  [];
                    pps = pp.pp;
                end;

                latex_print_symbolmapstack::latex_print_symbolmapstack
                    pp
                    { directory,
                      filename_prefix,
                      filename_suffix
                    }
                    (symbolmapstack_part  compiler_mapstack_set);

                pp.newline();
                pp.newline();
                pp.newline();
                pp.lit   "% This file generated by latex_print_compiler_state_to_file  from";           pp.newline();
                pp.lit   "%    src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.pkg";
                pp.newline();

                pp.flush ();
                pp.close ();



                stipulate

                    prettyprint_filename
                        =
                        directory + "/"   +
                        filename_prefix   +
                        "linking-mapstack"   +
                        filename_suffix;

                herein
                    pp  = standard_prettyprinter::make_standard_prettyprinter_into_file  prettyprint_filename  [];
                    pps = pp.pp;
                end;

                latex_print_symbolmapstack::latex_print_symbolmapstack
                    pp
                    { directory,
                      filename_prefix,
                      filename_suffix
                    }
                    (symbolmapstack_part  compiler_mapstack_set);

                pp.newline();
                pp.newline();
                pp.newline();
                pp.lit   "Linking table";            pp.newline();
                pp.lit   "-------------";            pp.newline();
                pp.newline();
                pp.lit   "(unimplemented)";          pp.newline();

                pp.lit   "% This file generated by latex_print_compiler_state_to_file  from";           pp.newline();
                pp.lit   "%    src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.pkg";
                pp.newline();

                pp.flush ();
                pp.close ();


                stipulate

                    prettyprint_filename
                        =
                        directory + "/"   +
                        filename_prefix   +
                        "inlining-mapstack"  +
                        filename_suffix;

                herein

                    pp  = standard_prettyprinter::make_standard_prettyprinter_into_file  prettyprint_filename  [];
                    pps = pp.pp;

                end;

                pp.newline();
                pp.newline();
                pp.newline();
                pp.lit   "Inlining table";           pp.newline();
                pp.lit   "--------------";           pp.newline();
                pp.newline();
                pp.lit   "(unimplemented)";          pp.newline();

                pp.lit   "% This file generated by latex_print_compiler_state_to_file  from";          pp.newline();
                pp.lit   "%    src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.pkg";
                pp.newline();

                pp.flush ();
                pp.close ();
            };


        fun latex_print_compiler_mapstack_set_reference
                { directory:       String,
                  filename_prefix: String,
                  filename_suffix: String
                }
                (compiler_mapstack_set_reference:   compiler_state::Compiler_Mapstack_Set_Jar)
            =
            latex_print_compiler_mapstack_set
                { directory,
                  filename_prefix,
                  filename_suffix
                }
                (compiler_mapstack_set_reference.get_mapstack_set ());


        fun latex_print_compiler_state
                { directory,
                  filename_prefix: String,
                  filename_suffix: String
                }
            =
            {
    #           pp.lit   "Combined (top_level + base) compiler tableset";            pp.newline();
    #       pp.lit   "=============================================";            pp.newline();

                # In practice virtually everything is in the top_level
                # symbol table, and the end user just cares     what is
                # available, not whether it arrived via base, pervasive
                # or whatever, so for routine production documentation
                # we just print out the combined symbolmapstack:
                #
                latex_print_compiler_mapstack_set
                    { directory,
                      filename_prefix,
                      filename_suffix
                    }
                    (compiler_state::combined ());

    #           pp.newline();
    #           pp.newline();
    #           pp.newline();
    #       pp.lit   "Toplevel compiler tableset";            pp.newline();
    #       pp.lit   "==========================";            pp.newline();
    #           latex_print_compiler_mapstack_set_reference  pp  (compiler_state::top_level ());
    #
    #           pp.newline();
    #           pp.newline();
    #           pp.newline();
    #       pp.lit   "Base compiler tableset";            pp.newline();
    #       pp.lit   "======================";            pp.newline();
    #           latex_print_compiler_mapstack_set_reference  pp  (compiler_state::base ());
    #
    #           pp.newline();
    #           pp.newline();
    #           pp.newline();
    #           pp.lit   "Pervasive compiler tableset";            pp.newline();
    #       pp.lit   "===========================";            pp.newline();
    #           latex_print_compiler_mapstack_set_reference  pp  compiler_state::pervasive;
            };


        fun latex_print_compiler_state_to_file
                { directory:       String,
                  filename_prefix: String,
                  filename_suffix: String
                }
            =
            {
                latex_print_compiler_state
                    { directory,
                      filename_prefix,
                      filename_suffix
                    };
            };

    };
end;














Comments and suggestions to: bugs@mythryl.org

PreviousUpNext