aboutsummaryrefslogtreecommitdiffstats
path: root/c_lexer/include/c_lexer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'c_lexer/include/c_lexer.hpp')
-rw-r--r--c_lexer/include/c_lexer.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/c_lexer/include/c_lexer.hpp b/c_lexer/include/c_lexer.hpp
new file mode 100644
index 0000000..059664a
--- /dev/null
+++ b/c_lexer/include/c_lexer.hpp
@@ -0,0 +1,33 @@
+#ifndef C_LEXER_HPP
+#define C_LEXER_HPP
+
+#include <string>
+
+enum TokenType {
+ None,
+ Keyword,
+ Identifier,
+ Operator,
+ Constant,
+ StringLiteral,
+ Invalid
+};
+
+// Global variable that will be looked for by byson
+extern std::string *yylval;
+
+// flex function to run on input
+extern int yylex();
+
+extern int yyleng;
+
+extern int lineCount;
+extern int spaceCount;
+extern int sourceLineCount;
+
+extern std::string fileName;
+
+// get the correct output
+std::string toJson(const std::string& classType, const std::string& text, const std::string& strLine, const std::string& srcCol, const std::string& srcLine, const std::string& fName);
+
+#endif