blob: 90c4d530233f8e51a28a6a19520e3eaf5e846959 (
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 lineCount;
extern int spaceCount;
extern int sourceLineCount;
extern int charLength;
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
|