3 string /^("(?:[^"\\]|\\.)*")/
4 float /^([0-9]+\.[0-9]*)/
7 then /^(then)(?:[^a-z0-9_][\s\S]*|)$/i
8 else /^(else)(?:[^a-z0-9_][\s\S]*|)$/i
11 all /^(all)(?:[^a-z0-9_][\s\S]*|)$/i
12 default /^(default)(?:[^a-z0-9_][\s\S]*|)$/i
13 for /^(for)(?:[^a-z0-9_][\s\S]*|)$/i
14 in /^(in)(?:[^a-z0-9_][\s\S]*|)$/i
15 if /^(if)(?:[^a-z0-9_][\s\S]*|)$/i
32 -- just so everything can be lexed, and therefore don't break error recovery
35 entry: definition = column_list end
37 column_list_single: column_list = column
38 column_list_multi: column_list = column_list _comma column
40 -- Handle error in column list... The error handler should dig out
41 -- column_list-tokens from error string
42 column_list_error: column_list = error
44 column_all: column = _all
45 column_default: column = _default
46 column_named: column = name
47 column_disable: column = _op_sub name
48 column_disable_str: column = _op_sub string
49 column_custom: column = custom_name _eq custom_content
51 _custom_name_name: custom_name = name
52 _custom_name_str: custom_name = string
54 -- Wrap custom_content so we can track errors in the sub-expression. In that
55 -- case, the title of the column can be valid, and keep the expression isolated
57 _custom_content_expr: custom_content = expr
58 custom_content_error: custom_content = error
60 expr_eq: expr = expr1 _eq expr1
62 _expr_0_1: expr = expr1
64 expr_add: expr1 = expr1 _op_add expr2
65 expr_sub: expr1 = expr1 _op_sub expr2
67 _expr_1_2: expr1 = expr2
69 expr_mult: expr2 = expr2 _op_mult expr3
70 expr_div: expr2 = expr2 _op_div expr3
72 _expr_2_3: expr2 = expr3
74 expr_neg: expr3 = _op_sub expr4
75 _expr_3_4: expr3 = expr4
78 expr_string: expr4 = string
79 expr_int: expr4 = integer
80 expr_float: expr4 = float
82 _expr_par: expr4 = _par_l expr _par_r
83 expr_list_comp: expr4 = _sq_l expr _for name _in expr _sq_r
84 expr_list_comp_if: expr4 = _sq_l expr _for name _in expr _if expr _sq_r
86 expr_func: expr4 = name _par_l expr_list _par_r
88 expr_if: expr4 = _if expr _then expr4 _else expr4
90 expr_list: expr_list = expr _comma expr_list
91 expr_list_end: expr_list = expr
94 var_index: var = var _sq_l integer _sq_r
95 var_attr: var = var _dot name