« 9/11 : questions, questions, questions | Main | Rådhuspladsen »
September 05, 2004
Lex & Yacc
The asteroid to kill this dinosaur is still in orbit.
- Lex Manual Page
A compiler or interptreter for a programminning language is often decomposed into two parts:
Read the source program and discover its structure.
Process this structure, e.g. to generate the target program.
Lex and Yacc can generate program fragments that solve the first task.
The task of discovering the source structure again is decomposed into subtasks:
Split the source file into tokens (Lex).
Find the hierarchical structure of the program (Yacc).
Posted by daen at September 5, 2004 11:04 PM