What is the difference between PCCTS and YACC/LEX?
This question is obviously flame-bait, but it does come up and will continue to do so. Thus, here is a brief summary of some distinctions: • ANTLR generates predicated LL(k) parsers, YACC generates LALR(1) parsers. • ANTLR-generated code is human-readable since it consists of mutually recursive C/C++ functions. YACC code is generally unreadable since it generally consists of a table of integers. • ANTLR provides more flexibility in assigning actions to a grammar since the introduction of an action cannot introduce ambiguities as it can in a YACC grammar. Further arguments can be passed to rules rather than just return values from rules since parsing is from the top down. • YACC is widely used, well documented, and has many grammars readily available. On the other hand, YACC does not have a good, standard C++ interface, nor can it build trees, nor does it accept extended BNF grammars. Further, it requires that separate lexical and syntactic descriptions be maintained and consistent. Ret