implementation of --no-valid-syntax
basic end2end tests for --no-valid-syntax