1 Package org.simantics.spreadsheet.common.expression;
4 letter = [['A'..'Z'] + ['a'..'z']];
8 not_cr_lf = [[32..127] - [cr + lf]];
10 harmless_char = [[32..127] - [''' + ['"' + '\']]];
12 sq_str_char = harmless_char | '"';
13 dq_str_char = harmless_char | ''';
15 sq_str_char_sequence = sq_str_char+;
16 dq_str_char_sequence = dq_str_char+;
18 single_quote_string = ''' sq_str_char_sequence? ''';
19 double_quote_string = '"' dq_str_char_sequence? '"';
38 func = letter (letter | digit)* '(';
39 cell = '_'? letter+ digit+;
40 number = digit+ '.'* digit*;
41 string = single_quote_string | double_quote_string;
43 new_line = cr | lf | cr lf;
53 {mult} multiplicative |
54 {plus} [left]:expression plus [right]:multiplicative |
55 {minus} expression minus multiplicative;
59 {mult} [left]:multiplicative mult [right]:unary |
60 {div} [left]:multiplicative div [right]:unary;
64 {unaryplus} plus unary |
65 {unaryminus} minus unary;
69 {sequence} arg_list comma expression;
73 {function} func arg_list? r_par;
77 {multi} [left]:cell colon [right]:cell;
83 {address} ampersand range |
84 {expr} l_par expression r_par;