Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zephyr.ens.tek.com!tektronix!percy!m2xenix!quagga!undeed!babraham From: babraham@Daisy.EE.UND.AC.ZA (Bobby Abraham) Newsgroups: comp.lang.lisp Subject: Help needed - Read Macros Keywords: lisp Message-ID: <1991Jun13.064841.20364@Daisy.EE.UND.AC.ZA> Date: 13 Jun 91 06:48:41 GMT Organization: Univ. Natal, Durban, S. Africa Lines: 29 I am needing some help with the following problem in an simple assembler I am writing. I wish to parse expressions such as mov #10 20 add @13 #6 l: jmp @5 Ideally I would like a lexical analyser to return the following mov (immediate 10) 20 add (indirect 13) (immediate 6) (label l) jmp (indirect 5) I know that # will cause the lisp reader to dispatch a macro but this is no problem as one can (substitute #\! #\# input-line). I suspect that it may be possible to do this by defining read macros although it may be necessary to specify labels in the form :label rather than label: Any help would be gratefully received? Many thanks. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= Bobby Abraham Dept of Computer Science, University of Natal, Pietermaritzburg babraham@daisy.ee.und.ac.za