Think In Geek

In geek we trust

A tiny GCC front end – Part 9

Today we will do something relatively easy: let’s add a way to declare boolean variables and express boolean literals.

Continue reading “A tiny GCC front end – Part 9” »

A tiny GCC front end – Part 8

Now that we have the basic language set implemented we can consider adding new features to it. Today we will add arrays.

Continue reading “A tiny GCC front end – Part 8” »

A tiny GCC front end – Part 7

In this part we will complete the missing statements from part 6 and finish our front end.

Continue reading “A tiny GCC front end – Part 7” »

,

A tiny GCC front end – Part 6

In part 5 we described the objects that we will need to semantically analyze a tiny program. In current part we will extend the parser of part 4 to do the semantic analysis and create the GENERIC trees.

Continue reading “A tiny GCC front end – Part 6” »

,

A tiny GCC front end – Part 5

In the last installment of this series we saw how to verify that the sequence of tokens of the input is syntactically valid. Today we will see what we need to give it meaning.

Continue reading “A tiny GCC front end – Part 5” »

,

A tiny GCC front end – Part 4

Now that we have a stream of tokens we can start performing syntactic analysis.

Continue reading “A tiny GCC front end – Part 4” »

,

A tiny GCC front end – Part 3

Now that the minimal infrastructure is already set, we can start with the implementation of our tiny front end. Today we will talk about the lexer.

Continue reading “A tiny GCC front end – Part 3” »

,

A tiny GCC front end – Part 2

The previous installment of this series was all about the syntax and the semantics of the tiny language. In this chapter we will start implementing a front end for tiny in GCC. The journey will be long but rewarding. Let’s get started.

Continue reading “A tiny GCC front end – Part 2” »

,

A tiny GCC front end – Part 1

In this series we will see the process of adding a new front end for a very simple language in GCC. If you, like me, marvel at the magic of compilers then these posts may be for you.

Continue reading “A tiny GCC front end – Part 1” »

, , ,

Toying with GCC JIT – Part 3

In the last two parts of this series we’ve seen how to use GCC JIT and how to apply it to a simple regular expression matcher. But an open question remains, has it been worth the effort? This part will try to figure it out.

Continue reading “Toying with GCC JIT – Part 3” »

Previous Posts