| version 1.8, 2000/01/19 18:31:33 |
version 1.10, 2000/03/10 12:24:38 |
|
|
| # Author: 小原功任 @ 金沢大学理学部計算科学教室 |
# Author: 小原功任 @ 金沢大学理学部計算科学教室 |
| # URI: http://omega.s.kanazawa-u.ac.jp/ohara/ |
# URI: http://omega.s.kanazawa-u.ac.jp/ohara/ |
| # $OpenXM: OpenXM/src/ox_toolkit/README,v 1.7 2000/01/14 10:23:34 ohara Exp $ |
# $OpenXM: OpenXM/src/ox_toolkit/README,v 1.9 2000/01/20 17:18:55 ohara Exp $ |
| |
|
| /*&ja ox_toolkit ユーザガイド |
/*&ja ox_toolkit ユーザガイド |
| |
|
| Line 25 In order to use libox.a, you need to include the follo |
|
| Line 25 In order to use libox.a, you need to include the follo |
|
| */ |
*/ |
| /*&common |
/*&common |
| |
|
| #include <oxtag.h> |
#include <ox_toolkit.h> |
| #include <ox.h> |
|
| #include <parse.h> |
|
| |
|
| */ |
*/ |
| /*&ja |
/*&ja |
| Line 42 In order to use libox.a, you need to include the follo |
|
| Line 40 In order to use libox.a, you need to include the follo |
|
| 1. Types |
1. Types |
| |
|
| 1.1 CMO (Common Math Object) |
1.1 CMO (Common Math Object) |
| The following structures are defined in ox.h: |
The following structures are defined in ox_toolkit.h: |
| */ |
*/ |
| /*&common |
/*&common |
| |
|
|
|
| */ |
*/ |
| /*&en |
/*&en |
| 1.2 OX objects |
1.2 OX objects |
| The following structures are defined in ox.h: |
The following structures are defined in ox_toolkit.h: |
| */ |
*/ |
| /*&common |
/*&common |
| |
|
| Line 222 void ox_push_cmd(ox_file_t sv, int sm_code); |
|
| Line 220 void ox_push_cmd(ox_file_t sv, int sm_code); |
|
| */ |
*/ |
| /*&en |
/*&en |
| ox_push_cmd() sends an operation code to an OpenXM stack machine. |
ox_push_cmd() sends an operation code to an OpenXM stack machine. |
| See OpenXM/src/ox_toolkit/oxtag.h for a list of operation codes. |
See OpenXM/include/ox_toolkit_tags.h for a list of operation codes. |
| |
|
| */ |
*/ |
| /*&ja |
/*&ja |
| Line 424 receive_ox_tag() reads a tag and a serial number of an |
|
| Line 422 receive_ox_tag() reads a tag and a serial number of an |
|
| */ |
*/ |
| /*&common |
/*&common |
| |
|
| 4.6 |
4.6 Sending OX messages. |
| |
|
| */ |
*/ |
| /*&common |
/*&common |
| Line 434 void send_ox_command(int fd, int sm_command); |
|
| Line 432 void send_ox_command(int fd, int sm_command); |
|
| |
|
| */ |
*/ |
| /*&ja |
/*&ja |
| ox メッセージを送信する。 |
OX メッセージを送信する。 |
| */ |
*/ |
| |
|
| /*&ja |
/*&ja |
|
|
| 5. OX expression パーサ |
5. OX expression パーサ |
| |
|
| */ |
*/ |
| |
/*&en |
| |
|
| |
5. Parser for OX expressions |
| |
|
| |
*/ |
| /*&ja |
/*&ja |
| OpenXM C library には 文字列表現された |
OpenXM C library には 文字列表現された OX expression および CMO |
| OX expression および CMO expression から、 |
expression から、ox 構造体または cmo 構造体を生成するためのパーサが付 |
| ox 構造体または cmo 構造体を生成するためのパーサが付属している。 |
属している。ここではこのパーサについて説明する。 |
| |
*/ |
| |
/*&en |
| |
We have a parser which generate an OX object or a CMO from a string |
| |
encoded OX/CMO expression. In this section, we explain the parser. |
| |
*/ |
| |
/*&en |
| |
|
| ここではこのパーサについて説明する。 |
5.1 Setting an option |
| |
*/ |
| |
/*&ja |
| |
|
| |
5.1 オプション |
| */ |
*/ |
| /*&common |
/*&common |
| |
|
| int setflag_parse(int flag); |
int setflag_parse(int flag); |
| |
|
| */ |
*/ |
| /*&ja |
/*&ja |
| setflag_parse(PFLAG_ADDREV) によって、CMO の短縮表現を許す。 |
setflag_parse(PFLAG_ADDREV) によって、CMO の短縮表現を許す。 |
| |
*/ |
| |
/*&en |
| |
We set an option for the parser. If we call |
| |
setflag_parse(PFLAG_ADDREV), then the parser admits external |
| |
expressios. |
| |
*/ |
| |
/*&en |
| |
|
| |
5.2 Initializing |
| */ |
*/ |
| |
/*&ja |
| |
|
| |
5.2 初期化 |
| |
*/ |
| /*&common |
/*&common |
| |
|
| int init_parser(char *str); |
int init_parser(char *str); |
| |
|
| */ |
*/ |
| /*&ja |
/*&ja |
| パーサが処理すべき文字列をセットする。 |
パーサが処理すべき文字列をセットする。 |
| |
*/ |
| |
/*&en |
| |
We give the parser an OX/CMO expression, that is, a Lisp style string. |
| |
*/ |
| |
/*&en |
| |
|
| |
5.3 Getting an object |
| */ |
*/ |
| |
/*&ja |
| |
|
| |
5.3 結果を得る |
| |
*/ |
| /*&common |
/*&common |
| |
|
| cmo *parse(); |
cmo *parse(); |
| |
|
| */ |
*/ |
|
|
| Lisp 表現による OX expression, CMO expression の構文解析器。あらかじめ |
Lisp 表現による OX expression, CMO expression の構文解析器。あらかじめ |
| 設定された文字列を解析して ox 構造体、あるいは cmo 構造体を生成する。 |
設定された文字列を解析して ox 構造体、あるいは cmo 構造体を生成する。 |
| */ |
*/ |
| |
/*&en |
| |
The parser returns an OX/CMO object. If the given string is illegal, |
| |
then the parser returns NULL. |
| |
*/ |
| /*&ja |
/*&ja |
| |
|
| 7. 付属プログラムについて |
7. 付属プログラムについて |
|
|
| A byte code encoder. It shows a byte stream which corresponds to an |
A byte code encoder. It shows a byte stream which corresponds to an |
| OX expression. |
OX expression. |
| |
|
| |
*/ |
| /*&common |
/*&common |
| ox_Xsample |
ox_Xsample |
| |
|