bug fix grammar and add NodeVisitor