An emulator, assembler, and disassembler for the Sega Game Gear
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

61 lines
1.1 KiB

  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_SYMBOL,
  12. ET_PARSER
  13. } ASMErrorType;
  14. typedef enum {
  15. ED_NONE = 0,
  16. ED_INC_BAD_ARG,
  17. ED_INC_DEPTH,
  18. ED_INC_FILE_READ,
  19. ED_PP_UNKNOWN,
  20. ED_PP_DUPLICATE,
  21. ED_PP_NO_ARG,
  22. ED_PP_BAD_ARG,
  23. ED_PP_ARG_RANGE,
  24. ED_LYT_HEADER_RANGE,
  25. ED_LYT_DECL_RANGE,
  26. ED_LYT_BOUNDS,
  27. ED_LYT_BLOCK0,
  28. ED_LYT_SLOTS,
  29. ED_LYT_BLOCK_CROSS,
  30. ED_LYT_OVERLAP,
  31. ED_LYT_OVERLAP_HEAD,
  32. ED_SYM_DUPE_LABELS,
  33. ED_SYM_NO_LABEL,
  34. ED_PARSE_OP_LONG,
  35. ED_PARSE_OP_SHORT,
  36. ED_PARSE_OP_CHARS,
  37. ED_PARSE_OP_UNKNOWN
  38. } ASMErrorDesc;
  39. /* Structs */
  40. typedef struct ErrorInfo ErrorInfo;
  41. /* Functions */
  42. ErrorInfo* error_info_create(const ASMLine*, ASMErrorType, ASMErrorDesc);
  43. void error_info_append(ErrorInfo*, const ASMLine*);
  44. void error_info_print(const ErrorInfo*, FILE*);
  45. void error_info_destroy(ErrorInfo*);