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.

  1. #include <string.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <stdarg.h>
  5. #include <errno.h>

And we’ll also have to remove the forward declarations of our parsers, so please delete the following too.

  1. /* Parser Declariations */
  2. mpc_parser_t* Number;
  3. mpc_parser_t* Symbol;
  4. mpc_parser_t* String;
  5. mpc_parser_t* Comment;
  6. mpc_parser_t* Sexpr;
  7. mpc_parser_t* Qexpr;
  8. mpc_parser_t* Expr;
  9. mpc_parser_t* Lispy;

And with that we’re really done! Enjoy your new hand rolled parser.