class_docstr: A Scanner is used to read tokens from a stream of characters
  using the token set specified by a Plex.Lexicon.
  
  Constructor:
  
    Scanner(lexicon, stream, name = '')
  
      See the docstring of the __init__ method for details.
  
  Methods:
  
    See the docstrings of the individual methods for more
    information.
  
    read() --> (value, text)
      Reads the next lexical token from the stream.
  
    position() --> (name, line, col)
      Returns the position of the last token read using the
      read() method.
  
    begin(state_name)
      Causes scanner to change state.
  
    produce(value [, text])
      Causes return of a token value to the caller of the
      Scanner.
docstr: Set the current state of the scanner to the named state.
docstr_tok: ["Set","the","current","state","of","the","scanner","to","the","named","state","."]
code: def begin(self, state_name):
      """Set the current state of the scanner to the named state."""
      self.initial_state = self.lexicon.get_initial_state(state_name)
      self.state_name = state_name
  
file_path: catboost/contrib/tools/cython/Cython/Plex/Scanners.py
imports: from __future__ import absolute_import
  import cython
  from .None import Errors
  from .Regexps import BOL, EOL, EOF
label_desc: Use image node_id 8 for calling the Scanner obj's underlying member method code with example usage: obj.begin(state_name) without return types