First of all, this is really a great library! According to my knowledge, there are very few open-source attempt at UnicodeMath. Excellent job!
I'm also writing my own UnicodeMath parser in Dart. One problem I found within UnicodeMath, A Nearly Plain-Text Encoding of Mathematics, Version 3.1 Appendix A. UnicodeMath Grammar is that, it fails to account for separators in the grammar for expBracket
.
expBracket ← opOpener exp opCloser
← ‘||’ exp ‘||’
← ‘|’ exp ‘|’
expBracket ← opOpener exp (opSeparator exp)+? opCloser
← ‘||’ exp ‘||’
← ‘|’ exp ‘|’
However this introduces backtracking problems. Since |
U+007C can at the same time be opener, separator or closer. I haven't got a good solution to this now.
Meanwhile it would be great if we can collaborate on this matter. I have been documenting my findings in znjameswu/flutter_math#2