I'm a newbie in LISP and I'm face to several problems. I'm trying to read a text file and store it in a list thanks to a lisp program but it's not working.
Could you please tell me what's wrong with this script?
lisp code:
Code: Select all
(defun parser ()
;Initialisation de la liste dico
(setq dico '())
;Initialisation d'une liste ligne
(setq ligne '(hello))
;Lecture du fichier dico
(with-open-file (stream "./dico.txt"))
(loop while (not (null ligne))
(setq ligne (read-line str))
(setq dico (cons ligne dico))
)
)
Code: Select all
MotCle01 MotResultat01
MotCle02 MotResultat02
MotCle03 MotResultat03
MotCle04 MotResultat04