|
x-engine-c v0.2.13
The C engine for x-lang
|
S-expression analyser and reader for character literals. More...
#include "x-obj.h"Go to the source code of this file.
Macros | |
| #define | X_SEXP_CHAR_PRE_STR "#\\" |
Functions | |
| x_obj_t * | x_sexp_char_analyse1 (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_sexp_char_analyse2 (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_sexp_char_analyse3 (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_sexp_char_read (x_obj_t *p_base, x_obj_t *p_args) |
Variables | |
Analyser state primitives (spair – composable state machines). | |
| x_spair_t | x_sexp_char_analyse1_prim |
| x_spair_t | x_sexp_char_analyse2_prim |
| x_spair_t | x_sexp_char_analyse3_prim |
Read primitives (satom – type-internal). | |
| x_satom_t | x_sexp_char_read_prim |
S-expression analyser and reader for character literals.
| #define X_SEXP_CHAR_PRE_STR "#\\" |
Character literal prefix.
Analyse state 1: match first char of #\ prefix.
Analyse state 1: match first character of the #\ prefix.
| p_base | Base (execution context). |
| p_args | Pair of (self, read-args). |
Analyse state 2: match second char of #\ prefix.
Analyse state 2: match second character of the #\ prefix.
| p_base | Base (execution context). |
| p_args | Pair of (self, read-args). |
Analyse state 3: classify single character vs. named character start.
Analyse state 3: classify character after prefix.
A lowercase letter transitions to the named-character state (analyse4). Any other character scores immediately as a single-char literal.
| p_base | Base (execution context). |
| p_args | Pair of (self, read-args). |
Read a character literal from the token buffer.
Read a character literal from the token buffer.
Handles single-character literals (#\c, length 3) and named characters (e.g. #\newline) by looking up the name in the character type's data alist.
| p_base | Base (execution context). |
| p_args | Read-args containing the token buffer. |
|
extern |
| x_spair_t x_sexp_char_analyse2_prim |
| x_spair_t x_sexp_char_analyse3_prim |
|
extern |