Closed rgaiacs closed 10 years ago
The default error message don't help very much.
\frac{1}
It show
Parse error on line 1: \frac{1} --------^ Expecting '{', 'LEFT', 'OPFS', '.', 'BIG', 'BBIG', 'BIGG', 'BBIGG', 'BIGL', 'BBIGL', 'BIGGL', 'BBIGGL', 'NUM', 'TEXT', 'A', 'F', 'MI', 'MN', 'MO', 'OP', 'OPS', 'OPAS', 'MS', 'MTEXT', 'HIGH_SURROGATE', 'BMP_CHARACTER', 'OPERATORNAME', 'MATHOP', 'MATHBIN', 'MATHREL', 'FRAC', 'ROOT', 'SQRT', 'UNDERSET', 'OVERSET', 'UNDEROVERSET', 'XARROW', 'MATHRLAP', 'MATHLLAP', 'MATHCLAP', 'PHANTOM', 'TFRAC', 'BINOM', 'TBINOM', 'PMOD', 'UNDERBRACE', 'UNDERLINE', 'OVERBRACE', 'ACCENT', 'ACCENTNS', 'BOXED', 'SLASH', 'QUAD', 'QQUAD', 'NEGSPACE', 'NEGMEDSPACE', 'NEGTHICKSPACE', 'THINSPACE', 'MEDSPACE', 'THICKSPACE', 'SPACE', 'MATHRAISEBOX', 'MATHBB', 'MATHBF', 'MATHBIT', 'MATHSCR', 'MATHBSCR', 'MATHSF', 'MATHFRAK', 'MATHIT', 'MATHTT', 'MATHRM', 'HREF', 'STATUSLINE', 'TOOLTIP', 'TOGGLE', 'BTOGGLE', 'TENSOR', 'MULTI', 'BMATRIX', 'BGATHERED', 'BPMATRIX', 'BBMATRIX', 'BVMATRIX', 'BBBVMATRIX', 'BVVVMATRIX', 'BSMALLMATRIX', 'BCASES', 'BALIGNED', 'BARRAY', 'SUBSTACK', 'ARRAY', got 'EOF'\frac{1}
$ cat e.tex \documentclass{article} \begin{document} $\frac{1}$ \end{document} $ pdflatex -interaction=nonstopmode e ... ! Missing } inserted. <inserted text> } l.3 $\frac{1}$ ! Too many }'s. \frac #1#2->{\begingroup #1\endgroup \over #2} l.3 $\frac{1}$ ...
Replace JISON parser.parserError as suggest by @zaach here and here.
parser.parserError
I removed the "Expecting..." line. Now we only have
Parse error on line 1: \frac{1} --------^
The default error message don't help very much.
Step to reproduce
\frac{1}
.It show
Comparison with LaTeX
Solution
Replace JISON
parser.parserError
as suggest by @zaach here and here.