File: protocol.txt

package info (click to toggle)
anthy 9100h-24
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 28,004 kB
  • ctags: 3,258
  • sloc: ansic: 26,140; sh: 8,573; lisp: 1,264; makefile: 205
file content (130 lines) | stat: -rw-r--r-- 2,906 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
EGG Ȥ̿Υץȥ
 anthy-agentޥɤ--eggץꤷƵư뤳ȤѲǽǤ


	greeting = server-name " (" version ") " options " :" string CRLF
	server-name = string
	version = 1*(DIGIT)
	options = "[" string 1*(", " string ) "]"

Command Semantics and Syntax

	context-desc = 1*( DIGIT)
		; context descriptor

	seg-no  = 1*(DIGIT)
		; segment number (0 origin)

	candidate-offset = 1*(DIGIT)

	max-candidates = 1*(DIGIT)

	cand-no = 1*(DIGIT)
		; candidate number (0 origin)

	string = 1*<any CHAR excluding control characters>

	error = "-ERR" SP error-code SP string CRLF

	error-code = 1*( DIGIT )

	success-with-number = "+OK" SP number CRLF

	number = 1*( DIGIT )

	success = "+OK" CRLF

	segments = "+DATA" SP seg-no SP number-of-segments-removed SP
		   number-of-segments-inserted CRLF
		   1*( number-of-candidates SP converted SP yomi CRLF )
		   CRLF

	number-of-replaced = 1*( DIGIT )

	offset = 1*( DIGIT )

	number-of-segments = 1*( DIGIT )

	converted = string

	yomi = string

	candidates = "+DATA" SP offset SP number-of-candidates CRLF
		   1*( converted CRLF )
		   CRLF

	number-of-candidates = 1*( DIGIT )


1. ƥ
  Command:
	command-new-context = "NEW-CONTEXT" parameters CRLF
	parameters = *( SP expression )
		   ; e.g. : Encoding specification, etc.
	expression = var "=" value
	var = 1*(ALPHA) 1*(ALPHA / DIGIT)
	value = string
		   ; INPUT=UTF-8 OUTPUT=UTF-8
		   ; INPUT=#106 OUTPUT=#106
		   ; INPUT=EUC-JP OUTPUT=EUC-JP
		   ; INPUT=#18 OUTPUT=#18

  Reply:
	reply-of-new-context = error
			     / success-with-number
			     ; number: context-descriptor

2. ƥȲ
  Command:
	command-release-context = "RELEASE-CONTEXT" SP context-desc CRLF

  Reply:
	reply-of-release-context = error / success

3. Ѵ
  Command:
	command-convert = "CONVERT" SP context-desc SP input CRLF
	input = string

  Reply:
	reply-of-convert = error / segments

4. Ѵ̥ߥå/󥻥
  Command:
	command-commit-or-cancel = "COMMIT" SP context-desc SP do-cancel CRLF
	do-cancel = "0" / "1"
		  ;  0 ΤȤꡣ¾ΤȤ󥻥롣
  Reply:
	reply-of-commit-or-cancel = error / success

5.
  Command:
	command-get-candidates = "GET-CANDIDATES" SP context-desc SP
			          seg-no SP candidate-offset SP
				  max-candidates CRLF

  Reply:
	reply-of-get-candidates = error / candidates

6. 
  Command:
	command-select-candidate = "SELECT-CANDIDATE" SP context-desc SP
				   seg-no SP cand-no CRLF
  Reply:
	reply-of-select-candidate = error / success / segments

7. ʸ῭
  Command:
	command-resize-segment = "RESIZE-SEGMENT" SP context-desc SP
				  seg-no SP inc-dec CRLF
	inc-dec = "0" / "1"
		; "0" means increment, while "1" means decrement
  Reply:
	reply-of-resize-segment = error / segments

8. λ
  Command:
	command-quit = "QUIT" CRLF
  Reply:
	no reply, connection will be closed by server.
--