adrian-thurston / colm

The Colm Programming Language
MIT License
166 stars 32 forks source link

[colm] tree walk list iterator assumes right recursion, want both left and right #90

Closed adrian-thurston closed 4 years ago

adrian-thurston commented 4 years ago

The + and * operators are currently implemented with right recursion. The tree walker (generated C++ interface), used to load colm programs, assumes right recursion and can keep only a pointer to do this. We want to be able to support both left and right recursion so this needs to change to a stack.

adrian-thurston commented 4 years ago

Might make sense to use a non-recursive generic iterator.

Also, this can replace the repeat() iterator implementation.