A question about error messages
Up to JastAdd
A question: is it possible to get error locations (line and column numbers) in JastAdd?
Thanks ahead.
The short answer is yes. The slightly longer answer is that it depends on which parser you use. In JastAddJ we use Beaver which automatically adds location information to the AST nodes. A typical example is available in the file ErrorCheck.jrag in the Java1.4Frontend. The "void ASTNode.error(String s)" method contains uses of start and end information for a particular ASTNode.
Best regards
/Torbjorn
Powered by
Ploneboard