| Okay, well, I think we'll definitely have to make sure everything is
re-entrant, so it's important you found this. For now, I'm focusing
on what changed to make the if-then tests fail. I found changes in
the tree expansion in csound_orc_expresssions.c dealing with if-then
but need to do some analysis carefully about what changed since my
last checkin a long time ago and now. Hopefully will get that fixed
up today!
On Wed, Apr 22, 2009 at 10:22 AM, victor wrote:
> I am using the latest bison and flex from GNU project sources.
> Bison is 2.4, flex not sure; I'll check it tomorrow.
>
> Victor
> ----- Original Message -----
> From: "Steven Yi"
> To: "Developer discussions"
> Sent: Wednesday, April 22, 2009 6:07 PM
> Subject: Re: [Cs-dev] building new parser on OSX; global variables
>
>
> Hi Victor,
>
> First of all, thanks for reporting all this! It sounds like sort of a
> pain for OSX!
>
> The big concern I had from your email was your 4th point. There are a
> couple of things that I think still use globals (perhaps the opcode
> table? need to check), but I had done some work to take advantage of
> features in flex and bison to make it reentrant. Well, at least in
> the .y file, we are using:
>
> %pure_parser
> %parse-param { CSOUND * csound }
> %parse-param { TREE * astTree }
> %lex-param { CSOUND * csound }
>
> We can add more params to the parser and lexer so that when we call
> them we pass in structures that can be used to store information
> instead of storing in global space.
>
> Victor: What version of Flex and Bison are you using on OSX? It seems
> like we'll have to do a little more research to see what is particular
> about OSX's implementation.
>
> Thanks!
> steven
>
>
> On Wed, Apr 22, 2009 at 5:31 AM, wrote:
>> Dear all,
>> just some remarks on building new parser on OSX
>> 1. OSX has bison and flex, but these seem to be quite old versions
>> and bison can't cope with the syntax file for Csound.
>> 2. So we have to get updated sources and build
>> bison, flex and GNU m4. This is easy, download, configure, make, make
>> install.
>> 3. Bison calls /usr/bin/gm4 (GNU m4), which is also old and will not work.
>> What
>> we need to do is to
>> sudo mv /usr/bin/gm4 /usr/bin/gm4-old
>> sudo ln -s /usr/local/bin/m4 /usr/bin/gm4
>> 4. Csound will not link to the modules produced by flex with default
>> options.
>> So I needed to add the linker option -single_module (-Wl,-single_module)
>> to SConstruct (now in CVS). This is to do with the global variables in
>> the parser code, which are not allowed in -multi_module.
>> Now it builds and runs.
>> However, I am slightly concerned with the globals generated by flex. Will
>> that
>> affect the capability of running multiple instances of csound?
>> Regards
>> Victor
>>
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |