Undocumented
Method __init__ Initialize the scanner.

Inherited from Scanner:

Method get_token_pos Get the current token position in the input text.
Method get_char_pos Get the current char position in the input text.
Method get_prev_char_pos Get the previous position (one token back) in the input text.
Method get_line_number Get the line number of the current position in the input text.
Method get_column_number Get the column number of the current position in the input text.
Method get_input_scanned Get the portion of the input that has been tokenized.
Method get_input_unscanned Get the portion of the input that has not yet been tokenized.
Method token Get the i'th token in the input.
Method __repr__ Print the last 10 tokens that have been scanned in
Method scan Should scan another token and add it to the list, self.tokens, and add the restriction to self.restrictions
def __init__(self, str): (source)

Initialize the scanner.

Parameterspatterns[(terminal, uncompiled regex), ...] or None
ignore[terminal,...]
inputstring

If patterns is None, we assume that the subclass has defined self.patterns : [(terminal, compiled regex), ...]. Note that the patterns parameter expects uncompiled regexes, whereas the self.patterns field expects compiled regexes.

API Documentation for Twisted, generated by pydoctor at 2015-11-29 11:40:45.