STR-715: asfix-anno-position-info(|path) gives <int> as area
When using the strategy asfix-anno-position-info(|path) the returned AST has position-info with only an :
[eric@~]$ echo “1+1” | parse-php -s Expr –preserve-positions
Plus(LNumber(Deci(“1”{[pos-info,]}){[pos-info,]}){[pos-info,]},LNumber(Deci(“1”{[pos-info,]}){[pos-info,]})[eric@~]$ echo “1+1” | parse-php -s Expr –preserve-positions
Plus(LNumber(Deci(“1”{[pos-info,]}){[pos-info,]}){[pos-info,]},LNumber(Deci(“1”{[pos-info,]}){[pos-info,]}){[pos-info,]}){[pos-info,]}
Both parse-php and parse-java use this strategy.However, it does not occur when calling sgrli:
[eric@~]$ echo “1+1” | sglri -s Expr –preserve-positions -p ./workspace/dev/php-front/src/grammar/PHP4Test.tbl
Plus(LNumber(Deci(“1”{[pos-info,area-in-file("",area(1,0,1,1,0,1))]}){[pos-info,area-in-file("",area(1,0,1,1,0,1))]}){[pos-info,area-in-file("",area(1,0,1,1,0,1))]},LNumber(Deci(“1”{[pos-info,area-in-file("",area(1,2,1,3,2,1))]}){[pos-info,area-in-file("",area(1,2,1,3,2,1))]}){[pos-info,area-in-file("",area(1,2,1,3,2,1))]}){[pos-info,area-in-file("",area(1,0,1,3,0,3))]}The main difference is that sglri calls AddPosInfo through XTC, so this might be a lead.
Submitted on 5 April 2007 at 20:44
Log in to post comments