Hey Bart, it's been a long time... what are you up to nowadays? I have a suggestion if you are still planning to write a small C compiler, which is something...
... Damn Eudora Light's message filtering!! It looked like Graham's message was in my inbox rather than my Compilers101 mailbox. Ah, well :P ... Bart...
... I have been working on automatically generated code generators for multiple target machines. I have a system called ILCG ( Intermediate Language for Code...
Paul Cockshott
wpc@...
Sep 2, 2003 10:47 am
243
Hello, I dug out my Small C compiler project I started at the beginning of this year and have written a grammar for declarations. Unfortunately, the DDJ Small...
... Yes, that last one is valid as well. ... Actually, signed/unsigned and int/char can come in any order. You can have: int unsigned x; char signed x; And if...
I'm trying to determine which is the better format to use for an AST - a binary tree, a n-node tree, but with a fixed number of nodes, or a multi-way tree,...
... That seems to be the consensus here :) I raised a question similar to yours earlier on this list. ... The n-way trees are probably unnecessary. It might be...
I prefer multi-way trees. I write a traversal method for each class used in the trees, which is I suppose a bit of extra work. Seems the most natural way to do...
wpc@...
Sep 26, 2003 12:33 pm
249
... It appears as though this is just a parser for Tiny C expressions without types. The Small C compiler I've been working on (very slowly due to real life ...
Still working on parse trees. I've implemented an interpreter for a simple language, one using strictly binary AST's, and the other using a n-way tree. To me...
I would appreciate your comments regarding the following simple interpreter. I would like to grow this into a simple programming language, but before I get...
... I think it looks good. Reminds me a bit of QBasic, which I always liked (I think a lot of problems people associate with it are actually due to the IDE...
... (and procedures!) It's a good piece of demonstration code - not cluttered with the sort of complexities you'll need for a real compiler, and if you were...
... I'm trying to decide which to implement: '\n' as in C, or add an explicit println, as in Pascal: C-style: print "Hello, World!\n" Pascal-style: println...
... Then why not include the line-break literally in the string? Like this: print "line one line two" ... Something that not only reports on which line the...
Rainer Thonnes
rainer@...
Dec 22, 2003 6:40 pm
256
... Because it just seems wrong? I've never seen anything like this before, hence my initial reaction. I'll have to think on it a while. Thanks for the...
... Good. So your hash table is, I take it, nothing but an array of pointers to chainable token decriptors, as opposed to an array of token descriptors which...
Rainer Thonnes
rainer@...
Dec 22, 2003 10:42 pm
258
Hey Rainer, didn't your write some trie stuff once for a spelling checker? Tries are faster, smaller, and more easily expandable than hash tables. Dunno why...
... Yes but not for a spelling checker, and I got the idea from some natural language processing stuff Hamish had written (to help identify geographical origin...
Rainer Thonnes
rainer@...
Dec 23, 2003 12:24 am
261
... Yes, but not necessarily. If your language has the property that key words are distinguished syntactically from identifiers (such as being enclosed in...
Rainer Thonnes
rainer@...
Dec 23, 2003 1:25 am
262
... That gives me an idea that I haven't seen in any language that I know of - modify the parser to insert the name tables as a parsable item so that they...
... I wrote trie and hash test programs, ran them each multiple times, and took the average results. In my implementations, hash tables are smaller and faster...
... You wouldn't be biased, would you? Your trie implementation would seem to have been written deliberately badly. :-) ... I notice that your trie...
Rainer Thonnes
rainer@...
Dec 24, 2003 11:40 am
265
... I'm cut to the quick. If not for your ":-)", I think I would be really offended <grin>. Seriously, I deliberately tried to make both of them as good as ...
... It should not be difficult when using your scheme of two pointers per node. I do remember it being quite tricky with my single pointer scheme, when I used...
Rainer Thonnes
rainer@...
Dec 25, 2003 12:21 pm
267
... I don't have your email address (I've been using the groups web interface, which hides the email address). If you'll email me (ed underscore davis2 at...
... Andrew Appel & Guy Jacobson - you can find their paper on my Scrabble page: http://www.gtoal.com/wordgames/scrabble.html I've written quite a bit of...
Because of the high overlap I'm posting this to compilers101 and staticrecompilers as well. But please followup to dynarec. ... Hello guys, I'm bored out of...