I am trying to do some "in-place" rewrites where the tree parser is
modified as it is parsed.  There are six loci where I desire to add a
procedure call:

1) Before a procedure call -- Create a block that calls method_new after
method_org
    (call method_org (params_org)) 
       => 
    (block (call method_new (params_new)) (call method_org (params_org)))
2) After a procedure call -- Create a block that calls method_new after
method_org
    (call method_org (params_org)) 
       => 
    (block (call method_org (params_new)) (call method_new (params_new)))
3) Around a procedure call -- Replace call with a "call_through" which
permits a call pointer inside method_new
    (call method_org (params_org)) 
       => 
    (call_through method_new (params_new) method_org (params_org))
4) Before a procedure execution -- Place a call to method_new at beginning
of block
    (proc name (block ...)) 
       => 
    (proc (block (call method_new params_new) ...))
5) After a procedure execution -- Place a call to method_new at end and at
every "return" command
    (proc name (block ... (return) ...)) 
       => 
    (proc name (block ... (block (call method_new params_new) (return))
... (call method_new params_new)))
6) Around a procedure execution -- Detach proc declaration into a delegate
and place a call in its stead
    (proc name_org (params_org) (block ...)) 
       => 
    (declarations ... (proc name_org (block (call_through method_new
(params_new) method_org (params_org)))) ... (proc delegate (params_org)
(block ...))

Can anyone help?
-Sean Walton
PhD Student
School of Computing
University of Utah

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to