#include <stdlib.h>
#include <string.h>
#include "NewtParser.h"
#include "NewtErrs.h"
#include "NewtMem.h"
#include "NewtObj.h"
#include "NewtEnv.h"
#include "NewtFns.h"
#include "NewtVM.h"
#include "NewtIO.h"
#include "NewtPrint.h"
#include "yacc.h"
NewtParser.c で定義されています。
| int nps_yyinput | ( | FILE * | yyin, | |
| char * | buff, | |||
| int | max_size | |||
| ) |
構文解析するデータを取出す
| yyin | [in] 入力ファイル | |
| buff | [out]バッファ | |
| max_size | [in] 最大長 |
NewtParser.c の 120 行で定義されています。
参照先 nps_inputdata_t::data・nps_inputdata・nps_yyinput_str().
関数の呼び出しグラフ:

| int nps_yyinput_str | ( | char * | buff, | |
| int | max_size | |||
| ) | [static] |
構文解析するデータを文字列から取出す
| buff | [out]バッファ | |
| max_size | [in] 最大長 |
NewtParser.c の 93 行で定義されています。
参照先 nps_inputdata_t::currp・nps_inputdata_t::limit・nps_inputdata.
参照元 nps_yyinput().
| newtRef NPSAddARef | ( | newtRefArg | r, | |
| newtRefArg | v | |||
| ) |
バイナリオブジェクトの最後にデータを追加
| r | [in] バイナリオブジェクト | |
| v | [in] 追加するデータ |
NewtParser.c の 968 行で定義されています。
参照先 NewtBinaryLength()・NewtBinarySetLength()・NewtSetARef().
関数の呼び出しグラフ:

| newtRef NPSAddArraySlot | ( | newtRefArg | r, | |
| newtRefArg | v | |||
| ) |
配列オブジェクトの最後にオブジェクトを追加する
| r | [in] 配列オブジェクト | |
| v | [in] 追加するオブジェクト |
NewtParser.c の 831 行で定義されています。
参照先 NcAddArraySlot().
関数の呼び出しグラフ:

| void NPSBindParserInput | ( | const char * | s | ) | [static] |
構文解析する文字列をセットする
| s | [in] 文字列 |
NewtParser.c の 73 行で定義されています。
参照先 nps_inputdata_t::currp・nps_inputdata_t::data・nps_inputdata_t::limit・nps_inputdata.
参照元 NPSParseStr().
| void NPSCleanup | ( | void | ) |
構文解析の後始末
NewtParser.c の 263 行で定義されています。
参照先 NewtStackFree()・nps_stree.
参照元 NBCCompileFile()・NBCCompileStr()・NPSParse()・NVMInterpret2().
関数の呼び出しグラフ:

| void NPSDumpSyntaxTree | ( | FILE * | f, | |
| nps_syntax_node_t * | stree, | |||
| uint32_t | size | |||
| ) |
構文木をダンプする
| f | [in] 出力ファイル | |
| stree | [in] 構文木 | |
| size | [in] 構文木のサイズ |
NewtParser.c の 414 行で定義されています。
参照先 nps_syntax_node_t::code・kNPSAdd・kNPSFreqFunc・kNPSPopHandlers・NewtFprintf()・NPSPrintNode()・NPSPrintSyntaxCode()・NVMDumpInstName()・nps_syntax_node_t::op1・nps_syntax_node_t::op2.
参照元 NPSParse().
関数の呼び出しグラフ:

| void NPSError | ( | int32_t | err | ) |
構文エラー
| err | [in] エラーコード |
NewtParser.c の 1022 行で定義されています。
参照先 yyerror().
参照元 NPSGenOP1()・NPSGenOP2().
関数の呼び出しグラフ:

| void NPSErrorStr | ( | char | c, | |
| char * | s | |||
| ) |
エラーメッセージの表示
| c | [in] エラー種別 | |
| s | [in] エラーメッセージ |
NewtParser.c の 990 行で定義されています。
参照先 nps_env_t::fname・nps_env_t::linebuf・nps_env_t::lineno・NewtFprintf()・nps_env・nps_env_t::numerrs・nps_env_t::numwarns・nps_env_t::tokenpos・nps_env_t::yyleng.
参照元 yyerror().
関数の呼び出しグラフ:

| nps_node_t NPSGenForeach | ( | nps_node_t | index, | |
| nps_node_t | val, | |||
| nps_node_t | obj, | |||
| nps_node_t | deeply, | |||
| nps_node_t | op, | |||
| nps_node_t | expr | |||
| ) |
FOREACH 文のオペノードを作成
| index | [in] インデックス変数 | |
| val | [in] 値を格納する変数 | |
| obj | [in] ループの対象となるオブジェクト | |
| deeply | [in] deeply フラグ | |
| op | [in] オペレーション種別(DO or COLLECT) | |
| expr | [in] 繰り返し式 |
NewtParser.c の 739 行で定義されています。
参照先 kNewtRefUnbind・NewtMakeArray()・NewtSetArraySlot()・NPSGenNode2().
関数の呼び出しグラフ:

| nps_node_t NPSGenForLoop | ( | nps_node_t | index, | |
| nps_node_t | v, | |||
| nps_node_t | to, | |||
| nps_node_t | by, | |||
| nps_node_t | expr | |||
| ) |
FOR 文のオペノードを作成
| index | [in] インデックス変数 | |
| v | [in] 初期値 | |
| to | [in] 終了値 | |
| by | [in] ステップ値 | |
| expr | [in] 繰り返し式 |
NewtParser.c の 711 行で定義されています。
参照先 kNewtRefUnbind・NewtMakeArray()・NewtSetArraySlot()・NPSGenNode2().
関数の呼び出しグラフ:

| nps_node_t NPSGenGlobalFn | ( | nps_node_t | name, | |
| nps_node_t | args, | |||
| nps_node_t | expr | |||
| ) |
グローバル関数のオペノードを作成
| name | [in] 関数名 | |
| args | [in] 関数の引数 | |
| expr | [in] 実行式 |
NewtParser.c の 765 行で定義されています。
参照先 NPSGenNode2().
関数の呼び出しグラフ:

| nps_node_t NPSGenIfThenElse | ( | nps_node_t | cond, | |
| nps_node_t | ifthen, | |||
| nps_node_t | ifelse | |||
| ) |
条件文のオペノードを作成
| cond | [in] 条件式 | |
| ifthen | [in] THEN 式 | |
| ifelse | [in] ELSE 式 |
NewtParser.c の 680 行で定義されています。
参照先 kNewtRefUnbind・NewtMakeArray()・NewtSetArraySlot()・NPSGenNode2().
関数の呼び出しグラフ:

| nps_node_t NPSGenNode0 | ( | uint32_t | code | ) |
引数0のノードを作成
| code | [in] 構文コード |
NewtParser.c の 455 行で定義されています。
参照先 kNewtRefUnbind・NPSGenNode2().
関数の呼び出しグラフ:

| nps_node_t NPSGenNode1 | ( | uint32_t | code, | |
| nps_node_t | op1 | |||
| ) |
引数1のノードを作成
| code | [in] 構文コード | |
| op1 | [in] 引数1 |
NewtParser.c の 470 行で定義されています。
参照先 kNewtRefUnbind・NPSGenNode2().
参照元 NPSGenOP1().
関数の呼び出しグラフ:

| nps_node_t NPSGenNode2 | ( | uint32_t | code, | |
| nps_node_t | op1, | |||
| nps_node_t | op2 | |||
| ) |
引数2のノードを作成
| code | [in] 構文コード | |
| op1 | [in] 引数1 | |
| op2 | [in] 引数2 |
NewtParser.c の 486 行で定義されています。
参照先 nps_syntax_node_t::code・CX・NewtStackExpand()・nps_stree・NPSMakeSyntaxNode・nps_syntax_node_t::op1・nps_syntax_node_t::op2・STREESTACK・yyerror().
参照元 NPSGenForeach()・NPSGenForLoop()・NPSGenGlobalFn()・NPSGenIfThenElse()・NPSGenNode0()・NPSGenNode1()・NPSGenOP2()・NPSGenResend()・NPSGenSend().
関数の呼び出しグラフ:

| nps_node_t NPSGenOP1 | ( | uint32_t | op, | |
| nps_node_t | op1 | |||
| ) |
引数1のオペレータノードを作成
| op | [in] オペコード | |
| op1 | [in] 引数1 |
NewtParser.c の 517 行で定義されています。
参照先 kNErrSyntaxError・kNewtRefUnbind・kNPS_NOT・kNPSNot・KNPSUnknownCode・NPSError()・NPSGenNode1().
関数の呼び出しグラフ:

| nps_node_t NPSGenOP2 | ( | uint32_t | op, | |
| nps_node_t | op1, | |||
| nps_node_t | op2 | |||
| ) |
引数2のオペレータノードを作成
| op | [in] オペコード | |
| op1 | [in] 引数1 | |
| op2 | [in] 引数2 |
NewtParser.c の 546 行で定義されています。
参照先 kNErrSyntaxError・kNewtRefUnbind・kNPS_CONCAT2・kNPS_DIV・kNPS_GREATER_EQUAL・kNPS_LESS_EQUAL・kNPS_MOD・kNPS_NOT_EQUAL・kNPS_OBJECT_EQUAL・kNPS_SHIFT_LEFT・kNPS_SHIFT_RIGHT・kNPSAdd・kNPSConcat・kNPSConcat2・kNPSDiv・kNPSDivide・kNPSEquals・kNPSGreaterOrEqual・kNPSGreaterThan・kNPSLessOrEqual・kNPSLessThan・kNPSMod・kNPSMultiply・kNPSNotEqual・kNPSObjectEqual・kNPSShiftLeft・kNPSShiftRight・kNPSSubtract・KNPSUnknownCode・NPSError()・NPSGenNode2().
関数の呼び出しグラフ:

| nps_node_t NPSGenResend | ( | uint32_t | op, | |
| nps_node_t | msg, | |||
| nps_node_t | args | |||
| ) |
メッセージ再送信のオペノードを作成
| op | [in] オペコード | |
| msg | [in] メッセージ | |
| args | [in] メッセージの引数 |
NewtParser.c の 662 行で定義されています。
参照先 kNPSResend・kNPSResendIfDefined・NPSGenNode2().
関数の呼び出しグラフ:

| nps_node_t NPSGenSend | ( | nps_node_t | receiver, | |
| uint32_t | op, | |||
| nps_node_t | msg, | |||
| nps_node_t | args | |||
| ) |
メッセージ送信のオペノードを作成
| receiver | [in] レシーバ | |
| op | [in] オペコード | |
| msg | [in] メッセージ | |
| args | [in] メッセージの引数 |
NewtParser.c の 640 行で定義されています。
参照先 kNPSSend・kNPSSendIfDefined・NPSGenNode2().
関数の呼び出しグラフ:

| void NPSInit | ( | newtPool | pool | ) | [static] |
構文解析のための初期化
| pool | [in] メモリプール |
NewtParser.c の 138 行で定義されています。
参照先 nps_env_t::first_time・nps_env_t::fname・nps_env_t::linebuf・nps_env_t::lineno・NEWT_NUM_STREESTACK・NEWT_POOL・NewtStackSetup()・nps_env・nps_stree・nps_env_t::numerrs・nps_env_t::numwarns・nps_env_t::tokenpos.
参照元 NPSParse().
関数の呼び出しグラフ:

| newtRef NPSInsertArraySlot | ( | newtRefArg | r, | |
| uint32_t | p, | |||
| newtRefArg | v | |||
| ) |
配列オブジェクトのオブジェクトを挿入する
| r | [in] 配列オブジェクト | |
| p | [in] 挿入する位置 | |
| v | [in] 挿入るオブジェクト |
NewtParser.c の 848 行で定義されています。
関数の呼び出しグラフ:

| newtRef NPSMakeArray | ( | newtRefArg | v | ) |
配列オブジェクトの作成
| v | [in] 初期値 |
NewtParser.c の 804 行で定義されています。
参照先 kNewtRefUnbind・NewtMakeArray()・NewtSetArraySlot().
関数の呼び出しグラフ:

| newtRef NPSMakeBinary | ( | newtRefArg | v | ) |
バイナリオブジェクトの作成
| v | [in] 初期値 |
NewtParser.c の 935 行で定義されています。
参照先 kNewtRefUnbind・NcClone()・NcSetClass()・NewtBinarySetLength()・NewtMakeBinary()・NewtRefIsString()・NewtSetARef()・NewtStringLength().
関数の呼び出しグラフ:

| newtRef NPSMakeFrame | ( | newtRefArg | slot, | |
| newtRefArg | v | |||
| ) |
フレームオブジェクトの作成
| slot | [in] スロットシンボル | |
| v | [in] 初期値 |
NewtParser.c の 891 行で定義されています。
参照先 NcMakeFrame・NewtMakeFrame2()・NewtRefIsNIL().
関数の呼び出しグラフ:

| newtRef NPSMakeMap | ( | newtRefArg | v | ) |
フレームマップオブジェクトの作成
| v | [in] 初期値 |
NewtParser.c の 864 行で定義されています。
参照先 kNewtRefNIL・kNewtRefUnbind・NewtMakeMap()・NewtSetArraySlot().
関数の呼び出しグラフ:

| newtRef NPSMakePathExpr | ( | newtRefArg | sym1, | |
| newtRefArg | sym2 | |||
| ) |
参照パスオブジェクトの作成
| sym1 | [in] シンボル1 | |
| sym2 | [in] シンボル2 |
NewtParser.c の 784 行で定義されています。
参照先 NewtMakeArray()・NewtSetArraySlot()・NSSYM0.
関数の呼び出しグラフ:

| newtErr NPSParse | ( | const char * | path, | |
| nps_syntax_node_t ** | streeP, | |||
| uint32_t * | sizeP, | |||
| bool | is_file | |||
| ) |
構文解析する
| path | [in] 入力ファイルのパス | |
| streeP | [out]構文木 | |
| sizeP | [out]構文木のサイズ | |
| is_file | [in] ファイルかどうか(#! 処理をおこなうかどうか) |
NewtParser.c の 165 行で定義されています。
参照先 CX・nps_env_t::first_time・nps_env_t::fname・kNErrNone・kNErrSyntaxError・NEWT_DUMPSYNTAX・NewtFprintf()・NewtStackSlim()・nps_env・nps_stree・NPSCleanup()・NPSDumpSyntaxTree()・NPSInit()・nps_env_t::numerrs・STREESTACK.
参照元 NPSParseFile()・NPSParseStr().
関数の呼び出しグラフ:

| newtErr NPSParseFile | ( | const char * | path, | |
| nps_syntax_node_t ** | streeP, | |||
| uint32_t * | sizeP | |||
| ) |
指定されたファイルをソースに構文解析する
| path | [in] 入力ファイルのパス | |
| streeP | [out]構文木 | |
| sizeP | [out]構文木のサイズ |
NewtParser.c の 207 行で定義されています。
参照先 kNErrFileNotOpen・NewtFprintf()・NPSParse()・yyin.
参照元 NBCCompileFile()・NVMInterpretFile().
関数の呼び出しグラフ:

| newtErr NPSParseStr | ( | const char * | s, | |
| nps_syntax_node_t ** | streeP, | |||
| uint32_t * | sizeP | |||
| ) |
文字列をソースに構文解析する
| s | [in] 入力データ | |
| streeP | [out]構文木 | |
| sizeP | [out]構文木のサイズ |
NewtParser.c の 244 行で定義されています。
参照先 NPSBindParserInput()・NPSParse().
参照元 NBCCompileStr()・NVMInterpretStr().
関数の呼び出しグラフ:

| void NPSPrintNode | ( | FILE * | f, | |
| nps_node_t | r | |||
| ) | [static] |
構文木のノードを印字する
| f | [in] 出力ファイル | |
| r | [in] ノード |
NewtParser.c の 279 行で定義されています。
参照先 NewtFprintf()・NewtPrintObj()・NPSRefIsSyntaxNode・NPSRefToSyntaxNode.
参照元 NPSDumpSyntaxTree().
関数の呼び出しグラフ:

| void NPSPrintSyntaxCode | ( | FILE * | f, | |
| uint32_t | code | |||
| ) | [static] |
構文コードを印字する
| f | [in] 出力ファイル | |
| code | [in] 構文コード |
NewtParser.c の 297 行で定義されています。
参照先 NewtFprintf().
参照元 NPSDumpSyntaxTree().
関数の呼び出しグラフ:
