Re: [Python-Dev] Adding a token

2010-08-10 Thread Ronald Oussoren
On 8 Aug, 2010, at 6:15, Greg Ewing wrote: > Aaargh, I think I've found out what the problem is. > > I'm using framework builds on MacOSX. I have two experimental > builds of Python 3.1 around, plus a standard one installed in > /Library. It's picking up the version of Python.framework in > /Lib

Re: [Python-Dev] Adding a token

2010-08-07 Thread Ned Deily
In article <4c5e2f7d.5080...@canterbury.ac.nz>, Greg Ewing wrote: > Does anyone know if there's a way to tell Apple's linker to > use a framework from a specific location and not go looking > anywhere else? I haven't tested it myself but you should be able to prevent problems like that by speci

Re: [Python-Dev] Adding a token

2010-08-07 Thread Ivan Krstić
On Aug 7, 2010, at 9:15 PM, Greg Ewing wrote: > Does anyone know if there's a way to tell Apple's linker to > use a framework from a specific location and not go looking > anywhere else? $ DYLD_FRAMEWORK_PATH= See dyld(1) for other relevant magic. Cheers, -- Ivan Krstić, via mobile > __

Re: [Python-Dev] Adding a token

2010-08-07 Thread Greg Ewing
Aaargh, I think I've found out what the problem is. I'm using framework builds on MacOSX. I have two experimental builds of Python 3.1 around, plus a standard one installed in /Library. It's picking up the version of Python.framework in /Library/Frameworks instead of the one in the local build di

Re: [Python-Dev] Adding a token

2010-08-07 Thread Greg Ewing
Benjamin Peterson wrote: Why do you even have to add a new token? You can just put the literal '?' in the grammar. I don't see how that can be sufficient. All the other tokens have entries in the three places I mentioned, and there's no way that pgen can generate those automatically just from

Re: [Python-Dev] Adding a token

2010-08-07 Thread Benjamin Peterson
2010/8/7 Greg Ewing : > I'm trying to add a '?' token to the parser, and weird things > are happening. Why do you even have to add a new token? You can just put the literal '?' in the grammar. -- Regards, Benjamin ___ Python-Dev mailing list Python-

[Python-Dev] Adding a token

2010-08-07 Thread Greg Ewing
I'm trying to add a '?' token to the parser, and weird things are happening. I've added a #define to token.h, an entry to _PyParser_TokenNames in tokenizer.c and case for it in PyToken_OneChar(). But it's behaving as though the tokenizer is not recognising my token. I put in some printfs to find