ERMParser.h 635 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "../global.h"
  3. class ERMParser
  4. {
  5. private:
  6. std::string srcFile;
  7. int parsedLine;
  8. void repairEncoding(char * str, int len) const; //removes nonstandard ascii characters from string
  9. void repairEncoding(std::string & str) const; //removes nonstandard ascii characters from string
  10. enum ELineType{COMMAND_FULL, COMMENT, UNFINISHED_STRING, END_OF_STRING};
  11. int countHatsBeforeSemicolon(const std::string & line) const;
  12. ELineType classifyLine(const std::string & line, bool inString) const;
  13. void parseLine(const std::string & line);
  14. public:
  15. ERMParser(std::string file);
  16. void parseFile();
  17. };