What are the differences between PEGs and CFGs?
A CFG grammar is non-deterministic, meaning that some input could result in two or more possible parse-trees. Though most CFG-based parser-generators have restrictions on the determinability of the grammar. It will give a warning or error if it has two or more choices. A PEG grammar is deterministic, meaning that any input can only be … Read more