You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parse.h 399B

12345678910111213141516171819
  1. #ifndef L2_PARSE_H
  2. #define L2_PARSE_H
  3. #include "lex.h"
  4. #include "gen/gen.h"
  5. struct l2_parse_error {
  6. int line;
  7. int ch;
  8. char *message;
  9. };
  10. void l2_parse_err(struct l2_parse_error *err, struct l2_token *tok, const char *fmt, ...);
  11. void l2_parse_error_free(struct l2_parse_error *err);
  12. int l2_parse_program(
  13. struct l2_lexer *lexer, struct l2_generator *gen, struct l2_parse_error *err);
  14. #endif