Visualization of parser LSFilter

Lexical analysis

_whitespace /^(\s+)/
_comment /^(\/\*(?:[^\*]|\*[^\/])*\*\/)/
string /^("(?:[^"\\]|\\.)*")/
all /^(all)(?:[^a-z0-9_][\s\S]*|)$/i
and /^(and)(?:[^a-z0-9_][\s\S]*|)$/i
not /^(not)(?:[^a-z0-9_][\s\S]*|)$/i
or /^(or)(?:[^a-z0-9_][\s\S]*|)$/i
in /^(in)(?:[^a-z0-9_][\s\S]*|)$/i
name /^([a-z][a-z0-9_]*)/i
integer /^([0-9]+)/
not_re_ci /^(!~~)/
not_re_cs /^(!~)/
re_ci /^(~~)/
re_cs /^(~)/
not_eq_ci /^(!=~)/
eq_ci /^(=~)/
not_eq /^(!=)/
gt_eq /^(>=)/
lt_eq /^(<=)/
gt /^(>)/
lt /^(<)/
eq /^(=)/
colon /^(:)/
comma /^(,)/
dot /^(\.)/
par_l /^(\()/
par_r /^(\))/
brace_l /^(\[)/
brace_r /^(\])/

Grammar

entry program = query end
query query = brace_l table_def brace_r search_query
table_def_simple table_def = name
search_query search_query = filter
filter_or filter = filter or filter2
_filter_1_2 filter = filter2
filter_and filter2 = filter2 and filter3
_filter_2_3 filter2 = filter3
filter_not filter3 = not filter4
_filter_3_4 filter3 = filter4
filter_ok filter4 = match
_filter_parentesis filter4 = par_l filter par_r
match_all match = all
match_in match = in set_descr
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
set_descr_name set_descr = string
field_name field = name
field_obj field = name dot field
_arg_num_str_num arg_num_string = arg_num
_arg_num_str_str arg_num_string = arg_string
_arg_num arg_num = integer
_arg_string arg_string = string

LR Parser table

State end string all and not or in name integer not_re_ci not_re_cs re_ci re_cs not_eq_ci eq_ci not_eq gt_eq lt_eq gt lt eq colon comma dot par_l par_r brace_l brace_r program query table_def search_query filter filter2 filter3 filter4 match set_descr field arg_num_string arg_num arg_string
0
entry program = query end
query query = brace_l table_def brace_r search_query
shift
1
goto
63
1
query query = brace_l table_def brace_r search_query
table_def_simple table_def = name
shift
2
goto
3
2
table_def_simple table_def = name  
reduce
table_def_simple
3
query query = brace_l table_def brace_r search_query
shift
4
4
query query = brace_l table_def brace_r search_query
search_query search_query = filter
filter_or filter = filter or filter2
_filter_1_2 filter = filter2
filter_and filter2 = filter2 and filter3
_filter_2_3 filter2 = filter3
filter_not filter3 = not filter4
_filter_3_4 filter3 = filter4
filter_ok filter4 = match
_filter_parentesis filter4 = par_l filter par_r
match_all match = all
match_in match = in set_descr
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
field_name field = name
field_obj field = name dot field
shift
42
shift
46
shift
40
shift
5
shift
43
goto
62
goto
61
goto
49
goto
48
goto
45
goto
44
goto
8
5
field_name field = name  
field_obj field = name dot field
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
reduce
field_name
shift
6
6
field_obj field = name dot field
field_name field = name
field_obj field = name dot field
shift
5
goto
7
7
field_obj field = name dot field  
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
reduce
field_obj
8
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
shift
37
shift
35
shift
33
shift
31
shift
29
shift
27
shift
25
shift
23
shift
21
shift
19
shift
17
shift
15
shift
9
9
match_eq match = field eq arg_num_string
_arg_num_str_num arg_num_string = arg_num
_arg_num_str_str arg_num_string = arg_string
_arg_num arg_num = integer
_arg_string arg_string = string
shift
10
shift
11
goto
14
goto
13
goto
12
10
_arg_string arg_string = string  
reduce
_arg_string
reduce
_arg_string
reduce
_arg_string
reduce
_arg_string
11
_arg_num arg_num = integer  
reduce
_arg_num
reduce
_arg_num
reduce
_arg_num
reduce
_arg_num
12
_arg_num_str_str arg_num_string = arg_string  
reduce
_arg_num_str_str
reduce
_arg_num_str_str
reduce
_arg_num_str_str
reduce
_arg_num_str_str
13
_arg_num_str_num arg_num_string = arg_num  
reduce
_arg_num_str_num
reduce
_arg_num_str_num
reduce
_arg_num_str_num
reduce
_arg_num_str_num
14
match_eq match = field eq arg_num_string  
reduce
match_eq
reduce
match_eq
reduce
match_eq
reduce
match_eq
15
match_lt match = field lt arg_num
_arg_num arg_num = integer
shift
11
goto
16
16
match_lt match = field lt arg_num  
reduce
match_lt
reduce
match_lt
reduce
match_lt
reduce
match_lt
17
match_gt match = field gt arg_num
_arg_num arg_num = integer
shift
11
goto
18
18
match_gt match = field gt arg_num  
reduce
match_gt
reduce
match_gt
reduce
match_gt
reduce
match_gt
19
match_lt_eq match = field lt_eq arg_num
_arg_num arg_num = integer
shift
11
goto
20
20
match_lt_eq match = field lt_eq arg_num  
reduce
match_lt_eq
reduce
match_lt_eq
reduce
match_lt_eq
reduce
match_lt_eq
21
match_gt_eq match = field gt_eq arg_num_string
_arg_num_str_num arg_num_string = arg_num
_arg_num_str_str arg_num_string = arg_string
_arg_num arg_num = integer
_arg_string arg_string = string
shift
10
shift
11
goto
22
goto
13
goto
12
22
match_gt_eq match = field gt_eq arg_num_string  
reduce
match_gt_eq
reduce
match_gt_eq
reduce
match_gt_eq
reduce
match_gt_eq
23
match_not_eq match = field not_eq arg_num_string
_arg_num_str_num arg_num_string = arg_num
_arg_num_str_str arg_num_string = arg_string
_arg_num arg_num = integer
_arg_string arg_string = string
shift
10
shift
11
goto
24
goto
13
goto
12
24
match_not_eq match = field not_eq arg_num_string  
reduce
match_not_eq
reduce
match_not_eq
reduce
match_not_eq
reduce
match_not_eq
25
match_eq_ci match = field eq_ci arg_string
_arg_string arg_string = string
shift
10
goto
26
26
match_eq_ci match = field eq_ci arg_string  
reduce
match_eq_ci
reduce
match_eq_ci
reduce
match_eq_ci
reduce
match_eq_ci
27
match_not_eq_ci match = field not_eq_ci arg_string
_arg_string arg_string = string
shift
10
goto
28
28
match_not_eq_ci match = field not_eq_ci arg_string  
reduce
match_not_eq_ci
reduce
match_not_eq_ci
reduce
match_not_eq_ci
reduce
match_not_eq_ci
29
match_re_cs match = field re_cs arg_string
_arg_string arg_string = string
shift
10
goto
30
30
match_re_cs match = field re_cs arg_string  
reduce
match_re_cs
reduce
match_re_cs
reduce
match_re_cs
reduce
match_re_cs
31
match_re_ci match = field re_ci arg_string
_arg_string arg_string = string
shift
10
goto
32
32
match_re_ci match = field re_ci arg_string  
reduce
match_re_ci
reduce
match_re_ci
reduce
match_re_ci
reduce
match_re_ci
33
match_not_re_cs match = field not_re_cs arg_string
_arg_string arg_string = string
shift
10
goto
34
34
match_not_re_cs match = field not_re_cs arg_string  
reduce
match_not_re_cs
reduce
match_not_re_cs
reduce
match_not_re_cs
reduce
match_not_re_cs
35
match_not_re_ci match = field not_re_ci arg_string
_arg_string arg_string = string
shift
10
goto
36
36
match_not_re_ci match = field not_re_ci arg_string  
reduce
match_not_re_ci
reduce
match_not_re_ci
reduce
match_not_re_ci
reduce
match_not_re_ci
37
match_field_in match = field in set_descr
set_descr_name set_descr = string
shift
38
goto
39
38
set_descr_name set_descr = string  
reduce
set_descr_name
reduce
set_descr_name
reduce
set_descr_name
reduce
set_descr_name
39
match_field_in match = field in set_descr  
reduce
match_field_in
reduce
match_field_in
reduce
match_field_in
reduce
match_field_in
40
match_in match = in set_descr
set_descr_name set_descr = string
shift
38
goto
41
41
match_in match = in set_descr  
reduce
match_in
reduce
match_in
reduce
match_in
reduce
match_in
42
match_all match = all  
reduce
match_all
reduce
match_all
reduce
match_all
reduce
match_all
43
_filter_parentesis filter4 = par_l filter par_r
filter_or filter = filter or filter2
_filter_1_2 filter = filter2
filter_and filter2 = filter2 and filter3
_filter_2_3 filter2 = filter3
filter_not filter3 = not filter4
_filter_3_4 filter3 = filter4
filter_ok filter4 = match
_filter_parentesis filter4 = par_l filter par_r
match_all match = all
match_in match = in set_descr
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
field_name field = name
field_obj field = name dot field
shift
42
shift
46
shift
40
shift
5
shift
43
goto
52
goto
49
goto
48
goto
45
goto
44
goto
8
44
filter_ok filter4 = match  
reduce
filter_ok
reduce
filter_ok
reduce
filter_ok
reduce
filter_ok
45
_filter_3_4 filter3 = filter4  
reduce
_filter_3_4
reduce
_filter_3_4
reduce
_filter_3_4
reduce
_filter_3_4
46
filter_not filter3 = not filter4
filter_ok filter4 = match
_filter_parentesis filter4 = par_l filter par_r
match_all match = all
match_in match = in set_descr
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
field_name field = name
field_obj field = name dot field
shift
42
shift
40
shift
5
shift
43
goto
47
goto
44
goto
8
47
filter_not filter3 = not filter4  
reduce
filter_not
reduce
filter_not
reduce
filter_not
reduce
filter_not
48
_filter_2_3 filter2 = filter3  
reduce
_filter_2_3
reduce
_filter_2_3
reduce
_filter_2_3
reduce
_filter_2_3
49
_filter_1_2 filter = filter2  
filter_and filter2 = filter2 and filter3
reduce
_filter_1_2
shift
50
reduce
_filter_1_2
reduce
_filter_1_2
50
filter_and filter2 = filter2 and filter3
filter_not filter3 = not filter4
_filter_3_4 filter3 = filter4
filter_ok filter4 = match
_filter_parentesis filter4 = par_l filter par_r
match_all match = all
match_in match = in set_descr
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
field_name field = name
field_obj field = name dot field
shift
42
shift
46
shift
40
shift
5
shift
43
goto
51
goto
45
goto
44
goto
8
51
filter_and filter2 = filter2 and filter3  
reduce
filter_and
reduce
filter_and
reduce
filter_and
reduce
filter_and
52
_filter_parentesis filter4 = par_l filter par_r
filter_or filter = filter or filter2
shift
53
shift
55
53
filter_or filter = filter or filter2
filter_and filter2 = filter2 and filter3
_filter_2_3 filter2 = filter3
filter_not filter3 = not filter4
_filter_3_4 filter3 = filter4
filter_ok filter4 = match
_filter_parentesis filter4 = par_l filter par_r
match_all match = all
match_in match = in set_descr
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
field_name field = name
field_obj field = name dot field
shift
42
shift
46
shift
40
shift
5
shift
43
goto
54
goto
48
goto
45
goto
44
goto
8
54
filter_or filter = filter or filter2  
filter_and filter2 = filter2 and filter3
reduce
filter_or
shift
50
reduce
filter_or
reduce
filter_or
55
_filter_parentesis filter4 = par_l filter par_r  
reduce
_filter_parentesis
reduce
_filter_parentesis
reduce
_filter_parentesis
reduce
_filter_parentesis
56
filter_ok filter4 = match  
reduce
filter_ok
reduce
filter_ok
reduce
filter_ok
reduce
filter_ok
57
_filter_3_4 filter3 = filter4  
reduce
_filter_3_4
reduce
_filter_3_4
reduce
_filter_3_4
reduce
_filter_3_4
58
filter_not filter3 = not filter4
filter_ok filter4 = match
_filter_parentesis filter4 = par_l filter par_r
match_all match = all
match_in match = in set_descr
match_field_in match = field in set_descr
match_not_re_ci match = field not_re_ci arg_string
match_not_re_cs match = field not_re_cs arg_string
match_re_ci match = field re_ci arg_string
match_re_cs match = field re_cs arg_string
match_not_eq_ci match = field not_eq_ci arg_string
match_eq_ci match = field eq_ci arg_string
match_not_eq match = field not_eq arg_num_string
match_gt_eq match = field gt_eq arg_num_string
match_lt_eq match = field lt_eq arg_num
match_gt match = field gt arg_num
match_lt match = field lt arg_num
match_eq match = field eq arg_num_string
field_name field = name
field_obj field = name dot field
shift
42
shift
40
shift
5
shift
43
goto
47
goto
44
goto
8
59
_filter_2_3 filter2 = filter3  
reduce
_filter_2_3
reduce
_filter_2_3
reduce
_filter_2_3
reduce
_filter_2_3
60
_filter_1_2 filter = filter2  
filter_and filter2 = filter2 and filter3
reduce
_filter_1_2
shift
50
reduce
_filter_1_2
reduce
_filter_1_2
61
search_query search_query = filter  
filter_or filter = filter or filter2
reduce
search_query
shift
53
62
query query = brace_l table_def brace_r search_query  
reduce
query
63
entry program = query end
accept