For the math input, it makes sense that in different contexts, certain expression types should be allowable, while others should not be permitted. How should this be implemented? It seems like there are a few options:
The rich input could be provided with...
- a grammar to build some validating function which tests input expressions.
- instructions on what to do for individual characters (i.e., how to manipulate the expression trees).
- a subset of valid expression constructors (i.e., a predicate).
Maybe the functionality for most of the rich-input editor could be isolated from the rest of its internals (i.e., more in line with option 2). This is probably the most general solution, in which the rich-input editor is mostly there for presenting the tree traversal.
For the math input, it makes sense that in different contexts, certain expression types should be allowable, while others should not be permitted. How should this be implemented? It seems like there are a few options:
The rich input could be provided with...
Maybe the functionality for most of the rich-input editor could be isolated from the rest of its internals (i.e., more in line with option 2). This is probably the most general solution, in which the rich-input editor is mostly there for presenting the tree traversal.