Frank Mittelbach <[log in to unmask]> writes:

> >   But, continuing this theme of non-deterministic parsing, have you tried
> > picking up say a whole word in advance, then doing some parsing of it
> > (expanding all macros in it, and replacing it with a word where TeX might
> > regonize it.
> >   More explicitly, one would type say
> >     <foo\a bar>
> > Then the "<" would pick up the whole "foo\a bar>", expanding the \a,
> > finally returning "foobar". Would it be possible to recognize a ligature
> > "ob" by this method? (The example is otherwise entirely hypothetical.)
>it would but on the other hand it would not help as you
> a) need that > character there is not anything you could choose, eg
>scanning up to the next space or so is no answer as you would run into
>problems inside arguments etc
> b) there is this nasty case of \verb which modifies TeXs parsing and
>you would kill that case as well
>so again, unless you make everything "letter" and "other" except for
>"\" and the start of shortref strings and essentially build your own
>parser for all of the text (with the problem of handling nested groups
>etc etc) there is no way to make this work

  The discussion concerns a somewhat artifical style of programming, but
one could think of picking up something bigger, say a sentence or a
paragraph in advance. The parser would have some knowledge of when to
abort. Perhaps one could do this by the idea of a "text environment". One
would then have to write (what semantically corresponds to)
and not
if one wnat that particular feature (ligatures, or whatever).
-- Perhaps with an improved syntax.

  I would not experiment with it myself, but for those willing fakires out

  Hans Aberg