octave-maintainers
[Top][All Lists]
Advanced

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

Re: push-pull syntax varies between Bison versions


From: Rik
Subject: Re: push-pull syntax varies between Bison versions
Date: Thu, 28 Feb 2013 11:48:15 -0800

On 02/28/2013 11:19 AM, John W. Eaton wrote:
> On 02/28/2013 01:53 PM, Rik wrote:
>> 2/28/13
>>
>> John,
>>
>> The new directive for a push-pull parser is currently
>>
>> %define api.push-pull both
>>
>> which is appropriate for bison versions>= 2.5.
>>
>> The original syntax that they introduced in 2.4 was
>>
>> %define api.push_pull "both"
>>
>> which has underscores and quoting.  It looks like an autoconf test is in
>> order to verify which syntax the host is using.
>
> OK, well this is a bit of a work in progress...
>
> After checking in my last change, I realized that I also checked
> USE_PUSH_PARSER in the sources but set OCTAVE_USE_PUSH_PARSER in
> configure.ac, so wasn't even testing the push parser when using
> --enable-push-parser.  Oops.  I'm working on that now.
>
> I guess something like
>
>   #ifdef BISON_NEEDS_QUOTED_PARSER_TYPES
>   # define PARSER_TYPES "both"
>   #else
>   # define PARSER_TYPES both
>   #endif
>
>   ...
>
>   %define api.push-pull PARSER_TYPES
>
> won't work, so this means generating oct-parse.yy from oct-parse.in.yy,
> right?  Ugh.
Yup.  The command that gets executed for me by Make is

/bin/bash ../build-aux/ylwrap parse-tree/oct-parse.yy y.tab.c
parse-tree/oct-parse.cc y.tab.h parse-tree/oct-parse.h y.output
parse-tree/oct-parse.output -- bison -y  -dv

so CPP doesn't touch it before it gets parsed by bison.

--Rik


reply via email to

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