1)Parser
with symbol table routines integrated into parser. Thus, on variable
declarations, program will add the name into the symbol table. On uses of a
variable (rule: idnonterm --> IDTOK)
program will look up the variable in all current scopes.
Input to this parser: Essentially correct BADA programs with declarations and assignment statements.
Output: Leftmost derivation and dump of the symbol table; error msg if duplicate declaration or if a variable is used but not declared (in any active scope).
Testing: here, only declarations and uses of variables. All statements should have been tested in the previous program.
Multiple nested, non nested blocks. Same variables declared in the same block with the same/different types. Same variables declared in different blocks. Similar variables (only differ in last character, in case, or in ...) /