21 lines
568 B
C
21 lines
568 B
C
#ifndef _PARSE_H
|
|
#define _PARSE_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "lisp_types.h"
|
|
#include "lisp_string.h"
|
|
#include "main.h"
|
|
|
|
void lisp_tokenize_init();
|
|
void lisp_tokenize_next(lisp_cons** head);
|
|
void lisp_tokenize(char* buf, int len, lisp_cons** head);
|
|
|
|
bool lisp_parse_number(lisp_string* token_lstr, lisp_value* value);
|
|
bool lisp_parse_string(lisp_string* token_lstr, lisp_value* value);
|
|
bool lisp_parse_scalar(lisp_string* token_lstr, lisp_value* value);
|
|
|
|
bool lisp_parse_recursive(lisp_cons** tokens, bool (*fetch_tokens)(lisp_cons**), lisp_value* value);
|
|
|
|
#endif
|