class_docstr: A ``ShiftReduceParser`` that allows you to setp through the parsing
  process, performing a single operation at a time.  It also allows
  you to change the parser's grammar midway through parsing a text.
  
  The ``initialize`` method is used to start parsing a text.
  ``shift`` performs a single shift operation, and ``reduce`` performs
  a single reduce operation.  ``step`` will perform a single reduce
  operation if possible; otherwise, it will perform a single shift
  operation.  ``parses`` returns the set of parses that have been
  found by the parser.
  
  :ivar _history: A list of ``(stack, remaining_text)`` pairs,
      containing all of the previous states of the parser.  This
      history is used to implement the ``undo`` operation.
  :see: ``nltk.grammar``
class_docstr_tok: ["A","``","ShiftReduceParser","``","that","allows","you","to","setp","through","the","parsing","process",",","performing","a","single","operation","at","a","time",".","It","also","allows","you","to","change","the","parser","'s","grammar","midway","through","parsing","a","text",".","The","``","initialize","``","method","is","used","to","start","parsing","a","text",".","``","shift","``","performs","a","single","shift","operation",",","and","``","reduce","``","performs","a","single","reduce","operation",".","``","step","``","will","perform","a","single","reduce","operation","if","possible",";","otherwise",",","it","will","perform","a","single","shift","operation",".","``","parses","``","returns","the","set","of","parses","that","have","been","found","by","the","parser",".",":","ivar","_history",":","A","list","of","``","(","stack",",","remaining_text",")","``","pairs",",","containing","all","of","the","previous","states","of","the","parser",".","This","history","is","used","to","implement","the","``","undo","``","operation",".",":","see",":","``","nltk.grammar","``"]
code: def parse(self, tokens):
      tokens = list(tokens)
      self.initialize(tokens)
      while self.step():
          pass
      return self.parses()
  
imports: from nltk.grammar import Nonterminal
  from nltk.parse.api import ParserI
  from nltk.tree import Tree
label_desc: Use image node_id 2 for calling the SteppingShiftReduceParser obj's underlying member method code with example usage: obj.parse(tokens) and returns: self