The parser has a few peculiarities that are known bugs.
no viable alternative at character ' '" with an arithmetic expression on the target line for the error. Remove spaces around the minus sign. This isn't a general problem in the parser, but in the code that checks KRL into the repository.
Invalid value [k] found should have been one of [before, after, then]" in a select statement. The parser doesn't like variables as arguments to the
anygroup event operators. A workaround is to add 0 to the variable. (e.g.
count k+0 (...))