


## 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 # types is from src/lib/compiler/front/typer-stuff/types/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 = prettyprint; # prettyprint is from src/lib/prettyprint/big/src/prettyprint.pkg # prettyprint_symbolmapstack is from src/lib/compiler/front/typer-stuff/symbolmapstack/prettyprint-symbolmapstack.pkgherein
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 compiler_mapstack_set;
stipulate
prettyprint_filename
=
directory + "/" +
filename_prefix +
"global-symbols" +
filename_suffix;
herein
pp = prettyprinter::make_file_prettyprinter prettyprint_filename;
pps = pp.stream;
end;
latex_print_symbolmapstack::latex_print_symbolmapstack
pps
{ directory,
filename_prefix,
filename_suffix
}
(symbolmapstack_part compiler_mapstack_set);
pp::newline pps;
pp::newline pps;
pp::newline pps;
pp::string pps "% This file generated by latex_print_compiler_state_to_file from"; pp::newline pps;
pp::string pps "% src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.pkg";
pp::newline pps;
pp.flush ();
pp.close ();
stipulate
prettyprint_filename
=
directory + "/" +
filename_prefix +
"linking-mapstack" +
filename_suffix;
herein
pp = prettyprinter::make_file_prettyprinter prettyprint_filename;
pps = pp.stream;
end;
latex_print_symbolmapstack::latex_print_symbolmapstack
pps
{ directory,
filename_prefix,
filename_suffix
}
(symbolmapstack_part compiler_mapstack_set);
pp::newline pps;
pp::newline pps;
pp::newline pps;
pp::string pps "Linking table"; pp::newline pps;
pp::string pps "-------------"; pp::newline pps;
pp::newline pps;
pp::string pps "(unimplemented)"; pp::newline pps;
pp::string pps "% This file generated by latex_print_compiler_state_to_file from"; pp::newline pps;
pp::string pps "% src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.pkg";
pp::newline pps;
pp.flush ();
pp.close ();
stipulate
prettyprint_filename
=
directory + "/" +
filename_prefix +
"inlining-mapstack" +
filename_suffix;
herein
pp = prettyprinter::make_file_prettyprinter prettyprint_filename;
pps = pp.stream;
end;
pp::newline pps;
pp::newline pps;
pp::newline pps;
pp::string pps "Inlining table"; pp::newline pps;
pp::string pps "--------------"; pp::newline pps;
pp::newline pps;
pp::string pps "(unimplemented)"; pp::newline pps;
pp::string pps "% This file generated by latex_print_compiler_state_to_file from"; pp::newline pps;
pp::string pps "% src/lib/compiler/front/typer-stuff/symbolmapstack/latex-print-compiler-state.pkg";
pp::newline pps;
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::string pps "Combined (top_level + base) compiler tableset"; pp::newline pps;
# pp::string pps "============================================="; pp::newline pps;
# 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 pps;
# pp::newline pps;
# pp::newline pps;
# pp::string pps "Toplevel compiler tableset"; pp::newline pps;
# pp::string pps "=========================="; pp::newline pps;
# latex_print_compiler_mapstack_set_reference pps (compiler_state::top_level ());
#
# pp::newline pps;
# pp::newline pps;
# pp::newline pps;
# pp::string pps "Base compiler tableset"; pp::newline pps;
# pp::string pps "======================"; pp::newline pps;
# latex_print_compiler_mapstack_set_reference pps (compiler_state::base ());
#
# pp::newline pps;
# pp::newline pps;
# pp::newline pps;
# pp::string pps "Pervasive compiler tableset"; pp::newline pps;
# pp::string pps "==========================="; pp::newline pps;
# latex_print_compiler_mapstack_set_reference pps 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;


