Skip to content
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

Improve expression grouping using operator precedence #9

Open
fred-wang opened this issue Jan 23, 2014 · 0 comments
Open

Improve expression grouping using operator precedence #9

fred-wang opened this issue Jan 23, 2014 · 0 comments
Assignees

Comments

@fred-wang
Copy link
Owner

See http://www.w3.org/Math/MathML3/chapter3.html#id.3.3.1.3 for a discussion of grouping of sub-expressions.

Expression grouping was removed in 2f3e5f4 because it didn't work very well and was a serious performance burden for Jison.

I believe in general, correct operator grouping is not possible because one has to infer some semantics from the TeX source , especially when fences are involved like in y = { [0,1) ; (2,3] }^2.

However, I think it would still be possible to improve the grouping via operator precedence:

  • do this in newMrow instead of relying on the grammar's operator precedence
  • only do this for a restricted set of operators like unary/binary operators and relations.
  • fences should not be involved or only at the beginning and end of the mrow
@ghost ghost assigned fred-wang Jan 23, 2014
@fred-wang fred-wang removed this from the TeXZilla 1.0 milestone Sep 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant