summaryrefslogtreecommitdiff
path: root/web/yacco2/diagrams/treemodify.txt
blob: 583965835514ea1aa7595067f223e89e85cf41be (plain)
1
2
3
4
5
6
7
8
9
/*
file: /yacco2/diagrams+etc/treemodify.txt
Example of re-aligning the parser's LA T when dynamically modifying the tree
*/
tok_can<yacco2::AST*>* ct 
           = (tok_can<yacco2::AST*>*)parser()->token_supplier();
ct->remove();//drop the la T as i could have morphed this into a comment
parser()->override_current_token_pos(parser()->current_token_pos()-1);
parser()->get_next_token();