[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Rewriters and document parsing

From: David Allouche
Subject: [Texmacs-dev] Rewriters and document parsing
Date: Fri, 24 May 2002 01:10:36 +0200

I am currently working on the Rewriters. Sunday or tuesday I will put 
online some design notes and a code draft for rewriters which is intended 
to implement the identity transformation ---untested since TeXmacs does 
not have the required plumbing yet,--- so you can tell me if you think it 
is right.

I just found something which can be interesting to think of without 
having a specific implementation in mind: the currently envisioned tree 
location scheme is unable to support parsing in rewriters.

Parsing is a very desirable features since it allows the rewriter to 
process structures in the body of the text. It is required to implement 
syntax hilighting. Generally, it is useful to find non-markup structure 
in documents.

In the new tree implementation, each subtree (including the STRING leafs) 
is associated to an inverse path. That path is initially produced by a 
document abstraction (it could be the buffer class). Those paths which 
end up in the typesetter are used to translate user actions, which occur 
in typeset boxes, into edition operations, which occur in a buffer (or 

If the string "foo bar" is associated to the inverse path P_1, the letter 
"f" is associated to (0,P_1), and the letter "b" is associated to 
(4,P_1). However we cannot give the typesetter meaningful paths for the 
strings "foo" and "bar", which are the two tokens of phrase.

That is very annoying and a solution will have to be found if we want to 
support a Literate Programming or XSLT some day.

                                  -- David --

reply via email to

[Prev in Thread] Current Thread [Next in Thread]