parameters: (self, term)
docstring: Updates state based on seeing a term of the form (type, value).
          A special form is ('end', '') for the end of scanning.
docstring_summary: Updates state based on seeing a term of the form (type, value).
          A special form is ('end', '') for the end of scanning.
docstring_tokens: Updates state based on seeing a term of the form ( type value ) . A special form is ( end ) for the end of scanning .
function: def update(self, term):
          """
          Updates state based on seeing a term of the form (type, value).
          A special form is ('end', '') for the end of scanning.
          """
  
          # See if there is an FSM which would be activated by this term, and
          # add to the state list.
          if term in self.activators:
              for fsm in self.activators[term]:
                  if fsm not in self.state:
                      self.state[fsm] = fsm.init_state()
  
          # Update all active FSMs, including any just added to the list.
          for v in self.state:
              self.state[v].update(term)
function_tokens: def update ( self , term ) : # See if there is an FSM which would be activated by this term, and # add to the state list. if term in self . activators : for fsm in self . activators [ term ] : if fsm not in self . state : self . state [ fsm ] = fsm . init_state ( ) # Update all active FSMs, including any just added to the list. for v in self . state : self . state [ v ] . update ( term )