?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. /* parser.h - declarations for "parser.c".
  2.  
  3.    This is free and unencumbered software released into the public domain.
  4.    For more information, please refer to <http://unlicense.org>. */
  5.  
  6. #ifndef _PARSER_H_INCLUDED
  7. #define _PARSER_H_INCLUDED
  8.  
  9. #include "defs.h"
  10.  
  11. #include <stdbool.h>
  12. #include "l_ifile.h"
  13.  
  14. // Syntax
  15.  
  16. #define SYNTAX_TASM  0
  17. #define SYNTAX_SJASM 1
  18.  
  19. bool _str_to_syntax (const char *name, unsigned *syntax);
  20. bool _syntax_to_str (unsigned syntax, const char **name);
  21.  
  22. // Parser status
  23.  
  24. #define PARST_OK   0
  25. #define PARST_SKIP 1
  26. #define PARST_ERR  2
  27.  
  28. // Parser
  29.  
  30. // Caller must free "name"
  31. char get_include_tasm (const char *s, unsigned *flags, char **name);
  32.  
  33. // Caller must free "name"
  34. char get_include_sjasm (const char *s, unsigned *flags, char **name);
  35.  
  36. typedef char get_include_proc_t (const char *s, unsigned *flags, char **name);
  37.  
  38. bool _find_get_include_proc (unsigned syntax, get_include_proc_t **proc);
  39.  
  40. #endif  // !_PARSER_H_INCLUDED
  41.