An emulator, assembler, and disassembler for the Sega Game Gear
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

50 řádky
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*);