embulk-filter-row 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +10 -6
- data/build.gradle +1 -1
- data/src/main/java/org/embulk/filter/row/where/Parser.java +144 -90
- data/src/main/java/org/embulk/filter/row/where/ParserExp.java +112 -8
- data/src/main/java/org/embulk/filter/row/where/ParserLiteral.java +46 -22
- data/src/main/java/org/embulk/filter/row/where/Yylex.java +115 -111
- data/src/main/java/org/embulk/filter/row/where/_lexer.l +3 -2
- data/src/main/java/org/embulk/filter/row/where/_parser.y +47 -38
- data/src/test/java/org/embulk/filter/row/where/TestParser.java +107 -5
- metadata +3 -3
@@ -4,6 +4,9 @@ import org.embulk.config.ConfigException;
|
|
4
4
|
import org.embulk.spi.PageReader;
|
5
5
|
import org.embulk.spi.time.Timestamp;
|
6
6
|
|
7
|
+
import java.util.regex.Matcher;
|
8
|
+
import java.util.regex.Pattern;
|
9
|
+
|
7
10
|
// Operation Node of AST (Abstract Syntax Tree)
|
8
11
|
public abstract class ParserExp extends ParserNode
|
9
12
|
{
|
@@ -12,9 +15,11 @@ public abstract class ParserExp extends ParserNode
|
|
12
15
|
|
13
16
|
abstract class BinaryOpExp extends ParserExp
|
14
17
|
{
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
ParserLiteral left;
|
19
|
+
ParserLiteral right;
|
20
|
+
int operator;
|
21
|
+
|
22
|
+
public BinaryOpExp() {}
|
18
23
|
|
19
24
|
public BinaryOpExp(ParserLiteral left, ParserLiteral right, int operator)
|
20
25
|
{
|
@@ -27,10 +32,47 @@ abstract class BinaryOpExp extends ParserExp
|
|
27
32
|
{
|
28
33
|
this((ParserLiteral)(left.obj), (ParserLiteral)(right.obj), operator);
|
29
34
|
}
|
35
|
+
|
36
|
+
static BinaryOpExp create(ParserLiteral left, ParserLiteral right, int operator)
|
37
|
+
{
|
38
|
+
if (left.isTimestamp() || right.isTimestamp()) {
|
39
|
+
// Either of left or right would be a string or a number
|
40
|
+
return new TimestampOpExp(left, right, operator);
|
41
|
+
}
|
42
|
+
else if (left.isString() || right.isString()) {
|
43
|
+
return new StringOpExp(left, right, operator);
|
44
|
+
}
|
45
|
+
else if (left.isNumber() || right.isNumber()) {
|
46
|
+
return new NumberOpExp(left, right, operator);
|
47
|
+
}
|
48
|
+
else if (left.isBoolean() || right.isBoolean()) {
|
49
|
+
return new BooleanOpExp(left, right, operator);
|
50
|
+
}
|
51
|
+
else {
|
52
|
+
throw new RuntimeException();
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
static BinaryOpExp create(ParserVal left, ParserVal right, int operator)
|
57
|
+
{
|
58
|
+
return BinaryOpExp.create(((ParserLiteral)left.obj), ((ParserLiteral)right.obj), operator);
|
59
|
+
}
|
60
|
+
|
61
|
+
static boolean isOperatorAllowed(int[] operators, int operator)
|
62
|
+
{
|
63
|
+
for (int o : operators) {
|
64
|
+
if (operator == o) {
|
65
|
+
return true;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
return false;
|
69
|
+
}
|
30
70
|
}
|
31
71
|
|
32
72
|
class BooleanOpExp extends BinaryOpExp
|
33
73
|
{
|
74
|
+
public static int[] operators = {Parser.EQ, Parser.NEQ, Parser.GT, Parser.GE, Parser.LT, Parser.LE};
|
75
|
+
|
34
76
|
public BooleanOpExp(ParserLiteral left, ParserLiteral right, int operator)
|
35
77
|
{
|
36
78
|
super(left, right, operator);
|
@@ -40,6 +82,9 @@ class BooleanOpExp extends BinaryOpExp
|
|
40
82
|
if (! right.isBoolean()) {
|
41
83
|
throw new ConfigException(String.format("\"%s\" is not a Boolean column", ((IdentifierLiteral)right).name));
|
42
84
|
}
|
85
|
+
if (! isOperatorAllowed(operators, operator)) {
|
86
|
+
throw new ConfigException(String.format("\"%s\" is not an allowed operator for BooleanOpExp", Parser.yyname[operator]));
|
87
|
+
}
|
43
88
|
}
|
44
89
|
|
45
90
|
public BooleanOpExp(ParserVal left, ParserVal right, int operator)
|
@@ -66,6 +111,8 @@ class BooleanOpExp extends BinaryOpExp
|
|
66
111
|
|
67
112
|
class NumberOpExp extends BinaryOpExp
|
68
113
|
{
|
114
|
+
public static int[] operators = {Parser.EQ, Parser.NEQ, Parser.GT, Parser.GE, Parser.LT, Parser.LE};
|
115
|
+
|
69
116
|
public NumberOpExp(ParserLiteral left, ParserLiteral right, int operator)
|
70
117
|
{
|
71
118
|
super(left, right, operator);
|
@@ -75,6 +122,9 @@ class NumberOpExp extends BinaryOpExp
|
|
75
122
|
if (! right.isNumber()) {
|
76
123
|
throw new ConfigException(String.format("\"%s\" is not a Number column", ((IdentifierLiteral)right).name));
|
77
124
|
}
|
125
|
+
if (! isOperatorAllowed(operators, operator)) {
|
126
|
+
throw new ConfigException(String.format("\"%s\" is not an allowed operator for NumberOpExp", Parser.yyname[operator]));
|
127
|
+
}
|
78
128
|
}
|
79
129
|
|
80
130
|
public NumberOpExp(ParserVal left, ParserVal right, int operator)
|
@@ -113,14 +163,22 @@ class NumberOpExp extends BinaryOpExp
|
|
113
163
|
|
114
164
|
class TimestampOpExp extends BinaryOpExp
|
115
165
|
{
|
166
|
+
public static int[] operators = {Parser.EQ, Parser.NEQ, Parser.GT, Parser.GE, Parser.LT, Parser.LE};
|
167
|
+
|
116
168
|
public TimestampOpExp(ParserLiteral left, ParserLiteral right, int operator)
|
117
169
|
{
|
118
|
-
|
119
|
-
|
120
|
-
|
170
|
+
this.left = left.isIdentifier() ? left : new TimestampLiteral(left);
|
171
|
+
this.right = right.isIdentifier() ? right : new TimestampLiteral(right);
|
172
|
+
this.operator = operator;
|
173
|
+
|
174
|
+
if (! this.left.isTimestamp()) {
|
175
|
+
throw new ConfigException(String.format("\"%s\" is not a Timestamp column", ((IdentifierLiteral)this.left).name));
|
176
|
+
}
|
177
|
+
if (! this.right.isTimestamp()) {
|
178
|
+
throw new ConfigException(String.format("\"%s\" is not a Timestamp column", ((IdentifierLiteral)this.right).name));
|
121
179
|
}
|
122
|
-
if (!
|
123
|
-
throw new ConfigException(String.format("\"%s\" is not
|
180
|
+
if (! isOperatorAllowed(operators, operator)) {
|
181
|
+
throw new ConfigException(String.format("\"%s\" is not an allowed operator for TimestampOpExp", Parser.yyname[operator]));
|
124
182
|
}
|
125
183
|
}
|
126
184
|
|
@@ -160,6 +218,11 @@ class TimestampOpExp extends BinaryOpExp
|
|
160
218
|
|
161
219
|
class StringOpExp extends BinaryOpExp
|
162
220
|
{
|
221
|
+
public static int[] operators = {
|
222
|
+
Parser.EQ, Parser.NEQ, Parser.GT, Parser.GE, Parser.LT, Parser.LE,
|
223
|
+
Parser.START_WITH, Parser.END_WITH, Parser.INCLUDE, Parser.REGEXP
|
224
|
+
};
|
225
|
+
|
163
226
|
public StringOpExp(ParserLiteral left, ParserLiteral right, int operator)
|
164
227
|
{
|
165
228
|
super(left, right, operator);
|
@@ -169,6 +232,9 @@ class StringOpExp extends BinaryOpExp
|
|
169
232
|
if (! right.isString()) {
|
170
233
|
throw new ConfigException(String.format("\"%s\" is not a String column", ((IdentifierLiteral)right).name));
|
171
234
|
}
|
235
|
+
if (! isOperatorAllowed(operators, operator)) {
|
236
|
+
throw new ConfigException(String.format("\"%s\" is not an allowed operator for StringOpExp", Parser.yyname[operator]));
|
237
|
+
}
|
172
238
|
}
|
173
239
|
|
174
240
|
public StringOpExp(ParserVal left, ParserVal right, int operator)
|
@@ -186,6 +252,18 @@ class StringOpExp extends BinaryOpExp
|
|
186
252
|
else if (operator == Parser.NEQ) {
|
187
253
|
return ! l.equals(r);
|
188
254
|
}
|
255
|
+
else if (operator == Parser.GT) {
|
256
|
+
return l.compareTo(r) > 0;
|
257
|
+
}
|
258
|
+
else if (operator == Parser.GE) {
|
259
|
+
return l.compareTo(r) >= 0;
|
260
|
+
}
|
261
|
+
else if (operator == Parser.LT) {
|
262
|
+
return l.compareTo(r) < 0;
|
263
|
+
}
|
264
|
+
else if (operator == Parser.LE) {
|
265
|
+
return l.compareTo(r) <= 0;
|
266
|
+
}
|
189
267
|
else if (operator == Parser.START_WITH) {
|
190
268
|
return l.startsWith(r);
|
191
269
|
}
|
@@ -202,6 +280,32 @@ class StringOpExp extends BinaryOpExp
|
|
202
280
|
}
|
203
281
|
}
|
204
282
|
|
283
|
+
class RegexpOpExp extends BinaryOpExp
|
284
|
+
{
|
285
|
+
Pattern pattern;
|
286
|
+
|
287
|
+
public RegexpOpExp(ParserLiteral left, ParserLiteral right, int operator)
|
288
|
+
{
|
289
|
+
super(left, right, operator);
|
290
|
+
this.pattern = Pattern.compile(((StringLiteral)right).val);
|
291
|
+
if (! left.isString()) {
|
292
|
+
throw new ConfigException(String.format("\"%s\" is not a String column", ((IdentifierLiteral)left).name));
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
public RegexpOpExp(ParserVal left, ParserVal right, int operator)
|
297
|
+
{
|
298
|
+
this((ParserLiteral)(left.obj), (ParserLiteral)(right.obj), operator);
|
299
|
+
}
|
300
|
+
|
301
|
+
public boolean eval(PageReader pageReader)
|
302
|
+
{
|
303
|
+
String l = left.getString(pageReader);
|
304
|
+
Matcher m = pattern.matcher(l);
|
305
|
+
return m.find();
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
205
309
|
class NullOpExp extends ParserExp
|
206
310
|
{
|
207
311
|
protected ParserLiteral val;
|
@@ -22,7 +22,8 @@ import org.msgpack.value.Value;
|
|
22
22
|
// Literal Node of AST (Abstract Syntax Tree)
|
23
23
|
public abstract class ParserLiteral extends ParserNode
|
24
24
|
{
|
25
|
-
static ScriptingContainer jruby;
|
25
|
+
protected static ScriptingContainer jruby;
|
26
|
+
protected String yytext;
|
26
27
|
|
27
28
|
public static void setJRuby(ScriptingContainer jruby)
|
28
29
|
{
|
@@ -49,6 +50,10 @@ public abstract class ParserLiteral extends ParserNode
|
|
49
50
|
{
|
50
51
|
return false;
|
51
52
|
}
|
53
|
+
public boolean isIdentifier()
|
54
|
+
{
|
55
|
+
return false;
|
56
|
+
}
|
52
57
|
|
53
58
|
public boolean isNull(PageReader pageReader)
|
54
59
|
{
|
@@ -78,11 +83,12 @@ public abstract class ParserLiteral extends ParserNode
|
|
78
83
|
|
79
84
|
class BooleanLiteral extends ParserLiteral
|
80
85
|
{
|
81
|
-
|
86
|
+
protected boolean val;
|
82
87
|
|
83
|
-
public BooleanLiteral(
|
88
|
+
public BooleanLiteral(String yytext)
|
84
89
|
{
|
85
|
-
this.
|
90
|
+
this.yytext = yytext;
|
91
|
+
this.val = Boolean.parseBoolean(yytext); // but, only true|TRUE|false|FALSE are allowed in lexer
|
86
92
|
}
|
87
93
|
|
88
94
|
public boolean isBoolean()
|
@@ -100,14 +106,10 @@ class NumberLiteral extends ParserLiteral
|
|
100
106
|
{
|
101
107
|
protected double val;
|
102
108
|
|
103
|
-
public NumberLiteral(
|
109
|
+
public NumberLiteral(String yytext)
|
104
110
|
{
|
105
|
-
this.
|
106
|
-
|
107
|
-
|
108
|
-
public NumberLiteral(String str)
|
109
|
-
{
|
110
|
-
this.val = Double.parseDouble(str);
|
111
|
+
this.yytext = yytext;
|
112
|
+
this.val = Double.parseDouble(yytext);
|
111
113
|
}
|
112
114
|
|
113
115
|
public boolean isNumber()
|
@@ -125,9 +127,10 @@ class StringLiteral extends ParserLiteral
|
|
125
127
|
{
|
126
128
|
protected String val;
|
127
129
|
|
128
|
-
public StringLiteral(String
|
130
|
+
public StringLiteral(String yytext)
|
129
131
|
{
|
130
|
-
this.
|
132
|
+
this.yytext = yytext;
|
133
|
+
this.val = yytext;
|
131
134
|
}
|
132
135
|
|
133
136
|
public boolean isString()
|
@@ -146,21 +149,30 @@ class TimestampLiteral extends ParserLiteral
|
|
146
149
|
protected Timestamp val;
|
147
150
|
private static final DateTimeZone default_timezone = DateTimeZone.forID("UTC");
|
148
151
|
|
149
|
-
public TimestampLiteral(
|
152
|
+
public TimestampLiteral(ParserLiteral literal)
|
150
153
|
{
|
151
|
-
if (
|
152
|
-
initTimestampLiteral((
|
154
|
+
if (literal.getClass() == StringLiteral.class) {
|
155
|
+
initTimestampLiteral((StringLiteral)literal);
|
153
156
|
}
|
154
|
-
else if (
|
155
|
-
initTimestampLiteral((
|
157
|
+
else if (literal.getClass() == NumberLiteral.class) {
|
158
|
+
initTimestampLiteral((NumberLiteral)(literal));
|
159
|
+
}
|
160
|
+
else if (literal.getClass() == TimestampLiteral.class) {
|
161
|
+
initTimestampLiteral((TimestampLiteral)literal);
|
156
162
|
}
|
157
163
|
else {
|
158
|
-
throw new
|
164
|
+
throw new ConfigException(String.format("\"%s\" is not a Timestamp literal", literal.yytext));
|
159
165
|
}
|
160
166
|
}
|
161
167
|
|
162
|
-
public
|
168
|
+
public TimestampLiteral(ParserVal val)
|
169
|
+
{
|
170
|
+
this((ParserLiteral)(val.obj));
|
171
|
+
}
|
172
|
+
|
173
|
+
void initTimestampLiteral(StringLiteral literal)
|
163
174
|
{
|
175
|
+
this.yytext = literal.yytext;
|
164
176
|
String[] formats = {
|
165
177
|
"%Y-%m-%d %H:%M:%S.%N %z",
|
166
178
|
"%Y-%m-%d %H:%M:%S.%N",
|
@@ -174,7 +186,7 @@ class TimestampLiteral extends ParserLiteral
|
|
174
186
|
for (String format : formats) {
|
175
187
|
try {
|
176
188
|
TimestampParser timestampParser = new TimestampParser(jruby, format, default_timezone);
|
177
|
-
this.val = timestampParser.parse(
|
189
|
+
this.val = timestampParser.parse(literal.val);
|
178
190
|
break;
|
179
191
|
}
|
180
192
|
catch (TimestampParseException e) {
|
@@ -186,13 +198,21 @@ class TimestampLiteral extends ParserLiteral
|
|
186
198
|
}
|
187
199
|
}
|
188
200
|
|
189
|
-
|
201
|
+
void initTimestampLiteral(NumberLiteral literal)
|
190
202
|
{
|
203
|
+
this.yytext = literal.yytext;
|
204
|
+
double epoch = literal.val;
|
191
205
|
int epochSecond = (int) epoch;
|
192
206
|
long nanoAdjustment = (long) ((epoch - epochSecond) * 1000000000);
|
193
207
|
this.val = Timestamp.ofEpochSecond(epochSecond, nanoAdjustment);
|
194
208
|
}
|
195
209
|
|
210
|
+
void initTimestampLiteral(TimestampLiteral literal)
|
211
|
+
{
|
212
|
+
this.yytext = literal.yytext;
|
213
|
+
this.val = literal.val;
|
214
|
+
}
|
215
|
+
|
196
216
|
public boolean isTimestamp()
|
197
217
|
{
|
198
218
|
return true;
|
@@ -239,6 +259,10 @@ class IdentifierLiteral extends ParserLiteral
|
|
239
259
|
{
|
240
260
|
return (column.getType() instanceof JsonType);
|
241
261
|
}
|
262
|
+
public boolean isIdentifier()
|
263
|
+
{
|
264
|
+
return true;
|
265
|
+
}
|
242
266
|
|
243
267
|
public boolean isNull(PageReader pageReader)
|
244
268
|
{
|
@@ -37,14 +37,14 @@ class Yylex {
|
|
37
37
|
* Translates characters to character classes
|
38
38
|
*/
|
39
39
|
private static final String ZZ_CMAP_PACKED =
|
40
|
-
"\11\0\1\
|
40
|
+
"\11\0\1\54\1\12\1\55\1\55\1\11\22\0\1\54\1\24\1\4"+
|
41
41
|
"\4\0\1\10\1\13\1\13\3\0\1\1\1\3\1\0\12\2\2\0"+
|
42
|
-
"\1\22\1\21\1\23\2\0\1\14\1\5\1\34\1\16\1\33\1\
|
43
|
-
"\1\
|
44
|
-
"\1\20\1\25\1\26\1\36\1\5\1\30\
|
45
|
-
"\1\27\1\6\1\
|
46
|
-
"\1\
|
47
|
-
"\1\
|
42
|
+
"\1\22\1\21\1\23\2\0\1\14\1\5\1\34\1\16\1\33\1\53"+
|
43
|
+
"\1\37\1\32\1\31\2\5\1\35\1\42\1\15\1\17\1\41\1\5"+
|
44
|
+
"\1\20\1\25\1\26\1\36\1\5\1\30\1\40\2\5\1\6\1\7"+
|
45
|
+
"\2\6\1\27\1\6\1\50\1\56\2\5\1\46\1\47\5\5\1\51"+
|
46
|
+
"\1\5\1\57\3\5\1\44\1\52\1\43\1\45\5\5\12\0\1\55"+
|
47
|
+
"\u1fa2\0\1\55\1\55\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\udfe6\0";
|
48
48
|
|
49
49
|
/**
|
50
50
|
* Translates characters to character classes
|
@@ -58,15 +58,15 @@ class Yylex {
|
|
58
58
|
|
59
59
|
private static final String ZZ_ACTION_PACKED_0 =
|
60
60
|
"\3\0\2\1\1\2\1\3\1\4\1\5\2\6\1\7"+
|
61
|
-
"\
|
61
|
+
"\4\4\1\10\1\11\1\12\1\1\7\4\1\6\1\13"+
|
62
62
|
"\1\1\1\14\1\13\1\15\1\1\1\0\3\4\1\16"+
|
63
|
-
"\1\17\1\20\1\21\4\4\1\22\4\4\1\23
|
64
|
-
"\1\25\1\26\1\27\1\30\1\31\1\32\1\33
|
65
|
-
"\1\34\1\35\
|
66
|
-
"\6\4\1\41\3\4\1\42\1\4\1\43\1\44";
|
63
|
+
"\1\4\1\17\1\20\1\21\4\4\1\22\4\4\1\23"+
|
64
|
+
"\1\24\1\25\1\26\1\27\1\30\1\31\1\32\1\33"+
|
65
|
+
"\1\2\1\34\1\35\12\4\1\36\2\4\1\37\10\4"+
|
66
|
+
"\1\40\6\4\1\41\3\4\1\42\1\4\1\43\1\44";
|
67
67
|
|
68
68
|
private static int [] zzUnpackAction() {
|
69
|
-
int [] result = new int[
|
69
|
+
int [] result = new int[101];
|
70
70
|
int offset = 0;
|
71
71
|
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
|
72
72
|
return result;
|
@@ -91,22 +91,22 @@ class Yylex {
|
|
91
91
|
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
|
92
92
|
|
93
93
|
private static final String ZZ_ROWMAP_PACKED_0 =
|
94
|
-
"\0\0\0\
|
95
|
-
"\0\
|
96
|
-
"\0\
|
97
|
-
"\0\
|
98
|
-
"\0\
|
99
|
-
"\0\
|
100
|
-
"\0\
|
101
|
-
"\0\
|
102
|
-
"\0\
|
103
|
-
"\0\
|
104
|
-
"\0\
|
105
|
-
"\0\
|
106
|
-
"\0\
|
94
|
+
"\0\0\0\60\0\140\0\220\0\300\0\360\0\220\0\u0120"+
|
95
|
+
"\0\220\0\u0150\0\220\0\220\0\u0180\0\u01b0\0\u01e0\0\u0210"+
|
96
|
+
"\0\220\0\u0240\0\u0270\0\u02a0\0\u02d0\0\u0300\0\u0330\0\u0360"+
|
97
|
+
"\0\u0390\0\u03c0\0\u03f0\0\u0420\0\u0450\0\u0480\0\220\0\u04b0"+
|
98
|
+
"\0\220\0\u04e0\0\u0510\0\u0540\0\u0570\0\u05a0\0\u0120\0\u05d0"+
|
99
|
+
"\0\220\0\220\0\220\0\u0600\0\u0630\0\u0660\0\u0690\0\u0120"+
|
100
|
+
"\0\u06c0\0\u06f0\0\u0720\0\u0750\0\220\0\220\0\220\0\220"+
|
101
|
+
"\0\220\0\220\0\220\0\220\0\220\0\u0510\0\u0120\0\u0120"+
|
102
|
+
"\0\u0780\0\u07b0\0\u07e0\0\u0810\0\u0840\0\u0870\0\u08a0\0\u08d0"+
|
103
|
+
"\0\u0900\0\u0930\0\u0120\0\u0960\0\u0990\0\u0120\0\u09c0\0\u09f0"+
|
104
|
+
"\0\u0a20\0\u0a50\0\u0a80\0\u0ab0\0\u0ae0\0\u0b10\0\u0120\0\u0b40"+
|
105
|
+
"\0\u0b70\0\u0ba0\0\u0bd0\0\u0c00\0\u0c30\0\u0120\0\u0c60\0\u0c90"+
|
106
|
+
"\0\u0cc0\0\u0120\0\u0cf0\0\u0120\0\u0120";
|
107
107
|
|
108
108
|
private static int [] zzUnpackRowMap() {
|
109
|
-
int [] result = new int[
|
109
|
+
int [] result = new int[101];
|
110
110
|
int offset = 0;
|
111
111
|
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
|
112
112
|
return result;
|
@@ -130,97 +130,101 @@ class Yylex {
|
|
130
130
|
|
131
131
|
private static final String ZZ_TRANS_PACKED_0 =
|
132
132
|
"\1\4\1\5\1\6\1\4\1\7\1\10\2\4\1\11"+
|
133
|
-
"\1\12\1\13\1\14\1\15\1\16\1\10\1\17\1\
|
134
|
-
"\1\
|
135
|
-
"\1\10\1\
|
136
|
-
"\1\
|
137
|
-
"\4\
|
138
|
-
"\1\6\
|
139
|
-
"\4\0\5\10\4\0\
|
140
|
-
"\
|
141
|
-
"\4\0\
|
142
|
-
"\4\0\3\10\1\
|
133
|
+
"\1\12\1\13\1\14\1\15\1\16\1\10\1\17\1\20"+
|
134
|
+
"\1\21\1\22\1\23\1\24\1\25\1\26\2\10\1\27"+
|
135
|
+
"\1\10\1\30\7\10\1\31\3\10\1\32\3\10\1\33"+
|
136
|
+
"\1\34\1\4\2\10\7\35\1\36\1\37\2\4\45\35"+
|
137
|
+
"\4\40\1\41\2\40\1\42\1\40\2\4\45\40\62\0"+
|
138
|
+
"\1\6\57\0\1\6\1\43\56\0\1\10\2\0\3\10"+
|
139
|
+
"\4\0\5\10\4\0\27\10\2\0\2\10\12\0\1\13"+
|
140
|
+
"\47\0\1\10\2\0\3\10\4\0\1\10\1\44\3\10"+
|
141
|
+
"\4\0\27\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
142
|
+
"\4\0\3\10\1\45\1\10\4\0\11\10\1\46\15\10"+
|
143
143
|
"\2\0\2\10\2\0\1\10\2\0\3\10\4\0\4\10"+
|
144
|
-
"\1\
|
145
|
-
"\
|
146
|
-
"\
|
147
|
-
"\
|
148
|
-
"\
|
149
|
-
"\
|
150
|
-
"\
|
151
|
-
"\1\
|
152
|
-
"\1\10\2\0\3\10\4\0\
|
153
|
-
"\
|
154
|
-
"\5\10\4\0\
|
155
|
-
"\1\10\2\0\3\10\4\0\
|
156
|
-
"\2\0\2\10\
|
157
|
-
"\
|
158
|
-
"\
|
159
|
-
"\1\
|
160
|
-
"\
|
161
|
-
"\
|
162
|
-
"\
|
163
|
-
"\3\10\4\0\
|
144
|
+
"\1\47\4\0\27\10\2\0\2\10\2\0\1\10\2\0"+
|
145
|
+
"\3\10\4\0\5\10\4\0\6\10\1\50\20\10\2\0"+
|
146
|
+
"\2\10\21\0\1\51\1\0\1\52\55\0\1\53\57\0"+
|
147
|
+
"\1\52\40\0\1\10\2\0\3\10\4\0\5\10\4\0"+
|
148
|
+
"\1\10\1\54\25\10\2\0\2\10\2\0\1\10\2\0"+
|
149
|
+
"\3\10\4\0\4\10\1\55\4\0\4\10\1\56\22\10"+
|
150
|
+
"\2\0\2\10\2\0\1\10\2\0\3\10\4\0\1\10"+
|
151
|
+
"\1\57\3\10\4\0\1\60\26\10\2\0\2\10\2\0"+
|
152
|
+
"\1\10\2\0\3\10\4\0\1\10\1\61\3\10\4\0"+
|
153
|
+
"\27\10\2\0\2\10\2\0\1\10\2\0\3\10\4\0"+
|
154
|
+
"\5\10\4\0\17\10\1\62\7\10\2\0\2\10\2\0"+
|
155
|
+
"\1\10\2\0\3\10\4\0\5\10\4\0\23\10\1\63"+
|
156
|
+
"\3\10\2\0\2\10\2\0\1\10\2\0\3\10\4\0"+
|
157
|
+
"\1\64\4\10\4\0\27\10\2\0\2\10\54\0\1\34"+
|
158
|
+
"\3\0\7\35\4\0\45\35\4\65\1\66\2\65\1\67"+
|
159
|
+
"\1\70\2\0\30\65\1\71\1\72\2\65\1\73\5\65"+
|
160
|
+
"\1\0\1\74\1\75\4\40\1\0\2\40\1\0\1\40"+
|
161
|
+
"\2\0\45\40\4\65\1\66\2\65\1\67\1\70\2\0"+
|
162
|
+
"\42\65\1\0\2\65\2\0\1\76\57\0\1\10\2\0"+
|
163
|
+
"\3\10\4\0\2\10\1\77\2\10\4\0\27\10\2\0"+
|
164
164
|
"\2\10\2\0\1\10\2\0\3\10\4\0\5\10\4\0"+
|
165
|
-
"\
|
166
|
-
"\3\10\4\0\
|
165
|
+
"\1\10\1\100\25\10\2\0\2\10\2\0\1\10\2\0"+
|
166
|
+
"\3\10\4\0\5\10\4\0\10\10\1\101\16\10\2\0"+
|
167
|
+
"\2\10\2\0\1\10\2\0\3\10\4\0\5\10\4\0"+
|
168
|
+
"\12\10\1\102\14\10\2\0\2\10\2\0\1\10\2\0"+
|
169
|
+
"\3\10\4\0\1\103\4\10\4\0\27\10\2\0\2\10"+
|
167
170
|
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\11\10"+
|
168
|
-
"\1\
|
169
|
-
"\4\0\5\10\4\0\
|
171
|
+
"\1\104\15\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
172
|
+
"\4\0\5\10\4\0\15\10\1\105\11\10\2\0\2\10"+
|
170
173
|
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\7\10"+
|
171
|
-
"\1\
|
172
|
-
"\4\0\2\10\1\
|
173
|
-
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\
|
174
|
-
"\1\
|
175
|
-
"\4\0\5\10\4\0\
|
174
|
+
"\1\106\17\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
175
|
+
"\4\0\2\10\1\107\2\10\4\0\27\10\2\0\2\10"+
|
176
|
+
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\20\10"+
|
177
|
+
"\1\110\6\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
178
|
+
"\4\0\5\10\4\0\24\10\1\111\2\10\2\0\2\10"+
|
176
179
|
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\10\10"+
|
177
|
-
"\1\
|
178
|
-
"\4\0\5\10\4\0\10\10\1\
|
179
|
-
"\2\0\1\10\2\0\3\10\4\0\
|
180
|
-
"\
|
181
|
-
"\
|
182
|
-
"\1\10\2\0\3\10\4\0\5\10\4\0\6\10\1\
|
180
|
+
"\1\112\16\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
181
|
+
"\4\0\5\10\4\0\10\10\1\113\16\10\2\0\2\10"+
|
182
|
+
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\6\10"+
|
183
|
+
"\1\114\20\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
184
|
+
"\4\0\4\10\1\115\4\0\27\10\2\0\2\10\2\0"+
|
185
|
+
"\1\10\2\0\3\10\4\0\5\10\4\0\6\10\1\116"+
|
186
|
+
"\20\10\2\0\2\10\2\0\1\10\2\0\3\10\4\0"+
|
187
|
+
"\5\10\4\0\6\10\1\117\20\10\2\0\2\10\2\0"+
|
188
|
+
"\1\10\2\0\3\10\4\0\5\10\4\0\10\10\1\120"+
|
183
189
|
"\16\10\2\0\2\10\2\0\1\10\2\0\3\10\4\0"+
|
184
|
-
"\5\10\4\0\
|
185
|
-
"\1\10\2\0\3\10\4\0\5\10\4\0\
|
186
|
-
"\
|
187
|
-
"\5\10\4\0\
|
188
|
-
"\1\10\2\0\3\10\4\0\5\10\4\0\
|
189
|
-
"\1\10\2\0\2\10\2\0\1\10\2\0\3\10\4\0"+
|
190
|
-
"\5\10\4\0\1\117\24\10\2\0\2\10\2\0\1\10"+
|
191
|
-
"\2\0\3\10\4\0\5\10\4\0\1\10\1\120\23\10"+
|
190
|
+
"\5\10\4\0\2\10\1\121\24\10\2\0\2\10\2\0"+
|
191
|
+
"\1\10\2\0\3\10\4\0\5\10\4\0\21\10\1\116"+
|
192
|
+
"\5\10\2\0\2\10\2\0\1\10\2\0\3\10\4\0"+
|
193
|
+
"\5\10\4\0\25\10\1\110\1\10\2\0\2\10\2\0"+
|
194
|
+
"\1\10\2\0\3\10\4\0\5\10\4\0\1\104\26\10"+
|
192
195
|
"\2\0\2\10\2\0\1\10\2\0\3\10\4\0\5\10"+
|
193
|
-
"\4\0\1\
|
194
|
-
"\3\10\4\0\5\10\4\0\
|
195
|
-
"\2\10\2\0\1\10\2\0\3\10\4\0\5\10
|
196
|
-
"\
|
197
|
-
"\3\10\4\0\5\10\4\0\
|
196
|
+
"\4\0\13\10\1\122\13\10\2\0\2\10\2\0\1\10"+
|
197
|
+
"\2\0\3\10\4\0\5\10\4\0\1\10\1\123\25\10"+
|
198
|
+
"\2\0\2\10\2\0\1\10\2\0\3\10\4\0\5\10"+
|
199
|
+
"\4\0\1\124\26\10\2\0\2\10\2\0\1\10\2\0"+
|
200
|
+
"\3\10\4\0\5\10\4\0\11\10\1\125\15\10\2\0"+
|
198
201
|
"\2\10\2\0\1\10\2\0\3\10\4\0\5\10\4\0"+
|
199
|
-
"\
|
200
|
-
"\3\10\4\0\5\10\4\0\
|
202
|
+
"\3\10\1\126\23\10\2\0\2\10\2\0\1\10\2\0"+
|
203
|
+
"\3\10\4\0\5\10\4\0\14\10\1\127\12\10\2\0"+
|
201
204
|
"\2\10\2\0\1\10\2\0\3\10\4\0\5\10\4\0"+
|
202
|
-
"\
|
203
|
-
"\3\10\4\0\
|
205
|
+
"\2\10\1\130\24\10\2\0\2\10\2\0\1\10\2\0"+
|
206
|
+
"\3\10\4\0\5\10\4\0\1\10\1\131\25\10\2\0"+
|
207
|
+
"\2\10\2\0\1\10\2\0\3\10\4\0\2\10\1\132"+
|
208
|
+
"\2\10\4\0\27\10\2\0\2\10\2\0\1\10\2\0"+
|
209
|
+
"\3\10\4\0\5\10\4\0\4\10\1\133\22\10\2\0"+
|
204
210
|
"\2\10\2\0\1\10\2\0\3\10\4\0\5\10\4\0"+
|
205
|
-
"\
|
206
|
-
"\3\10\4\0\
|
207
|
-
"\2\
|
208
|
-
"\
|
209
|
-
"\4\0\5\10\4\0\
|
210
|
-
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\
|
211
|
-
"\1\
|
212
|
-
"\4\0\5\10\4\0\
|
213
|
-
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\12\10"+
|
214
|
-
"\1\136\12\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
215
|
-
"\4\0\5\10\4\0\5\10\1\137\17\10\2\0\2\10"+
|
216
|
-
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\1\10"+
|
217
|
-
"\1\140\23\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
218
|
-
"\4\0\5\10\4\0\13\10\1\141\11\10\2\0\2\10"+
|
211
|
+
"\3\10\1\134\23\10\2\0\2\10\2\0\1\10\2\0"+
|
212
|
+
"\3\10\4\0\1\135\4\10\4\0\27\10\2\0\2\10"+
|
213
|
+
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\6\10"+
|
214
|
+
"\1\136\20\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
215
|
+
"\4\0\5\10\4\0\1\10\1\137\25\10\2\0\2\10"+
|
216
|
+
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\4\10"+
|
217
|
+
"\1\140\22\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
218
|
+
"\4\0\5\10\4\0\15\10\1\141\11\10\2\0\2\10"+
|
219
219
|
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\5\10"+
|
220
|
-
"\1\142\
|
220
|
+
"\1\142\21\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
221
|
+
"\4\0\5\10\4\0\1\10\1\143\25\10\2\0\2\10"+
|
222
|
+
"\2\0\1\10\2\0\3\10\4\0\5\10\4\0\14\10"+
|
223
|
+
"\1\144\12\10\2\0\2\10\2\0\1\10\2\0\3\10"+
|
224
|
+
"\4\0\5\10\4\0\5\10\1\145\21\10\2\0\2\10";
|
221
225
|
|
222
226
|
private static int [] zzUnpackTrans() {
|
223
|
-
int [] result = new int[
|
227
|
+
int [] result = new int[3360];
|
224
228
|
int offset = 0;
|
225
229
|
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
|
226
230
|
return result;
|
@@ -259,11 +263,11 @@ class Yylex {
|
|
259
263
|
|
260
264
|
private static final String ZZ_ATTRIBUTE_PACKED_0 =
|
261
265
|
"\3\0\1\11\2\1\1\11\1\1\1\11\1\1\2\11"+
|
262
|
-
"\
|
263
|
-
"\
|
266
|
+
"\4\1\1\11\15\1\1\11\1\1\1\11\1\1\1\0"+
|
267
|
+
"\5\1\3\11\11\1\11\11\50\1";
|
264
268
|
|
265
269
|
private static int [] zzUnpackAttribute() {
|
266
|
-
int [] result = new int[
|
270
|
+
int [] result = new int[101];
|
267
271
|
int offset = 0;
|
268
272
|
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
|
269
273
|
return result;
|
@@ -371,7 +375,7 @@ class Yylex {
|
|
371
375
|
char [] map = new char[0x110000];
|
372
376
|
int i = 0; /* index in packed string */
|
373
377
|
int j = 0; /* index in unpacked array */
|
374
|
-
while (i <
|
378
|
+
while (i < 180) {
|
375
379
|
int count = packed.charAt(i++);
|
376
380
|
char value = packed.charAt(i++);
|
377
381
|
do map[j++] = value; while (--count > 0);
|
@@ -799,11 +803,11 @@ class Yylex {
|
|
799
803
|
}
|
800
804
|
case 66: break;
|
801
805
|
case 31:
|
802
|
-
{ yyparser.yylval = new ParserVal(new BooleanLiteral(
|
806
|
+
{ yyparser.yylval = new ParserVal(new BooleanLiteral(yytext())); return Parser.BOOLEAN;
|
803
807
|
}
|
804
808
|
case 67: break;
|
805
809
|
case 32:
|
806
|
-
{
|
810
|
+
{ return Parser.REGEXP;
|
807
811
|
}
|
808
812
|
case 68: break;
|
809
813
|
case 33:
|