emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] status? news?


From: Eli Zaretskii
Subject: Re: [emacs-bidi] status? news?
Date: Sun, 21 Jan 2001 19:48:29 +0200

> Date: Sun, 21 Jan 2001 18:25:17 +0330 (IRT)
> From: Roozbeh Pournader <address@hidden>
> 
> On Sun, 21 Jan 2001, Eli Zaretskii wrote:
> 
> > Not if the behavior is also determined by the table.
> 
> I would really like to know about the kind of table you have in your mind.

That makes two of us ;-)

Unfortunately, at this stage I have only a bunch of ideas and no real
code that I can show.

> Converting UTR9 to an automaton or something like that seems hard,
> considering the many implicit requirements.

Given the basic design I described in my other message today, I think
it should become clear that most of the terrible complexity in UTR9
will need to be rethought anyway.  Instead of multiple passes through
the same buffer, we need an algorithm which finds the visually-next
character, one character at a time.  The possible actions such an
algorithm can take are:

  - advance one character position
  - back up one character position
  - scan quickly forward or backward until a character with suitable
    bidi characteristics is found

These actions lend themselves very well to a state-machine like
implementation.  I don't think it will be a real state machine, but it
certainly can be easily made table-driven, because as each character
is examined, the code needs to decide whether it keeps moving (forward
or backward) or stops and returns the character it found.  This
decision is based on the characteristics of that character and of its
neighbours (and on embedding information).



reply via email to

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