/* libsizzle/read.h - reader declarations
 
  Copyright (C) 1999, 2000 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
 
  This is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2, or (at your option)
  any later version.
  
  This software is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with this package; see the file COPYING.  If not, write to the
  Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  MA 02111-1307, USA.  */

#ifndef __SIZZLE_READ_H__
#define __SIZZLE_READ_H__

#if HAVE_CONFIG_H
# include <config.h>
#endif 

#if __SIZZLE_IMPORT__
# define SIZZLE_API __declspec (dllimport)
#elif __SIZZLE_EXPORT__ 
# define SIZZLE_API __declspec (dllexport)
#else
# define SIZZLE_API
#endif

#include "node.h"

#if 0
/* The name of the currently loaded source file as a Scheme string
   object.  */
SIZZLE_API extern zzz_scm_t zzz_current_input_file_name;

/* The current nesting count of lists.  */
SIZZLE_API extern int zzz_parentheses_nesting;

/* If non-zero, the location of source code statements is remembered
   for later retrieval.  */
SIZZLE_API extern int zzz_remember_source_locations;

/* If non-zero, MzScheme-like parenthesis `[' and `]' are supported
   when reading lists.  If zero, they are rejected.  */
SIZZLE_API extern int zzz_support_mzscheme_brackets;
#endif

/* Return the source location of the pair @var{pair}, or, if not
   possible, return @code{#f}.  */
SIZZLE_API zzz_scm_t zzz_get_source_location (zzz_scm_t pair);

/* Parse the string beginning at the location pointed to by @var{c} of
   length @var{len}.  @var{default_radix} is the radix used if none is
   given in the string.  The result is a Scheme object which will be
   stored in the location pointed to by @var{result}.  */
SIZZLE_API result_t zzz_parse_scheme_number (char * s, unsigned len,
					     int default_radix,
					     zzz_scm_t * result);

/* Read an sexp from the input port @var{port}.  The result is
   returned in the location pointed to by @var{result}, and a result
   code is returned.  */
SIZZLE_API result_t zzz_read_cell (zzz_scm_t port, zzz_scm_t * result);

/* Initialize the reader module.  */
SIZZLE_API void zzz_init_reader (void);

/* Free all memory allocated by the reader module.  */
SIZZLE_API void zzz_finalize_reader (void);

#endif /* not __SIZZLE_READ_H__ */
