You can use CSS HTML Validator to syntax check a robots.txt file, just like you can use it to check HTML and CSS.