Contains the source code from the course work throughout my undergraduate Computer Engineering degree at Brigham Young University. There is a mixture of Go, Python, C, C++, Java, VHDL, Verilog, Matlab, Bash, Assembly, etc..
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.

45 lines
1.8KB

  1. #ifndef __LEXI_H__
  2. #define __LEXI_H__
  3. #include <iostream>
  4. #include <fstream>
  5. #include <vector>
  6. #include "token.h"
  7. #include <cctype>
  8. #include <string>
  9. #include <sstream>
  10. using namespace std;
  11. class lexi {
  12. public:
  13. lexi(){}
  14. vector<token> tokens;
  15. string determiner(string, string);
  16. vector<token> lexical_analyzer(vector<string>, string);
  17. string type_simple(string, string);
  18. string type_simple_string(string);
  19. bool is_simple_string(string);
  20. string det_type_simple_string(vector<string>&, int, int);
  21. bool is_char_valid(char);
  22. string string_finder(vector<string>&, int, int);
  23. string comment_finder(vector<string>&, int, int);
  24. string id_finder(vector<string>&, int, int);
  25. string incorrect(string);
  26. bool det_help_simple(string, string);
  27. bool det_help_simple_string(string, string);
  28. bool quick_help(string, string);
  29. bool det_help_id(string);
  30. string type_simple_caps(string, string);
  31. bool simple_state(vector<string>&, string, string, string, int, int);
  32. bool simple_state_string(vector<string>&, string, string, string, int, int);
  33. bool simple_id(vector<string>&, string, string, string, int, int);
  34. bool simple_comment(vector<string>&, string, string, string, int, int);
  35. void write_to_file(string);
  36. void write_to_file(string, int);
  37. };
  38. #endif