You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make an entry for the identifiers into the symbol table(if there exists an identifier with the same name in different scopes then construct symbol table per scope).
Symbol table must contain entries for predefined routines like printf, scanf etc
Syntax Analysis
Write CFG for the entire program.
If implementing parser by hand:
Prefer RDP with backtracking.
Perform translation at required places in the code for each non-terminal.
If implementing using tool:
Provide appropriate semantic rules.
Semantic Analysis
Take care of the primitive types and array types.
Take care of coersions.
Take care of Arithemetic expressions.
Concetrate on the looping construct choosen.
Update type and storage information into the symbol table.