An emulator, assembler, and disassembler for the Sega Game Gear
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
949 B

  1. /* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  2. Released under the terms of the MIT License. See LICENSE for details. */
  3. #pragma once
  4. #include <stdio.h>
  5. #include "state.h"
  6. /* Enums */
  7. typedef enum {
  8. ET_INCLUDE,
  9. ET_PREPROC,
  10. ET_LAYOUT,
  11. ET_PARSER
  12. } ASMErrorType;
  13. typedef enum {
  14. ED_INC_BAD_ARG,
  15. ED_INC_RECURSION,
  16. ED_INC_FILE_READ,
  17. ED_PP_UNKNOWN,
  18. ED_PP_DUPLICATE,
  19. ED_PP_NO_ARG,
  20. ED_PP_BAD_ARG,
  21. ED_PP_ARG_RANGE,
  22. ED_LYT_HEADER_RANGE,
  23. ED_LYT_DECLARE_RANGE,
  24. ED_LYT_DUPE_LABELS,
  25. ED_LYT_HEAD_OVERLAP,
  26. ED_LYT_INST_OVERLAP,
  27. ED_LYT_DATA_OVERLAP,
  28. ED_PARSE_SYNTAX
  29. } ASMErrorDesc;
  30. /* Structs */
  31. typedef struct ErrorInfo ErrorInfo;
  32. /* Functions */
  33. ErrorInfo* error_info_create(const ASMLine*, ASMErrorType, ASMErrorDesc);
  34. void error_info_append(ErrorInfo*, const ASMLine*);
  35. void error_info_print(const ErrorInfo*, FILE*);
  36. void error_info_destroy(ErrorInfo*);