ErrorLogParsers.tioga
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
David Goldberg May 2, 1989 9:51:03 pm PDT
Theimer, March 14, 1990 7:07 pm PST
Willie-s, May 27, 1992 12:58 pm PDT
ErrorLogParsers
CEDAR10.1 —
ErrorLogParsers
parsing compiler error messages
David Goldberg and Marvin Theimer
© Copyright 1989, 1990, 1992 Xerox Corporation. All rights reserved.
Abstract: ErrorLogParsers is a package for routines that parse compiler error messages. So far it contains only one module, CycleThruErrorLog, which registers a parser using FileViewerOpsBackdoor.RegisterErrorLogProc.
Created by: David Goldberg, PCedar variation by Marvin Theimer
Maintained by: Marvin Theimer <theimer:parc>
Keywords: compiler, error messages, FileViewerOps
XEROX Xerox Corporation
Palo Alto Research Center
3333 Coyote Hill Road
Palo Alto, California 94304
Introducation
ErrorLogParsers is a package for routines that parse compiler error messages. So far it contains only one module, CycleThruErrorLog, which registers a parser using FileViewerOpsBackdoor.RegisterErrorLogProc.
CycleThruErrorLog puts an errlog button in the viewer of a source file. This button can be used to move sequentially through the errors listed in the associated errlog file. (There must be a file foo.errlog for the source file foo.mesa.) The first click on this button will open the errlog file. Subsequent clicks will move among the errors listed in the errlog, scrolling both the source file and the errlog file as needed. Edits to the source file are correctly accounted for, so that moving to subsequent errors will show the correct places in each file.
Initialization
You must set Compiler.ViewSeparateLogs: FALSE in your user profile.
In Cedar10.1 the compiler would automatically put an errlog button in the viewer for a source file that had an error in it. Similarly, when a source file had been successfully compiled, the compiler would remove the errlog button and close any .errlog file that had a viewer open on it.
In PCedar2.0 this automatic management of the errlog button and errlog file is not available. (Most people run their language tools in a separate PCedar world.) To "activate" the errlog button for a source file, you must instead invoke the command
ActivateErrorLog filename
This command will put an errlog button in the viewer for the file filename.mesa.
NOTE: Unlike DCedar, you do not need to invoke CycleThruErrorLog anywhere. The ActivateErrorLog command will do all the necessary initialization.
One good way to invoke this command is to add a button to your command viewer that will invoke it for a selected filename. (The compiler prints out the names of all files for which it finds errors.) To get such a button, put something like the following line in your
CommandTool.PerCommandTool entry in your user profile:
CreateButton errlog ActivateErrorLog $FileNameSelection$
The errlog Button
The following actions can be invoked through the errlog button:
Left-click will move to the next error in the errlog.
Right-click will move to the previous error in the errlog.
Middle-click will move to the first error in the errlog.
Control-left-click will remove the errlog button from the viewer and close the errlog file.
Control-{middle|right}-click will reinitiaize from a new error log and move to the first error.