Delegate Str to $.tree
Add a few lookahead optimizations