[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enhancement request: enabling Variant in C parsers

From: Hans Åberg
Subject: Re: Enhancement request: enabling Variant in C parsers
Date: Thu, 23 Aug 2018 10:18:16 +0200

> On 23 Aug 2018, at 07:34, Akim Demaille <address@hidden> wrote:
>> Le 21 août 2018 à 10:46, Hans Åberg <address@hidden> a écrit :
>>> On 19 Aug 2018, at 17:23, Akim Demaille <address@hidden> wrote:
>>>>> I would strongly suggest that you look at the examples/ in Bison, the C++
>>>>> calculator
>>>> I did look at it - this example scared me off c++ parsers :-(
>>> Really???  Then I failed.  Can you be more specific?
>> I noticed: It does not have a Makefile, so one can’t just copy it and 
>> compile.
> Why not adding one, indeed.
>> The input file is broken.
> You’ll have to be more specific, WFM.

It generates an error. You might have more than one, say error<k>.txt, and 

>> And the location filename gets set to null.
> Not clear enough, but elaborate.

The location you initialize in .yy is not the one the .ll uses, so it returns a 
location with filename set to null, which is then what is reported, that is 
nothing. I changed:

calc++.cc: make global
  extern calcxx_driver driver;

  calcxx_driver driver;

  // The location of the current token.
  static yy::location loc(&driver.file);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]