Extensible logical structure:
Subject: Extensible logical structure:
From: "T. V. Raman" <firstname.lastname@example.org>
Date: Tue, 21 May 1996 14:02:55 -0700
From email@example.com Tue May 21 17: 03:00 1996
X-Fax: 1(415) 962-6063
X-Phone: 1 (415) 962-3945
For details on how the notion of an extensible logical structure was built
into AsTeR's parser for handling the TeX family of markup,
see the following sections in my thesis
We could use some of the same ideas in implementing the extensible portion of
the html math markup.
The details are in the above ref but in summary, AsTeR used operator
precedence to parse math notation, and everytime you defined a new LaTeX
macro, you supplied the system with certain important bits of information;
e.g. whether the newly defined macro construct represented an operand or an
operator, the precedence if an operator etc. Using this information, it became
possible to treat the newly dfined construct as a first-class citizen in the
class of notation that AsTeR already knew to recognize.
The reason I keep harping on the need to get the extensibility notions correct
and bootstrap the rest of the system off such an extensibility model is
that when I implemented AsTeR I initially made the mistake of trying to
implement parsers for each of the predefined TeX math macros --after the
extensibility mechanism was designed and built --which I had to if I wanted a
useful system-- I actually went back and reimplemented all of the builtin
operators using the extension mechanism. The resulting solution was a lot more
elegant and maintainable than the initial implementation.
In fact the above actually makes sense --after all even (La)TeX implements things
like \over and \frac using
lower level primitive operators that one never sees --as a consequence, a user
defined construct e.g. \legendre and a system provided construct e.g. \frac
look conceptually equivalent to an author.
Implementing all of AsTeR's recognition on top of the extensibility model
allowed AsTeR to gain a similar advantage when it came to rendering the
structure --rendering a teX builtin construct like \over was no different and
no more complex than rendering the \legendre.
Adobe Systems Tel: 1 (415) 962 3945 (B-1 115)
Advanced Technology Group Fax: 1 (415) 962 6063
(E 1-160) 1585 Charleston Road Email: firstname.lastname@example.org
Mountain View, CA 94039 -7900 email@example.com
http://www-atg/People/Raman.html (Internal To Adobe)
Disclaimer: The opinions expressed are my own and in no way should be taken
as representative of my employer, Adobe Systems Inc.