Visualization of parser LSFilter

Lexical analysis

_whitespace /^(\s+)/
_comment /^(\/\*(?:[^\*]|\*[^\/])*\*\/)/
string /^("(?:[^"\\]|\\.)*")/
all /^(all)(?:[^a-z0-9_][\s\S]*|)$/i
none /^(none)(?:[^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_none match = none
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
arg_num_func arg_num = name par_l arg_list par_r
arg_list arg_list = arg_num_string comma arg_list
arg_list_end arg_list = arg_num_string

LR Parser table

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