[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Token value in custom error reporting
From: |
Akim Demaille |
Subject: |
Re: Token value in custom error reporting |
Date: |
Fri, 19 Jun 2020 07:16:08 +0200 |
> Le 18 juin 2020 à 20:46, Hans Åberg <haberg-1@telia.com> a écrit :
>
> Otherwise, in your link above you suggest not using the semantic value in
> error messages, but when using locations, it contains the token
> delimitations. So there seems to be no advantage letting the lexer generating
> the error.
It is still useful for the scanner to emit the error message, because the
parser has no idea what is wrong. Granted, it knows _where_ it's wrong, but
not _why_:
- invalid character?
- not-closed string?
- invalid escape sequence?
- out-of-range literal number?
- etc.
The scanner faces the error, *it* should say what's wrong.
- Re: Token value in custom error reporting, (continued)
- Re: Token value in custom error reporting, Akim Demaille, 2020/06/18
- Re: Token value in custom error reporting, Daniele Nicolodi, 2020/06/18
- Re: Token value in custom error reporting, Adrian Vogelsgesang, 2020/06/18
- Re: Token value in custom error reporting, Akim Demaille, 2020/06/18
- Re: Token value in custom error reporting, Adrian Vogelsgesang, 2020/06/18
- Re: Token value in custom error reporting, Hans Åberg, 2020/06/18
- Re: Token value in custom error reporting, Akim Demaille, 2020/06/18
- Re: Token value in custom error reporting, Hans Åberg, 2020/06/18
- Re: Token value in custom error reporting, Akim Demaille, 2020/06/18
- Re: Token value in custom error reporting, Hans Åberg, 2020/06/18
- Re: Token value in custom error reporting,
Akim Demaille <=
- Re: Token value in custom error reporting, Hans Åberg, 2020/06/19
- Re: Token value in custom error reporting, Akim Demaille, 2020/06/18
Token value in custom error reporting, Daniele Nicolodi, 2020/06/17