Implements syntax checking.