Abstract:
A method and system for interactively displaying error messages, such as parser or compiler messages, associated with a user&#39;s source code is described. The processors generating the messages may execute on a remote computer. Whether locally or remotely generated, the error messages are stored as error message data entries in an error list. Each entry designates an error type and specifies the location of the error in the source code. When the source code consists of multiple files the identifier of the specific file in which the error was found is also designated. When the error list is displayed for the user, the user may select one error message data entry in the error list and thereby cause the portion of the source code containing the error to be displayed for editing. When the user modifies or deletes the portion of the source code corresponding to a selected error message data entry, the Error List is updated to reflect the modification or deletion. The file in which the error occurred may be loaded automatically into the editor. If a remote computer is connected, the source code is transmitted to the remote computer for processing and the error data is then transmitted back.

Description:
This application is a continuation of application Ser. No. 07/939,819, filed on Sep. 3, 1992, now abandoned, entitled &#34;METHOD AND SYSTEM FOR DISPLAYING ERROR MESSAGES&#34;, in the name of Steven H. Mueller. 
    
    
     TECHNICAL FIELD 
     The present invention relates to methods and systems in the field of interactive computer program development and more particularly to gathering, displaying and processing error data from a plurality of language processors. 
     BACKGROUND OF THE INVENTION 
     Computer programmers conventionally work by entering and modifying source code in files in the computer through the use of an editor. The plurality of files of source code are processed to create an executable program by having the computer translate the source code into an executable form by running a series of programs which might typically include combinations of a macro processor, various preprocessors, a compiler and linker. Each of these processors may generate error messages or error data which aid the programer in identifying the nature of the errors and the lines of code causing the errors so that the errors can be corrected. It is possible to link an editor, compiler, linker and a debugger into an integrated development system to allow the source code to be modified and processed without having to leave the development environment. 
     Compilers typically provide the programer with a &#34;compiler listing&#34; which lists the source code along with the errors. On mainframe computers, the list of errors was either at the end of the source listing, or interspersed through the source listing. On personal computers (PCs), many commercially available compilers, (such as the well known Borland Turbo C), display the errors in the same window in which the source file is being edited. 
     J. H. Downey has described a method which imbeds error messages into a &#34;VS/PASCAL&#34; source program. When a &#34;VS/PASCAL&#34; program is compiled, a listing file is generated containing possible errors. The &#34;VS/PASCAL Program Debug Aid&#34; parses the listing file and creates a new source file. The contents of the new source file includes comments placed next to the applicable error. To correct compile errors, the programmer need only edit the source file. When all errors have been corrected, the system allows for the automatic deletion of the imbedded error messages. (IBM Technical Disclosure Bulletin, 05-89, P.376). 
     Automatically having an editor display the line containing an error in a file for a source program having an error when an error is detected during translation of the source program has been described by M. Amano (published Japanese patent app. JP 02-244224, 09-28-90). 
     Special problems not solved by the prior art arise when the errors may come from multiple sources such as a local parser or compiler, as well as a remote compiler which runs on a second computer such as a mainframe host computer or minicomputer connected through a communication link. Additional problems arise when the errors occur in one or more of the plurality of files comprising the source code for a program. 
     SUMMARY OF THE INVENTION 
     The invention is a method and system for displaying error messages associated with a user&#39;s source code. The error messages may be generated by parsers, compilers or any program which processes source code or text. These processors may be local, i.e., execute on the same personal computer where the user edits the source code, or they may execute on a remote computer connected by standard communication means. The error messages are stored as error message data entries in an error list in the memory of the computer. Each entry designates an error type and specifies the location of the error in the source code. When the source code consists of multiple files the identifier of the specific file in which the error was found is also designated. All or part of the Error List is displayed for the user, preferably in a window. The user may select one error message data entry in the Error List and thereby cause the portion of the source code containing the error to be displayed for editing. When the user modifies or deletes the portion of the source code corresponding to a selected error message data entry, the Error List is updated to reflect the modification or deletion. The Error List may dynamically grow and shrink as the user corrects the source code and submits all or a unit of the code for local or remote processing. As the process is repeated responsive to keyboard input by the user, new errors will be stored in the Error List, the list will be redisplayed and errors will be deleted from the list until keyboard input indicative of a command to halt is received. When there are multiple files of source code and the user selects an error in the Error List, the file in which the error occurred may be loaded automatically into the editor. If a remote computer is connected, all or part of the source code is transmitted to the remote computer for processing when the user so requests. The error data is then received back from the remote computer and placed in the Error List. The error data may be transmitted to the Error List processor as message data when the system supports program to program messages, but it may also be communicated in file form. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an embodiment of the invention. 
     FIG. 2 is an overview of the information flow in an embodiment of the invention. 
     FIG. 3 is an example of an Error List window. 
     FIG. 4 illustrates the data structure containing the information used in the invention for the Error List window. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Reference is made to FIG. 1. The detailed embodiment of the invention is implemented in a conventional personal computer or workstation having a CPU System which includes a microprocessor, memory and one or more communication links to any combination of mainframes, minicomputers and personal computers. The invention is intended to function interactively; therefore, means for presenting data to a user and for receiving input from a user are required. The standard display, keyboard, mouse and hard disk(s) are preferably present. The control of the display contents and the traditional editing functions are controlled by a source file editor (Editor) which has been modified to interact with an Error List Processor. The inputs to the Error List Processor are Error List Messages. An Events File Processor converts data in Events Files into a message stream for the Error List Processor. The Editor, the Error List Processor and the Events File Processor reside on the personal computer or workstation. 
     FIG. 2 will be used to illustrate the flow of information. Multiple language processors such as compilers can be executed by the Source File Editor, hereinafter called the Editor. These language processors may be local, i.e., execute on the personal computer with the Editor, or they may be remote, i.e., execute on a mainframe, minicomputer or another personal computer. The language processors create an Events File which contains the information identifying the file in which the error occurs, the error types and the locations of the error in the file when possible. If the Events File is remote, it is transmitted on the communication link back to the user&#39;s computer. If the Events File is local, it can be stored on disk or in the system&#39;s RAM. The Events File is processed by the Events File Processor which generates a set of program-to-program messages which are sent to the Error List Processor which builds the Error List. An alternative mechanism is provided for local language processors to send messages directly to the Error List Processor, thereby by-passing the Events File. In the detailed embodiment a local Parser is used by the Editor to parse source lines entered by the user as they are entered or as a batch process. In the detailed embodiment the Parser communicates with the Editor which interfaces with the Error List Processor. Alternatively the Parser could be designed to send messages to the Error List Processor. Both of these paths are shown in FIG. 2. 
     When an error is detected, either through a local process such as a syntax checker (parser) or a remote process (like a host compiler), this information is sent to the Error List. For each file containing an error, that file&#39;s name will be displayed in the Error List Window, followed by an indented list of all errors that were detected in that file (see FIG. 3). In the method of the invention a user (computer programmer) may select an error in the Error List and the file containing that error will be displayed on the workstation with the text that caused the error highlighted in the file. In the preferred embodiment the selection is made by placing a mouse cursor on the error field and pressing a button on the mouse (`clicking`). If the user modifies a line containing the text of the error, the Error List will be updated by either removing the error from the Error List or by checkmarking the error in the Error List (dependent on whether the error was detected by a local or host process). If the user modifies the source code file and creates a new error, if the error is detectable by a local process, it will be added to the Error List and highlighted immediately in the source code. 
     The method of the invention has the following features: 
     The user can see all errors in one location (the Error List), while still being able to easily locate the file and text containing the error. 
     The Error List has an Application Programming Interface (API) that allows information in the window to be modified. This allows programs like tokenizers and syntax checkers to add or delete errors from the Error List without having to generate an external file. 
     The Error List is language independent, so errors from multiple languages may be displayed in the window. 
     This mechanism is not restricted to compilers and programming languages. For example, it would be straightforward to get a batch text printing control product like IBM&#39;s BookMaster program to generate the information required to have its error displayed in the IDE Error List. 
     The invention&#39;s method has the following advantages: 
     The source code is not modified and all errors are listed. Other systems either embed the error messages in the source code, which makes it difficult to see where all the errors are located (like Borland&#39;s Turbo C), or stop compiling when the first error is detected to allow it to be fixed (like Borland&#39;s Turbo Pascal). Some systems produce a summary of all errors in a file, but the user has to look in multiple places to find all the errors for the project. After doing a MAKE, for example, you would have to look in multiple listing files or multiple windows. 
     The Error List API allows updating the Error List quickly when the source file is changed. 
     The system is not tied to the compiler or language processor being used because it has a general interface. 
     Displaying Errors 
     Two types of errors can be displayed in the detailed embodiment of the invention--parsing errors detected by the live parser (which is local), and errors detected by the compiler (which may be remote) after a compilation is done. Generally, when an error is detected, the token causing the error will be highlighted in all views of the file, and the actual error message will be shown in a window called the Error List. An exception is those errors not generally associated with a location in a file, such as out-of-storage conditions or invalid compile-time options. See &#34;User Interactions&#34; for details on how tokens are highlighted and error messages are displayed. 
     Invocation 
     To get error information from the live parser, the parser must be active. Select Language editing options . . . from the Options pull-down and activate the live parser using the options in the Parsing events group box, or use one of the syntax checking actions in the Go pull-down. To get compile-time errors, the file must be compiled with the compiler&#39;s compile-time option that causes an Events File to be created. 
     User Interactions 
     Several facilities exist to indicate where errors occurred in the file and to locate them. Errors in the file are displayed in a different font and color than normal text, and a special window will display the files that contain errors along with the errors for each file. Also, a method exists to search for errors in a file. 
     Highlighting Errors in the Source 
     Each token or line associated with an error message in the file may be shown in a specific font and/or in a specific color, e.g., red for errors, yellow for warnings, and green for informational messages. Both parser and compiler errors may use these fonts and colors by default. However, the user should be able to change the fonts and colors for parser and compiler errors independently of each other if he wants to know if a specific error came from the parser or a compiler. If more than one class of message occurs for a token or line, the color used to display it will be that of the most severe message. For example, if a token caused both a warning and an error, it would be displayed in red, not yellow. If the messages have the same severity, the font and color of the compiler messages will be chosen over those of the parser messages. 
     Whenever the user changes a line containing errors, if a parse is done on the line, any previous error highlighting on that line (and possibly others) will be lost. Any corresponding parser messages will also be removed from the Error List window, but any compiler messages in the Error List window corresponding to that line or token will have a check mark placed next to them (instead of being removed from the window). This is done because changing and re-parsing a line does not guarantee that compiler errors are fixed, and the user may need to find text containing compiler error messages even though the token or line causing the error will not be highlighted as an error. Keeping these messages in the Error List also allows the user to see which errors have possibly been fixed by changes made to the text. For example, one change could fix several errors or the user could have made multiple changes to the line. Performing another compile on the file will remove compiler messages from the Error List (assuming the errors that caused the messages were fixed). If parsing is not enabled, parser messages corresponding to a changed line will have a check mark placed next to them, too. 
     If the entire text range corresponding to a compiler message is deleted, the message in the Error List window will be grayed out and a check mark will be placed next to it. This will indicate that the error may no longer exist in the file. Because the message is no longer associated with text in the file, however, &#34;Find error&#34; and &#34;Next error&#34; will not work for the message. If the entire text range corresponding to a parser message is deleted, the message in the Error List window will be deleted. 
     If new parser errors are discovered during a parse, they will be highlighted and added to the Error List. 
     Errors Not Contained in a Source File 
     The previous section dealt with errors that were located in a source file, but not all errors are the result of problems in source files. Invalid compiler options, compilers running out of memory or disk space, and so on, are examples of these types of errors. 
     Errors of this type will be divided into two classes: fatal and non-fatal. Fatal errors, such as a compiler running out of memory, will be displayed in gray at the top of the appropriate file grouping with an octagonal icon (suggesting a stop sign) next to them. Non-fatal errors, such as invalid compiler options being specified, will be displayed in gray at the bottom of the appropriate file grouping with a downward-pointing triangle icon (suggesting a yield sign) next to them. The messages are displayed in gray to indicate that they do not correspond to any text in a source file. 
     The Error List Window 
     All error message information is shown in a read-only window (called the Error List). An example is shown in FIG. 3. It is a standard window which displays a list of files (Files #1, #2 and #3) containing errors and the error messages in those files. It shows the user all error messages for each file and provides the user with an easy way of displaying each file in the editor. 
     Methods of displaying the Error List and the various pull-downs in the Error List are described below. 
     Displaying the Error List: The Error List window will pop up if any errors were detected after a parse or during a compilation. This window should not have keyboard focus, however, to allow the user to continue to typing in the window he is currently using. If no errors occurred during any parsing or compiling, or all messages have been deleted by fixing them, then there are no error messages in the Error List, and the &#34;Display error list&#34; action in the Go pull-down is grayed out. If errors occur during compilation of a file, but the user exited the integrated development environment (IDE) during the compile (for example, during a batch compile), the next time the file is opened, errors will be highlighted in the source and the Error List window will appear. 
     If errors were detected in the file, but the version of the file compiled does not match the version of the file available to the IDE a message will be displayed in a message box to indicate that errors might not be displayed properly. The user can choose whether or not to display the errors in this case. 
     The Error List window can also be displayed by selecting the Display error list action from the Go pull-down. The Error List will be placed on top of all other windows, and a line will be selected in the window according to the following rules: 
     1. If &#34;Display error list&#34; was issued from a window containing no errors, the top line in the Error List window will be selected. 
     2. If &#34;Display error list&#34; was issued from a window containing no findable errors, from a window whose file is contracted or from a window whose file has all findable errors hidden, the file name line will be selected. 
     3. If the cursor is at the start of text corresponding to an error message, and the last &#34;Next error&#34; issued placed the cursor at this point, the message selected will be the one corresponding to the text selected by the &#34;Next error&#34;. 
     4. If the cursor is at the start of text corresponding to an error message, and the last &#34;Next error&#34; issued did not place the cursor at this point, or if the cursor is not at the start of text corresponding to an error, the line selected will be that which would have been selected if a &#34;Next error&#34; was issued immediately preceding the &#34;Display error list&#34;. 
     Edit Pull-down: The Edit pull-down menu allows the user to place information in the Error List in the clipboard and to locate the text that caused a given error. The &#34;Copy&#34; and &#34;Find error&#34; actions are selectable in the Edit pull-down. &#34;Copy&#34; is the standard clipboard action. &#34;Find error&#34; will find and select the line or token corresponding to the message selected in the Error List window. If the file containing the corresponding error is not in an edit window, it will be loaded into one. Double-clicking on the selected message also finds the error. If the message is not associated with any text in the file (in other words, grayed out), &#34;Find error&#34; will be grayed out, and double-clicking on the message will have no effect. 
     If multiple views of a given file are open, the view that last had focus will be the one used to locate the error. If the text corresponding to the error being searched for is not contained in the view, the cursor will be placed before the hidden section containing the text corresponding to the message and a system message will be issued. The user can either select a view where the text is visible or change the view so that the error is visible, and issue the &#34;Find error&#34; again. Pressing the OK button in response to the system message will cause the latter action to be done for the user. 
     View Pull-down: The View pull-down menu allows the user to view all error information or only a subset of it. The following described actions are available in the View pull-down. 
     Selecting &#34;Contract file&#34; will &#34;contract&#34; the selected file name and the error messages beneath it so that only the file name is displayed. If a &#34;-&#34; icon is shown next to the file name, the file can be contracted. Contracting can be done either by selecting the &#34;Contract file&#34; action, clicking on the &#34;-&#34; icon, or typing the &#34;-&#34; key (the accelerator for &#34;Contract file&#34;). 
     Selecting &#34;Expand file&#34; will &#34;expand&#34; the selected file name so that the file name is displayed with associated error messages displayed beneath the file name. If a &#34;+&#34; icon is shown next to the file name, the file can be expanded. Expanding can be done either by selecting the &#34;Expand file&#34; action, clicking on the &#34;+&#34; icon, or typing the &#34;+&#34; key (the accelerator for Expand file). 
     &#34;Contract all files&#34; contracts all the files in the Error List window. &#34;Expand all files&#34; expands all the files in the Error List window. By default, all files are expanded when the Error List is first displayed. When an error message is added to the Error List window for a contracted file, the file is automatically expanded so that the new message is visible. 
     &#34;Hide error&#34; hides the selected error message. If a file name is selected, this action is grayed out. This action allows the user to temporarily remove error messages from the Error List that he believes he has fixed or that he believes have the same cause as another message in the Error List. 
     &#34;Restore errors&#34; restores all hidden error messages. This is especially useful if the user has accidentally hidden an error message. &#34;Hide error&#34; and &#34;Restore errors&#34; are independent of file contraction and expansion. If a message is hidden, the file containing the message is contracted, and when &#34;Restore errors&#34; is selected, the message will not be visible until the file is expanded again. 
     &#34;Show error numbers&#34; toggles the display of the assigned message numbers and severity codes to the left of the corresponding error messages. Message numbers are generally only useful for looking items up in a book or reporting problems to service, and so are not shown by default. A check is displayed next to this action when selected. 
     Searching for Errors 
     In addition to the Error List window, which allows a user to find a specific error in the file, a method is provided to find the next error after a given point in the file. In the search menu, the &#34;Next error&#34; action will select the next token or line containing an error in the file starting from the current cursor position. If no errors exist in the current file, &#34;Next error&#34; is grayed out. If multiple error messages exist for a token or line, the cursor will not move, but text corresponding to a different message (which could be the same text previously found) will be selected. 
     If the text corresponding to the next error is not contained in the current view, the cursor will be placed before the hidden section containing the text corresponding to the next error and a system message will be issued. The user can change the view so that the error is visible, and issue the &#34;Next error&#34; again. Pressing the OK button in response to the system message will cause this to be done for the user. If the bottom of the file is reached, the search will wrap and a system message will be displayed to indicate this wrapping. &#34;Next error&#34; will only find errors that are associated with text in the file. Thus, tokens or lines containing compiler errors which are not highlighted any more due to re-parsing will still be found, but errors not associated with a particular line or token in the file (for example, out-of-storage or invalid compiler option errors) will not be found. 
     This section describes the design of all interactions with the Error List window and error marking in the Edit Window. The main components of error feedback include: 
     Building the Error List from Messages and Events Files 
     Modifying data in the Error List 
     Handling user interactions with the Error List 
     Indicating and locating errors in the source file 
     Displaying the Error List 
     Locating the next error in a file 
     Displaying message help 
     The Error List is a data structure which is usually stored in RAM. There are two main ways to add or delete errors to the Error List--the Events File and a message interface to the Error List. The Events File is for use by compilers that cannot send messages directly to the Error List or that need special processing to locate errors in the original source file. The messages are for syntax checkers and compilers that can send messages to the Error List and know the exact locations of errors in the original source file. The system support for sending messages is outside of the invention and must be supplied by an operating system such as IBM&#39;s OS/2 or AIX. When an Events File is processed, messages contained in the Events File will be added to the Error List using the message interface. Therefore, a processor or program should use the message interface if at all possible, as it will avoid the overhead of processing an Events File. 
     The Error List window will be created at initialization, and the window handle will be stored in the Global Control Block (GCB), the main control block used by the IDE editor. A pointer in a structure pointed to by the Error List&#39;s window words will point to the start of the Error List data structure. If the Error List is empty, the &#34;Display error list&#34; action will be grayed-out, and the Error List window will not be in the window list. If the Error List is ever displayed, the Error List window will be added to the Window List. When the Error List is closed, it will be removed from the Window List. 
     The basic structure of the information needed by the IDE for displaying the Error List window is illustrated in the data structure shown in FIG. 4. File 1 has a pointer to File 2 and File 2 has a pointer back to File 1 and so forth. File information is kept in a doubly-linked list. For each file, a pointer points to the first error in the file (used when writing out the Error List window). File information is kept in a File Information Record (FIR). Each error in the file is kept in a doubly-linked list with a pointer back to the corresponding file. This pointer is used when &#34;Find error&#34; is selected to determine which file the message is located in. Error information is kept in an Error Information Record (EIR). 
     The information in this data structure is used to fill the Error List window. The Error List window itself is implemented as a list box. Each line in the list box corresponds to a filename or a message. Associated with each line is an item handle, which for a file is a pointer to the corresponding FIR, and for a message is a pointer to the corresponding EIR. This allows easy checking whether the selected line is a file or error message, and allows us to get the details of the item. 
     All requests to update the Error List will be initiated by sending messages to the Error List&#39;s window procedure. There are five actions that can cause the Error List to change: 
     Invoking the live parser or syntax checking all or part of the file 
     Compiling a file (using either a compiler or program verifier) 
     Issuing a Get events file . . . to retrieve an Events File (usually after a batch compile) Deleting a text range that contains an error 
     Changing a text range that contains an error 
     Actions which add a message to the Error List cause it to pop up. Other actions keep the Error List as it was, although changes will be visible if the Error List is visible and not minimized. 
     In the following sections, message names are arbitrary: 
     Updating the Error List after parsing: To make an update to the Error List, an EVF --  BEGINERRLISTUPDATE message is first sent to the Error List. An EVF --  DELMSGCLASSFROMERRLIST message is then sent with a File Location Information Record (FLIR) containing a pointer to the Edit Control Block (ECB) of the file and specifying the insertion point (IPT) range being parsed to delete messages corresponding to text in that range, followed by one EVF --  ADDMSGTOERRLIST for each new error detected. Finally, an EVF --  ENDERRLISTUPDATE is sent to complete the update process. 
     Updating the Error List after compiling: After compiling a file interactively or verifying a program, a call to the routine which processes Events Files should be made. This routine will process the Events File (if any), and then send messages to update and display the Error List if the Events File contains any error records. The messages sent are similar to those specified in &#34;Updating the Error List after parsing&#34; except that the EVF --  DELMSGCLASSFROMERRLIST should specify that Compiler errors are being deleted, and should place the Server name and File name instead of the pointer to the ECB in the FLIR. Also, the IPT range specified should be (0,0). 
     Updating the Error List after a Get events file action: The processing is similar to the actions that occur after compiling a program interactively. 
     Updating the Error List after deleting text corresponding to an error: When a text range containing an error is deleted, the internal editor label marking the error will be destroyed and a routine will be called to gray out and check a compiler message or delete a parsing error in the Error List. 
     Updating the Error List after changing text corresponding to an error: When a text range containing an error is changed, a routine will be called to place a check mark next to the message in the Error List. 
     Indicating and Locating Errors in the Source File 
     Each error in the source file will be marked using a label. The label will have a pointer to the corresponding EIR. This allows highlighting the appropriate message in the Error List when the user selects &#34;Display error list&#34;. 
     Displaying the Error List 
     When the user selects the &#34;Display error list&#34; action, a routine bound to that action will be called which will determine which line in the Error List to select, then send a message to the Error List to display itself, highlighting that message. 
     Locating the Next Error in a File 
     When the user selects the &#34;Next error&#34; action, a routine bound to that action will be called which will locate the next error shown in the Error List, retrieve the IPT range of the error from the label corresponding to that message, and send a message to the Edit Window to select the text in that IPT range. 
     Displaying Message Help 
     When the user hits a selected function key, e.g. F1, while a message is selected, help for that message is displayed. To do this, the message ID of the selected message is used to perform a lookup in a table that associates message IDs with help IDs. This table is supplied in the Language Profile for a given language. 
     The lookup will first be tried using the profile associated with the Edit Window if the file containing the message is in an Edit Window. If the IPF ID is not found, a lookup will be tried in all profiles pointed to by the GCB. This second lookup is required in case the file is open, but not using the profile for the language the message is associated with (for example, the file is C code, but was opened with a default profile). This requires each processor to have unique message IDs. For example, RPG 400 could issue messages from the syntax checker, the Program Verifier, or the compiler. Each of these must produce different message IDs, even if the message says basically the same thing. After the lookup, if the IPF ID is found, the message is displayed. 
     External File Information Record (XFIR) 
     The XFIR is used when sending messages to the Error List. It points to either the server and file names of the file (for example, when processing an Events File), or to the ECB of the file (for example, when tokenizing a file). 
     
         ______________________________________XFIR  typedef struct .sub.-- xfir {   PSZ         pszServer;                         //Pointer to name of server  PSZ pszFileName; //Pointer to name of file  PECB pECB; //Pointer to ECB of file} XFIR;  typedef struct .sub.-- xfir *PXFIR; //Pointer to XFIR______________________________________ 
    
     External Error Information Record (XEIR) 
     The XEIR is used when sending messages to the Error List. It provides information on the type and location of the message. If the IPT range of the error is known, it should be saved in iptRange and fRangeValid should be set to TRUE. Otherwise, ulStartLine, ulStartCol, ulEndLine, and ulEndCol should be set, and fRangeValid should be set to FALSE. 
     
         ______________________________________XEIR  typedef enum { All, Parser, Scanner, Compiler } ERRCLASS;  typedef enum { Top, Middle, Bottom } ANNOTCLASS;  typedef struct .sub.-- xeir {   ERRCLASS     ErrClass;                         //Type of Error  ANNOTCLASS AnnotClass; //Location of error in list  ULONG ulStartLine; //Starting line of error  ULONG ulStartCol; //Starting column of error  ULONG ulEndLine; //Ending line of error  ULONG ulEndCol; //Ending column of error  EPIPTRANGE iptRange; //IPT range of error  BOOL fRangeValid; //TRUE if valid iptRange  PSZ pszMsgID; //Message ID  CHAR Severity; //Severity of message  PSZ pszMessage; //Text of message  PSZ pszTag; //Used to differentiate    //messages in same file} XEIR;  typedef struct .sub.-- xeir *PXEIR; //Pointer to XEIR______________________________________ 
    
     File Location Information Record (FLIR) 
     The FLIR is used when deleting a group of messages from the Error List. It points to the ECB of the file being edited; processors which create an Events File should set this to NULL. It also specifies an IPT range to process errors in; set both IPTs to zero if the whole file should be processed. Processors which create an Events File should set both IPTs to zero. 
     
         ______________________________________FLIR  typedef struct .sub.-- flir {   PECB         pECB;    //Pointer to file&#39;s ECB  IPTRANGE iptRange; //Range to process  PSZ pszTag; //Used to differentiate    //messages in same file} FLIR;  typedef struct .sub.-- flir *PFLIR; //Pointer to FLIR______________________________________ 
    
     The Events File 
     The Events File is produced sequentially. Each processor is simply appending new records to it. When an important event occurs, a record is written to the Events File. Thus every compilation process will produce an Events File. 
     On each platform, the external characteristics of the Events File (for example, record format, logical record length, access method, etc. on MVS) produced by the various processors should be the same. This is not required across platforms. Each record will be typed according to its contents. This allows future extensions by creating new records allowable in the Events File. 
     The definitions below may not work for mechanisms like the COBOL BASIS/INSERT/DELETE statements, which are, in essence, a language-specific update facility. 
     The following record types are defined: 
     Timestamp record--Indicates when the Events File creation started. 
     Processor record--Indicates a new processor has been invoked. 
     File ID record--Indicates an input file has been opened. 
     File end record--Indicates an input file has been closed. 
     Error information record--Indicates that an error has been detected in the input source code. 
     Program record--Indicates beginning of a second program source within the source code file being processed. 
     Map define record--Indicates a macro definition within the input source code. 
     Map start record--Indicates beginning of generated source code. 
     Map end record--Indicates end of generated source code. 
     Since different types of records will be included in this one file, the first word in each record will identify the record type. The formats of these record types are described below. In the syntax diagrams, each token should be separated by exactly one blank. 
     Timestamp Record 
     This record indicates when the Events File was created, and allows an application to determine if the Events File is current (if the timestamp is older than a file indicated in a File ID record, the Events File may be incorrect for that file). This record is always the first record in the Events File. It is not required that this record be written by a processor; it may be written by the caller of the first processor. This allows each processor to append to the Events File without having to determine if the file exists. 
     The timestamp record is described as follows: 
     
         ______________________________________TIMESTAMP -- version -- timestamp    Where      Represents  version The revision of this record, used for upward   compatibility.  timestamp The date and time the Events File was created   in yyyymmddhhmmss format.______________________________________ 
    
     Processor Record 
     This record indicates that a new processor has been invoked. One will always follow the timestamp record in the Events File (although there may be more than one). 
     The processor record is described as follows: 
     
         ______________________________________PROCESSOR -- version -- output-id -- line-class  Where     Represents  version The revision of this record, used for upward   compatibility.  output-id The file ID of an output file produced by this processor.         If the output of this processor is intended to be used as         input to another processor, this file ID represents that         file, and the file ID record of the file will follow this         record. If this is the last processor that will be   invoked for which the IDE will be expected to   display messages, the file ID is 0.  line-class Method used to number lines. Specify zero if a   temporary file or internal file containing an expanded   source representation is being used; the line number   represents the line number in the expanded source.   Specify one if the line number represents the physical   line number in the source file indicated in source file   ID field.______________________________________ 
    
     File ID Record 
     This record contains the full name of the source file processed and associates an integer with the file name. There should be one record of this type for each source file processed by the compiler, the main source file as well as any included source units (copylib members) and macros. Because the location where a file is included is important, if a file is included several times during processing, a file id record should be written for each inclusion. A processor should not keep track of files it has already included and only write a file id record if a file record had not been written for this file. 
     The file ID record is described as follows: 
     
         ______________________________________FILEID -- version -- source-id -- line -- length -- filename  Where     Represents  version The revision of this record, used for upward   compatibility.  source-id A file identifier expressed as an integer to be used in         place of the file name to correlate an error record with         the source file in which it occurred, without having to         use the character based file name. Use zero if the input         file is not known, such as input coming from a user exit.        line Source file line number where a new file is referenced,   or zero if the file was not referenced from a file.  length Length of the file name  filename The name should be the fully-qualified physical file   name. If none exists (for example, getting text from the   user) or the name can&#39;t be determined, place a null   string here.______________________________________ 
    
     File End Record 
     This record indicates that an included file is ending. It provides a method for viewing a file which includes a file containing an error. This is useful when the included file does not contain enough information to determine what caused the error. 
     The file end record is described as follows: 
     
         ______________________________________FILEEND -- version -- file-id -- expansion  Where     Represents  version The revision of this record, used for upward   compatibility.  file-id The file ID of this file.  expansion Number of expanded source lines in this file,   including any nested includes and macro expansions.______________________________________ 
    
     Error Information Record 
     A record of this type contains information required to highlight a token or line causing a message in the source file, as well as enough information to allow the message itself to be displayed. This information includes location information (such as what file and line the error occurred on) and information related to the error itself (such as the number, text, and severity of the message). 
     The error information record is described as follows: 
     
         ______________________________________ERROR -- version -- file-id -- annot-class --  stmt-line -- start-err-line -- token-start -- end-err-line --  token-end -- msg-id -- sev-char -- sev-num -- length -- msg  Where       Represents  version The revision of this record, used for upward   compatibility  file-id The file ID number of the source file containing   this error.annot-class   Indicates where in a listing of messages this message   should be placed. The following positions are defined:       Class  Meaning  0 Top of list. Generally used for very important   messages that aren&#39;t really associated with a   specific line in a file (for example, compiler   ran out of storage). The sorting order for   multiple instances of messages of this type is   not defined. Because no text generally   corresponds to this error, no highlighting will   be done in the edit window.  1 Middle of list. Generally used for messages   which are associated with a single line or token   (for example, an undeclared identifier).   Multiple messages of this type are sorted by line   number.  2 Bottom of list. Generally used for less   important messages that aren&#39;t really associated   with a specific line in a file (for example,   compiler option invalid). The sorting order for   multiple instances of messages of this type is   not defined. Because no text generally   corresponds to this error, no highlighting will   be done in the edit window.stmt-line   Line number (in the source file associated with the above     source file ID number) of the first line of the statement     containing the error. This is required in case the   error does not occur on the first line of the statement.   This number is interpreted using the line class field   of the Processor Record.  start-err-line Line number (in the source file associated with the   above   source file ID number) containing the start of the error.   This number is interpreted using the line class field   of the Processor Record.  token-start Column (or character in the line) of the start of the     token in error. If this information is not available, a     zero here will cause the first column (or character) to     be used as the start of the error.  end-err-line Line number (in the source file associated with the above     source file ID number) containing the end of the error.     This number is interpreted using the line class field   of the Processor Record.  token-end Column (or character in the line) of the end of the token     in error. If this information is not available, a zero   here will cause the last column (or character) to be used   as the end of the error.  msg-id Message ID, left justified. For example, AMPX999  sev-char Severity code letter (I, W, E, S, or T).  sev-num Severity level number. For some systems, this is the   return code associated with the severity code letter   (I=0, W=4, E=8, S=12, T=16).  length The actual length of the next field (message text).  msg The message text of the error message. Any replacement   of fields should have already been done.______________________________________ 
    
     Program Record 
     This record indicates a new program in the same source file is being compiled. It is used when multiple programs are contained in one file. Expanded source line is assumed to start over at 1 when this record is written. It is not needed to indicate the first program in the file. 
     The program record is described as follows: 
     
         ______________________________________PROGRAM -- version -- line    Where      Represents  version The revision of this record, used for upward   compatibility.  line The position in the file that this program starts.______________________________________ 
    
     Map Define Program Record 
     This record indicates that a macro is being defined. It is used to allow errors to be reflected back to a macro definition instead of the place the macro is used. 
     The map define record is described as follows: 
     
         ______________________________________MAPDEFINE -- version -- macro-id -- line -- length -- macro-name  Where      Represents  version The revision of this record, used for upward   compatibility.  macro-id Integer representing this macro definition. It   should be incremented sequentially within a specific   file.  line Physical line in the current file where the macro   definition starts.  length Length of the macro name.  macro-name The name of the macro being defined.______________________________________ 
    
     Map Start Record 
     This record indicates that source expansion is starting. It is used where any textual replacement is being done (for example, a macro). 
     The map start record is described as follows: 
     
         ______________________________________MAPSTART -- version -- macro-id -- line    Where     Represents  version The revision of this record, used for upward   compatibility.  macro-id Identifier of a macro specified in a map definition   record.  line Physical line in the current file where expansion   starts.______________________________________ 
    
     Map End Record 
     This record indicates that source expansion is complete. It is used at the end of a textual replacement to show how many lines were created. 
     The map start record is described as follows: 
     
         ______________________________________MAPEND -- version -- macro-id -- line -- expansion  Where     Represents  version The revision of this record, used for upward   compatibility.  macro-id Identifier of a macro specified in a map definition   record.  line Physical line in the current file where expansion   ends.  expansion Number of lines resulting from this macro expansion,   including any nested expansions.______________________________________ 
    
     Using the foregoing specifications the invention may be implemented using standard programming and/or engineering techniques. The resulting program(s) may be stored on disk, diskettes, memory cards, ROM or any other memory device. For execution, the program may be copied into the RAM of the computer. User input may be received from keyboard, mouse, pen, voice, touch screen or any other means by which a human can input data to a computer. One skilled in the art of computer science will easily be able to combine the software created as described with appropriate general purpose or special purpose computer hardware to create a computer system embodying the invention. While the preferred embodiment of the present invention has been illustrated in detail, it should be apparent that modifications and adaptations to that embodiment may occur to one skilled in the art without departing from the scope of the present invention as set forth in the following claims.