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...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

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 216 - 247 of 1320   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
216
I have a question about hand-written scanners. I have noticed a difference in the scanners found in Wirth's books (Algorithms+Data Structures=Programs,...
ed_davis2
Offline Send Email
Jun 19, 2003
1:15 am
217
... I don't think it matters much. When looking at the bigger picture (ie., the whole lexer and all of the symbol types it has to recognize), which one ...
Bart
bart_trzynad...
Offline Send Email
Jun 19, 2003
5:23 am
218
... IIRC, gcc either reads the whole file or mmaps it depending on its size. It was the optimal way on most systems at the time. The end result is the same...
Olivier Galibert
galibert@...
Send Email
Jun 19, 2003
6:31 am
219
... A few notes: In many implementations, getc is a macro, so calling it has very little overhead. Additionally, FILE streams are buffered, so very little disk...
ed_davis2
Offline Send Email
Jun 19, 2003
12:16 pm
220
... The EMAS compilers from the 70's used memory-mapped files, which is equivalent to reading the whole file into a buffer. That feature reappeared with the...
Graham Toal
graham_toal
Offline Send Email
Jun 19, 2003
12:56 pm
221
... I don't think that's the case nowadays. GCC doesn't implement it as a macro nor does MSVC. ... That's true. The overhead of buffered input does become...
Bart
bart_trzynad...
Offline Send Email
Jun 19, 2003
2:56 pm
222
Here is another try at a simple scanner, for the simple language noted below. This version loads the entire file before scanning, and uses macros to access...
ed_davis2
Offline Send Email
Jun 19, 2003
3:12 pm
223
... You're right. I was sure that most C compilers implemented getc/fgetc as macros, but the last time I looked was around 1985 or so (when I was learning C),...
ed_davis2
Offline Send Email
Jun 19, 2003
3:33 pm
224
... As others have already indicated, it makes no real difference, in principle, whether you read the whole file into memory (or map it into virtual memory)...
Rainer Thonnes
rainer@...
Send Email
Jun 19, 2003
6:44 pm
225
... Isn't it also the case that there is no universally promulgated standard? I mean, whereas every C implementation worth its salt implements all the usual...
Rainer Thonnes
rainer@...
Send Email
Jun 19, 2003
8:48 pm
226
... I'd guess that file input was a little less complex and could be implemented with macros back then. You're right about the buffering and if anything, it's...
Bart
bart_trzynad...
Offline Send Email
Jun 20, 2003
1:17 am
227
... A stack of lists? Actually, more like a stack of stacks. Well, since a stack is typically implemented as a list anyway, the distinction may seem a little...
Rainer Thonnes
rainer@...
Send Email
Jun 20, 2003
2:22 pm
228
How would one parse a pascal-like super "in" operator: Where the "in" could be used for not only integers, but any basic data type (integers, reals, strings): ...
ed_davis2
Offline Send Email
Jun 20, 2003
8:16 pm
229
... It certainly does. ... How do you treat comparators, i.e. the likes of "==" and ">=" and "<"? Are they just ordinary binary operators handled by your...
Rainer Thonnes
rainer@...
Send Email
Jun 20, 2003
10:52 pm
230
... I don't have any comments on parsing this but if you are doing pascal-like set extensions in your language, you may find this helpful in actually...
Graham Toal
graham_toal
Offline Send Email
Jun 21, 2003
12:42 am
231
... Yes. ... Yes. For instance: void expr(int p) { primary(); while (isBinaryOperator(token.sym) && precedence(token.sym) >= p) { const symbol op = token.sym; ...
ed_davis2
Offline Send Email
Jun 24, 2003
6:17 pm
232
... Sure. I may not have translated from my dialect of BNF notation to yours correctly. In yours, it seems, curly brackets denote indefinite repetition (zero...
Rainer Thonnes
rainer@...
Send Email
Jun 24, 2003
9:30 pm
234
... Definitely! Thanks for sharing this. I recently upgraded to Win2K and I completely forgot to backup my bookmarks ... lost. ... Bart...
Bart
bart_trzynad...
Offline Send Email
Jun 25, 2003
11:07 pm
235
Since Yahoo did such a fine job of trashing the HTML here, I'm resending as text, and I'll delete the original post from the archive... ...
Graham Toal
graham_toal
Offline Send Email
Jun 26, 2003
1:59 am
236
Here's a compiler worth a look if you haven't seen it before: http://fabrice.bellard.free.fr/tcc/ http://fabrice.bellard.free.fr/tcc/tcc-doc.html Small and...
Graham Toal
graham_toal
Offline Send Email
Aug 3, 2003
8:47 pm
237
One of my favorites: ftp://ftp.cs.chalmers.se/pub/users/augustss/oc.tar.gz From the read.me: This is an implementation of a small subset of C. Do `make test'...
ed_davis2
Offline Send Email
Aug 8, 2003
12:38 pm
238
... Cool! From the same site, I was also impressed by his original 'tiny-c': http://fabrice.bellard.free.fr/otcc/otccelfn.c Pretty impressive, if not a little...
ed_davis2
Offline Send Email
Aug 8, 2003
12:53 pm
239
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...
Graham Toal
graham_toal
Offline Send Email
Sep 1, 2003
11:21 pm
241
... 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...
Bart
bart_trzynad...
Offline Send Email
Sep 2, 2003
3:59 am
242
... 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@...
Send Email
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...
Bart
bart_trzynad...
Offline Send Email
Sep 13, 2003
8:32 pm
244
... you can have: int fred; unsigned int fred; signed int fred; unsigned fred; (and probably "signed fred;" although I've never seen that...) so...
Graham Toal
graham_toal
Offline Send Email
Sep 14, 2003
5:06 pm
245
... 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...
Bart
bart_trzynad...
Offline Send Email
Sep 14, 2003
6:04 pm
246
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,...
ed_davis2
Offline Send Email
Sep 25, 2003
7:50 pm
247
... 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...
Bart
bart_trzynad...
Offline Send Email
Sep 26, 2003
5:49 am
Messages 216 - 247 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