forked from apache/jena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NotesAFS.txt
77 lines (57 loc) · 2.03 KB
/
NotesAFS.txt
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
===
Changes for RFC 1123 sec 2.1
violations.xml: comment out IP_V4_HAS_FOUR_COMPONENTS
PattenCompiler: remove entry using IP_V4_HAS_FOUR_COMPONENTS in for ipV4Address[]
=== JFlex
Build:
See dev.buildlexer.MainGenerateLexers which does step 1-3
1/ BuildViolationCodes.main(args) (violations.xml => Java code)
2/ PatternCompiler.main (writes host.jflex)
3/ AbsLexer.main (writes other jflex files)
then refresh in Eclipse.
Edit to remove errors and warnings.
change yytext to
@Override final String yytext()
=== What builds what
TestCreator:
uris.xml -> test.xml
AbsLexerBuilder
// violation.xml ==> ViolationCodes
BuildViolationCodes.main(args) ;
// host.jflex
PatternCompilerBuilder.main(args) ;
// Other jflex files
AbsLexerBuilder.main(args) ;
====
/*
host => (@{regname})
regname => ((@{label}\\.)*@{label}\\.?)
label => (@{labelPrefix}(@{labelInside}@{labelPostfix})?)
labelInside => (@{labelSingleDashInside}?)
labelPrefix => (@{labelChar})
labelChar => (@{unreservedDNSLabel})
unreservedDNSLabel => (@{letterDigit}|_)
letterDigit => ([a-z0-9])
labelSingleDashInside => ((@{labelChar}+-)*@{labelChar}+)
labelPostfix => (@{labelChar})
*/
--------------
[[
RFC 1123, sec 2.1
The syntax of a legal Internet host name was specified in RFC-952
[DNS:4]. One aspect of host name syntax is hereby changed: the
restriction on the first character is relaxed to allow either a
letter or a digit. Host software MUST support this more liberal
syntax.
]]
I can't find an updated official grammar and I only came across by googling
to get the authoritive text to show it was illegal. I happened on a nice
web page of DNS standards which mentioned it.
RFC 3986, sec 3.2.2, talks about the ambiguity.
The 1123 text isn't entirely clear - does it mean the first char of the
whole DNS host name or every component?
So a host of "1752" is now legal (albeit silly and unlikely to work very well).
-----------------
IP_V4_OCTET_RANGE
IP_V4_HAS_FOUR_COMPONENTS
are no longer MUST