3.0 Introduction

3.1 Metalanguage

3.2 The Driver

3.3 The Generator

3.4 Error Handling

3.5 Generating vs. Writing

3.6 LEX, A Lexical Analyzer Generator

3.7 Summary

Web References

Exercises

Algorithm

Driver for Lexical Analysis

                     WHILE there is more input 
                         InputChar := GetChar
                         State := Table[0, InputChar]
                         WHILE State != Blank 
                            InputChar := GetChar
                            State := Table[State, InputChar]
                         ENDWHILE
                         Retract 
                         Accept 
                         Return  token = (Class, Value)
                     ENDWHILE 

Send questions and comments to: Karen Lemone