Why do compiler writers need formal grammars?

Answer

Just as a person requires knowledge of the syntax (structure) and semantics (meaning) of a spoken language, so too does the compiler need to "understand" how to interpret what is being given to it.

A formal grammar provides the rules of syntax and semantics.

 

Improve Answer Discuss the question "Why do compiler writers need formal grammars?" Watch Question

First answer by RuntuGen. Last edit by RuntuGen. Contributor trust: 100 [recommend contributor]. Question popularity: 79 [recommend question]


Research your answer:

Can you answer other questions about programming?

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > Why do compiler writers need formal grammars?