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: Move a token from the beginning of the remaining text to the
  end of the stack.  If there are no more tokens in the
  remaining text, then do nothing.
  
  :return: True if the shift operation was successful.
  :rtype: bool
docstr_tok: ["Move","a","token","from","the","beginning","of","the","remaining","text","to","the","end","of","the","stack",".","If","there","are","no","more","tokens","in","the","remaining","text",",","then","do","nothing",".",":","return",":","True","if","the","shift","operation","was","successful",".",":","rtype",":","bool"]
code: def shift(self):
      """
      Move a token from the beginning of the remaining text to the
      end of the stack.  If there are no more tokens in the
      remaining text, then do nothing.
  
      :return: True if the shift operation was successful.
      :rtype: bool
      """
      if len(self._remaining_text) == 0:
          return False
      self._history.append((self._stack[:], self._remaining_text[:]))
      self._shift(self._stack, self._remaining_text)
      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 7 for calling the SteppingShiftReduceParser obj's underlying member method code with example usage: obj.shift() and returns: True, False