Cleaning Up
With that done we can finally remove our include for mpc
. We’ll need to replace it with includes for some of the libraries mpc
included for us. The top of our file should now look like this.
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
And we’ll also have to remove the forward declarations of our parsers, so please delete the following too.
/* Parser Declariations */
mpc_parser_t* Number;
mpc_parser_t* Symbol;
mpc_parser_t* String;
mpc_parser_t* Comment;
mpc_parser_t* Sexpr;
mpc_parser_t* Qexpr;
mpc_parser_t* Expr;
mpc_parser_t* Lispy;
And with that we’re really done! Enjoy your new hand rolled parser.
当前内容版权归 orangeduck 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 orangeduck .