Translations of this page:

SEATMLとは

SEATによるスクリプトを記述するための記述形式です。 以下のように定義されています。

BNFによる定義

script ::= xmlfile+
xmlfile ::= xmlheader xmlcontent
xmlheader ::= '<?xml' (sp xmlheaderopt)* sp? '?>'
xmlheaderopt ::= xmlversion | xmlencoding
xmlversion ::= 'version' sp? eq sp? number
xmlencoding ::= 'encoding' sp? eq sp? string
xmlcontent ::= '<seatml>' seatgeneral? | seatmode* '</seatml>'
seatgeneral ::= '<general>' adaptorsetting+ '</general>'
adaptorsetting ::= '<'adaptorname (sp adaptoropt)* sp? '/>'
adaptorname ::= 'julian' | 'agent' | 'python'
adaptoropt ::= hostsetting | portsetting | codesetting
hostsetting ::= 'host' sp? eq sp? string
portsetting ::= 'port' sp? eq sp? number
codesetting ::= 'code' sp? eq sp? string
seatmode ::= '<state' (sp stateopt)* '>' rule+ '</state>'
stateopt ::= namesetting | dictsetting
namesetting ::= 'name' sp? eq sp? string
dictsetting ::= 'dict' sp? eq sp? string
rule ::= key+ command+ transition?
key ::= '<key>' string '</key>'
command ::= '<command' (sp commandopt)* '>' string '</command>'
commandopt ::= ('host' | 'type' | 'func') sp? eq sp? string
transition ::= '<statetransition>' string '</statetransition>'
eq ::= '='
string ::= [a-zA-z][0-9a-zA-z]*
number ::= -?[0-9]+

日本語での説明

スクリプトは、1つもしくは複数のxmlファイルからなる。
xmlファイルは、xmlヘッダとxml本体からなり、xmlヘッダにはバージョン情報とエンコーディング情報を書くことができる。
xml本体は、アダプタ設定と状態設定からなる。
アダプタ設定には、julian, agent, python設定を書くことができ、それぞれホスト名、ポート名、エンコーディング情報を書くことができる。
状態設定は、辞書設定とルール設定からなる。
ルール設定は、キーワード設定とコマンド設定と状態遷移設定からなる。

サンプル

SEATMLにより記述されたスクリプトの例を以下に示す。

<?xml version="1.0" encoding="UTF-8"?>
<general>
  <julian host="localhost" port="9000" code="EUC-JP"/>
  <agent name="talk" host="localhost" port="11000"/>
</general>
<state name="OPEN" dict="DICT/OPEN">
  <rule>
    <key>こんにちは</key>
    <command host="talk">Op1</command>
  </rule>
  <rule>
    <key>おはよう</key>
    <command host="talk">Op2</command>
  </rule>
</state>

スクリプトの詳細についてはSEATユーザマニュアルを参照してください。

seat/seatml.txt · 最終更新: 2011/04/16 14:22 (外部編集)
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0