|
From: | Sayak Sarkar |
Subject: | Re: [m17n-list] m17n Based Visual Input System: bn-disha |
Date: | Fri, 29 Jun 2012 12:59:31 +0530 |
In article <CANrO7TeWrWrmiHEzZ38_3+9N=PpF3f=address@hidden>, Sayak Sarkar <address@hidden> writes:It seems that your mim file is syntactically broken. For
> 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.
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
[Prev in Thread] | Current Thread | [Next in Thread] |