@@ 6,6 6,10 @@
:initarg :current-position
:initform 0)))
+(defmethod initialize-instance :after ((l lexer) &rest args)
+ (declare (ignore args))
+ (setf (source l) (concatenate 'string (source l) '(#\Newline))))
+
(define-condition lexing-error (error)
((text :initarg :text :reader text)))
@@ 139,7 143,8 @@
(labels-declared :accessor labels-declared :initform '())
(labels-gotoed :accessor labels-gotoed :initform '())))
-(defmethod initialize-instance :after ((p parser) &rest args) ; FIXME suppress unused arguments warning
+(defmethod initialize-instance :after ((p parser) &rest args)
+ (declare (ignore args))
(next-token p)
(next-token p))
@@ 407,6 412,7 @@
(program p)
(format stream "~a ~a~%" (header e) (code e)))))
+;; if you've got tcc this is convenient
(defun run (strategic-communication)
(compile-to-c strategic-communication)
(uiop:run-program '("tcc" "-run" "t.c") :output t))