Hello, I've been working on a standalone C parser (with yacc) which builds a tree as well as type information for each data type. It's going well and it ...
... Is typedef a storage class??? Those storage classes are all mutually exclusive except for typedef which I thought of as a declarator. ... You mean "int...
... It is a storage class. You can't do "typedef static int STATIC_INT;", for example. ... No, that can't be... External declarations mean the variable is ...
... Well, syntactically it may look and feel like a storage class, but it isn't one because it doesn't allocate storage. ... Graham was not using "external" as...
Rainer Thonnes
rainer@...
Feb 12, 2003 12:33 pm
168
... Yeah, but I still need to keep track of it as a storage class so that no other storage class may be assigned to it and so that the lexer can identify it as...
... Agreed. If they are syntactically equivalent, and share the same mutual incompatibilties, there's no reason not to get the parser to reject the error. ......
Rainer Thonnes
rainer@...
Feb 12, 2003 11:59 pm
170
... I'm not sure what you mean by this. My parser does 3 things: Builds an AST, constructs data type (TYPE) structures, and performs some semantic checking...
... It is needed (sort of) in GCC for one of the non-standard extensions: http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html So, how's the code coming...
... I guess they found a good way to make a useless keyword useful again ;) ... Nothing worth showing yet. It's very messy, but I think it's coming along ...
... What I meant was whether the parser is aware of program context. In particular, does it know whether a declaration is inside or outside a procedure? If...
Rainer Thonnes
rainer@...
Feb 13, 2003 10:27 am
174
... Yes, it is aware of these sorts of things. ... This is what I'm currently doing. When I parse specifiers, I fill out a structure (struct specifiers) which...
... tree of ... have a ... It *must* be a tree structure in principle - for example (1+2)*(3+4) *cannot* be represented linearly. (Use of temporaries is...
... You're talking about _intermediate_ code? I thought the optimization process was this: source -> tree or DAG -> some tree optimizations -> generated i-code...
... code -> ... transformation of ... linear ... Peter Robertson, I know you're lurking on this list, it's time to stand up and be counted :-) This is...
Hello, Just a few minutes ago I realized how easy CSE with DAGs is and had to ask myself what I was thinking when I posted my CSE demos a while back to this ...
Hello, I've found some information on the Open64/ORC compiler's intermediate representation, WHIRL (which may also be used by SGI's MIPSPro compiler) here: ...
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@...
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...
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...
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...
... 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 ...
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...
... 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...
... 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...
... 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...
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...
... 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...