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","``"]
docstr: Return the parser to its state before the most recent
  shift or reduce operation.  Calling ``undo`` repeatedly return
  the parser to successively earlier states.  If no shift or
  reduce operations have been performed, ``undo`` will make no
  changes.
  
  :return: true if an operation was successfully undone.
  :rtype: bool
docstr_tok: ["Return","the","parser","to","its","state","before","the","most","recent","shift","or","reduce","operation",".","Calling","``","undo","``","repeatedly","return","the","parser","to","successively","earlier","states",".","If","no","shift","or","reduce","operations","have","been","performed",",","``","undo","``","will","make","no","changes",".",":","return",":","true","if","an","operation","was","successfully","undone",".",":","rtype",":","bool"]
code: def undo(self):
      """
      Return the parser to its state before the most recent
      shift or reduce operation.  Calling ``undo`` repeatedly return
      the parser to successively earlier states.  If no shift or
      reduce operations have been performed, ``undo`` will make no
      changes.
  
      :return: true if an operation was successfully undone.
      :rtype: bool
      """
      if len(self._history) == 0:
          return False
      (self._stack, self._remaining_text) = self._history.pop()
      return True
  
imports: from nltk.grammar import Nonterminal
  from nltk.parse.api import ParserI
  from nltk.tree import Tree
label_desc: Use image node_id 9 for calling the SteppingShiftReduceParser obj's underlying member method code with example usage: obj.undo() and returns: True, False