+static int
+push_read_stack(int cons, int in_quote)
+{
+ if (cons) {
+ read_stack = ao_lisp_cons_cons(ao_lisp_cons_poly(read_cons),
+ ao_lisp_cons_cons(ao_lisp_int_poly(in_quote),
+ read_stack));
+ if (!read_stack)
+ return 0;
+ }
+ read_cons = NULL;
+ read_cons_tail = NULL;
+ return 1;
+}
+
+static int
+pop_read_stack(int cons)
+{
+ int in_quote = 0;
+ if (cons) {
+ read_cons = ao_lisp_poly_cons(read_stack->car);
+ read_stack = ao_lisp_poly_cons(read_stack->cdr);
+ in_quote = ao_lisp_poly_int(read_stack->car);
+ read_stack = ao_lisp_poly_cons(read_stack->cdr);
+ for (read_cons_tail = read_cons;
+ read_cons_tail && read_cons_tail->cdr;
+ read_cons_tail = ao_lisp_poly_cons(read_cons_tail->cdr))
+ ;
+ } else {
+ read_cons = 0;
+ read_cons_tail = 0;
+ read_stack = 0;
+ }
+ return in_quote;
+}
+
+ao_poly
+ao_lisp_read(void)