m17n-list
[Top][All Lists]
Advanced

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

Re: [m17n-list] m17n Based Visual Input System: bn-disha


From: Sayak Sarkar
Subject: Re: [m17n-list] m17n Based Visual Input System: bn-disha
Date: Fri, 29 Jun 2012 12:59:31 +0530

Hey Guys,

Thanks for the valuable advice, I really appreciate it.

I mostly used gedit for writing the code, and the getting the parenthesis correct is really confusing using it. I have installed emacs and m17n-edit, and I must say that these tools are way better and really helpful. I have corrected the parenthesis mistakes as pointed out by Kenichi, and am currently using m17n-edit to debug the logical errors.

It seems that the key mappings are working quite fine, however the dependent vowels are getting unhandled due to a logical error in my part. Hence, as Harshula suggested, I'm stripping the code down to the basics and reworking my way through the state definitions.

I'll be updating the github repository shortly with the appropriate changes made, and will ping back on this thread when its done.

Regards,
Sayak

On Thu, Jun 28, 2012 at 5:55 PM, Kenichi Handa <address@hidden> wrote:
In article <CANrO7TeWrWrmiHEzZ38_3+9N=PpF3f=address@hidden>, Sayak Sarkar <address@hidden> writes:

> After working on an initial MIM file for the same I've however been unable
> to validate it. I've tried working out various methods, mostly brute force
> hacks into my local system for the same, but have been unsuccessful at it.
> I would be very grateful if someone from this list could give me
> suggestions on how the MIM file can be validated.

It seems that your mim file is syntactically broken.  For
instance, "(map ..." is not correctly closed by ")".
And, see this part:

(state
 (init
   (consonant
     (set c @-1)
       (cond
           (| (< c 0x0999) (> c 0x999)  <--- (1)
             (cond
               (| (< c 0x099E) (> c 0x099E)  <--- (2)
                 (cond

I suspect that (1) and (2) lack one opening parenthesis and
one closing parenthesis.  It should be:

           ((| (< c 0x0999) (> c 0x999))
and
               ((| (< c 0x099E) (> c 0x099E))

What kind of editor are you using?  I strongly recommend
some smart editor that recognizes Lisp's s-_expression_.  The
best one is of course Emacs.  Have you noticed that most mim
files included in the m17n-db package has this comment at
the end.  It is for Emacs.

;; Local Variables:
;; coding: utf-8
;; mode: emacs-lisp
;; End:

When you open a mim file by Emacs, you can use the keys
C-M-n and C-M-p to move to the next or previous matching
parenthesis.  C-M-q at the beginning of a list re-indents
the list correctly.  So you can very easily find a
mismatching parenthesis.  Without such functionality, I
can't imagine how to write a correct mim file which contains
many many '(' and ')'.

By the way, after you fix the syntax of the mim file,
using the program m17n-edit as below will help you debugging
more logical (and thus more difficult) bug.

## put the file bn-disha.mim under ~/.m17n.d
% export MDEBUG_DATABAE=1
% export MDEBUG_INPUT=1
% m17n-edit --im bn-disha

---
Kenichi Handa
address@hidden



--
About Me:http://about.me/sayak_sarkar
Twitter: http://twitter.com/sayak_sarkar
Blog: http://sayaksarkar.wordpress.com

reply via email to

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