Difference between interpretation and hybrid compilation

broken image

Universal parsing methods such as the Cocke-Younger-Kasami algorithm andEarley's algorithm can parse any grammar.There are three general types' parsers for grammars.The parser returns any syntax error for the source language.In the compiler model, the parser obtains a string of tokens from the lexical analyser, and verifies that the string can be generated by the grammar for the source language.What is the role of a parser in compiler design?

broken image