1 Package org.simantics.basicexpression;
4 letter = [[['A'..'Z'] + ['a'..'z']] + '_'];
8 not_cr_lf = [[32..255] - [cr + lf]];
10 harmless_char = [[32..255] - [''' + ['"' + '\']]];
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 variable = letter (letter | digit)*;
39 func = letter (letter | digit)* '(';
40 cell = '_'? letter+ digit+;
41 rvi = ('.')* ('/' | '#') ('/' | '#' | '.' | letter | digit | '_')*;
42 number = digit+ '.'* digit*;
43 string = single_quote_string | double_quote_string;
45 new_line = cr | lf | cr lf;
55 {mult} multiplicative |
56 {plus} [left]:expression plus [right]:multiplicative |
57 {minus} expression minus multiplicative;
61 {mult} [left]:multiplicative mult [right]:unary |
62 {div} [left]:multiplicative div [right]:unary;
66 {unaryplus} plus unary |
67 {unaryminus} minus unary;
71 {sequence} arg_list comma expression;
76 {function} func arg_list? r_par;
80 {multi} [left]:cell colon [right]:cell;
87 {address} ampersand range |
88 {expr} l_par expression r_par;