> On 25 Aug 2018, at 08:51, Akim Demaille <[email protected]> wrote:
>
>> Le 23 août 2018 à 07:34, Akim Demaille <[email protected]> a écrit :
>>
>>> Le 21 août 2018 à 10:46, Hans Åberg <[email protected]> a écrit :
>>>
>>>
>>>> On 19 Aug 2018, at 17:23, Akim Demaille <[email protected]> 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.
>
> I installed this.
Ignore last message, I ran the calc++ example without ./configure && make.
But now I get the following error, with extra quotes in the #line directives.
They do not appear if I compile the same example with bison 3.0.5. So it seems
to be a bug in the pre-release.
$ make
../../src/bison -o parser.cc parser.yy
g++ -c -ocalc++.o calc++.cc
g++ -c -odriver.o driver.cc
g++ -c -oparser.o parser.cc
parser.cc:334:10: error: """parser" is not a valid filename
#line 42 ""parser.yy"" // lalr1.cc:635
^~~~~~~~
parser.cc:341:10: error: """parser" is not a valid filename
#line 42 ""parser.yy"" // lalr1.cc:635
^~~~~~~~
parser.cc:348:10: error: """parser" is not a valid filename
#line 42 ""parser.yy"" // lalr1.cc:635
^~~~~~~~
make: *** [parser.o] Error 1