[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error: invalid character `' (ASCII 0) near line 164, column 2 (probl
From: |
Ben Abbott |
Subject: |
Re: error: invalid character `' (ASCII 0) near line 164, column 2 (problem avoided) |
Date: |
Thu, 31 Dec 2009 11:33:26 -0500 |
On Dec 31, 2009, at 8:37 AM, Ben Abbott wrote:
> On Dec 27, 2009, at 7:35 PM, Ben Abbott wrote:
>
>> On Dec 27, 2009, at 6:12 PM, John W. Eaton wrote:
>>
>>> On 26-Dec-2009, Ben Abbott wrote:
>>>
>>> | On Dec 26, 2009, at 12:37 PM, Ben Abbott wrote:
>>> |
>>> | > On Dec 25, 2009, at 4:24 PM, Ben Abbott wrote:
>>> | >
>>> | >> Is anyone else seeing this?
>>> | >>
>>> | >> ../../run-octave -f -q -H -p . --eval "geometryimages ('voronoi',
>>> 'txt');"
>>> | >> warning: invalid character `' (ASCII 0) near line 92, column 2
>>> | >> error: invalid character `' (ASCII 0) near line 164, column 2
>>> | >> parse error near line 164 of file
>>> /Users/bpabbott/Development/mercurial/local_clone/scripts/set/unique.m
>>>
>>> The only way I can see this happening is if text_yyinput returns 0,
>>> which can only happen if yyinput returns 0, which should only be
>>> possible if flex's internal buffer somehow has an ASCII nul character
>>> in it. I don't see how that can happen, and as I can't reproduce this
>>> problem, you will need to do some debugging to see what the contents
>>> of the flex buffer is and try to find out why it is incorrect.
>>>
>>> jwe
>>
>> At the moment I have no insight ... but I'll start studying the problem.
>>
>> Ben
>
> The problem appears to be with Mac OSX's variant of flex.
>
> $ /usr/bin/flex --version
> flex 2.5.35
>
> If I use an older version from Fink ...
>
> $ /sw/bin/flex --version
> flex version 2.5.4
>
> ... then the (ASCII 0) error/warnings are absent, but I need to edit lex.cc
> to add "#include <config.h>".
>
> I think the obvious next step is to independently build flex (version 2.5.35)
> and try it. I'll look into creating a Fink package for that.
>
> Ben
I noticed that Fink's package flex-devel buries flex-2.3.35 at
/sw/lib/flex/bin/flex.
$ /sw/lib/flex/bin/flex --version
flex 2.5.35
To use this version, I modified my shell environment ...
## Use the flex from flex-devel
export PREFIX=/sw
export PATH="$PREFIX/lib/flex/bin:$PATH"
export CPPFLAGS="-I$PREFIX/lib/flex/include $CPPFLAGS"
export LDFLAGS="-L$PREFIX/lib/flex/lib"
... and then removed the existing lex.cc and reran configure and make.
This resulted in a lex.cc that works as expected; (1) the"%top{}" directive in
lex.ll works, and (2) there are no instances of "(ASCII 0)" errors/warnings.
Thus, it appears that the flex that comes with Mac OSX has some *features*. If
anyone has insight in how flex works and would like to look into what Apple
changed ...
http://www.opensource.apple.com/source/flex/flex-24.1/patches/
Ben
- error: invalid character `' (ASCII 0) near line 164, column 2, Ben Abbott, 2009/12/25
- Re: error: invalid character `' (ASCII 0) near line 164, column 2, Ben Abbott, 2009/12/26
- Re: error: invalid character `' (ASCII 0) near line 164, column 2, Ben Abbott, 2009/12/26
- Re: error: invalid character `' (ASCII 0) near line 164, column 2, John W. Eaton, 2009/12/27
- Re: error: invalid character `' (ASCII 0) near line 164, column 2, Ben Abbott, 2009/12/27
- Re: error: invalid character `' (ASCII 0) near line 164, column 2, Ben Abbott, 2009/12/31
- Re: error: invalid character `' (ASCII 0) near line 164, column 2 (problem avoided),
Ben Abbott <=
- Re: error: invalid character `' (ASCII 0) near line 164, column 2 (problem avoided), Michael D Godfrey, 2009/12/31
- Re: error: invalid character `' (ASCII 0) near line 164, column 2 (problem avoided), Joel LeBlanc, 2009/12/31