Search the web
Sign In
New User? Sign Up
compilers101 · Compilers 101
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 182 - 211 of 1320   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
182
Hi ! ... I think "forest" should be taken literally: What is a forest ? It consists of multiple trees ! Sometimes the trees have distinct roots but may merge...
Kai Schuetz
schuetz.kai@...
Send Email
Mar 5, 2003
1:17 pm
183
... After I wrote the email, I did some more reading and found out more about how LCC trees and dags work. LCC's frontend builds a list of trees. A tree only...
Bart
bart_trzynad...
Offline Send Email
Mar 5, 2003
4:18 pm
184
Hello, This email message is a notification to let you know that a file has been uploaded to the Files area of the compilers101 group. File :...
compilers101@yahoogro...
Send Email
Mar 7, 2003
9:32 pm
185
Hi, I have added a couple of links that I think will be interesting to the group. One describes in quite good detail the internals and other aspects of the...
africabushpilot
Offline
Mar 7, 2003
9:36 pm
186
... I was just looking at this the other day and decided to implement Small C first. I've put my original C compiler on hold (I have most of the data ...
Bart
bart_trzynad...
Offline Send Email
Mar 8, 2003
6:29 am
187
I can't believe I've got this running again, but it does appear to work! Below is the output from my Skimp compiler for the 6809 which I wrote as a 3rd-yr...
Graham Toal
graham_toal
Offline Send Email
Mar 8, 2003
10:23 pm
188
... Where in your compiler is the code for this? I'd like to take a look. ... Well, not quite ;) I have been playing with a small toy parser which accepts C...
Bart
bart_trzynad...
Offline Send Email
Mar 8, 2003
10:58 pm
189
... Sorry, it's lamentably commented; we had a manual which explained it all. I have scans of the manual and I may have recently found the source of the...
Graham Toal
graham_toal
Offline Send Email
Mar 8, 2003
11:40 pm
190
... look. I have something like a dozen compiler books at home right now and not one of them explains this worth a damn. The best explanation I've found...
Graham Toal
graham_toal
Offline Send Email
Mar 10, 2003
5:32 am
191
... Thanks for putting these up! I've got them saved on my system now. ... Bart...
Bart
bart_trzynad...
Offline Send Email
Mar 10, 2003
10:50 pm
192
I decided to see if I could write the code to convert complex if()s into simple tests and jumps, just to keep my hand in. It's as tricky as I remembered to...
Graham Toal
graham_toal
Offline Send Email
Mar 11, 2003
6:13 am
193
... I persevered. I think it works now. 40: LINE 10: if (((x != i) || (y != j)) && (i == j)) i = j 41: [@AST 5] NE [@AST 13] 42: [@AST 8] NE [@AST 12] 43: OR...
Graham Toal
graham_toal
Offline Send Email
Mar 11, 2003
7:19 am
194
... I'll give it a shot tomorrow afternoon. After that, I'll probably implement switch statements (not looking forward to it) and then the rest of the...
Bart
bart_trzynad...
Offline Send Email
Mar 11, 2003
7:26 am
195
... The principles are easy enough. The key is to avoid being tricked into thinking that ANDs and ORs differ fundamentally from each other. In fact they are...
Rainer Thonnes
rainer@...
Send Email
Mar 11, 2003
10:57 pm
196
Here's the critical parts of my version of compiling conditionals. It doesn't yet handle negated conditions (eg "if (!(a == b)) ...") or the tweak you need to...
Graham Toal
graham_toal
Offline Send Email
Mar 12, 2003
3:44 am
197
Thanks for posting the code! I think I get the basic idea, I'm going to read your code and Rainer's post a bit more thoroughly to make sure I get it. I'm done...
Bart
bart_trzynad...
Offline Send Email
Mar 13, 2003
5:20 pm
198
Below is something I whipped up to day based on the info Rainer and Graham have posted. An input file can only contain one condition with &, (, ), or ...
Bart
bart_trzynad...
Offline Send Email
Mar 14, 2003
3:58 am
199
./cond2 /dev/tty a|b|c|d ... a b c d test a; goto 0 if TRUE test b; goto 3 if FALSE goto 0 3: test c; goto 2 if FALSE goto 0 2: test d; goto 1 if FALSE 0:...
Graham Toal
graham_toal
Offline Send Email
Mar 14, 2003
7:05 am
200
... Hmm, I'll try it again and post the results. ... The 0 and 1 labels are only printed to show that they correspond to true/false. Of course there would be a...
Bart
bart_trzynad...
Offline Send Email
Mar 15, 2003
1:04 am
201
I think the parser below works. If there are any problems, I'd guess they will surface with rightward trees (A&(B|C&(D&E), etc.) I can't say I knew what I was...
Bart
bart_trzynad...
Offline Send Email
Mar 15, 2003
4:48 am
202
It's looking good! To finish it off so its actually usable in your compiler, you need to add actual comparisons (eg ==, !=, < etc) so that you can work out...
Graham Toal
graham_toal
Offline Send Email
Mar 15, 2003
7:57 pm
203
... against ... A cmp against 0 can be replaced by a TEST reg,reg on X86 or a TST on 68K. On MIPS and Alpha, I think, there would be no comparison, just a...
Bart
bart_trzynad...
Offline Send Email
Mar 15, 2003
9:59 pm
204
... I thought it would be interesting to have a look at some code sequences for conditionals to see the variations possible. They're all pretty similar in...
Graham Toal
graham_toal
Offline Send Email
Mar 16, 2003
6:39 am
205
... I tested this function: int Foo(int a, int b, int c, int d) { if (a && (b || c) && d) return 1; return 0; } On Alpha (w/ GCC -O4): Foo: .frame $30,0,$26,0 ...
Bart
bart_trzynad...
Offline Send Email
Mar 16, 2003
8:20 am
206
... I find Bart's DoCond() function excessively complicated, as it has to look down into the sub-trees of AND- and OR-nodes to decide what to do. ... For what...
Rainer Thonnes
rainer@...
Send Email
Mar 16, 2003
4:08 pm
207
... Indeed, but to know if that is true you need to actually compile the code in the then/else part rather than guess, because you may have something in there...
Graham Toal
graham_toal
Offline Send Email
Mar 16, 2003
10:36 pm
208
... Stochastic programming, eh? If it doesn't work, change something. Change anything. Keep going until it works. Hmm. The logical approach has much to...
Rainer Thonnes
rainer@...
Send Email
Mar 16, 2003
10:52 pm
209
... Actually, guys, the way I thought about it when I wrote my version was to forget about multiple chains of conditions at the same level and just ask myself...
Graham Toal
graham_toal
Offline Send Email
Mar 16, 2003
11:40 pm
210
To add to the collection: LCC32 ... cmpl $0,-4(%ebp) je _$2 cmpl $0,-8(%ebp) jne _$4 cmpl $0,-12(%ebp) je _$2 $4: cmpl $0,-16(%ebp) je...
Graham Toal
graham_toal
Offline Send Email
Mar 17, 2003
5:59 am
211
... Actually, that was the n-ary tree model... The forest model is alive and well ;) Forests are simply trees linked together. In the case of my compiler, they...
Bart
bart_trzynad...
Offline Send Email
Mar 17, 2003
6:37 am
Messages 182 - 211 of 1320   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help