Fixed filling of subtrees by checking the termination symbol of each node in the higher level parsing functions