grammar.h 631 B

123456789101112131415161718192021222324
  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. } status;
  12. char *status_message;
  13. char *file;
  14. };
  15. typedef struct ParserMessage ParserMessage;
  16. ParserMessage *makeParserMessage(char *file_dir);
  17. void freeParserMessage(ParserMessage *pm, bool self);
  18. void parserCommandList(ParserMessage *pm, Inter *inter, bool global, bool is_one, Statement *st);
  19. // PASERSSIGNATURE 位于__grammar
  20. #endif //VIRTUALMATH_GRAMMAR_H