Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!news.iecc.com!.POSTED!nerds-end From: =?ISO-8859-1?Q?S=E9bastien_Fricker?= Newsgroups: comp.compilers Subject: Re: Best tools for writing an assembler? Date: Wed, 19 Feb 2014 09:59:36 +0100 Organization: Compilers Central Lines: 15 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-02-022@comp.compilers> References: <14-02-018@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: miucha.iecc.com 1392848610 94368 64.57.183.58 (19 Feb 2014 22:23:30 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Wed, 19 Feb 2014 22:23:30 +0000 (UTC) Keywords: assembler Posted-Date: 19 Feb 2014 17:23:29 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:1101 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. Also think about the start time of your assembler: if you write it in C#, loading all the .NET framework may need a lot of time, in this case your assembler may need 20s before your main function get reached. If writing from the scratch, I would use OCaml. OCaml provides ocamllex/ocamlyacc (and also menhir which is also a lex/yacc replacement) which are quite similar to flex/bison. 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.