searchstringparser.lexer
¶
-
class
searchstringparser.lexer.general.
GeneralSearchStringLexer
(illegal='ignore', **kw_args)[source]¶ Bases:
object
-
__init__
(illegal='ignore', **kw_args)[source]¶ A composite class of a ply.lex.lex.
This is the setup step necessary before you can iterate over the tokens.
Parameters: - illegal ({'record', 'ignore', 'error'} (optional)) – Action to be taken when illegal characters are encountered. The default is to record them but continue without regarding them.
- kw_args – Keyword arguments are passed to the ply.lex.lex call.
-
get_illegal
()[source]¶ Return encountered illegal characters.
Returns: - None – If no illegal characters occurred.
- Tuple – A pair of lists that contain the illegal characters and the positions where they occurred.
-