Path: utzoo!mnetor!uunet!husc6!necntc!ima!johnl From: harvard!rutgers!mandrill.cwru.edu!chet@BBN.COM (Chet Ramey) Newsgroups: comp.compilers Subject: Re: LEX behavior when given "large" automata. Message-ID: <928@ima.ISC.COM> Date: 23 Mar 88 19:03:03 GMT References: <911@ima.ISC.COM> <914@ima.ISC.COM> <917@ima.ISC.COM> <919@ima.ISC.COM> Sender: johnl@ima.ISC.COM Reply-To: Chet Ramey Organization: CWRU Dept of Computer Engineering and Science, Cleveland, OH Lines: 33 Summary: Textbook reference for keyword recognition scheme Approved: compilers@ima.UUCP In article <919@ima.ISC.COM> haddock!uunet!uiucdcs!pur-ee!hankd (Hank Dietz) writes: >I'm very pleased to see many people confirming that what I've >done and told my students to do is reasonably widely accepted >(despite not appearing in any compiler textbook I know of)... >recognizing keywords and identifiers by a single DFA rule and >then using symbol table lookup techniques to determine the >type of the lexeme. > >My question is simply: what is this technique officially >called and does anyone know of a formal reference for it? I don't think it really has a formal name, but it has appeared in at least one compilers textbook: "Introduction to Compiler Construction with UNIX" by Axel T. Schreiner and H. George Friedman, Jr. I used it in a toy Pascal subset (a really minimal subset) compiler I wrote for a course last year. As an aside, the above text is the best guide I have seen to understanding the UNIX compiler development tools. The authors provide a number of useful hints, as well as source code that will improve YACC's error recovery, in the course of developing a compiler for "small-C", a subset of the C language. _______________________________________________________________________________ | Chet Ramey chet@mandrill.ces.CWRU.Edu {cbosgd,decvax,sun}!mandrill!chet | -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request