Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Robert A Duff Newsgroups: comp.compilers Subject: Re: Best tools for writing an assembler? Date: Wed, 19 Feb 2014 18:27:32 -0500 Organization: The World Public Access UNIX, Brookline, MA Lines: 32 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-02-024@comp.compilers> References: <14-02-018@comp.compilers> <14-02-022@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: miucha.iecc.com 1392966889 33891 64.57.183.58 (21 Feb 2014 07:14:49 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 21 Feb 2014 07:14:49 +0000 (UTC) Keywords: assembler Posted-Date: 21 Feb 2014 02:14:49 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1103 Sibastien Fricker writes: > If starting from scratch I would use a high level language and for > performance reasons not perl. An assembler may need to assemble big > sources and so it should be as fast as possible. I don't agree -- nobody writes big assembly sources by hand these days. Maybe you're thinking of compiler-generated assembly, but I think compilers should generate machine language, not assembly language. I like Ivan Godard's idea better. > If writing from the scratch, I would use OCaml. That's a good choice, but... >...OCaml provides > ocamllex/ocamlyacc (and also menhir which is also a lex/yacc > replacement) which are quite similar to flex/bison. ...but I'd use Ivan Godard's idea, thus avoiding any need for horsing around with lexing and parsing. >...I think that > coding in ML would permits to get a smaller source file and easier to > read. But of course you need to learn a new programming language... > See http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora107.html > for an ocamllex/ocamlyacc sample. Well, learning a new programming language is generally a good idea, and fun, especially if that language has interesting ideas. - Bob