6 # whitespace, non-printables
9 newline = ('\r\n' | '\r' | '\n' | '\f');
10 escaped_newline = '\\' newline;
11 nonnewline = any - [\r\n\f];
12 nonprintable_char = cntrl - [\r\n\f];
16 hex_num = 0 [xX] [a-fA-F0-9]+;
18 integer = [+\-]? (hex_num | oct_num | dec_num);
19 float = [+\-]? ((digit* '.' digit+) | (digit+ '.' digit*) | digit+)
24 action ls { if (!line_start) line_start = ts; }
27 if (!line_contains_code && !line_start) line_start = ts;
28 line_contains_code = 1;
32 if (!line_contains_code) {
33 whole_line_comment = 1;
34 if (!line_start) line_start = ts;
40 action no_code { !line_contains_code }
41 action no_comment { !whole_line_comment }
42 action no_code_or_comment { !line_contains_code && !whole_line_comment }
45 p == buffer || *(p-1) == '\r' || *(p-1) == '\n' || *(p-1) == '\f'
48 p == buffer || *(p-2) == '\r' || *(p-2) == '\n' || *(p-2) == '\f'