handling nested data in LISP
Posted: Thu Aug 20, 2009 1:40 pm
Hi everybody
I have a (UNIX-shell) program with an output like this:
(root
(class living_thing
(spec human
(prop has_legs))
(spec bird (prop has_wings))))
The program spits that kind of code out whenever it has computed its input.
Now I have three problems:
1. How do I feed my program time after time?
2. How do i lookup the data:
here the problems are:
1. I dont know the structures depht (which is variable) 2. I dont know how to retrieve the information once stored because of 1.
3. The set of tags is variable.
3. How to store it in a DB (solved conceptually by my own)
I am WILLED to RTFM but i couldn't find an algorythm in Perl so i'm trying in Lisp now.
Any ideas?
Best regards
PS: Linux on x86
I have a (UNIX-shell) program with an output like this:
(root
(class living_thing
(spec human
(prop has_legs))
(spec bird (prop has_wings))))
The program spits that kind of code out whenever it has computed its input.
Now I have three problems:
1. How do I feed my program time after time?
2. How do i lookup the data:
here the problems are:
1. I dont know the structures depht (which is variable) 2. I dont know how to retrieve the information once stored because of 1.
3. The set of tags is variable.
3. How to store it in a DB (solved conceptually by my own)
I am WILLED to RTFM but i couldn't find an algorythm in Perl so i'm trying in Lisp now.
Any ideas?
Best regards
PS: Linux on x86