This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\usepackage{tikz} | |
\usetikzlibrary{shapes,positioning,snakes,calc,chains,arrows} | |
\begin{document} | |
\begin{figure}[h!] | |
\begin{tikzpicture}[ | |
state/.style={draw,circle,scale=1.5,fill=green!40}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Étape 1/3 : Téléchargement | |
--2011-02-12 15:53:54-- http://www.lirmm.fr/~lafourcade/JDM-LEXICALNET-FR/?C=M;O=D | |
Résolution de www.lirmm.fr (www.lirmm.fr)... 193.49.104.249 | |
Connexion vers www.lirmm.fr (www.lirmm.fr)|193.49.104.249|:80...connecté. | |
requête HTTP transmise, en attente de la réponse...200 OK | |
Longueur: 6900 (6,7K) [text/html] | |
Sauvegarde en : «STDOUT» | |
100%[====================================================================================================================================================================================================================================>] 6.900 --.-K/s ds 0,05s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((eq 'defmacro (car expr)) | |
`(:mcall set-defmacro (:const . ,(second expr)) | |
,(lisp2li `(lambda ,(third expr) ,@(cdddr expr)) env))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> MEVAL MAKE-ENV | |
[FAILURE] Test : (MAKE-ENV 2 '(1 2) #()) | |
got : #(NIL 1 2) | |
expected : #(NIL 1 2) | |
comparison : #<SYSTEM-FUNCTION EQUAL> | |
[FAILURE] Test : (MAKE-ENV 2 '(7 8) #(#(NIL 7 8) 1 2)) | |
got : #(#(NIL 7 8) 1 2) | |
expected : #(#(NIL 7 8) 1 2) | |
comparison : #<SYSTEM-FUNCTION EQUAL> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun map-meval (list env) | |
(mapcar (lambda (x) (meval x env)) list)) | |
(defun meval-progn (list env) | |
(let ((res (map-meval list env))) | |
(nth (- (list-length res) 1) res))) | |
(defun meval (expr &optional env) | |
"Interprète le langage intermédiaire passé en paramètre." | |
(cond |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun make-stat-env-optional (params env position num-env) | |
(cond ((endp params) | |
env) | |
((consp (car params)) | |
(print params) | |
`((,(caar params) ,num-env ,position) | |
(,(intern (format nil "~a-P" (caar params))) ,num-env ,(+ 1 position)) | |
. ,(make-stat-env-optional (cdr params) env (+ 2 position) num-env))) | |
((eq '&rest (car params)) | |
(make-stat-env (cdr params) env position num-env)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun readfile (name) | |
(let ((fd (open name))) | |
(loop | |
for line = (read fd nil 'eof) | |
when (not (eq line 'eof)) | |
do (print line) | |
else return (close fd) | |
))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun readfile (name) | |
(let ((fd (open name))) | |
(loop | |
with line (read fd nil 'eof) | |
while (not (eq line 'eof)) | |
do line))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun make-stat-env (params &optional env) | |
(append | |
(loop | |
for var in params | |
for j = 1 then (+ j 1) | |
for num-env = (if (or (eq (first env) '&optional) | |
(eq (first env) '&rest)) nil (+ (or (second (first env)) -1) 1)) | |
collect (list var num-env j) | |
) | |
env)) |