[GRASS5] compiling probs grass51

Glynn Clements glynn.clements at virgin.net
Fri Feb 14 06:58:15 EST 2003


Stephan Holl wrote:

> I would like to try the experimental grass51-tree from CVS, but ran into
> trouble during compiling.
> 
> perhaps anybody can give me a hint what went wrong.

> bison -y -d -v yac.y
> yac.y:42.26: invalid character: `,'
> yac.y:42.39: invalid character: `,'
> yac.y:42.47: invalid character: `,'
> yac.y:42.56: invalid character: `,'
> yac.y:42.64: invalid character: `,'

lib/db/sqlp/yac.y appears to be using non-standard syntax (recent
versions of bison appear to be less forgiving than older versions).

I suggest replacing the line:

	%type <node>	y_comparison, y_condition, y_attr, y_attr2, y_name, y_cnam

with multiple lines:

	%type <node>	y_comparison
	%type <node>	y_condition
	%type <node>	y_attr
	%type <node>	y_attr2
	%type <node>	y_name
	%type <node>	y_cnam

[AFAIK, simply removing the commas should work, but one line per
symbol is more clear.]

> In file included from lex.l:25:
> y.tab.h:78: warning: `AND' redefined
> /var/tmp/grasscvs/grass51/include/sqlp.h:5: warning: this is the
> location of the previous definition
> y.tab.h:79: warning: `OR' redefined
> /var/tmp/grasscvs/grass51/include/sqlp.h:6: warning: this is the
> location of the previous definition
> y.tab.h:80: warning: `NOT' redefined
> /var/tmp/grasscvs/grass51/include/sqlp.h:7: warning: this is the
> location of the previous definition
> In file included from lex.l:25:
> y.tab.h:50: parse error before `2'

Try removing those lines from include/sqlp.h; if that causes other
things to break, then either yac.y/lex.l or sqlp.h (and code which
uses it) should use other names for AND/OR/NOT.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list