How do I get BBEdit to display the error browser programmatically?
You can do it using AppleScript and BBEdit's results browser command. It isn't well documented, but there are some good examples around to help you out. For example: John Gruber's CSS Syntax Checker.

Here is a sample AppleScript.

tell application "BBEdit"
  set error_list to ¬
    {{result_kind: "Error", result_file: "/path/to/codegen.sml",¬
      result_line: 121, message: "syntax error: inserting  LPAREN"},¬
     {result_kind: "Error", result_file: "/path/to/codegen.sml",¬
      result_line: 130, message: "syntax error: inserting  EQUALOP"}}
  make new results browser with data error_list with properties ¬
    {name:"Errors"}
end tell


Of course, you will want to create the error_list variable programmatically, but this should get you started. If you change /path/to/codegen.sml to a file that exists on your system, you can see it in action.