ABNF.Core
Core rules found in the Apendix B of the ABNF RFC.
Copyright 2015 Marcelo Gornstein <marcelog@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Summary↑
alpha?(char) | ALPHA = %x41-5A / %x61-7A ; A-Z / a-z |
bit?(char) | BIT = “0” / “1” |
char?(char) | CHAR = %x01-7F ; any 7-bit US-ASCII character, excluding NUL |
cr?(char) | CR = %x0D ; carriage return |
ctl?(char) | CTL = %x00-1F / %x7F ; controls |
digit?(char) | DIGIT = %x30-39; 0-9 |
dquote?(char) | DQUOTE = %x22 ; “ (Double Quote) |
hexdig?(char) | HEXDIG = DIGIT / “A” / “B” / “C” / “D” / “E” / “F” |
htab?(char) | HTAB = %x09 ; horizontal tab |
lf?(char) | LF = %x0A ; linefeed |
octet?(char) | OCTET = %x00-FF ; 8 bits of data |
sp?(char) | SP = %x20 |
vchar?(char) | VCHAR = %x21-7E ; visible (printing) characters |
wsp?(char) | WSP = SP / HTAB ; white space |
Functions
Specs:
- alpha?(char) :: boolean
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
Specs:
- bit?(char) :: boolean
BIT = “0” / “1”
Specs:
- char?(char) :: boolean
CHAR = %x01-7F ; any 7-bit US-ASCII character, excluding NUL
Specs:
- cr?(char) :: boolean
CR = %x0D ; carriage return
Specs:
- ctl?(char) :: boolean
CTL = %x00-1F / %x7F ; controls
Specs:
- digit?(char) :: boolean
DIGIT = %x30-39; 0-9
Specs:
- dquote?(char) :: boolean
DQUOTE = %x22 ; “ (Double Quote)
Specs:
- hexdig?(char) :: boolean
HEXDIG = DIGIT / “A” / “B” / “C” / “D” / “E” / “F”
Specs:
- htab?(char) :: boolean
HTAB = %x09 ; horizontal tab
Specs:
- lf?(char) :: boolean
LF = %x0A ; linefeed
Specs:
- octet?(char) :: boolean
OCTET = %x00-FF ; 8 bits of data
Specs:
- sp?(char) :: boolean
SP = %x20
Specs:
- vchar?(char) :: boolean
VCHAR = %x21-7E ; visible (printing) characters
Specs:
- wsp?(char) :: boolean
WSP = SP / HTAB ; white space