<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">below...  (At the risk of a case of being in disagreement with someone I rarely am).</font></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Mar 9, 2025 at 10:03 PM Douglas McIlroy <<a href="mailto:douglas.mcilroy@dartmouth.edu">douglas.mcilroy@dartmouth.edu</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>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.</div></div></div></div></div></div></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">I disagree here.  I have wtchged too many young programmers that I realized did not understand what yacc  was doing and came to understanding that never built a simple parse before.</font></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">I'm not asking them to rebuild a parser for Algol68 or  C++ in a one semester course.  I asking that to you take something like Dennis Allisons "tiny basic" assignment for his Stanfrodf students in the lat 1970s and ask them to build that.</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff"><br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Peter Hibbard gave us a super small Algol-ish language, and we generated code for the "CMU Mini" (which was basically Gordon Bell's the precursor to the PDP-8 (see ISP below) - in my time the "Dragon Book was not yet written BTW.  I really understood what Stev had accomplished.</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff"><br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">The interesting thing is while I tend to use yacc for most parsers, I've found myself building</font><font color="#9900ff"> <span style="font-family:Arial,Helvetica,sans-serif">recursive descent parsers in a couple of cases where it seems to make better sense.</span></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div> </div><div><br></div><div>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.<br></div></div></div></div></div></div></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">Point table ... however a funny thing to consider. My father was a high school math teacher for 40 years. He noted that the loss of slide rules and trig tables made his "modern" (post-calculator) students not understand interpolation.</span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">To me,</span></font><span class="gmail_default" style="color:rgb(0,0,255)"> learning</span><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif"> to use mathematical tables is a skill that never hurts.  </span><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)">I don't even think of asking people <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">"</span>to walk uphill both ways to school <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">in the snow and rain </span>instead of riding a<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> heated, dry</span> yellow school bus.<span class="gmail_default" style="font-family:arial,helvetica,sans-serif">" </span>I am asking the student to learn foundational ideas and build skills up top of core understanding.</span></div></div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aY2xlbWNAY2NjLmNvbQ%3D%3D&type=zerocontent&guid=710ed8d9-1837-4e74-a34b-756243c23f1c"><font color="#ffffff" size="1">ᐧ</font></div>