annotate src/libguess/guess.scm @ 3532:7532ab3d25e5 trunk

Automated merge with ssh://hg.atheme-project.org//hg/audacious
author Jonathan Schleifer <js@h3c.de>
date Sat, 15 Sep 2007 10:54:23 +0200
parents b474ecb5bde4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2 ;;; This code is derivative of guess.c of Gauche-0.8.7.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3 ;;; The following is the original copyright notice.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 ;;; Auxiliary script to generate japanese code guessing table
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 ;;; Copyright (c) 2000-2003 Shiro Kawai, All rights reserved.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 ;;; Redistribution and use in source and binary forms, with or without
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 ;;; modification, are permitted provided that the following conditions
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 ;;; are met:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15 ;;; 1. Redistributions of source code must retain the above copyright
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 ;;; notice, this list of conditions and the following disclaimer.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 ;;; 2. Redistributions in binary form must reproduce the above copyright
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19 ;;; notice, this list of conditions and the following disclaimer in the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20 ;;; documentation and/or other materials provided with the distribution.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
22 ;;; 3. Neither the name of the authors nor the names of its contributors
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 ;;; may be used to endorse or promote products derived from this
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 ;;; software without specific prior written permission.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 ;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 ;;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 ;;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29 ;;; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
30 ;;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 ;;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32 ;;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 ;;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34 ;;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
36 ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 ;;; $Id: guess.scm,v 1.3 2003/07/05 03:29:10 shirok Exp $
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
41 (use srfi-1)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
42 (use gauche.sequence)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
43
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
44 ;; This is a simple state machine compiler.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
45 ;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
46 ;; <state-machine> : (define-dfa <name> <state> ...)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
47 ;; <state> : (<name> (<input-set> <next-state> <score>) ...)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
48 ;; <name> : symbol
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
49 ;; <next-state> : symbol
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50 ;; <score> : real
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
51 ;; <input-set> : (<byte-or-range> ...)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
52 ;; <byte-or-range> : <byte> | (<byte> <byte>)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
53 ;; <byte> : integer between 0 and #xff | ASCII char
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
54 ;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
55 ;; When evaluated, the DFA generates a state transition table in
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
56 ;; C source format.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
57
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
58 (define-class <dfa> ()
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
59 ((name :init-keyword :name :accessor name-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
60 (states :init-keyword :states :accessor states-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61 (instances :allocation :class :init-value '())))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63 (define-class <state> ()
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
64 ((name :init-keyword :name :accessor name-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65 (index :init-keyword :index :accessor index-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 (arcs :init-keyword :arcs :accessor arcs-of :init-value '())))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
68 (define-class <arc> ()
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69 ((from-state :init-keyword :from-state :accessor from-state-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
70 (to-state :init-keyword :to-state :accessor to-state-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
71 (ranges :init-keyword :ranges :accessor ranges-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
72 (index :init-keyword :index :accessor index-of)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
73 (score :init-keyword :score :accessor score-of)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
74
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
75 ;; Create DFA
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
76
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
77 (define-syntax define-dfa
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
78 (syntax-rules ()
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
79 ((_ name . states)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
80 (define name (make <dfa>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
81 :name 'name
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
82 :states (resolve-states 'states))))))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
83
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
84 (define-method initialize ((self <dfa>) initargs)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
85 (next-method)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
86 (slot-push! self 'instances self))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
88 (define (all-dfas) (reverse (class-slot-ref <dfa> 'instances)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
89
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
90 (define (resolve-states state-defs)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
91 (let ((states (map (lambda (d i) (make <state> :name (car d) :index i))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
92 state-defs
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
93 (iota (length state-defs)))))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
94 (fold (lambda (s d i)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
95 (let1 num-arcs (length (cdr d))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
96 (set! (arcs-of s)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
97 (map (lambda (arc aindex)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
98 (make <arc>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
99 :from-state s
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
100 :to-state (or (find (lambda (e)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
101 (eq? (name-of e) (cadr arc)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
102 states)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
103 (error "no such state" (cadr arc)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
104 :ranges (car arc)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
105 :index aindex
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
106 :score (caddr arc)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
107 (cdr d)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
108 (iota num-arcs i)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
109 (+ i num-arcs)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
110 0
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
111 states state-defs)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
112 states))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
113
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
114 ;; Emit state table
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
115 (define (emit-dfa-table dfa)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
116 (format #t "static signed char guess_~a_st[][256] = {\n" (name-of dfa))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
117 (for-each emit-state-table (states-of dfa))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
118 (print "};\n")
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
119 (format #t "static guess_arc guess_~a_ar[] = {\n" (name-of dfa))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
120 (for-each emit-arc-table
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
121 (append-map arcs-of (states-of dfa)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
122 (print "};\n")
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
123 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
124
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
125 (define (emit-state-table state)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
126 (define (b2i byte) ;byte->integer
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
127 (if (char? byte) (char->integer byte) byte))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
128 (let1 arc-vec (make-vector 256 -1)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
129 (dolist (br (arcs-of state))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
130 (dolist (range (ranges-of br))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
131 (if (pair? range)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
132 (vector-fill! arc-vec (index-of br)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
133 (b2i (car range)) (+ (b2i (cadr range)) 1))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
134 (set! (ref arc-vec (b2i range)) (index-of br)))))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
135 (format #t " { /* state ~a */" (name-of state))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
136 (dotimes (i 256)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
137 (when (zero? (modulo i 16)) (newline))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
138 (format #t " ~2d," (ref arc-vec i)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
139 (print "\n },")
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
140 ))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
141
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
142 (define (emit-arc-table arc)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
143 (format #t " { ~2d, ~5s }, /* ~a -> ~a */\n"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
144 (index-of (to-state-of arc))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
145 (score-of arc)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
146 (name-of (from-state-of arc))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
147 (name-of (to-state-of arc))))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
148 ;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
149 ;; main
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
150 ;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
151
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
152 (define (main args)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
153 (unless (= (length args) 2)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
154 (error "usage: ~a <outout-file.c>" (car args)))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
155 (with-output-to-file (cadr args)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
156 (lambda ()
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
157 (print "/* State transition table for character code guessing */")
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
158 (print "/* This file is automatically generated by guess.scm */")
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
159 (newline)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
160 (for-each emit-dfa-table (all-dfas))))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
161 0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
162
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
163 ;;;============================================================
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
164 ;;; DFA definitions
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
165 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
166
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
167 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
168 ;;; EUC-JP
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
169 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
170
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
171 (define-dfa eucj
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
172 ;; first byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
173 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
174 (((#x00 #x7f)) init 1.0) ; ASCII range
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
175 ((#x8e) jis0201_kana 0.8) ; JISX 0201 kana
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
176 ((#x8f) jis0213_2 0.95) ; JISX 0213 plane 2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
177 (((#xa1 #xfe)) jis0213_1 1.0) ; JISX 0213 plane 1
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
178 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
179 ;; jis x 0201 kana
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
180 (jis0201_kana
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
181 (((#xa1 #xdf)) init 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
182 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
183 ;; jis x 0208 and jis x 0213 plane 1
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
184 (jis0213_1
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
185 (((#xa1 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
186 ;; jis x 0213 plane 2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
187 (jis0213_2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
188 (((#xa1 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
189 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
190
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
191 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
192 ;;; Shift_JIS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
193 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
194
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
195 (define-dfa sjis
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
196 ;; first byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
197 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
198 (((#x00 #x7f)) init 1.0) ;ascii
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
199 (((#x81 #x9f) (#xe1 #xef)) jis0213 1.0) ;jisx0213 plane 1
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
200 (((#xa1 #xdf)) init 0.8) ;jisx0201 kana
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
201 (((#xf0 #xfc)) jis0213 0.95) ;jisx0213 plane 2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
202 (((#xfd #xff)) init 0.8)) ;vendor extension
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
203 (jis0213
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
204 (((#x40 #x7e) (#x80 #xfc)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
205 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
206
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
207 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
208 ;;; UTF-8
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
209 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
210
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
211 (define-dfa utf8
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
212 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
213 (((#x00 #x7f)) init 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
214 (((#xc2 #xdf)) 1byte_more 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
215 (((#xe0 #xef)) 2byte_more 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
216 (((#xf0 #xf7)) 3byte_more 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
217 (((#xf8 #xfb)) 4byte_more 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
218 (((#xfc #xfd)) 5byte_more 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
219 (1byte_more
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
220 (((#x80 #xbf)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
221 (2byte_more
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
222 (((#x80 #xbf)) 1byte_more 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
223 (3byte_more
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
224 (((#x80 #xbf)) 2byte_more 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
225 (4byte_more
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
226 (((#x80 #xbf)) 3byte_more 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
227 (5byte_more
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
228 (((#x80 #xbf)) 4byte_more 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
229 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
230
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
231 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
232 ;;; UCS-2LE
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
233 ;;;
2559
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
234 ; (define-dfa ucs2le
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
235 ; (init
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
236 ; ((#xff) le 1.0)
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
237 ; (((#x00 #x7f)) ascii 1.0)
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
238 ; (((#x00 #xff)) multi 1.0))
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
239 ; (le
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
240 ; ((#xfe) init 1.0))
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
241 ; (ascii
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
242 ; ((#x00) init 1.0))
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
243 ; (multi
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
244 ; (((#x00 #xff)) init 1.0)))
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
245
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
246 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
247 ;;; UCS-2BE
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
248 ;;;
2559
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
249 ; (define-dfa ucs2be
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
250 ; (init
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
251 ; ((#xfe) be 1.0)
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
252 ; ((#x00) ascii 1.0)
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
253 ; (((#x00 #xff)) multi 1.0))
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
254 ; (be
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
255 ; ((#xff) init 1.0))
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
256 ; (ascii
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
257 ; (((#x00 #x7f)) init 1.0))
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
258 ; (multi
b474ecb5bde4 [svn] revise str_to_utf8():
yaz
parents: 2313
diff changeset
259 ; (((#x00 #xff)) init 1.0)))
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
260
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
261
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
262 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
263 ;;; JIS (ISO2022JP)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
264 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
265
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
266 ;; NB: for now, we just check the sequence of <ESC> $ or <ESC> '('.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
267 '(define-dfa jis
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
268 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
269 ((#x1b) esc 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
270 (((#x00 #x1a) (#x1c #x1f)) init 1.0) ;C0
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
271 (((#x20 #x7f)) init 1.0) ;ASCII
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
272 (((#xa1 #xdf)) init 0.7) ;JIS8bit kana
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
273 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
274 (esc
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
275 ((#x0d #x0a) init 0.9) ;cancel
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
276 ((#\( ) esc-paren 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
277 ((#\$ ) esc-$ 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
278 ((#\& ) esc-& 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
279 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
280 (esc-paren
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
281 ((#\B #\J #\H) init 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
282 ((#\I) jis0201kana 0.8)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
283 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
284 (esc-$
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
285 ((#\@ #\B) kanji 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
286 ((#\( ) esc-$-paren 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
287 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
288 (esc-$-paren
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
289 ((#\D #\O #\P) kanji 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
290 (esc-&
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
291 ((#\@ ) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
292 (jis0201kana
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
293 ((#x1b) esc 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
294 (((#x20 #x5f)) jis0201kana 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
295 (kanji
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
296 ((#x1b) esc 1.0)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
297 (((#x21 #x7e)) kanji-2 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
298 (kanji-2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
299 (((#x21 #x7e)) kanji 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
300 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
301
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
302 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
303 ;;; Big5
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
304 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
305
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
306 (define-dfa big5
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
307 ;; first byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
308 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
309 (((#x00 #x7f)) init 1.0) ;ascii
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
310 (((#xa1 #xfe)) 2byte 1.0) ;big5-2byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
311 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
312 (2byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
313 (((#x40 #x7e) (#xa1 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
314 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
315
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
316 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
317 ;;; GB2312 (EUC-CN?)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
318 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
319
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
320 (define-dfa gb2312
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
321 ;; first byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
322 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
323 (((#x00 #x7f)) init 1.0) ;ascii
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
324 (((#xa1 #xfe)) 2byte 1.0) ;gb2312 2byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
325 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
326 (2byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
327 (((#xa1 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
328 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
329
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
330 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
331 ;;; GB18030
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
332 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
333
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
334 (define-dfa gb18030
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
335 ;; first byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
336 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
337 (((#x00 #x80)) init 1.0) ;ascii
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
338 (((#x81 #xfe)) 2byte 1.0) ;gb18030 2byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
339 (((#x81 #xfe)) 4byte2 1.0) ;gb18030 2byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
340 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
341 (2byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
342 (((#x40 #x7e) (#x80 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
343 (4byte2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
344 (((#x30 #x39)) 4byte3 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
345 (4byte3
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
346 (((#x81 #xfe)) 4byte4 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
347 (4byte4
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
348 (((#x30 #x39)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
349 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
350
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
351 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
352 ;;; EUC-KR
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
353 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
354
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
355 (define-dfa euck
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
356 ;; first byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
357 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
358 (((#x00 #x7f)) init 1.0) ; ASCII range
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
359 (((#xa1 #xfe)) ks1001 1.0) ; KSX 1001
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
360 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
361 ;; ks x 1001
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
362 (ks1001
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
363 (((#xa1 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
364 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
365
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
366 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
367 ;;; Johab
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
368 ;;;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
369
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
370 (define-dfa johab
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
371 ;; first byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
372 (init
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
373 (((#x00 #x7f)) init 1.0) ; ASCII range
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
374 (((#x84 #xd3)) jamo51 1.0) ; jamo51
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
375 (((#xd8 #xde) (#xe0 #xf9)) jamo42 0.95) ; jamo42
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
376 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
377 ;; second byte
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
378 (jamo51
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
379 (((#x41 #x7e) (#x81 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
380 (jamo42
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
381 (((#x31 #x7e) (#x91 #xfe)) init 1.0))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
382 )
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
383