summaryrefslogtreecommitdiffstats
path: root/maps/SYNTAX
blob: a3ad110282b25720ad08c7fd4bf9833a13332993 (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
50
51
52
"include" <file>
	Include the contents of <file>.

"unmap" <sequence range>
	Remove mapping for byte sequence range.

"remap" <sequence range> "to" "U+"<code point> ["using" <endian>]
	Like "map", except assume all sequence is already defined
	and redefine them instead.

["readonly"] "map" <sequence range> "to" "U+"<code point> ["using" <endian>]
	Map a byte sequence range to a code point range.
	If a sequence is already defined, fail.
	<code point> (hexadecimal) shall be the code point for the
	  lowest valued sequence in <sequence range>
	If multiple byte sequences, <endian> may be "big-endian" or "little-endian"
	  to specify the significance of the bytes in the sequence, alternative
	  value calculations can be specified in <sequence range>
	If "readonly" is present, the mapping should only be used when decoding,
	  not when encoding. For each mapped code point, there must exist exactly
	  on mapping that is not "readonly".

<sequence range>
	<byte>
		Single byte range.
	<byte> [<value calculation>] (", " <byte> [<value calculation>]) ...
		A sequence of bytes, in storage order.
		<value calculation> shall appear on all or no <byte>, and
		  shall appear if and only if <endian> was not used but at
		  least two <byte>s are valued (have multiple legal values).

<byte>
	<value>
		Single byte, not valued.
	<value>(["-"|"+"]<value>)...
		The <value>s should be ordered by mapping value.
		The first <value> is the lowest values byte in domain (valued 0).
		"-" creates a range from the previous <value> upto and include
		  the <value> behind it
		"+" creates a domain disjunction, skipping over the values
		  between, but excluding, the values between the <value>s
		  on either side of it

<value calculation>
	"<<<" <positive decimal>
		set the relative significance of the byte, 0 is least significant.

<value>
	<positive decimal>
	0x<positive hexadecimal>

\ may be used on the end of a line to replace the <newline> with a space.