throw syntax errors instead of semantic ones. Also, throw all encountered errors instead of just the first.