Re: syntax errors

epklell@kaepk1.ericsson.se (Lennart Lindell)
Mon, 27 Feb 1995 13:26:15 GMT

          From comp.compilers

Related articles
syntax errors miles@minster.york.ac.uk (1995-02-20)
Re: syntax errors gvcormac@plg.uwaterloo.ca (1995-02-22)
Re: syntax errors jmccarty@spd.dsccc.com (1995-02-23)
Re: syntax errors epklell@kaepk1.ericsson.se (1995-02-27)
Re: syntax errors mikey@ontek.com (1995-02-28)
| List of all articles for this month |

Newsgroups: comp.compilers
From: epklell@kaepk1.ericsson.se (Lennart Lindell)
Keywords: errors, design
Organization: Compilers Central
References: 95-02-181
Date: Mon, 27 Feb 1995 13:26:15 GMT

Mike McCarty wrote some different examples on error reporting
from a C-compiler.




Here are an example from an assembler for the mc6805 I
have written, which handles multiple errors on a line:


    234 0020 00 54 1E 22 FCB LBL2,EXTEND,LBL,DIRECT,
                                                                                    0 1 2
    0. ---ERROR--- symbol is not defined
    1. ---WARNING--- value exceeds available field width
    2. ---ERROR--- no expression in address field
    Total errors 2 (Line 234)
    Total warnings 1 (Line 234)




The line printed out is the same as goes to the list file where the
first number is the line number. No file name is printed because it
can only handles one file at a time (I have to change this when I
implement include file function). Then to save lines in the printout I
give each error its own number and print the pointer on the same line.


/Lennart
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.