-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlexer_test.txt
68 lines (68 loc) · 1.38 KB
/
lexer_test.txt
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
= // '='
+= // '+='
-= // '-='
*= // '*='
/= // '/='
%= // '%='
<<= // '<<='
>>= // '>>='
&= // '&='
^= // '^='
|= // '|='
& // '&'
| // '|'
^ // '^'
~ // '~'
<< // '<<'
>> // '>>'
/*This is a block comment
which won't appear in token form*/
int a = 10;
//These numbers mean nothing and this is a line comment
int b = 20;
22 //Literal Int
//10.1m //Literal Decimal
//10.1M //Literal Decimal
0xAF2323F5 //Literal Hexadecimal
0b00100010 //Literal Binary
51.37f //Literal Float
51.37F //Literal Float
true //Literal True
false //Literal False
'c' //Literal Char
"Hola" //Literal String
@"Hola \r\nsoy ""Jesus""" //Literal String Verbatim
&& // '&&'
|| // '||'
! // '!'
sizeof // 'sizeof()'
type // 'type()'
? // '? :'
?? // '??'
is // 'is'
as // 'as'
. // '.'
hello //Identifier
: // ':'
, // ','
; // ';'
( // '('
) // ')'
{ // '{'
} // '}'
[ // '['
] // ']'
== // '=='
!= // '!='
> // '>'
< // '<'
>= // '>='
<= // '<='
@"Foo ""Bar"" Baz ""Quux"" this?" //Verbatim String
+ // '+'
- // '-'
* // '*'
/ // '/'
% // '%'
++ // '++'
-- // '--'