main.c

メイン関数(CUI コマンド) [詳細]

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "NewtCore.h"
#include "NewtBC.h"
#include "NewtVM.h"
#include "NewtParser.h"
#include "lookup_words.h"
#include "yacc.h"
#include "version.h"

ソースコードを見る。

列挙型

enum  {
  optNone = 0, optNos2, optCopyright, optVersion,
  optStaff
}
 オプション

関数

int main (int argc, const char *argv[])
 NewtonScript インタプリタ
static void newt_result_message (newtRefArg r, newtErr err)
static newtErr newt_info (int argc, const char *argv[], int n)
static newtErr newt_interpret_str (int argc, const char *argv[], int n)
static newtErr newt_interpret_file (int argc, const char *argv[], int n)
static void newt_chdir (void)
static void newt_show_copyright (void)
static void newt_show_version (void)
static void newt_show_staff (void)
static void newt_show_usage (void)
static void newt_invalid_option (char c)
static void newt_option_switchs (const char *s)
static void newt_option (const char *s)
static newtErr newt_option_with_arg (char c, int argc, const char *argv[], int n)
void yyerror (char *s)

変数

static keyword_t reserved_words []
 オプションキーワードのルックアップテーブル
static const char * newt_currdir
 作業ディレクトリ


説明

メイン関数(CUI コマンド)

作者:
M.Nukui
日付:
2003-11-07
Copyright (C) 2003-2004 M.Nukui All rights reserved.

main.c で定義されています。


関数

int main ( int  argc,
const char *  argv[] 
)

NewtonScript インタプリタ

main 関数(CUI コマンド)

引数:
argc [in] コマンドライン引数の数
argv [in] コマンドライン引数の配列
戻り値:
エラーコード

main.c404 行で定義されています。

参照先 kNErrNonenewt_currdirnewt_interpret_file()newt_option()newt_option_switchs()newt_option_with_arg().

関数の呼び出しグラフ:

void newt_chdir ( void   )  [static]

作業ディレクトリを変更

main.c208 行で定義されています。

参照先 newt_currdir.

参照元 newt_info()newt_interpret_file()newt_interpret_str().

newtErr newt_info ( int  argc,
const char *  argv[],
int  n 
) [static]

コマンドライン引数で指定された関数の情報を表示

引数:
argc [in] コマンドライン引数の数
argv [in] コマンドライン引数の配列
n [in] コマンドライン引数の位置
戻り値:
エラーコード

main.c120 行で定義されています。

参照先 kNErrNonenewt_chdir()NewtCleanup()NewtErrMessage()NewtInit()NVMInfo().

参照元 newt_option_with_arg().

関数の呼び出しグラフ:

newtErr newt_interpret_file ( int  argc,
const char *  argv[],
int  n 
) [static]

ファイルをインタプリタ実行する

引数:
argc [in] コマンドライン引数の数
argv [in] コマンドライン引数の配列
n [in] コマンドライン引数の位置
戻り値:
エラーコード

main.c183 行で定義されています。

参照先 newt_chdir()newt_result_message()NewtCleanup()NewtInit()NVMInterpretFile().

参照元 main().

関数の呼び出しグラフ:

newtErr newt_interpret_str ( int  argc,
const char *  argv[],
int  n 
) [static]

コマンドライン引数で指定された文字列をインタプリタ実行する

引数:
argc [in] コマンドライン引数の数
argv [in] コマンドライン引数の配列
n [in] コマンドライン引数の位置
戻り値:
エラーコード

main.c158 行で定義されています。

参照先 newt_chdir()newt_result_message()NewtCleanup()NewtInit()NVMInterpretStr().

参照元 newt_option_with_arg().

関数の呼び出しグラフ:

void newt_invalid_option ( char  c  )  [static]

オプションエラーを表示

引数:
c [in] オプション文字
戻り値:
なし

main.c258 行で定義されています。

参照元 newt_option_switchs().

void newt_option ( const char *  s  )  [static]

オプション文字列の解析

引数:
s [in] オプション文字列
戻り値:
なし

main.c327 行で定義されています。

参照先 lookup_words()NEWT_MODE_NOS2newt_show_copyright()newt_show_staff()newt_show_version()reserved_words.

参照元 main().

関数の呼び出しグラフ:

void newt_option_switchs ( const char *  s  )  [static]

オプションスイッチの解析

引数:
s [in] オプションスイッチ
戻り値:
なし

main.c272 行で定義されています。

参照先 NEWT_DEBUGNEWT_DUMPBCNEWT_DUMPLEXNEWT_DUMPSYNTAXnewt_invalid_option()newt_show_usage()newt_show_version()NEWT_TRACE.

参照元 main().

関数の呼び出しグラフ:

newtErr newt_option_with_arg ( char  c,
int  argc,
const char *  argv[],
int  n 
) [static]

オプションの引数を解析する

引数:
c [in] オプション文字
argc [in] コマンドライン引数の数
argv [in] コマンドライン引数の配列
n [in] コマンドライン引数の位置
戻り値:
エラーコード

main.c372 行で定義されています。

参照先 kNErrNonenewt_info()newt_interpret_str().

参照元 main().

関数の呼び出しグラフ:

void newt_result_message ( newtRefArg  r,
newtErr  err 
) [static]

結果を表示

引数:
r [in] オブジェクト
err [in] エラーコード
戻り値:
なし

main.c100 行で定義されています。

参照先 kNErrNonekNewtRefNILNEWT_DEBUGNewtErrMessage()NsPrint().

参照元 newt_interpret_file()newt_interpret_str().

関数の呼び出しグラフ:

void newt_show_copyright ( void   )  [static]

コピーライトを表示

main.c220 行で定義されています。

参照先 NEWT_COPYRIGHTNEWT_NAME.

参照元 newt_option().

void newt_show_staff ( void   )  [static]

スタッフ情報を表示

main.c235 行で定義されています。

参照先 NEWT_NAMENEWT_PROTONEWT_STAFFNEWT_VERSION.

参照元 newt_option().

void newt_show_usage ( void   )  [static]

使用法を表示

main.c243 行で定義されています。

参照先 NEWT_NAMENEWT_PARAMSNEWT_USAGE.

参照元 newt_option_switchs().

void newt_show_version ( void   )  [static]

バージョン情報を表示

main.c227 行で定義されています。

参照先 NEWT_BUILDNEWT_NAMENEWT_PROTONEWT_VERSION.

参照元 newt_option()newt_option_switchs().

void yyerror ( char *  s  ) 

パーサエラー

引数:
s [in] エラーメッセージ文字列
戻り値:
なし

main.c460 行で定義されています。

参照先 NPSErrorStr().

参照元 NPSError()NPSGenNode2().

関数の呼び出しグラフ:


変数

keyword_t reserved_words[] [static]

初期値:

 {
        
        {"copyright",   optCopyright},
        {"newton",      optNos2},
        {"nos2",        optNos2},
        {"staff",       optStaff},
        {"version",     optVersion},
    }
オプションキーワードのルックアップテーブル

main.c43 行で定義されています。

参照元 newt_option().


NEWT/0に対してThu Nov 23 16:52:05 2006に生成されました。  doxygen 1.5.0