[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison for nlp
From: |
Akim Demaille |
Subject: |
Re: bison for nlp |
Date: |
Fri, 9 Nov 2018 05:59:39 +0100 |
> Le 8 nov. 2018 à 22:35, r0ller <address@hidden> a écrit :
>
> Hi Hans,
>
> Wow, I did not know that feature. Is such a string only used when creating
> an error message?
It also becomes an alias in the grammar file itself. For instance with
%token PLUS "+"
in addition to
exp: exp PLUS exp
you can also write
exp: exp "+" exp
which I find much clearer. It's probably not helpful in your
case though. I would also recommend that you have a look at the
documentation of api.token.prefix.
> Will the token still have an integer assigned that can be used in the actions
> or do I get there the string as well instead of an integer?
No, it’s an alias, they have a single number.
> By the way, I’ll still get the error message as a string I guess, right?
Yes. Some day we will work on improving error message generation,
there is much demand.
- bison for nlp, r0ller, 2018/11/06
- Re: bison for nlp, Akim Demaille, 2018/11/07
- Re: bison for nlp, r0ller, 2018/11/07
- Re: bison for nlp, Hans Åberg, 2018/11/08
- Re: bison for nlp, r0ller, 2018/11/08
- Re: bison for nlp, Hans Åberg, 2018/11/08
- Re: bison for nlp, r0ller, 2018/11/08
- Re: bison for nlp,
Akim Demaille <=
- Re: bison for nlp, Hans Åberg, 2018/11/09
- Re: bison for nlp, Akim Demaille, 2018/11/09
- Re: bison for nlp, Hans Åberg, 2018/11/09
- improving error message (was: bison for nlp), Akim Demaille, 2018/11/10
- Re: improving error message (was: bison for nlp), Hans Åberg, 2018/11/10
- Re: improving error message (was: bison for nlp), Akim Demaille, 2018/11/10
- Re: improving error message, Hans Åberg, 2018/11/10
- Re: bison for nlp, Akim Demaille, 2018/11/09
- Re: bison for nlp, r0ller, 2018/11/12
- Re: bison for nlp, r0ller, 2018/11/19