title: What kind of lexer/parser was used in the very first C compiler?
body: <p>In the early 1970s, Dennis Ritchie wrote the very first C compiler.</p>
  
  <p>In the year 2017, I wanted to write a C compiler. Books like <em>Deep C Secrets</em> (Peter Van Der Linden) say that C was, above all else, designed to be easy to compile. But I've been having an inordinate amount of trouble with it. </p>
  
  <p>For starters, it's already relatively difficult to come up with Lex/Yacc specifications for the C language, and these tools didn't even exist yet when Ritchie made <em>his</em> compiler!</p>
  
  <p>Plus, there are a great many examples of surprisingly small C compilers that do not use any help from Lex &amp; Yacc. (Check out <a href="https://bellard.org/otcc/" rel="noreferrer">this</a> tiny obfuscated C compiler from Fabrice Bellard. Note that his "production" tinycc source is actually quite a bit longer, most likely in an effort to accommodate more architectures, and to be more readable)</p>
  
  <p>So <strong>what am I missing here?</strong> What kind of lexer/parser did Ritchie use in his compiler? Is there some easier way of writing compilers that I just haven't stumbled onto?</p>