Helper class to raise parser errors.
(msg)
| 2189 | # PARSER |
| 2190 | |
| 2191 | def Error(msg): |
| 2192 | """ |
| 2193 | Helper class to raise parser errors. |
| 2194 | """ |
| 2195 | def raise_error(s, loc, toks): |
| 2196 | raise ParseFatalException(s, loc, msg) |
| 2197 | |
| 2198 | empty = Empty() |
| 2199 | empty.setParseAction(raise_error) |
| 2200 | return empty |
| 2201 | |
| 2202 | class Parser(object): |
| 2203 | """ |
no test coverage detected