-
Notifications
You must be signed in to change notification settings - Fork 0
/
token.h
109 lines (103 loc) · 948 Bytes
/
token.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef TOKEN_H
#define TOKEN_H
#include <string>
#include <iostream>
enum class TokenType {
YARN,
NUMBR,
NUMBAR,
TROOF,
BUKKIT,
NOOB,
YARN_LITERAL,
NUMBR_LITERAL,
NUMBAR_LITERAL,
MINUS_SIGN,
WIN,
FAIL,
EXCLAMATION,
IDENTIFIER,
BTW,
I,
HAS,
A,
ITZ,
OBTW,
TLDR,
HAI,
KTHXBYE,
R,
MKAY,
AN,
SUM,
DIFF,
PRODUKT,
QUOSHUNT,
MOD,
BIGGR,
SMALLR,
OF,
BOTH,
EITHER,
WON,
NOT,
ALL,
ANY,
SAEM,
DIFFRINT,
IT,
SMOOSH,
MAEK,
IS,
NOW,
VISIBLE,
GIMMEH,
LONG,
O,
RLY,
QUESTION,
YA,
NO,
WAI,
OIC,
MEBBE,
WTF,
OMG,
GTFO,
WHATEVR,
OMGWTF,
IM,
IN,
OUTTA,
YR,
FROM,
TIL,
WILE,
UPPIN,
NERFIN,
WITH,
WATCHIN,
HOW,
IZ,
DAT,
IF,
U,
SAY,
SO,
FOUND,
PLZ,
NOES,
WEL,
KTHX,
SRS,
SLOT,
LINE_DELIMITER,
END_OF_FILE
};
std::string TokenTypeToString( TokenType );
struct Token {
TokenType type;
std::string string;
friend std::ostream &operator <<( std::ostream &, Token );
};
#endif