[ragel-users] Re: Almost Forgot, EaRing: An Assembler Using Ragel and Lemon
Zed A. Shaw
zeds... at zedshaw.com
Fri Jun 20 04:38:02 UTC 2008
On Thu, 19 Jun 2008 08:11:46 -0400
"Bob Paddock" <graceindustr... at gmail.com> wrote:
> On 6/18/08, Zed A. Shaw <zeds... at zedshaw.com> wrote:
> I wonder if you could build the LCC compiler on top of 'odd assembler'
> that would then produce code for customized CPUs in FPGA's?
Hmm, well, GNU lightning is notoriously hard to change. It is actually
a gigantic c pre-processor mess that has the byte codes in c macros.
If the FPGA had one of the other bytecodes as its base then you could
do it, but otherwise you'd have to add that CPU to the supported
However, this bytecode generation isn't that hard. I figure if I keep
working on this I'd eventually get rid of lightning by just reverse
engineering what they produce for their instructions and then writing
something that's not a damn CPP macro set.
Now, for LCC, I did look at it and TCC but found that they were pretty
damn complicated to just polish off really quick. In theory you could
do this with just about any language, since the assembler is what they
all become anyway. Just probably not too quickly with LCC.
> Never seem to find a micro with all the features I want for
> my embedded work. Might just have to make my own someday.
Yeah, go for it. You could probably take EaRing and tweak it to come
up with your own assembler opcodes and format too. That's a nice thing
about the project, I figured out that I could just create any format I
wanted once I divorced the byte code generation from the format.
Zed A. Shaw
- Hate: http://savingtheinternetwithhate.com/
- Good: http://www.zedshaw.com/
- Evil: http://yearofevil.com/
More information about the ragel-users