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

1234567891011121314151617181920212223
  1. #ifndef L2_PARSE_H
  2. #define L2_PARSE_H
  3. #include "lex.h"
  4. #include "../io.h"
  5. #include "../strset.h"
  6. struct l2_parse_state {
  7. struct l2_lexer *lexer;
  8. struct l2_bufio_writer writer;
  9. struct l2_strset atoms;
  10. struct l2_strset strings;
  11. };
  12. void l2_parse_init(
  13. struct l2_parse_state *state,
  14. struct l2_lexer *lexer, struct l2_io_writer *w);
  15. void l2_parse_free(struct l2_parse_state *state);
  16. void l2_parse_program(struct l2_parse_state *state);
  17. #endif