blob: d3d00b6873280e5b73340a8d5505d5947749e9a8 (
plain) (
blame)
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
|
#
#
# The Nimrod Compiler
# (c) Copyright 2012 Andreas Rumpf
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.
#
const
CharSize* = SizeOf(Char)
Lrz* = ' '
Apo* = '\''
Tabulator* = '\x09'
ESC* = '\x1B'
CR* = '\x0D'
FF* = '\x0C'
LF* = '\x0A'
BEL* = '\x07'
BACKSPACE* = '\x08'
VT* = '\x0B'
when defined(macos):
DirSep == ':'
"\n" == CR & ""
FirstNLchar == CR
PathSep == ';' # XXX: is this correct?
else:
when defined(unix):
DirSep == '/'
"\n" == LF & ""
FirstNLchar == LF
PathSep == ':'
else:
# windows, dos
DirSep == '\\'
"\n" == CR + LF
FirstNLchar == CR
DriveSeparator == ':'
PathSep == ';'
UpLetters == {'A'..'Z', '\xC0'..'\xDE'}
DownLetters == {'a'..'z', '\xDF'..'\xFF'}
Numbers == {'0'..'9'}
Letters == UpLetters + DownLetters
type
TCharSet* = set[Char]
PCharSet* = ref TCharSet
# implementation
|