... You're on the right track, except that it's even more embarrassing: Basic Conceptual Misunderstanding. Are you old enough to have senior moments? :-) ... ...
Rainer Thonnes
rainer@...
May 19, 2009 4:15 pm
1292
Thanks Rainer. I'll work on that this evening. Then I need to check where else the same pattern applies. I know it'll also affect multiple and divide, which...
... It's not so much mixing add with subtract (or multiply with divide) that's the problem (otherwise you could get over it by giving add and subtract ...
Rainer Thonnes
rainer@...
May 19, 2009 10:03 pm
1294
... Done, at least for + and -. Still to do for * and /. No grammar change needed, just a tweak to how the tree is assembled. This is for a student exercise...
[this will look familiar to comp.compilers readers] I am looking to create what I would call a "companion language" to C. It would basically compile to .o...
... The concept of multiple compilers for different languages sharing a common set of run-time conventions (procedure calling, library linking/loading, symbol...
... I am quite familiar with many languages but certainly don't know the existence of every one. I took a compiler class way back in the 80's (we wrote our toy...
... I think it would be worth trying in a language like python and/or ruby. Ive written lexers and parsers in python and it's quite nice, especially befause...
I can't say "used" but I did play around with ANTLR enough to think that it looked quite good. My opinion is that you should write your own parser generator at...
... Sorry these aren't as well organised as they could be, but maybe you'll find something helpful in here: http://www.gtoal.com/compilers101/compilers.html G...
I've used PLY a number of times, it's a reasonable lexer and parser generator and pretty easy once you get the hang of it. It uses rules built into pydoc...
Just to bring folks up to date on what I've been puttering with lately, I took the compiler I started on last year for our coding competition, and have been...
I'm working on signed arithmetic comparisons at the moment. I have a simple procedure that prints a signed number. It tests to see if the parameter is < 0,...
I don't think you've misunderstood the instructions. My suspicion is that nasm has mixed up the opcodes. Get it to show you the code listing to confirm. SETL...
Rainer Thonnes
rainer@...
Jun 3, 2009 11:48 pm
1308
... Just testing. :-) No, it's not that. SETL AL will make AL=1 if the "less than" comparison was true. If the CMP operands were equal, as when D is zero, the...
Rainer Thonnes
rainer@...
Jun 4, 2009 2:44 am
1309
... Very, very neat, Graham. I'd join you, but I'm currently working on porting a network stack and writing an operating system from the ground up. Seriously. ...
... Indeed. ... Heh, it had me up half the bloody night, since I just had to get to the bottom of it once I realised that my initial diagnosis was wrong. ... ...
Rainer Thonnes
rainer@...
Jun 4, 2009 10:06 am
1312
... I'm struggling to remember why. It wasn't an arbitrary choice but I've forgotten the reason now. I think it may have been because it was simpler for...
... I've been doing something similar this week, and what I've learned is that in the x86 world, there are *many* different calling conventions. It looks like...
It took about 2 days of programming and 2 days of debugging (one of which was Rainer's :-) ) to get an x86 code generator working for the toy compiler I wrote...
... Graham, as usual, you are THE MAN. This is really cool! For extra bonus points, you should work in register calling conventions. ;-) -->Neil ... C. Neil...
... When I do a native code generator, I'll do that and throw all the optimising tricks at it, but as long as I'm treating the x86 as a simple stack machine,...
... next development - I'm using the stack-based code as an intermediate code from which to generate more traditional x86 instructions in a load/store format;...
2009/7/22 <compilers101@yahoogroups.com> ... This is also a comprehensive compiler textbook: "Basics of Compiler Design" Torben Ægidius Mogensen available...