Tim Roberts
2/23/2010 5:57:00 AM
Paul Rubin <no.email@nospam.invalid> wrote:
>
>Giorgos Tzampanakis <gt67@hw.ac.uk> writes:
>> I'm implementing a CPU that will run on an FPGA. I want to have a
>> (dead) simple assembler that will generate the machine code for
>> me. I want to use Python for that. Are there any libraries that
>> can help me with the parsing of the assembly code?
>
>One "dead simple" option is the re module.
Yes, indeed. I have implemented TWO different FPGA-based microassemblers
in Python using the essentially undocumented but magically delicious
re.Scanner class. Simple and flexible.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.