|Question about writing assemblers firstname.lastname@example.org (Maliha Samad) (2000-02-15)|
|Re: Question about writing assemblers email@example.com (David Lindauer) (2000-02-15)|
|Re: Question about writing assemblers firstname.lastname@example.org (Sean Case) (2000-02-16)|
|Re: Question about writing assemblers email@example.com (Ian Lance Taylor) (2000-02-16)|
|Re: Question about writing assemblers firstname.lastname@example.org (2000-02-19)|
|From:||Ian Lance Taylor <email@example.com>|
|Date:||16 Feb 2000 23:41:20 -0500|
In comp.compilers firstname.lastname@example.org (Maliha Samad) writes:
>I am very confused as to whether I should write a hand coded assembler
>or should I use the existing tools like lex and yacc.
I've been working on the GNU assembler for several years.
I've never felt a need to use lex. Most assemblers accept a simple
line oriented syntax, and it is normally easy to pick out operands.
Only once have I seen a reason to use yacc. That was for the m68k
operand syntax. The m68k has a wide range of operand types, and for
historical reasons the GNU assembler supports two different operand
syntaxes. The original code to recognize both syntaxes was complex;
changing to yacc (work which I didn't start) made it quite a bit
clearer. Even then, the yacc parser was applied only to the operands;
picking out the operands themselves was done by a simpler procedure.
Of course what you should do depends upon the syntax you have to
Ian Taylor | email@example.com
Return to the
Search the comp.compilers archives again.