|
x-engine-c v0.2.13
The C engine for x-lang
|
S-expression analyser and delimiter for line comments. More...
#include "x-obj.h"Go to the source code of this file.
Macros | |
| #define | X_SEXP_COMMENT_PRE_STR ";" |
| #define | X_SEXP_COMMENT_PRE_STR_LEN 1 |
| #define | X_SEXP_COMMENT_POST_STR "\n" |
| #define | X_SEXP_COMMENT_POST_STR_LEN 1 |
| #define | X_SEXP_COMMENT_CHARS_STR X_SEXP_COMMENT_PRE_STR |
Functions | |
| x_obj_t * | x_sexp_comment_analyse1 (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_sexp_comment_analyse2 (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_sexp_comment_delimit (x_obj_t *p_base, x_obj_t *p_args) |
Variables | |
Analyser / delimiter primitives (satom). | |
| x_satom_t | x_sexp_comment_analyse1_prim |
| x_satom_t | x_sexp_comment_analyse2_prim |
| x_satom_t | x_sexp_comment_delimit_prim |
S-expression analyser and delimiter for line comments.
| #define X_SEXP_COMMENT_CHARS_STR X_SEXP_COMMENT_PRE_STR |
Characters that delimit other tokens.
| #define X_SEXP_COMMENT_POST_STR "\n" |
Comment end delimiter.
| #define X_SEXP_COMMENT_POST_STR_LEN 1 |
Length of comment end delimiter.
| #define X_SEXP_COMMENT_PRE_STR ";" |
Comment start delimiter.
| #define X_SEXP_COMMENT_PRE_STR_LEN 1 |
Length of comment start delimiter.
Analyse state 1: detect the comment start delimiter.
Analyse state 1: detect the comment start delimiter.
Compares the buffer contents against X_SEXP_COMMENT_PRE_STR.
| p_base | Base (execution context). |
| p_args | Read-args containing the token buffer. |
Analyse state 2: consume characters until end-of-line.
Analyse state 2: consume characters until end-of-line.
Continues reading until X_SEXP_COMMENT_POST_STR is found, then scores the full comment length.
| p_base | Base (execution context). |
| p_args | Read-args containing the token buffer and score. |
Delimiter callback: back up read pointer on comment-start char.
Delimiter callback for comment characters.
If the last character in the buffer is a comment-start character, backs up the read pointer so the comment is not consumed by the current token, and returns the buffer to signal delimiting.
| p_base | Base (execution context). |
| p_args | Read-args containing the token buffer. |
|
extern |
| x_satom_t x_sexp_comment_analyse2_prim |
| x_satom_t x_sexp_comment_delimit_prim |