[TUHS] What would early alternatives to C have been?
Douglas McIlroy
douglas.mcilroy at dartmouth.edu
Mon Mar 10 12:03:10 AEST 2025
> everyone should write for their first compiler in Pascal for a
> simple language and no cheating using YACC. You need to write the whole
> thing if you want to understand how parsing really works.
Yacc certainly makes it easier to write parsers for big grammars, but
it's far from cheating. You need to know a lot more about parsing to use
Yacc than you need to roll your own.
Hand parsing of a tiny grammar is almost a necessary step on the way to
understanding Yacc. But I think hand-building the whole parser for a
compiler is unnecessary torture--like doing trigonometry with log tables.
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tuhs.org/pipermail/tuhs/attachments/20250309/42b0b2d6/attachment.htm>
More information about the TUHS
mailing list