Did you know that Caché (and now InterSystems IRIS) has available parser for ObjectScript ?
Well, technically, lexer. It hides under the name of %SyntaxColor class. This class provides API to the DLL used by Studio to do syntax highlighting. As a result if works only under Windows.