Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Diagnostic Messages in A1

19 views
Skip to first unread message

zma...@gmail.com

unread,
Jan 22, 2014, 7:36:13 PM1/22/14
to
Assignment 1 says we should "produce appropriate diagnostic messages on standard error" when we are parsing an invalid joosc program. What sort of information is needed in messages? Should we print out the position of invalid tokens in the input file for example?

Ondřej Lhoták

unread,
Jan 23, 2014, 11:10:16 AM1/23/14
to
On Wed, Jan 22, 2014 at 04:36:13PM -0800, zma...@gmail.com wrote:
> Assignment 1 says we should "produce appropriate diagnostic messages on standard error" when we are parsing an invalid joosc program. What sort of information is needed in messages? Should we print out the position of invalid tokens in the input file for example?

There is no precise required format of the error messages. You should
use your own judgement to generate messages that you think would be
useful to a programmer using your compiler. Printing the positions
of invalid tokens (and printing the invalid tokens themselves) is an
example of a good error message. You can describe the kinds of error
messages that your compiler produces in your Assignment 1 document,
and explain why you think they are useful messages.

Ondřej

0 new messages