#include <assert.h>
#include <errno.h>
#include "cerr.h"
-#include "cmem.h"
-#include "exec.h"
-#include "hash.h"
#include "struct.h"
-#include "word.h"
-
-/**
- * @brief CASL IIの仕様
- */
-enum {
- LABELSIZE = 8, /**<ラベルの最大文字数 */
- OPDSIZE = 40, /**<オペラントの最大数。CASL IIシミュレータの制限 */
-};
-
-/**
- * @brief YACASL2の制限
- */
-enum {
- LINESIZE = 1024, /**<行の最大文字数 */
- TOKENSIZE = 256, /**<トークンの最大文字数 */
-};
+#include "token.h"
/**
* @brief アセンブルモードを表すデータ型
*/
void freelabel();
-/**
- * @brief オペランドを表すデータ型
- */
-typedef struct {
- int opdc; /**<オペランド数 */
- char *opdv[OPDSIZE]; /**<オペランド配列 */
-} OPD;
-
-/**
- * @brief 命令行を表すデータ型
- */
-typedef struct {
- char *label; /**<ラベル */
- char *cmd; /**<コマンド */
- OPD *opd; /**<オペランド */
-} CMDLINE;
-
-/**
- * @brief トークン取得のエラーを追加する
- *
- * @return なし
- */
-void addcerrlist_tok();
-
-/**
- * @brief 行から、ラベル・コマンド・オペランドを取得する
- *
- * @return ラベル・コマンド・オペランド
- *
- * @param *line 行
- */
-CMDLINE *linetok(const char *line);
-
/**
* @brief アセンブルエラーをエラーリストに追加する
*
/**
* @brief 指定された1つまたは複数のファイルを2回アセンブル
*
- * @return ã\81ªã\81\97
+ * @return ã\82¢ã\82»ã\83³ã\83\96ã\83«å®\8cäº\86æ\99\82ã\81¯trueã\80\81ã\82¨ã\83©ã\83¼ç\99ºç\94\9fæ\99\82ã\81¯falseã\82\92è¿\94ã\81\99
*
* @param filec アセンブルするファイルの数
* @param filev アセンブルするファイル名の配列
* @param adr アセンブル結果を格納するアドレス
*/
-void assemble(int filec, char *filev[], WORD adr);
+bool assemble(int filec, char *filev[], WORD adr);
/**
* @brief ファイルにアセンブル結果を書き込む