<-- previous page     Table of Contents    Index    next page -->

Special #file and #line comments

There are two "special" kinds of comments. Since Mup takes a text file as input, it may sometimes be convenient to write a program which generates Mup input, based on some higher-level description. But then, if there are any errors found in that generated input, it may be difficult to correlate the error line that Mup outputs with what line in the original input had generated it. To help with that, the generating program could insert special comments to override what Mup uses as the current file name and line number when reporting errors or warnings.

The first special comment format is:

//#file someFileName

Any warnings or errors encountered after that line will use the given someFileName instead of the name of the file actually being read. The "//#file" must be exactly as shown, with no spaces. That must be followed by at least one space or tab. The entire rest of the line after those spaces/tabs will be used as the file name.

The second special comment format is:

//#line N

where N is a number, to be treated as the line number for the following line of input. So:
//#file Etude
//#line 42
Any errors on this line will be reported as being from line 42 of file "Etude"

Anything on the //#line line after the number will be ignored.


   <-- previous page    Table of Contents    Index    next page -->