blob: 13d7c21d4e364271eea525599d5b88f477a5f0c4 (
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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Utility Functions - Packrat Docs</title>
<link href="default.css" rel="stylesheet">
</head>
<body>
<h2>Utility Functions</h2>
<a href="index.html">Return to Contents</a>
<p>These are intended as helper functions for use with <em>Satisfy</em> combinators and the like
when parsing ordinary strings.</p>
<table>
<tr>
<td><pre>
generic
Set : in Ada.Strings.Maps.Character_Set;
function In_Set
(Element : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is present within the given <em>Character_Set</em>.</td>
</tr>
<tr>
<td><pre>
generic
Set : in Ada.Strings.Maps.Character_Set;
function Not_In_Set
(Element : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is not present within the given <em>Character_Set</em>.</td>
</tr>
<tr>
<td><pre>
function Is_Digit
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is one of the digits 0 through 9.</td>
</tr>
<tr>
<td><pre>
function Is_Hex
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is one of the digits 0 through 9 or one of the letters
A through F, case insensitive.</td>
</tr>
<tr>
<td><pre>
function Is_Letter
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is one of the letters A through Z, case insensitive.</td>
</tr>
<tr>
<td><pre>
function Is_Alphanumeric
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is one of the digits 0 through 9 or one of the letters
A through Z, case insensitive.</td>
</tr>
<tr>
<td><pre>
function Is_Punctuation
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is one of the punctuation characters <em>! " # $ %
& ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~</em> which annoyingly
occupies several disjoint sections of ASCII.</td>
</tr>
<tr>
<td><pre>
function Is_ASCII
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is in the lower half of the ASCII character set.</td>
</tr>
<tr>
<td><pre>
function Is_Extended_ASCII
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is in the upper half of the ASCII character set.</td>
</tr>
<tr>
<td><pre>
function Is_Space
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is a space.</td>
</tr>
<tr>
<td><pre>
function Is_Linespace
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is a space or horizontal tab.</td>
</tr>
<tr>
<td><pre>
function Is_End_Of_Line
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is a linefeed or carriage return.</td>
</tr>
<tr>
<td><pre>
function Is_Whitespace
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is a space, horizontal tab, linefeed, or carriage return.</td>
</tr>
<tr>
<td><pre>
function Not_Whitespace
(Char : in Character)
return Boolean;
</pre></td>
<td>Tests whether a <em>Character</em> is not a space, horizontal tab, linefeed, or carriage return.</td>
</tr>
</table>
</body>
</html>
|