-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing of Separators #1
Comments
Hiya! I'm glad someone out there is finding my work useful! 😄
Yeah, the given grammar is rather incomplete – during the process of implementing of my parser, I had to piece together many details based on the text, which has likely led to a number of subtle incompatibilities with the canonical implementation in Microsoft Office (which I don't currently have access to). Addressing your specific issue, Sargent's document contains the following description of separators: With the most common use cases and a desire to end up with a comprehensible parsing grammar in mind, I've interpreted/implemented this basically as follows:
I hope that's somewhat helpful! Taking a look at your notes, it strikes me that you're also looking to implement the "input method" part of UnicodeMath, with successive (sub)equation build-up. I suspect that in this environment, you might be able to derive some context from the already-built-up portion of the expression that would e.g. allow using the pipe symbol for separators without the insurmountable ambiguities. |
Thank you for the comment. I might have misintepreted your code when I opened up this issue (didn't see the expBracketContent). Also thanks for your advice on the interactive build-up strategies. In general, I found it quite hard to speculate MS Office's implementation. I still don't have a solid speculation and still have to try some solutions. |
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
.Example
(1/2 \mid 3)
The
\mid
here needs to be identified as a separator to stretch.Solution
We may need to change the grammar from
to
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
The text was updated successfully, but these errors were encountered: