read.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* classes: h_files */
  2. #ifndef SCM_READ_H
  3. #define SCM_READ_H
  4. /* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc.
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include "libguile/__scm.h"
  21. #include "libguile/options.h"
  22. /* SCM_LINE_INCREMENTORS are the characters which cause the line count to
  23. * be incremented for the purposes of error reporting. This feature
  24. * is only used for scheme code loaded from files.
  25. *
  26. * SCM_WHITE_SPACES are other characters which should be treated like spaces
  27. * in programs.
  28. */
  29. #define SCM_LINE_INCREMENTORS '\n'
  30. #ifdef MSDOS
  31. # define SCM_SINGLE_SPACES ' ':case '\r':case '\f': case 26
  32. #else
  33. # define SCM_SINGLE_SPACES ' ':case '\r':case '\f'
  34. #endif
  35. #define SCM_WHITE_SPACES SCM_SINGLE_SPACES: case '\t'
  36. SCM_API scm_t_option scm_read_opts[];
  37. #define SCM_COPY_SOURCE_P scm_read_opts[0].val
  38. #define SCM_RECORD_POSITIONS_P scm_read_opts[1].val
  39. #define SCM_CASE_INSENSITIVE_P scm_read_opts[2].val
  40. #define SCM_KEYWORD_STYLE scm_read_opts[3].val
  41. #if SCM_ENABLE_ELISP
  42. #define SCM_ELISP_VECTORS_P scm_read_opts[4].val
  43. #define SCM_ESCAPED_PARENS_P scm_read_opts[5].val
  44. #define SCM_N_READ_OPTIONS 6
  45. #else
  46. #define SCM_N_READ_OPTIONS 4
  47. #endif
  48. SCM_API SCM scm_sym_dot;
  49. SCM_API SCM scm_read_options (SCM setting);
  50. SCM_API SCM scm_read (SCM port);
  51. SCM_API size_t scm_read_token (int ic, SCM * tok_buf, SCM port, int weird);
  52. SCM_API SCM scm_read_hash_extend (SCM chr, SCM proc);
  53. SCM_API void scm_i_input_error (const char *func, SCM port,
  54. const char *message, SCM arg)
  55. SCM_NORETURN;
  56. SCM_API void scm_init_read (void);
  57. #endif /* SCM_READ_H */
  58. /*
  59. Local Variables:
  60. c-file-style: "gnu"
  61. End:
  62. */