<compilers@is-not-my.name> wrote in message news:12-04-040@comp.compilers...

> I have an undergraduate degree in computer science as well but we didn't> get into much theoretical stuff.

Same here. I started writing my own compilers out of necessity (to make it
easier to program the microprocessor circuits I was building; it was just
not practical to run someone else's compiler).

But I also created my very simple languages which could do just what I
needed.

I'd heard of the 'proper' parsing methods in my compiler course, but ignored
all that and just did whatever was necessary to tokenise source code, parse
the few statements I had in the language, and write whatever code was
required to run the results. And it worked! I think those first attempts
might even have been single pass compilers, so ultra-simple if that was the
case.

> I really want to understand the parts well enough to write my own pieces> and not use something other people have written. That method has always been a> good idea in the past because I was forced to understand how the code> works. If you use other people's code you can miss things.

(Again, same here. Thirty years on and I still don't think I've ever used
someone else's actual source code (or language). (However I do use some
libraries, and someone else's OS.))

>> I hope this gives you some hope because its not the easiest subject to>> tackle. There is no substitution to just working at something just>> starting your own small basic compiler project to understand>> expressions will give you very much of what you want to know for the>> basics in my opinion and just work at that in your own time.>> Thanks that's exactly what I'm after. I don't have any plans to rock> the compilation world or write books on the subject. I'd be very excited> to be able to understand the basics enough to produce something I can use and> to use that as a path to additional learning on the topic.

Start with a very simple language. Perhaps even a version of Basic (as a
useful language consisting of Let, If, Goto, Print (and perhaps Input) can
be created without any structured statements; only expressions need
recursive methods to deal with). You might consider also interpreting the
language rather than translating to a target language. And use an easy,
dynamic language to implement it all in. Stay away from C, C++, or anything
else with curly braces.