code: @Override
      public void visitErrorNode(ErrorNode node) {
          if (error) {
              errorMsg = "Error " + errorMsg + " on node " + node.getText();
          } else {
              errorMsg = "Error on node " + node.getText();
              error = true;
          }
      }
docs: Grammar errors