1 classmap UriClassMap;
2
3 tokens UriTokens
4 {
5 (DIGIT, "'digit'"), (HEX, "'hex'"), (ALPHA, "'alpha'"), (COLON, "':'"), (SEMICOLON, "';'"), (SLASH, "'/'"), (DOT, "'.'"), (DASH, "'-'"), (QUEST, "'?'"), (AT, "'@'"), (LBRACKET, "'['"), (RBRACKET, "']'"),
6 (UNDERSCORE, "'_'"), (TILDE, "'~'"), (EXCLAMATION, "'!'"), (DOLLAR, "'$'"), (AMP, "'&'"), (SQ, "'"), (LPAREN, "'('"), (RPAREN, "')'"), (ASTERISK, "'*'"), (PLUS, "'+'"), (COMMA, "','"), (EQ, "'='"), (PERCENT, "'%'"), (HASH, "'#'")
7 }
8
9 expressions
10 {
11 digit = "[0-9]";
12 hex = "{digit}|[a-fA-F]";
13 alpha = "[a-zA-Z]";
14 colon = ":";
15 semicolon = ";";
16 ctl = "[\x0-\x1f]";
17 sp = " ";
18 dq = "\"";
19 hash = "#";
20 langle = "<";
21 rangle = ">";
22 slash = "/";
23 quest = "\?";
24 at = "@";
25 lbracket = "\[";
26 rbracket = "\]";
27 dot = "\.";
28 dash = "-";
29 underscore = "_";
30 tilde = "~";
31 exclamation = "!";
32 dollar = "$";
33 amp = "&";
34 sq = "'";
35 lparen = "\(";
36 rparen = "\)";
37 asterisk = "\*";
38 plus = "\+";
39 comma = ",";
40 eq = "=";
41 percent = "%";
42 }
43
44 lexer UriLexer
45 {
46 "{digit}"{ return DIGIT; }
47 "{hex}"{ return HEX; }
48 "{alpha}"{ return ALPHA; }
49 "{colon}"{ return COLON; }
50 "{semicolon}"{ return SEMICOLON; }
51 "{slash}"{ return SLASH; }
52 "{quest}"{ return QUEST; }
53 "{dot}"{ return DOT; }
54 "{dash}"{ return DASH; }
55 "{underscore}"{ return UNDERSCORE; }
56 "{tilde}"{ return TILDE; }
57 "{at}"{ return AT; }
58 "{exclamation}"{ return EXCLAMATION; }
59 "{lbracket}"{ return LBRACKET; }
60 "{rbracket}"{ return RBRACKET; }
61 "{dollar}"{ return DOLLAR; }
62 "{amp}"{ return AMP; }
63 "{sq}"{ return SQ; }
64 "{lparen}"{ return LPAREN; }
65 "{rparen}"{ return RPAREN; }
66 "{asterisk}"{ return ASTERISK; }
67 "{plus}"{ return PLUS; }
68 "{comma}"{ return COMMA; }
69 "{eq}"{ return EQ; }
70 "{percent}"{ return PERCENT; }
71 "{hash}"{ return HASH; }
72 }