next up previous
Next: c-code Up: Predefined Phases Previous: Predefined Phases

ast

The AST phase prints a human-readable version of the abstract syntax tree to standard output. For example, given the following foo.c:

int main () {
        int     a;

        a = 1;
}

Entering cbz -ast foo.c will result in this:

   0.unit
   1..proc:
   2...decl: "main" proc
   3....func:
   4.....decl: (abstract) formal
   5......prim: void
   6.....prim: int
   7...block:
   8....decl: "a" block
   9.....prim: int
  10....exprstmt:
  11.....binary: op='='
  12......const: val="1"
  13.......prim: int
  14......id: "a" decl=#8



Calvin Lin
2002-01-31