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 415B

1234567891011121314151617181920
  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. int is_static;
  9. char *message;
  10. };
  11. void l2_parse_err(struct l2_parse_error *err, struct l2_token *tok, const char *fmt, ...);
  12. void l2_parse_error_free(struct l2_parse_error *err);
  13. int l2_parse_program(
  14. struct l2_lexer *lexer, struct l2_generator *gen, struct l2_parse_error *err);
  15. #endif