[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error: invalid character `' (ASCII 0) near line 164, column 2
From: |
Ben Abbott |
Subject: |
Re: error: invalid character `' (ASCII 0) near line 164, column 2 |
Date: |
Sat, 26 Dec 2009 19:46:09 -0500 |
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
>>
>> syntax error
>>
>> error: called from:
>> error:
>> /Users/bpabbott/Development/mercurial/local_clone/scripts/optimization/__all_opts__.m
>> at line 56, column 11
>> error:
>> /Users/bpabbott/Development/mercurial/local_clone/scripts/optimization/PKG_ADD
>> at line 1, column 0
>>
>> make[3]: *** [voronoi.txt] Error 1
>> make[2]: *** [all-recursive] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>>
>> Ben
>
>
> Line 92 is empty, and there are only 163 lines in the file unique.m, so 164
> does not exist. My octave does run, so I took a look at the characters in
> unique.m.
>
> octave:3> fid = fopen('unique.m')
> fid = 4
> octave:4> str = fread (fid, "char=>char").';
> octave:5> fclose(fid)
> ans = 0
> octave:6> unique(double(str))
> ans =
>
> Columns 1 through 16:
>
> 10 32 33 34 35 37 38 39 40 41 42 43 44
> 45 46 47
>
> Columns 17 through 32:
>
> 48 49 50 51 52 53 54 55 56 57 58 59 60
> 61 62 64
>
> Columns 33 through 48:
>
> 65 66 67 69 70 71 72 73 74 75 76 77 78
> 79 80 82
>
> Columns 49 through 64:
>
> 83 84 85 87 89 91 92 93 95 97 98 99 100
> 101 102 103
>
> Columns 65 through 80:
>
> 104 105 106 107 108 109 110 111 112 113 114 115 116
> 117 118 119
>
> Columns 81 through 85:
>
> 120 121 122 123 125
>
> octave:7> disp(char(unique(double(str))))
>
> !"#%&'()*+,-./0123456789:;<=>@ABCEFGHIJKLMNOPRSTUWY[\]_abcdefghijklmnopqrstuvwxyz{}
>
> I don't see anything usual.
>
> Ben
Looks like I'm lost here. When I edit unique.m, and add \n to the end of the
file...
Next I see errors with ..
warning: invalid character `' (ASCII 0) near line 92, column 2
warning: no defaults for function `fsolve'
warning: no defaults for function `fzero'
warning: no defaults for function `lsqnonneg'
warning: no defaults for function `pqpnonneg'
error: invalid character `' (ASCII 0) near line 81, column 2
parse error near line 81 of file
/Users/bpabbott/Development/mercurial/local_clone/scripts/miscellaneous/fullfile.m
syntax error
error: evaluating argument list element number 1
error: called from:
error: /Users/bpabbott/Development/mercurial/local_clone/scripts/pkg/pkg.m at
line 203, column 3
error:
/Users/bpabbott/Development/mercurial/local_clone/scripts/startup/main-rcfile
at line 20, column 1
The file fullfile.m also does not end with an EOL character. After adding EOL
characters to each of the files below ...
unique.m
fullfile.m
strrep.m
compare_versions.m
isa.m
strsplit.m
strcmpi.m
Octave then starts with the warnings ...
warning: invalid character `' (ASCII 0) near line 92, column 2
warning: no defaults for function `fsolve'
warning: no defaults for function `fzero'
warning: no defaults for function `lsqnonneg'
warning: no defaults for function `pqpnonneg'
octave:1>
After searching the sources, it appears to me that the warning is part of lex.cc
2820 case 89:
2821 YY_RULE_SETUP
2822 #line 1032 "lex.ll"
2823 {
2824 LEXER_DEBUG (".");
2825
2826 xunput (octave_text[0], octave_text);
2827
2828 int c = text_yyinput ();
2829
2830 if (c != EOF)
2831 {
2832 current_input_column++;
2833
2834 error ("invalid character `%s' (ASCII %d) near line %d, column %d",
2835 undo_string_escape (static_cast<char> (c)), c,
2836 input_line_number, current_input_column);
2837
2838 return LEXICAL_ERROR;
2839 }
2840 else
2841 TOK_RETURN (END_OF_INPUT);
2842 }
2843 YY_BREAK
To test that, I tried ..
2820 case 89:
2821 YY_RULE_SETUP
2822 #line 1032 "lex.ll"
2823 {
2824 LEXER_DEBUG (".");
2825
2826 xunput (octave_text[0], octave_text);
2827
2828 int c = text_yyinput ();
2829
2830 /* if (c != EOF)
2831 {
2832 current_input_column++;
2833
2834 error ("invalid character `%s' (ASCII %d) near line %d, column %d",
2835 undo_string_escape (static_cast<char> (c)), c,
2836 input_line_number, current_input_column);
2837
2838 return LEXICAL_ERROR;
2839 }
2840 else */
2841 TOK_RETURN (END_OF_INPUT);
2842 }
2843 YY_BREAK
The result was a functional Octave (no warnings or errors on startup).
Perhaps this problem is due to ...
http://hg.savannah.gnu.org/hgweb/octave/rev/7ad32bf759c3
https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2009-December/014382.html
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 <=
- 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, 2009/12/31
- 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