forb
parser.hpp
1 //
2 // Created by gabriele on 19/11/18.
3 //
4 
5 #ifndef FORBCC_PARSER_H
6 #define FORBCC_PARSER_H
7 
8 #include <string>
9 
10 namespace forbcc {
11 
14  enum class keywords_idx_t {
15  MODULE, STRUCT, INTERFACE, NUM_KEYWORDS
16  };
17 
19  extern const std::string keywords[];
20 
22  extern const std::string direction_keywords[];
23 
25  extern const std::string reserved_names[];
26 
28  extern const int reserved_names_length;
29 
32  class parser {
33  std::string filename;
34 
35  public:
37  explicit parser(const std::string &filename) : filename(filename) {};
38 
41  void execute();
42  };
43 
44 }
45 
46 
47 #endif //FORBCC_PARSER_H
Parses an already pre-processed FORB IDL file and populates forbcc::module::global_module with all th...
Definition: parser.hpp:32
Definition: code_ostream.hpp:11
parser(const std::string &filename)
Creates a new parser with the given input file.
Definition: parser.hpp:37