compiler-theory

how to read the header block gcc compiler put to .o .a and an executable

I'd like to read the header block gcc put to the beginning of all .o .a and executables. In those days, on Solaris, there was an utility for this purpose. On linux, is similar utility available? ...

What exactly happens when you dereference a static variable in C?

So lets say I have this code int my_static_int = 4; func(&my_static_int); I passed the function a pointer to my_static_int, obviously. But what happens when the code is compiled? Avenue I've considered: 1) When you declare a non-pointer variable, C automatically creates its pointer and does something internally like typedefs my_stati...

Interesting Compiler Projects

I am looking at a semester long project in compilers that could also evolve into my graduate thesis. I do not have much experience in this field (I have written a small "translator" for Pascal as part of my undergraduate work) --- I have been more into Machine Learning, and AI. The idea is to take this up as a challenge, and learn someth...

Top-Down Parser want to have decent case example left-recursion in a 'Code'

Hello fellow stack over flow members. I'm studying for compiler class. I did understand Top-Down Parser should avoid left-recursion, and transform into right-recursion way. Questions are, a) am I understanding right Top-Down Parser is equal to LL and Bottom-Up Parser is equal to LR ? b) I've found out left-recursion is Rule that cal...

call by name in C#?

Hi everybody. Can anyone tell me how can I implement Call By Name in C#? I really have no idea about this. Thanks for any advise. ...