Add SemanticListener class
Add SemanticException class
Update SemanticListener
Fix exception thrown when inputing a directory