In my opinion the significance a parse tree does have during syntax and semantic analysis in compiler designing are:
Disambiguate Overloaded operators: If an operator is overloaded, one would like to specify the meaning of that particular operator because from one will go into code generation phase next.
Type checking: The process of verifying and enforcing the constraints of types is called type checking. This may occur either at compile-time (a static check) or run-time (a dynamic check). Static type checking is a primary task of the semantic analysis carried out by a compiler. If type rules are enforced strongly (that is, generally allowing only those automatic type conversions which do not lose information), the process is called strongly typed, if not, weakly typed.
Uniqueness checking: Whether a variable name is unique or not, in its scope.
Type coercion: If some kind of mixing of types is allowed it will be done in languages which are not strongly typed. This can be done dynamically as well as statically.
Name Checks: Check whether any variable has a name which is not allowed. Ex. Name is same as an identifier (Ex. int in java).
In syntax analysis we used context free grammar. Here we put lot of attributes around it.
So it consists of context sensitive grammars along with extended attribute grammars. Adhoc methods also good as there is no structure in it and the formal method is simply just too tough. So we would like to use something in between. Formalism may be so difficult that writing specifications it may become tougher than writing compiler itself. So we do use attributes but we do analysis along with parse tree itself instead of using context sensitive grammars.
plzzzzzzzz coment on this is this right?????/
in your GDB...what is the part of parse tree..?
Naina thanks for sharing
All students must share points and also your problems.... so it can discussed and solution can prepare.
Don’t wait for solutions just participate in Discussions because after discussions a correct solution will prepare...
koi prper solution tu send krooooooooooo
1 hour remaining......????