Regarding building bison-3.4.2 on Windows

2020-06-17 Thread Singh, Binay
Hi Support team , I am trying to build GNU bison-3.4.2 on Windows / Visual studio 15 . I am not able to find any info in Readme or Install files. Please let me know if there is any documentation . Thanks, Binay Your Personal Data: We may collect and process

Token value in custom error reporting

2020-06-17 Thread Daniele Nicolodi
Hello, error reporting has always been a pain point for me in the use of flex and bison, especially in coordinated error handling between the scanner and the grammar. I am very happy to see a lot of improvements in this area in the 3.6 release! Trying to use `%define parse.error custom` in a proj

Token value in custom error reporting

2020-06-17 Thread Daniele Nicolodi
Hello, error reporting has always been a pain point for me in the use of flex and bison, especially in coordinated error handling between the scanner and the grammar. I am very happy to see a lot of improvements in this area in the 3.6 release! Trying to use `%define parse.error custom` in a proj

Re: Regarding building bison-3.4.2 on Windows

2020-06-17 Thread Akim Demaille
Hi Binay, > Le 17 juin 2020 à 18:26, Singh, Binay a écrit : > > > Hi Support team , > > > I am trying to build GNU bison-3.4.2 The current version is 3.6.4, there's not much point in trying to build 3.4.2. > on Windows / Visual studio 15 . I am not able to find any info in Readme or > Ins

Re: Token value in custom error reporting

2020-06-17 Thread Akim Demaille
Hi Daniele, > Le 17 juin 2020 à 21:56, Daniele Nicolodi a écrit : > > Hello, > > error reporting has always been a pain point for me in the use of flex > and bison, especially in coordinated error handling between the scanner > and the grammar. I am very happy to see a lot of improvements in th

Re: Token value in custom error reporting

2020-06-17 Thread Daniele Nicolodi
Hi Akim, On 17/06/2020 23:43, Akim Demaille wrote: > I think it's a mistake to try to use the semantic value in error messages. The goal would not be to use the semantic value in the error message, but to use additional context attached to the token by the lexer to decide how to report the error.

Redefining the literal string associated to the YYerror symbol

2020-06-17 Thread Daniele Nicolodi
Hello, in Bison 3.6 is it possible to redefine the literal string associated to the YYerror symbol (and to the YYEOF, YYUNDEF ones, although I don't have immediate need for this)? Doing it in the naive way: %token YYerror "ERROR" results in a warning: warning: symbol YYerror given more than on

Re: Token value in custom error reporting

2020-06-17 Thread Akim Demaille
> Le 18 juin 2020 à 07:49, Daniele Nicolodi a écrit : > > Hi Akim, > > On 17/06/2020 23:43, Akim Demaille wrote: >> I think it's a mistake to try to use the semantic value in error messages. > > The goal would not be to use the semantic value in the error message, > but to use additional con

Re: Redefining the literal string associated to the YYerror symbol

2020-06-17 Thread Akim Demaille
Daniele, > Le 18 juin 2020 à 07:57, Daniele Nicolodi a écrit : > > Hello, > > in Bison 3.6 is it possible to redefine the literal string associated to > the YYerror symbol (and to the YYEOF, YYUNDEF ones, although I don't > have immediate need for this)? YYerror is exactly the error token, the