# This file is part of asmc, a bootstrapping OS with minimal seed # Copyright (C) 2018 Giovanni Mascellani # https://gitlab.com/giomasce/asmc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . fun compile_mcpp 0 { $filename @filename "/disk1/mcpp/all.c" = ; # Preprocessing $ctx @ctx ppctx_init = ; ctx "ONE_SOURCE" "1" ppctx_define ; ctx filename ppctx_set_base_filename ; $tokens @tokens 4 vector_init = ; tokens ctx filename preproc_file ; @tokens tokens remove_whites = ; @tokens tokens collapse_strings = ; #@tokens filename tokenize_file = ; "Finished preprocessing\n" log ; #tokens print_token_list ; # Compilation $cctx @cctx tokens cctx_init = ; cctx cctx_compile ; # Debug output "TYPES TABLE\n" log ; cctx cctx_dump_types ; "TYPE NAMES TABLE\n" log ; cctx cctx_dump_typenames ; "GLOBALS TABLE\n" log ; cctx cctx_dump_globals ; tokens free_vect_of_ptrs ; cctx cctx_destroy ; ctx ppctx_destroy ; }