...
Can we walk trees without creating buffer of entire tree? Perhaps we can make an on-demand buffer that doesn't go into subtrees unless the parser does. The wildcard would tell it to skip. Only problem is lookahead. Maybe we let LT (i) do the on-demand loading. We could add a skipOverSubtree() method to node stream so wildcard could avoid descending.
Patter ^( VAR . ID )
yields:
Code Block |
---|
match(input,VAR,FOLLOW_VAR_in_a13);
match(input, Token.DOWN, null);
matchAny(input);
match(input,ID,FOLLOW_ID_in_a17);
match(input, Token.UP, null);
|