Create SemanticAnalyzer.java

Code for semantic analysis which will be used in the parser class.