Completed the > nesting grammer logic