| 95 | | /* |
| 96 | | * We want to match any blank, except End of line; that is why we have to |
| 97 | | * match whitespace one by one! |
| 98 | | */ |
| 99 | | |
| 100 | | {BLANK} /* Eat up a blank */ |
| 101 | | |
| 102 | | /* Escaped End of line: eat and be happy */ |
| 103 | | |
| 104 | | <MIDDLE>\\\n /* Eat this! */ |
| 105 | | |
| 106 | | /* |
| 107 | | * Remove a comment; we do not change the state, |
| 108 | | * this is done when the \n is eaten |
| 109 | | */ |
| 110 | | |
| 111 | | #[^\n]* /* Eat this! */ |
| | 94 | <MIDDLE><<EOF>> { /* EOF here sends EOL token to parser also */ |
| | 95 | BEGIN(INITIAL); |
| | 96 | return EOL; |
| | 97 | } |
| | 98 | |
| | 99 | {BLANK}+ ; /* eat as many blanks as possible at once */ |
| | 100 | |
| | 101 | {BLANK}*\n { /* eat a bare newline (possibly preceded by blanks) */ |
| | 102 | sensors_yylineno++; |
| | 103 | } |
| | 104 | |
| | 105 | <MIDDLE>\\{BLANK}*\n { /* eat an escaped newline with no state change */ |
| | 106 | sensors_yylineno++; |
| | 107 | } |
| | 108 | |
| | 109 | <MIDDLE>#.* ; /* eat the rest of the line after comment char */ |
| | 110 | |
| | 111 | <MIDDLE>#.*\n { /* eat the rest of the line after comment char */ |
| | 112 | BEGIN(INITIAL); |
| | 113 | sensors_yylineno++; |
| | 114 | return EOL; |
| | 115 | } |
| | 116 | |
| | 117 | #.* ; /* eat the rest of the line after comment char */ |
| | 118 | |
| | 119 | #.*\n { /* eat the rest of the line after comment char */ |
| | 120 | sensors_yylineno++; |
| | 121 | } |