shithub: femtolisp

ref: 1ee781cb64e6fa05bf9b60a0065d4839da546f52
dir: /read.h/

View raw version
#pragma once

value_t fl_read_sexpr(value_t f);
bool isnumtok_base(const char *tok, value_t *pval, int base);
bool isnumtok(const 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)))