Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Uil(3XM) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

UilDumpSymbolTable(3XM)

uil(1)

Uil(3XM)  —  NEWS-OS Programmer’s Manual

名称

Uil - アプリケーション中から uil コンパイラを起動します。

形式

#include <uil/UilDef.h>
Uil_status_type Uil(command_desc, compile_desc, message_cb, message_data,

status_cb, status_data)

Uil_command_type ∗command_desc;
Uil_compile_desc_type ∗compile_desc;
Uil_continue_type (∗message_cb) ();
char ∗message_data;
Uil_continue_type (∗status_cb) ();
char ∗status_data;

解説

Uil 関数は、呼び出し可能な uil コンパイラのエントリポイントを提供します。 Uil の呼び出し可能なインターフェースを用いると、uil ソースファイルを処理して uid ファイルを生成するだけでなく、シンボルテーブル (パースツリー) の形の uil ソースモジュールの詳細記述が得られます。

command_descuil コマンドラインを指定します。

compile_desc計算結果を返します。

message_cbコンパイラが uil ソースファイルにエラーを発見した時のコールバック関数を指定します。

message_dataメッセージコールバック関数 (message_cb) に渡されるユーザのデータを指定します。 この引数は uil によって解釈されず、呼び出しアプリケーションが単独に用いるものであることに注意してください。

status_cbX のアプリケーションがスクリーンの更新のような X イベントをサービスすることを許すために呼び出されるコールバック関数を指定します。 この関数はいろいろなチェックポイントで呼び出され、チェックポイントは uil コンパイラの中にコーディングされています。 command_desc 中の status_update_delay という引数は、status_cb 関数が起動される前に通過するチェックポイントの数を指定します。

status_dataステータスコールバック関数 (status_cb) に渡されるユーザのデータを指定します。 この引数は uil によって解釈されず、呼び出しアプリケーションが単独に用いるものであることに注意してください。

Uil_command_type および Uil_compile_desc_type のデータ構造を以下に示します。

typedef struct Uil_command_type {

char ∗source_file; /∗ single source
char ∗resource_file; /∗ name of output file ∗/
char ∗listing_file; /∗ name of listing file ∗/
unsigned int ∗include_dir_count; /∗ number of directories in ∗/

/∗ include_dir array ∗/

char ∗((∗include_dir) []); /∗ directory to search for ∗/

/∗ include files ∗/

unsigned listing_file_flag: 1; /∗ produce a listing ∗/
unsigned resource_file_flag: 1; /∗ generate UID output ∗/
unsigned machine_code_flag: 1; /∗ generate machine code ∗/
unsigned report_info_msg_flag: 1; /∗ report info messages ∗/
unsigned report_warn_msg_flag: 1; /∗ report warnings ∗/
unsigned parse_tree_flag: 1; /∗ generate parse tree ∗/
unsigned int status_update_delay; /∗ number of times a status ∗/

/∗ point is passed before ∗/
/∗ calling status_cb function ∗/
/∗ 0 means called every time ∗/

};

typedef struct Uil_compile_desc_type {

unsigned int compiler_version; /∗ version number of compiler ∗/
unsigned int data_version; /∗ version number of structures ∗/
char ∗parse_tree_root; /∗ parse tree output ∗/
unsigned int message_count [Uil_k_max_status+1]; /∗ array of severity counts /∗
};

リターン値

この関数は、状態を示す以下の定数のうちのいずれかを返します。

Uil_k_success_status実行が成功した。

Uil_k_info_status実行が成功し、情報メッセージが返された。

Uil_k_warning_status実行が成功し、警告メッセージが返された。

Uil_k_error_statusエラーのために実行が失敗した。

Uil_k_severe_statusエラーのために実行が失敗した。

関連事項

UilDumpSymbolTable(3XM), uil(1)

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026