Bug 13 : better error message in compiler for missing or unmatched brackets
Last modified: 2010-04-12 14:11



Assigned To:

Attachment Type Created Size Actions

Description:   Opened: 2005-05-12 19:01
confuses the hell outta the people
Additional Comment #1 From fry 2007-01-29 15:57
attempt made for 0124 to catch some of these.
Additional Comment #2 From MrFeinberg 2010-03-15 13:02
Additional Comment #3 From fry 2010-03-17 13:14
i'd say try an example or two, remove brackets, and see how it responds.
there's a slightly massaged version, but what's thrown up from antlr is
kinda rough for the young'uns.
Additional Comment #4 From fry 2010-03-28 10:26
realized you may not have received the updates on this one.
Additional Comment #5 From MrFeinberg 2010-03-28 14:37
Will reopen if given complete example program text.
Additional Comment #6 From fry 2010-04-12 13:49
void setup()
size(200, 200);
line(20, 20, 80, 80);
produces "unexpected token: size"

void setup() {
size(200, 200);
line(20, 20, 80, 80);
produces: "expecting EOF, found '}'"
Additional Comment #7 From MrFeinberg 2010-04-12 14:08
What would a better message look like for those errors? I have to admit, they both look good to
me. How would we know what kind of unexpected token it is?

I guess the expecting EOF one could be caught, but I'm really dubious about the other one!
Additional Comment #8 From fry 2010-04-12 14:11
nobody in our audience knows what a token is, nor what EOF is. don't worry
about it though, i think it's something to watch for the time being. given
bug #1539, i'm hesitant to try to be too clever about it unless we can be
100% certain about what's going on.