Posted By:
Cheng_Fang
Posted On:
Tuesday, June 3, 2003 01:58 PM
I want to use antlr to preform some java src manipulation, for example, from try { getResource(); } catch (SqlException se) { throw new ResourceException("Failed to get resource"); } ==> try { getResource(); } catch (SqlException se) { throw new ResourceException("Failed to get resource", se); } Catch block is the only place I need to change code, and other parts should be intact. I am new to antlr and I am reading docs and tutorials, but haven't found a good way for this kind of transformation. Can you please advise? thanks.
More>>
I want to use antlr to preform some java src manipulation, for example, from
try {
getResource();
} catch (SqlException se) {
throw new ResourceException("Failed to get resource");
}
==>
try {
getResource();
} catch (SqlException se) {
throw new ResourceException("Failed to get resource", se);
}
Catch block is the only place I need to change code, and other parts should be intact. I am new to antlr and I am reading docs and tutorials, but haven't found a good way for this kind of transformation. Can you please advise? thanks.
<<Less