Skip to content

Commit 1794ac0

Browse files
author
Psilo
committed
add rql and antlr4 parser with tooling
version bump
1 parent b880f7a commit 1794ac0

File tree

19 files changed

+1533
-10
lines changed

19 files changed

+1533
-10
lines changed

antlr4/.antlr/Rql.interp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
token literal names:
2+
null
3+
'('
4+
')'
5+
null
6+
null
7+
null
8+
null
9+
null
10+
null
11+
null
12+
null
13+
14+
token symbolic names:
15+
null
16+
null
17+
null
18+
Operator
19+
NullOp
20+
NotNullOp
21+
And
22+
Or
23+
Identifier
24+
JpqlIdentifier
25+
Whitespace
26+
27+
rule names:
28+
eval
29+
orExpression
30+
andExpression
31+
atomExpression
32+
term
33+
operator
34+
identifier
35+
jpqlIdentifier
36+
37+
38+
atn:
39+
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 12, 72, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 29, 10, 3, 12, 3, 14, 3, 32, 11, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 41, 10, 4, 12, 4, 14, 4, 44, 11, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 54, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 2, 2, 10, 2, 4, 6, 8, 10, 12, 14, 16, 2, 2, 2, 66, 2, 18, 3, 2, 2, 2, 4, 21, 3, 2, 2, 2, 6, 33, 3, 2, 2, 2, 8, 53, 3, 2, 2, 2, 10, 55, 3, 2, 2, 2, 12, 62, 3, 2, 2, 2, 14, 65, 3, 2, 2, 2, 16, 68, 3, 2, 2, 2, 18, 19, 5, 4, 3, 2, 19, 20, 8, 2, 1, 2, 20, 3, 3, 2, 2, 2, 21, 22, 5, 6, 4, 2, 22, 30, 8, 3, 1, 2, 23, 24, 7, 9, 2, 2, 24, 25, 8, 3, 1, 2, 25, 26, 5, 6, 4, 2, 26, 27, 8, 3, 1, 2, 27, 29, 3, 2, 2, 2, 28, 23, 3, 2, 2, 2, 29, 32, 3, 2, 2, 2, 30, 28, 3, 2, 2, 2, 30, 31, 3, 2, 2, 2, 31, 5, 3, 2, 2, 2, 32, 30, 3, 2, 2, 2, 33, 34, 5, 8, 5, 2, 34, 42, 8, 4, 1, 2, 35, 36, 7, 8, 2, 2, 36, 37, 8, 4, 1, 2, 37, 38, 5, 8, 5, 2, 38, 39, 8, 4, 1, 2, 39, 41, 3, 2, 2, 2, 40, 35, 3, 2, 2, 2, 41, 44, 3, 2, 2, 2, 42, 40, 3, 2, 2, 2, 42, 43, 3, 2, 2, 2, 43, 7, 3, 2, 2, 2, 44, 42, 3, 2, 2, 2, 45, 46, 5, 10, 6, 2, 46, 47, 8, 5, 1, 2, 47, 54, 3, 2, 2, 2, 48, 49, 7, 3, 2, 2, 49, 50, 5, 4, 3, 2, 50, 51, 8, 5, 1, 2, 51, 52, 7, 4, 2, 2, 52, 54, 3, 2, 2, 2, 53, 45, 3, 2, 2, 2, 53, 48, 3, 2, 2, 2, 54, 9, 3, 2, 2, 2, 55, 56, 5, 14, 8, 2, 56, 57, 8, 6, 1, 2, 57, 58, 7, 5, 2, 2, 58, 59, 8, 6, 1, 2, 59, 60, 5, 16, 9, 2, 60, 61, 8, 6, 1, 2, 61, 11, 3, 2, 2, 2, 62, 63, 7, 5, 2, 2, 63, 64, 8, 7, 1, 2, 64, 13, 3, 2, 2, 2, 65, 66, 7, 10, 2, 2, 66, 67, 8, 8, 1, 2, 67, 15, 3, 2, 2, 2, 68, 69, 7, 11, 2, 2, 69, 70, 8, 9, 1, 2, 70, 17, 3, 2, 2, 2, 5, 30, 42, 53]

antlr4/.antlr/RqlLexer.interp

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
token literal names:
2+
null
3+
'('
4+
')'
5+
null
6+
null
7+
null
8+
null
9+
null
10+
null
11+
null
12+
null
13+
14+
token symbolic names:
15+
null
16+
null
17+
null
18+
Operator
19+
NullOp
20+
NotNullOp
21+
And
22+
Or
23+
Identifier
24+
JpqlIdentifier
25+
Whitespace
26+
27+
rule names:
28+
T__0
29+
T__1
30+
Operator
31+
NullOp
32+
NotNullOp
33+
And
34+
Or
35+
Identifier
36+
JpqlIdentifier
37+
Whitespace
38+
ST
39+
GT
40+
SEQ
41+
GEQ
42+
EQ
43+
NEQ
44+
Null
45+
Is
46+
Not
47+
UCaseAlpha
48+
LCaseAlpha
49+
Alpha
50+
Num
51+
AlphaNum
52+
A
53+
B
54+
C
55+
D
56+
E
57+
F
58+
G
59+
H
60+
I
61+
J
62+
K
63+
L
64+
M
65+
N
66+
O
67+
P
68+
Q
69+
R
70+
S
71+
T
72+
U
73+
V
74+
W
75+
X
76+
Y
77+
Z
78+
79+
channel names:
80+
DEFAULT_TOKEN_CHANNEL
81+
HIDDEN
82+
83+
mode names:
84+
DEFAULT_MODE
85+
86+
atn:
87+
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 12, 244, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 116, 10, 4, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 7, 9, 134, 10, 9, 12, 9, 14, 9, 137, 11, 9, 3, 10, 3, 10, 3, 10, 7, 10, 142, 10, 10, 12, 10, 14, 10, 145, 11, 10, 3, 11, 6, 11, 148, 10, 11, 13, 11, 14, 11, 149, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 5, 23, 187, 10, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 2, 2, 52, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 2, 25, 2, 27, 2, 29, 2, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, 41, 2, 43, 2, 45, 2, 47, 2, 49, 2, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 2, 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, 97, 2, 99, 2, 101, 2, 3, 2, 30, 5, 2, 11, 12, 15, 15, 34, 34, 7, 2, 47, 47, 50, 59, 67, 92, 97, 97, 99, 124, 4, 2, 67, 67, 99, 99, 4, 2, 68, 68, 100, 100, 4, 2, 69, 69, 101, 101, 4, 2, 70, 70, 102, 102, 4, 2, 71, 71, 103, 103, 4, 2, 72, 72, 104, 104, 4, 2, 73, 73, 105, 105, 4, 2, 74, 74, 106, 106, 4, 2, 75, 75, 107, 107, 4, 2, 76, 76, 108, 108, 4, 2, 77, 77, 109, 109, 4, 2, 78, 78, 110, 110, 4, 2, 79, 79, 111, 111, 4, 2, 80, 80, 112, 112, 4, 2, 81, 81, 113, 113, 4, 2, 82, 82, 114, 114, 4, 2, 83, 83, 115, 115, 4, 2, 84, 84, 116, 116, 4, 2, 85, 85, 117, 117, 4, 2, 86, 86, 118, 118, 4, 2, 87, 87, 119, 119, 4, 2, 88, 88, 120, 120, 4, 2, 89, 89, 121, 121, 4, 2, 90, 90, 122, 122, 4, 2, 91, 91, 123, 123, 4, 2, 92, 92, 124, 124, 2, 214, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 3, 103, 3, 2, 2, 2, 5, 105, 3, 2, 2, 2, 7, 115, 3, 2, 2, 2, 9, 117, 3, 2, 2, 2, 11, 120, 3, 2, 2, 2, 13, 124, 3, 2, 2, 2, 15, 128, 3, 2, 2, 2, 17, 131, 3, 2, 2, 2, 19, 138, 3, 2, 2, 2, 21, 147, 3, 2, 2, 2, 23, 153, 3, 2, 2, 2, 25, 155, 3, 2, 2, 2, 27, 157, 3, 2, 2, 2, 29, 160, 3, 2, 2, 2, 31, 163, 3, 2, 2, 2, 33, 165, 3, 2, 2, 2, 35, 168, 3, 2, 2, 2, 37, 173, 3, 2, 2, 2, 39, 176, 3, 2, 2, 2, 41, 180, 3, 2, 2, 2, 43, 182, 3, 2, 2, 2, 45, 186, 3, 2, 2, 2, 47, 188, 3, 2, 2, 2, 49, 190, 3, 2, 2, 2, 51, 192, 3, 2, 2, 2, 53, 194, 3, 2, 2, 2, 55, 196, 3, 2, 2, 2, 57, 198, 3, 2, 2, 2, 59, 200, 3, 2, 2, 2, 61, 202, 3, 2, 2, 2, 63, 204, 3, 2, 2, 2, 65, 206, 3, 2, 2, 2, 67, 208, 3, 2, 2, 2, 69, 210, 3, 2, 2, 2, 71, 212, 3, 2, 2, 2, 73, 214, 3, 2, 2, 2, 75, 216, 3, 2, 2, 2, 77, 218, 3, 2, 2, 2, 79, 220, 3, 2, 2, 2, 81, 222, 3, 2, 2, 2, 83, 224, 3, 2, 2, 2, 85, 226, 3, 2, 2, 2, 87, 228, 3, 2, 2, 2, 89, 230, 3, 2, 2, 2, 91, 232, 3, 2, 2, 2, 93, 234, 3, 2, 2, 2, 95, 236, 3, 2, 2, 2, 97, 238, 3, 2, 2, 2, 99, 240, 3, 2, 2, 2, 101, 242, 3, 2, 2, 2, 103, 104, 7, 42, 2, 2, 104, 4, 3, 2, 2, 2, 105, 106, 7, 43, 2, 2, 106, 6, 3, 2, 2, 2, 107, 116, 5, 23, 12, 2, 108, 116, 5, 27, 14, 2, 109, 116, 5, 25, 13, 2, 110, 116, 5, 29, 15, 2, 111, 116, 5, 31, 16, 2, 112, 116, 5, 33, 17, 2, 113, 116, 5, 9, 5, 2, 114, 116, 5, 11, 6, 2, 115, 107, 3, 2, 2, 2, 115, 108, 3, 2, 2, 2, 115, 109, 3, 2, 2, 2, 115, 110, 3, 2, 2, 2, 115, 111, 3, 2, 2, 2, 115, 112, 3, 2, 2, 2, 115, 113, 3, 2, 2, 2, 115, 114, 3, 2, 2, 2, 116, 8, 3, 2, 2, 2, 117, 118, 5, 37, 19, 2, 118, 119, 5, 35, 18, 2, 119, 10, 3, 2, 2, 2, 120, 121, 5, 37, 19, 2, 121, 122, 5, 39, 20, 2, 122, 123, 5, 35, 18, 2, 123, 12, 3, 2, 2, 2, 124, 125, 5, 51, 26, 2, 125, 126, 5, 77, 39, 2, 126, 127, 5, 57, 29, 2, 127, 14, 3, 2, 2, 2, 128, 129, 5, 79, 40, 2, 129, 130, 5, 85, 43, 2, 130, 16, 3, 2, 2, 2, 131, 135, 5, 45, 23, 2, 132, 134, 5, 49, 25, 2, 133, 132, 3, 2, 2, 2, 134, 137, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 18, 3, 2, 2, 2, 137, 135, 3, 2, 2, 2, 138, 139, 7, 60, 2, 2, 139, 143, 5, 45, 23, 2, 140, 142, 5, 49, 25, 2, 141, 140, 3, 2, 2, 2, 142, 145, 3, 2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 20, 3, 2, 2, 2, 145, 143, 3, 2, 2, 2, 146, 148, 9, 2, 2, 2, 147, 146, 3, 2, 2, 2, 148, 149, 3, 2, 2, 2, 149, 147, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 150, 151, 3, 2, 2, 2, 151, 152, 8, 11, 2, 2, 152, 22, 3, 2, 2, 2, 153, 154, 7, 62, 2, 2, 154, 24, 3, 2, 2, 2, 155, 156, 7, 64, 2, 2, 156, 26, 3, 2, 2, 2, 157, 158, 7, 62, 2, 2, 158, 159, 7, 63, 2, 2, 159, 28, 3, 2, 2, 2, 160, 161, 7, 64, 2, 2, 161, 162, 7, 63, 2, 2, 162, 30, 3, 2, 2, 2, 163, 164, 7, 63, 2, 2, 164, 32, 3, 2, 2, 2, 165, 166, 7, 62, 2, 2, 166, 167, 7, 64, 2, 2, 167, 34, 3, 2, 2, 2, 168, 169, 5, 77, 39, 2, 169, 170, 5, 91, 46, 2, 170, 171, 5, 73, 37, 2, 171, 172, 5, 73, 37, 2, 172, 36, 3, 2, 2, 2, 173, 174, 5, 67, 34, 2, 174, 175, 5, 87, 44, 2, 175, 38, 3, 2, 2, 2, 176, 177, 5, 77, 39, 2, 177, 178, 5, 79, 40, 2, 178, 179, 5, 89, 45, 2, 179, 40, 3, 2, 2, 2, 180, 181, 4, 67, 92, 2, 181, 42, 3, 2, 2, 2, 182, 183, 4, 99, 124, 2, 183, 44, 3, 2, 2, 2, 184, 187, 5, 43, 22, 2, 185, 187, 5, 41, 21, 2, 186, 184, 3, 2, 2, 2, 186, 185, 3, 2, 2, 2, 187, 46, 3, 2, 2, 2, 188, 189, 4, 50, 59, 2, 189, 48, 3, 2, 2, 2, 190, 191, 9, 3, 2, 2, 191, 50, 3, 2, 2, 2, 192, 193, 9, 4, 2, 2, 193, 52, 3, 2, 2, 2, 194, 195, 9, 5, 2, 2, 195, 54, 3, 2, 2, 2, 196, 197, 9, 6, 2, 2, 197, 56, 3, 2, 2, 2, 198, 199, 9, 7, 2, 2, 199, 58, 3, 2, 2, 2, 200, 201, 9, 8, 2, 2, 201, 60, 3, 2, 2, 2, 202, 203, 9, 9, 2, 2, 203, 62, 3, 2, 2, 2, 204, 205, 9, 10, 2, 2, 205, 64, 3, 2, 2, 2, 206, 207, 9, 11, 2, 2, 207, 66, 3, 2, 2, 2, 208, 209, 9, 12, 2, 2, 209, 68, 3, 2, 2, 2, 210, 211, 9, 13, 2, 2, 211, 70, 3, 2, 2, 2, 212, 213, 9, 14, 2, 2, 213, 72, 3, 2, 2, 2, 214, 215, 9, 15, 2, 2, 215, 74, 3, 2, 2, 2, 216, 217, 9, 16, 2, 2, 217, 76, 3, 2, 2, 2, 218, 219, 9, 17, 2, 2, 219, 78, 3, 2, 2, 2, 220, 221, 9, 18, 2, 2, 221, 80, 3, 2, 2, 2, 222, 223, 9, 19, 2, 2, 223, 82, 3, 2, 2, 2, 224, 225, 9, 20, 2, 2, 225, 84, 3, 2, 2, 2, 226, 227, 9, 21, 2, 2, 227, 86, 3, 2, 2, 2, 228, 229, 9, 22, 2, 2, 229, 88, 3, 2, 2, 2, 230, 231, 9, 23, 2, 2, 231, 90, 3, 2, 2, 2, 232, 233, 9, 24, 2, 2, 233, 92, 3, 2, 2, 2, 234, 235, 9, 25, 2, 2, 235, 94, 3, 2, 2, 2, 236, 237, 9, 26, 2, 2, 237, 96, 3, 2, 2, 2, 238, 239, 9, 27, 2, 2, 239, 98, 3, 2, 2, 2, 240, 241, 9, 28, 2, 2, 241, 100, 3, 2, 2, 2, 242, 243, 9, 29, 2, 2, 243, 102, 3, 2, 2, 2, 8, 2, 115, 135, 143, 149, 186, 3, 2, 3, 2]

antlr4/.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"antlr4.generation": {
3+
"mode": "external",
4+
"visitors": true,
5+
"outputDir": "C:\\code\\java-http-server\\src\\main\\java\\info\\unterrainer\\commons\\httpserver\\antlr",
6+
"package": "info.unterrainer.commons.httpserver.antlr"
7+
},
8+
"antlr4.referencesCodeLens.enabled": true
9+
}

antlr4/Rql.g4

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
grammar Rql;
2+
3+
/*
4+
* Parser Rules start with lower-case characters.
5+
*/
6+
eval returns [String r]
7+
: op=orExpression {$r = $op.text;}
8+
;
9+
10+
orExpression returns [String r]
11+
: op=andExpression {$r = $op.text;}
12+
(an=Or {$r += " " + $an.text + " ";}
13+
ae=andExpression {$r += $ae.text;}
14+
)*;
15+
16+
andExpression returns [String r]
17+
: op=atomExpression {$r = $op.text;}
18+
(an=And {$r += " " + $an.text + " ";}
19+
ae=atomExpression {$r += $ae.text;}
20+
)*;
21+
22+
atomExpression returns [String r]
23+
: op=term {$r = $op.text;}
24+
| '(' or=orExpression {$r = $or.text;}
25+
')';
26+
27+
term returns [String r]
28+
: id=identifier {$r = $id.text;}
29+
op=Operator {$r += $op.text;}
30+
jd=jpqlIdentifier {$r += $jd.text;}
31+
;
32+
33+
operator returns [String r]
34+
: op=Operator {$r = " " + $op.text + " ";}
35+
;
36+
37+
identifier returns [String r]
38+
: op=Identifier {$r = $op.text;}
39+
;
40+
41+
jpqlIdentifier returns [String r]
42+
: op=JpqlIdentifier {$r = $op.text;}
43+
;
44+
45+
/*
46+
* Lexer Rules start with upper-case characters.
47+
*/
48+
Operator : ST | SEQ | GT | GEQ | EQ | NEQ | NullOp | NotNullOp;
49+
NullOp : Is Null;
50+
NotNullOp : Is Not Null;
51+
And : A N D;
52+
Or : O R;
53+
Identifier : Alpha AlphaNum*;
54+
JpqlIdentifier : ':' Alpha AlphaNum*;
55+
Whitespace : [ \t\r\n]+ -> channel(HIDDEN);
56+
57+
// a fragment rule can't be used inside parser rules, only in lexer rules
58+
fragment ST : '<';
59+
fragment GT : '>';
60+
fragment SEQ : '<=';
61+
fragment GEQ : '>=';
62+
fragment EQ : '=';
63+
fragment NEQ : '<>';
64+
fragment Null : N U L L;
65+
fragment Is : I S;
66+
fragment Not : N O T;
67+
fragment UCaseAlpha : 'A'..'Z';
68+
fragment LCaseAlpha : 'a'..'z';
69+
fragment Alpha : LCaseAlpha | UCaseAlpha;
70+
fragment Num : '0'..'9';
71+
fragment AlphaNum : 'a'..'z' | 'A' .. 'Z' | '-' | '_' | '0'..'9';
72+
73+
fragment A : [aA]; // match either an 'a' or 'A'
74+
fragment B : [bB];
75+
fragment C : [cC];
76+
fragment D : [dD];
77+
fragment E : [eE];
78+
fragment F : [fF];
79+
fragment G : [gG];
80+
fragment H : [hH];
81+
fragment I : [iI];
82+
fragment J : [jJ];
83+
fragment K : [kK];
84+
fragment L : [lL];
85+
fragment M : [mM];
86+
fragment N : [nN];
87+
fragment O : [oO];
88+
fragment P : [pP];
89+
fragment Q : [qQ];
90+
fragment R : [rR];
91+
fragment S : [sS];
92+
fragment T : [tT];
93+
fragment U : [uU];
94+
fragment V : [vV];
95+
fragment W : [wW];
96+
fragment X : [xX];
97+
fragment Y : [yY];
98+
fragment Z : [zZ];

pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<modelVersion>4.0.0</modelVersion>
1919
<artifactId>http-server</artifactId>
20-
<version>0.1.4</version>
20+
<version>0.1.5</version>
2121
<name>HttpServer</name>
2222
<packaging>jar</packaging>
2323

@@ -52,6 +52,11 @@
5252
<artifactId>orika-core</artifactId>
5353
<version>1.5.4</version>
5454
</dependency>
55+
<dependency>
56+
<groupId>org.antlr</groupId>
57+
<artifactId>antlr4-runtime</artifactId>
58+
<version>4.8-1</version>
59+
</dependency>
5560
<dependency>
5661
<groupId>org.eclipse.jetty</groupId>
5762
<artifactId>jetty-http</artifactId>

src/main/java/info/unterrainer/commons/httpserver/GenericHandlerGroup.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import info.unterrainer.commons.httpserver.enums.Endpoint;
1515
import info.unterrainer.commons.httpserver.enums.QueryField;
1616
import info.unterrainer.commons.httpserver.exceptions.BadRequestException;
17-
import info.unterrainer.commons.httpserver.interceptors.GetListInterceptorResult;
17+
import info.unterrainer.commons.httpserver.interceptors.InterceptorData;
1818
import info.unterrainer.commons.httpserver.interceptors.delegates.GetListInterceptor;
1919
import info.unterrainer.commons.httpserver.jsons.ListJson;
2020
import info.unterrainer.commons.rdbutils.entities.BasicJpa;
@@ -104,7 +104,7 @@ private void getList(final Context ctx) {
104104
Long offset = hu.getQueryParamAsLong(ctx, QueryField.PAGINATION_OFFSET, 0L);
105105
Long size = hu.getQueryParamAsLong(ctx, QueryField.PAGINATION_SIZE, Long.MAX_VALUE);
106106

107-
GetListInterceptorResult interceptorResult = GetListInterceptorResult.builder()
107+
InterceptorData interceptorResult = InterceptorData.builder()
108108
.selectClause("o")
109109
.joinClause("")
110110
.whereClause("")
@@ -113,7 +113,7 @@ private void getList(final Context ctx) {
113113
.build();
114114
for (GetListInterceptor interceptor : getListInterceptors)
115115
try {
116-
GetListInterceptorResult result = interceptor.intercept(ctx, hu);
116+
InterceptorData result = interceptor.intercept(ctx, hu);
117117
if (result != null) {
118118
interceptorResult = result;
119119
break;

0 commit comments

Comments
 (0)