grammar.h 650 B

12345678910111213141516171819202122232425
  1. #ifndef VIRTUALMATH_GRAMMAR_H
  2. #define VIRTUALMATH_GRAMMAR_H
  3. #include "__macro.h"
  4. struct ParserMessage{
  5. struct TokenMessage *tm;
  6. enum ParserMessageStatus{
  7. success = 1,
  8. syntax_error,
  9. command_list_error,
  10. lexical_error,
  11. int_error,
  12. } status;
  13. char *status_message;
  14. char *file;
  15. };
  16. typedef struct ParserMessage ParserMessage;
  17. ParserMessage *makeParserMessage(char *file_dir);
  18. void freeParserMessage(ParserMessage *pm, bool self);
  19. void parserCommandList(ParserMessage *pm, Inter *inter, bool global, bool is_one, Statement *st);
  20. // PASERSSIGNATURE 位于__grammar
  21. #endif //VIRTUALMATH_GRAMMAR_H