MC in basic
Marcus Denker
denker at iam.unibe.ch
Tue Dec 14 10:28:38 UTC 2004
Am 14.12.2004 um 09:20 schrieb Andreas Raab:
>
> Well, the real issue which I'd like to see fixed is error reporting. I
> have found that SmaCC parsers are notoriously bad at it - except from
> "token not expected" it doesn't tell you anything about what is wrong
> (and it doesn't even tell you the token - so if you don't know how the
> next characters compose you are at a total loss). For example,
> consider the following erronous expressions:
>
> SmaCC Squeak
> a := . Token not expected Expression expected
> 3 foo: +5 Token not expected Argument expected
> [:foo ^3+4] Token not expected Vertical bar expected
> [^42 Token not expected Period or right bracket expected
>
>
> For a newbie this is deeply problematic. It's hard enough to get this
> stuff right even if the compiler tells you what it expects - but if
> you only know that there is "something wrong here" (perhaps a missing
> \item? ;-))) it's almost impossible to find out.
>
SmaCC has support for providing good error messages... It's just not
used in the new compiler. I'l put it on the TODO.
Marcus
More information about the Squeak-dev
mailing list
|