[Prev][Next][Index]

Buf fix for namelist



A few hours ago, we reported a bug with "namelist" in Sage++.
We are able to fix this bug (actually 2 bugs) in the following way:

To fix the indentation in the "namelist" statement, 
it was necessary to change file "unparse.def". Line 343 was
changed from: 

DEFNODECODE(NAMELIST_STAT,      "%CMNTnamelist %LL1%NL",

to:

DEFNODECODE(NAMELIST_STAT,      "%CMNT%PUTTABnamelist %LL1%NL",

that is, a "PUTTAB" had to be added.

The other error, the missing variable, is caused by a wrong
action in the rule for "namelist" in file "cftn.gram". Line
1380 was changed from:

	       s = make_scalar($3, TYNULL, LOCAL);

to:

	       s = make_scalar($4, TYNULL, LOCAL);

that is, the number for "name" was wrong in the rule

	NAMELIST in_dcl comblock name

When I tried to regenerate "f2dep", I got the following error
messages from bison:

bison -vd gram.y
("gram.y", line 1828) error: type clash (`' `symbol') on default action
("gram.y", line 1830) error: type clash (`' `symbol') on default action
("gram.y", line 1832) error: type clash (`' `symbol') on default action
("gram.y", line 1834) error: type clash (`' `symbol') on default action
("gram.y", line 1835) error: type clash (`' `ll_node') on default action
("gram.y", line 1888) error: type clash (`' `symbol') on default action
("gram.y", line 1893) error: type clash (`' `symbol') on default action

Therefore, I could not regenerate "gram.tab.c". I had to change
the old "gram.tab.c" by hand. Line 4136 was changed from:

	       s = make_scalar(yyvsp[-1].symbol, TYNULL, LOCAL);

to:

	       s = make_scalar(yyvsp[0].symbol, TYNULL, LOCAL);

Maybe the version of bison we are using is old (1.25). Do you
know which version you are using? Although it seems that the
problems are the default actions for the above mentioned rules,
that are: