19 November 2003

Bison has at leas two problems with location tracking: empty rhs and error on rhs. A "solution" for the first problem is:
lhs : {@$.first_line = @$.last_line; @$.first_column = @$.last_column; }
A "solution" for the second problem is (you need to do this if reporting error location):
lhs : a b error c {@3.first_line = @2.last_line; @3.first_column = @2.last_column;}

No comments:

Post a Comment

Note: (1) You need to have third-party cookies enabled in order to comment on Blogger. (2) Better to copy your comment before hitting publish/preview. Blogger sometimes eats comments on the first try, but the second works. Crazy Blogger.