I just bounced a post that was an obvious "please do my homework for me" request. I have let the last few posts like this slip through, but from now on I will...
Hey all, Some of you may have seen this already (a search of the archive didn't turn up any references), but I thought it might be worth mentioning since there...
Thanks for the link. I had a look at that parser. It's quite nice. ... However it has the same mistake as yacc. No context-sensitive tokenising. Means that...
Hey guys, For a couple of years now I've been working on byte code compilers and ... With what I now know, I thought it was time for me to put together a ...
... the ... amount ... or ... With a little effort it compiles fine on Linux. Got any basic source files we can throw at it to try it out? Reminiscent of some...
Hey guys, ... source files we can throw at it to try it out? Yes, the Bxbasm.zip contains a file Bxbasm.rtf, which contains about 50 cut-n-paste examples to...
I forgot to mention, that this file now also contains the command language description as well as about 50 sample programs that will generate ASM code from the...
Graham, Just curious, What modifications did you have to make to get it to compile under Linux ?? I have not tried that yet. I'd like to make a Linux version...
... Linux ?? ... Trivial. Here's a script you can execute that will fix the files and compile and test it. However it does run with errors: Copyright:...
I have a heap debugging package that sometimes helps on code like this. Unfortunately with the data corruption it wasn't able to pinpoint the source line...
I've written several simple one-pass compilers, with the code generation phase intermixed with the parsing phase, e.g., generate code as soon as possible. But,...
291
Paul Cockshott
wpc@...
May 14, 2004 2:08 pm
Build the ast. Walk over once to build symbol table Walk over again to do code generation. ... From: ed_davis2 [mailto:ed_davis2@...] Sent: Fri 5/14/2004...
Hey guys, When I first started learning about compilers I ran across some discussion in a compiler forum that discussed single-pass versus multi-pass...
... That's not quite the whole story. The principle driver was whether you had to read the source file twice. With card jobs this was a major hassle. Even...
Bxbasm compiler: update 1.051 Hey Guys, I have uploaded an update for Bxbasm (Native Code Compiler). The compiler update and source-code can be downloaded...
... There is no advantage from the point of view of having data available from some point later in the compilation (except perhaps in C with old-style partial...
Hey Graham, Thanks for your detailed clarfication. It makes a lot of sense. For further clarfication, I was not quoting from my exprience or any special...
... We have lots of opinions here. Some conflicting. Sometimes depending on the time of day you even get conflicting opinions from the same person ;-) By all...
... I'd lose that bet :-/ ISO C: struct { int x; struct { int y, z; } nested; } i = { .nested.y = 5, 6, .x = 1, 2 }; Found that one reading about CIL:...
Thanks Graham, and thanks for the link. I'll certainly give it a visit. I have monitored some of the discussion here, over the past few months and I always...
... Ok, here goes: The data is a list of 47,000 unique words. The search word list is 94,000 unique words, which includes the above words. So, there should be...
I can't remember in that code whether I do a malloc for each node, or allocate one big array at the start. If the former, the speed will be dominated by the...
I've created a simple compiler that generates code for a stack based VM. I've also implemented some extended instructions, such as: inc offset, constant which...
304
Rainer Thonnes
rainer@...
May 20, 2004 9:39 am
... What you could do is widen the records you use to describe nodes of your AST, to include addition of constants. So whereas A+B would be represented as a...
305
Paul Cockshott
wpc@...
May 20, 2004 12:17 pm
I do this by using java classes for the ast and have a Boolean predicate method in the super class to which all node classes belong and that predicate is...
... The pattern matching is basically the test you already have but generalised to look for type_of(op) == const instead of op == add To make this easier you...