1.  Syntax is the study of the rules that govern the ways words combine to form phrases, clauses, and sentences

2.  Language description for the programmer or who use the intended language

3.  language generator is a device that can be used to generate the sentences of a language. We can think the generator as having a button that produces a sentence of the language every time it is pushed.

4. suppose we have a language L that have $ as an alphabet. To define L formally, we have to construct a mechanism R (called a recognize device), capable of reading string of characters from alphabet $.

8. Static semantic is a formal form of the language program. Dynamic semantics is a perspective on natural language semantics that emphasizes the growth of information in time

10. The synthesized attributes are the result of the attribute evaluation rules, and may also use the values of the inherited attributes. The inherited attributes are passed down from parent nodes.

23.  it based on mathematics logic

24. recursive function theory



Problem Set

1. Syntax error is when we use a wrong typing

Example : for(a==0;a<9;a++);

Semantic error is logical error

Example : for(a=9;a>0;a++);


== : Equal to

!= : Not equal to

< : Less than

> : Greater than

>= : Greater or equal to

<= : Less or equal to


a. Image




a. bbaabb



e. accdc

18. fully attributes parse is when all of attributes of the parse tree have been calculated