Description

2 UNARY OPERATORS

C has several unary operators, which operate on a single value. In this chapter, you’ll extend your compiler to handle two unary operators: negation and bitwise complement. You’ll transform complex, nested unary expressions into simple operations that can be expressed in assembly. Instead of performing this transformation in a single compiler pass, you’ll introduce a new intermediate representation between the AST produced by the parser and the assembly AST produced by the assembly generation pass. You’ll ...

Get Writing a C Compiler now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.