Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

compilers101 · Compilers 101

The Yahoo! Groups Product Blog

Check it out!

Group Information

? 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.

Messages

Advanced
Messages Help
Messages 96 - 125 of 1492   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand Author Sort by Date ^
96 Bart
bart_trzynad... Send Email
Jan 3, 2003
4:38 am
Hello, I've been having a tough time getting C declarators to parse properly. I'm trying to construct a list of declarators in a type structure and although I...
97 Graham Toal
graham_toal Send Email
Jan 3, 2003
6:01 am
... An alternative suggestion: parse it with a simple left to right grammar, and treat everything as an operator and apply operator precedence rules? highest...
98 Bart
bart_trzynad... Send Email
Jan 3, 2003
6:40 am
... Parse the entire language that way? ... How to parenthesis fit into this picture? I've found that parsing declarations with only involve * and [] to be ...
99 Rainer Thonnes
rainer@... Send Email
Jan 3, 2003
11:28 am
... I'm pretty sure x is right but y and z are both wrong. AIUI, indexing has higher precedence than indirecting, i.e. if "*x[4]" is an int, then x is not a...
100 Rainer Thonnes
rainer@... Send Email
Jan 3, 2003
1:24 pm
... Why not? :-) ... I think this is where the BCM lies. If you start from the premise (which I believe to be false) that precedence at the outer level is...
101 Bart
bart_trzynad... Send Email
Jan 4, 2003
1:49 am
... x is right, as you say, and this can be quickly verified by thinking of argv. I use "char **argv" in my main() declarations, but *argv[] is valid too. I'm...
102 Bart
bart_trzynad... Send Email
Jan 4, 2003
2:40 am
... I'd have to write a parser of my own completely from scratch. I could also just do a top-down hand-written parser a la LCC (and most commercial compilers?)...
103 Graham Toal <gtoal...
graham_toal Send Email
Jan 4, 2003
9:11 am
... with and ... elsewhere in ... odd, but I ... to see ... I have to admit I'd never seen or used that construct either. I suspect the following program might...
104 Rainer Thonnes
rainer@... Send Email
Jan 4, 2003
11:13 am
... That's the exact same example I used in reaching my conclusion. ... Don't bother. I forgot to think inside-out here. You were right. ... Um, no, sorry...
105 Rainer Thonnes
rainer@... Send Email
Jan 4, 2003
12:16 pm
... I didn't express that very well. Replace the last sentence with: Then, working in, the "y" in (*y) must be a pointer to what (*y) is....
106 Graham Toal
graham_toal Send Email
Jan 4, 2003
3:28 pm
... What he said. Just keep the tree. We haven't discussed casts yet. casts have a pretty obvious interpretation in our data structure: cast / \ type expr ...
107 Graham Toal
graham_toal Send Email
Jan 4, 2003
3:43 pm
You're probably aware of this, but just to get it in writing... int a[10][10] is 10*10*sizeof(int) bytes. It's a 2-d array and there are no pointers involved,...
108 Rainer Thonnes
rainer@... Send Email
Jan 4, 2003
4:13 pm
... There would have to be, if there are still any compilers around which use this technique. Nobody would write the parse tables by hand. The Edinburgh...
109 Graham Toal <gtoal...
graham_toal Send Email
Jan 4, 2003
6:08 pm
... the ... grammar ... which ... I think the sort of representation Rainer is talking about is an extended phrase syntax such as this (I'm translating...
110 Graham Toal <gtoal...
graham_toal Send Email
Jan 4, 2003
10:20 pm
... Rainer corrected the error above, and I'd like to repeat what he said with a slightly different take: any time you have a bracketed expression, ask how you...
111 Bart
bart_trzynad... Send Email
Jan 12, 2003
8:59 pm
Hello everyone, Well, I'm back from Maui (with the tan to prove it ;))! It was wonderful, as expected, but now it's time for me to make up for lost coding...
112 Bart
bart_trzynad... Send Email
Jan 12, 2003
9:52 pm
... If you remain consistent with my method, the logic remains the same until you decide to remove the unnecessary bracketing. *(*X)[10] would be equivalent to...
113 Bart
bart_trzynad... Send Email
Jan 12, 2003
10:20 pm
... Interesting program. I've only looked at this man page but I'm going to have to get this program running here so I can play with it. ... This is how it...
114 Bart
bart_trzynad... Send Email
Jan 12, 2003
10:27 pm
... In which situations (if any) will the compiler reject an explicit cast? If it only happens in some really obvious case, couldn't the cast be completely...
115 Rainer Thonnes
rainer@... Send Email
Jan 12, 2003
10:36 pm
... I've been waiting for you. ... Well it depends what you mean by "handled first". It's handled first working form the inside out, which is what happens when...
116 Bart
bart_trzynad... Send Email
Jan 12, 2003
10:39 pm
... How would you use a multi-dimensional array with insufficiently defined bounds? You can declare main as: int main(int argc, char argv[][]) But, AFAIK, you...
117 Rainer Thonnes
rainer@... Send Email
Jan 12, 2003
10:53 pm
... The thing to remember is that the order of evaluation of a non-declarative expression does not depend on the declaration. The declaration only supplies...
118 Bart
bart_trzynad... Send Email
Jan 13, 2003
12:13 am
... Oops, I've been thinking about this in a backwards fashion because I wanted to construct the type declarator list by always adding to the front of the ...
119 Graham Toal <gtoal...
graham_toal Send Email
Jan 13, 2003
5:11 am
... precedence> ... precedence> ... The problem here is this: '*'var_decl | var_decl '[' expr ']' You need an additional layer of grammar in here to ...
120 Graham Toal <gtoal...
graham_toal Send Email
Jan 13, 2003
5:13 am
... Or? Not a clue, sorry. I assumed it was some C++ thing! G...
121 Graham Toal <gtoal...
graham_toal Send Email
Jan 13, 2003
5:18 am
... cast? I didn't know it ever did. There's rules about casting lvalues (which GCC extensions break), and about taking the address of register or const data,...
122 Graham Toal <gtoal...
graham_toal Send Email
Jan 13, 2003
5:37 am
... recognized ... No No No! First of all there is no 'first&#39;. There is 'higher in the parse tree'. They are not the same thing. Stop thinking about the...
123 Rainer Thonnes
rainer@... Send Email
Jan 13, 2003
1:33 pm
... Exactly. On the other hand, if he's trying to do clever stuff like creating linear lists *during* parsing, then he probably does need to know in what...
124 Bart
bart_trzynad... Send Email
Jan 13, 2003
6:42 pm
... The shift/reduce conflict I was talking about :) ... It is. But there is a small advantage in that it simplifies the grammar a bit. yacc and its clones...
125 Bart
bart_trzynad... Send Email
Jan 13, 2003
6:44 pm
... Maybe they meant "::". NAME alone cannot appear in both rules because that's ambiguous. ... Bart...
Messages 96 - 125 of 1492   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

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