shithub: femtolisp

ref: b3a21a0ff408e559639f6c31e1a2ab970787567f
dir: /read.h/

View raw version
#ifndef READ_H
#define READ_H

value_t fl_read_sexpr(value_t f);
int isnumtok_base(char *tok, value_t *pval, int base);
int isnumtok(char *tok, value_t *pval);

// defines which characters are ordinary symbol characters.
// exceptions are '.', which is an ordinary symbol character
// unless it's the only character in the symbol, and '#', which is
// an ordinary symbol character unless it's the first character.
#define symchar(c) (!strchr("()[]'\";`,\\| \a\b\f\n\r\t\v", (c)))

#endif