help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc front end


From: Christian Christmann
Subject: gcc front end
Date: Wed, 27 Apr 2005 18:38:30 +0200

Hi,

I've been reading the "GCC Frontend Howto" by Sreejith K Menon available
on www.tldp.org.

In section 7.2 he is describing how to create a tree for expressions (of
the new language which has to be created) using the function

build(EXPR, type, left, right)

with "left" and "right" being trees.


In his bison parsing file he invokes the function

exp '+' exp  { $$ = build (PLUS_EXPR, integer_type_node, $1, $3); }


I didn't get the idea of trees used in the GCC frontend. Why do we use
them ($1, $3) for every expression?

Thank you.

Chris


reply via email to

[Prev in Thread] Current Thread [Next in Thread]