nltk.SteppingRecursiveDescentParser.step

SteppingRecursiveDescentParser.step()[source]

Perform a single parsing operation. If an untried match is possible, then perform the match, and return the matched token. If an untried expansion is possible, then perform the expansion, and return the production that it is based on. If backtracking is possible, then backtrack, and return True. Otherwise, return None.

Returns:None if no operation was performed; a token if a match was performed; a production if an expansion was performed; and True if a backtrack operation was performed.
Return type:Production or String or bool