isolated AST, parser and error helpers