From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: C H Forsyth Date: Fri, 19 Jan 2007 20:35:39 +0000 To: 9fans@cse.psu.edu Subject: Re: [9fans] Replacements for lex In-Reply-To: <7871fcf50701191126x2e2031a2v9723d52ad2db6344@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 06192e14-ead2-11e9-9d60-3106f5b1d025 >I expect the lexer in /sys/src/cmd/cc/ will be a good example. it's a little more elaborate than some (not gcc!) because it takes on limited C preprocessing duties as well. you might also observe that the author enjoys his gotos, but since it is essentially a finite state machine that seems fair enough, and furthermore he's allowed to take advantage of his `licence to GOTO' awarded after a killer early paper. (Since that was about automata, it should probably be an Earley paper, except that it's slightly earlier than that.) anyway, he meant no harm.