A compiler is often made up of several components, one of which is a parser. A common set of components in a compiler is:
- Lexer - break the program up into words.
- Parser - check that the syntax of the sentences are correct.
- Semantic Analysis - check that the sentences make sense.
- Optimizer - edit the sentences for brevity.
- Code generator - output something with equivalent semantic meaning using another vocabulary.
Ref
http://stackoverflow.com/questions/1921474/difference-between-compilers-and-parsers
No comments:
Post a Comment