-
Notifications
You must be signed in to change notification settings - Fork 1
/
read.h
54 lines (41 loc) · 1.06 KB
/
read.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
READ
read.c handles input. It doesn't do anything terribly interesting
or exotic. Input is taken from fgets. If the input is a user
command, then command is executed. Otherwise, the input (presumed
to be Lisp code) is passed to the functions in parse.c.
*/
/*
TODO:
-- make it so that newlines don't have to be
added to every input string (problem
with tokenize in parse.c?s)
-- reader macros
*/
#ifndef READ_GUARD
#define READ_GUARD
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "flags.h"
#include "keywords.h"
#include "lib.h"
#include "objects.h"
#include "parse.h"
#include "print.h"
Obj read_code(void);
extern char code[];
/* input prompt */
void input_prompt(void);
void print_prompt(void);
void get_input(void);
bool isIrregular(char* code);
bool isEnter(char* code);
bool badSyntax(char* code);
bool parens_balanced(char* code);
/* check for user commands */
int isSpecial(char* code);
int isFlag(char* code);
int isHelp(char* code);
int streq(char* str1, char* str2);
#endif