I added a conditional to 'configure' so systems with 'yacc' don't attempt to build ncap. I did this because it seems there is something in the ncap stuff that only works with bison. Is this true? I don't really know anything about lex/yacc.
Also, when making a distribution, 'make dist', the gzip'ed tar file will create ncap_yacc.c and ncap_lex.c beforehand. I'm assuming the idea behind this is to create c-compilable files for people without lex/yacc (so they can have 'ncap' too). However, I can't seem to get the ncap_yacc.c I generate on my linux machine using bison to compile on my Solaris machine using cc.
yukon> cc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -g -c ncap_yacc.c
"ncap_yacc.y", line 160: syntax error before or at: /
"ncap_yacc.y", line 160: invalid source character: '$'
"ncap_yacc.y", line 160: invalid token: 1.var_nm
"ncap_yacc.y", line 160: invalid source character: '$'
"ncap_yacc.y", line 160: invalid token: 1.att_nm
"ncap_yacc.y", line 191: syntax error before or at: /
"ncap_yacc.y", line 191: invalid source character: '$'
"ncap_yacc.y", line 191: invalid token: 1.var_nm
"ncap_yacc.y", line 191: invalid source character: '$'
"ncap_yacc.y", line 191: invalid token: 1.att_nm
"ncap_yacc.y", line 212: syntax error before or at: /
"ncap_yacc.y", line 212: invalid source character: '$'
"ncap_yacc.y", line 212: invalid token: 1.var_nm
"ncap_yacc.y", line 212: invalid source character: '$'
"ncap_yacc.y", line 212: invalid token: 1.att_nm
"/usr/share/bison/bison.simple", line 934: cannot recover from previous errors
cc: acomp failed for ncap_yacc.c
Has anyone else ran into this problem? Any idea what's going on?
rorik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is actually flex that is required.
Search the ChangeLog for
"AT&T lex-compatibility broken by using flex <EOF> rules"
This is done in order to allow simple inclusion
of #include'd files.
Finally the sun compile breaks because Henry
is using // rather than /* */ as comment characters.
GCC does not mind, other compilers are stricter.
Note that C99 allows this so it is legal but non-portable ANSI C code. So just patch
the // usage and let's remember to use
/* */ for the time-being.
Charlie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Henry & Charlie,
I added a conditional to 'configure' so systems with 'yacc' don't attempt to build ncap. I did this because it seems there is something in the ncap stuff that only works with bison. Is this true? I don't really know anything about lex/yacc.
Also, when making a distribution, 'make dist', the gzip'ed tar file will create ncap_yacc.c and ncap_lex.c beforehand. I'm assuming the idea behind this is to create c-compilable files for people without lex/yacc (so they can have 'ncap' too). However, I can't seem to get the ncap_yacc.c I generate on my linux machine using bison to compile on my Solaris machine using cc.
yukon> cc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -g -c ncap_yacc.c
"ncap_yacc.y", line 160: syntax error before or at: /
"ncap_yacc.y", line 160: invalid source character: '$'
"ncap_yacc.y", line 160: invalid token: 1.var_nm
"ncap_yacc.y", line 160: invalid source character: '$'
"ncap_yacc.y", line 160: invalid token: 1.att_nm
"ncap_yacc.y", line 191: syntax error before or at: /
"ncap_yacc.y", line 191: invalid source character: '$'
"ncap_yacc.y", line 191: invalid token: 1.var_nm
"ncap_yacc.y", line 191: invalid source character: '$'
"ncap_yacc.y", line 191: invalid token: 1.att_nm
"ncap_yacc.y", line 212: syntax error before or at: /
"ncap_yacc.y", line 212: invalid source character: '$'
"ncap_yacc.y", line 212: invalid token: 1.var_nm
"ncap_yacc.y", line 212: invalid source character: '$'
"ncap_yacc.y", line 212: invalid token: 1.att_nm
"/usr/share/bison/bison.simple", line 934: cannot recover from previous errors
cc: acomp failed for ncap_yacc.c
Has anyone else ran into this problem? Any idea what's going on?
rorik
Oh, it's just the // comments.
I think I can answer these:
It is actually flex that is required.
Search the ChangeLog for
"AT&T lex-compatibility broken by using flex <EOF> rules"
This is done in order to allow simple inclusion
of #include'd files.
Finally the sun compile breaks because Henry
is using // rather than /* */ as comment characters.
GCC does not mind, other compilers are stricter.
Note that C99 allows this so it is legal but non-portable ANSI C code. So just patch
the // usage and let's remember to use
/* */ for the time-being.
Charlie
Hi Guys, Sorry about my incorrect comment syntax - Shall try to be more carefull --
Regards Henry