finish syntax and add tests

only syntax, not semantic analysis