1 #ifndef _RE2C_AST_INPUT_ 2 #define _RE2C_AST_INPUT_ 3 4 #include <stdio.h> 5 #include <string> 6 #include <vector> 7 #include "src/util/c99_stdint.h" 8 #include "src/util/forbid_copy.h" 9 10 11 namespace re2c { 12 13 struct Input 14 { 15 FILE *file; 16 std::string name; 17 std::string path; 18 std::string escaped_name; 19 const char *so; // start offset in buffer 20 const char *eo; // end offset in buffer 21 uint32_t line; 22 uint32_t fidx; 23 24 explicit Input(size_t fidx); 25 ~Input(); 26 bool open(const std::string &filename, const std::string *parent 27 , const std::vector<std::string> &incpaths); 28 29 FORBID_COPY(Input); 30 }; 31 32 } // namespace re2c 33 34 #endif // _RE2C_AST_INPUT_ 35