aboutsummaryrefslogtreecommitdiffstats
path: root/c_parser/include/c_lexer.hpp
blob: 059664a74fd9d87177d4d24d3c9f6d6d0d0b81e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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