combine
combine copied to clipboard
Supporting non-string inputs
I have another, more complex question. Would you be open to the idea of supporting inputs which are not strings?
The main thing I'd like to have is a list of terms as input. Basically, I'd like to use say leex to tokenize the input, and then combine to work on the grammar. Currently, the code is a bit clunky for more complex grammars, since tokenizing and parsing is conflated. For example, working with whitespaces is a bit hard, because we need to ignore them in many different places.
So the question is would you consider such option?
I'll cc my colleague @obrok here, as he also might find this discussion interesting :-)
I'm certainly interested in supporting it. Could you maybe throw together a small example of some input (let's use leex output) with the grammar defined with combine, and what you'd expect the output to be? It doesn't have to be a very complex example, but the visual example will help us work through it a lot better I think.
Good idea, I'll make a mock example with the leex output. It probably won't happen this week, since I'm away on a trip, but I'll get to it next week.