aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
blob: 7e6b2e183306c2761a716f792954b86c974a625c (plain) (blame)
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
// vim: nowrap

#include <stdio.h>

#include <parse.h>
#include <term.h>
#include <reducer.h>

int main(void)
{
	/* struct term *term = */
	/* 	parse("([((1 0) 0)] ([[([0] 0)]] [([(0 0)] [(0 0)])]))"); */
	// 1-2-6-1-1-4-9-3-1-2-6-2-5-7-1-2-6-3-4-5-11-5-10-9-4-8-10

	/* struct term *term = parse( */
	/* 	"(([[(([([[((1 0) [[[0]]])]] ((((0 [[(((0 ([([(0 [[0]])] ((((0 (([[[((0 2) 1)]]] [[[[3]]]]) [[[[(2 3)]]]])) [(0 [[(([[[((0 2) 1)]]] ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 0))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1))]])]))] (([(0 0)] [[((((0 [[[[3]]]]) [([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))])]]) 1))) ([([(0 [[0]])] ((((0 (([[[((0 2) 1)]]] [[[[3]]]]) [[[[(1 3)]]]])) [(0 [[(([[[((0 2) 1)]]] ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 0))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] 1))]])]))] (([(0 0)] [[((((0 [[[[3]]]]) [([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))])]]) 1))) (([(0 0)] [[((((0 [[[[3]]]]) [([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))]) [([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ([((3 3) 0)] 0))])]]) 1))]]) [[[((((1 ([(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))] 1)) [(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]])))]) [(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))]) [(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))])]]]) [[[((((1 ([(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))] 1)) [(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))]) [(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]])))]) [(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))])]]]) [[[((((1 ([(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))] 1)) [(((1 ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[2]]]))) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))]) [(((1 ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]]))) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[1]]]))) ([[[[[(1 ((((4 3) 2) 1) 0))]]]]] ((3 0) [[[0]]])))]) [(([[[[[[((((5 2) 1) 0) ((((4 3) 2) 1) 0))]]]]]] 1) ((3 0) [[[0]]]))])]]]))] 1) ([((((0 [[[[3]]]]) [[[[[(2 4)]]]]]) [[[[[(1 4)]]]] ]) [[[[[(0 4)]]]]])] 0))]] [[[[(2 (2 (1 3)))]]]]) [[[[(1 3)]]]])"); */
	// 1-1-2-6-2-6-1-1-2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2) 1) 0))]]]]] 1)) ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1))]])]) [(0 [[(([[[((0 2) 1)]]] ([[[[[(0 ((((4 3) 2) 1) 0))]]]]] 1)) ([[[[[(2 ((((4 3) 2) 1) 0))]]]]] 1))]])]))] 1)) ([(0 [[0]])] 0)))))]]]) [[[[(0 (2 (1 3)))]]]]) (([([(1 [((1 1) 0)])] [(1 [((1 1) 0)])])] [[((([([(1 [((1 1) 0)])] [(1 [((1 1) 0)])])] [[[((([((0 [[[[[0]]]]]) [[1]])] 1) 0) (([[[((0 2) 1)]]] ([(0 [[1]])] 1)) ((2 ([(0 [[0]])] 1)) 0)))]]]) 0) (1 0))]]) [((0 [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [((0 [((0 [[0]]) [((0 [[1]]) [((0 [[0]]) [((0 [[0]]) [((0 [[0]]) [((0 [[1]]) [((0 [[1]]) [((0 [[0]]) [[0]])])])])])])])])]) [[0]])])]))");
	// 1-1-1-2-6-1-2-6-1-3-2-5-6-2-6-2-6-1-1-1-2-6-1-1-3-3-1-1-2-6-1-2-6-1-3-2-5-6-2-6-1-1-1-2-6-1-2-6-1-3-2-5-6-2-6-2-6-1-1-1-2-6-1-1-3-3-3-2-5-5-5-6-1-1-3-2-5-6-2-6-2-6-2-6-2-6-3-1-1-2-6-2-6-2-5-5-5-6-1-1-3-2-5-6-2-6-2-6-2-6-2-6-3-1-1-1-2-6-1-1-1-1-3-3-2-5-5-6-2-6-2-6-2-6-1-3-2-5-6-3-1-3-2-5-6-2-5-6-2-6-3-1-1-2-6-2-6-2-5-5-7-1-1-4-9-3-1-2-6-1-3-4-5-6-1-1-3-2-5-6-2-6-3-3-1-2-6-1-3-4-5-6-1-1-3-2-5-6-2-6-3-2-5-5-5-5-7-1-1-4-9-2-7-2-7-4-11-5-11-5-10-9-2-7-1-1-4-9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