Jump to content

Template:GNU C Compiler Internals/Parser 4 1

From Wikibooks, open books for an open world

Parser is implemented manually in file c_parser.c. Compared to earlier releases of GCC, the new parser generates a lower level AST. There were special tree codes for loops, for example FOR_STMT denoted a for() loop. In this release the loops are represented as conditional statements and gotos, that is trees of codes COND_EXPR, LABEL_EXPR, and GOTO_EXPR. This probably means that it is impossible to raise AST representation to original source code.