Implement detection of unused declarations (terminals and variables) in the semantic analysis phase.
Implement detection of unused declarations (terminals and variables) in the semantic analysis phase.