symbolic (non-probabilistic) parsing of CFGs

- also, remove redundant use of .keys() method on dictionaries