repo.or.cz
/
lispp.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
LispSymbol.h compiles.
[lispp.git]
/
Scanner.h
blob
ef3d3ac4f33a8ea643e9bb34e8c25dcb9f379efa
1
#ifndef SCANNER_H_INCLUDED
2
#define SCANNER_H_INCLUDED
3
4
class
Scanner
5
{
6
public
:
7
8
enum
eSymbolType
9
{
10
eBrace
=
0
,
11
eString
,
12
eNumber
,
13
eSymbol
,
14
eSpecial
,
15
eSpace
,
16
eEndOfFile
17
};
18
19
20
enum
eScannerState
21
{
22
eInWhiteSpace
=
0
,
23
eInString
,
24
eInNumeric
,
25
eInSymbol
,
26
eInOpenBrace
,
27
eInCloseBrace
,
28
eFinished
29
};
30
31
Scanner
(
std
::
istream
&
in
);
32
33
std
::
string
next
(
eSymbolType
&
kind
);
34
35
36
37
private
:
38
bool
isSpecial
(
std
::
string symbol
);
39
40
static const char
*
specials
[];
41
42
std
::
istream
&
in_
;
43
eScannerState state_
;
44
};
45
46
#endif