Actually I have two questions. If I start writing my own lexical analyzer, parser what architecture it will be? What principles should I consider (i.e. Open-Close, loose coupling)?
Next question is about table-driven lexical analyzer implementation. Recently I have written lexical analyzer but it's not a programming pearl. Obviously I've used too straight approach). So does anyone know about how to implement table driven lexical analyzer?