Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C grammar in GCC source code

I'm looking for the C grammar in GCC source code, more specifically for the grammar in the yacc/bison form.

like image 991
Haruki Avatar asked Apr 27 '10 12:04

Haruki


2 Answers

GCC of version 4.3 did not contain explicitly written C grammar. Parsing and semantical analysis were performed simultaneously, without presenting syntax tree as a separate data structure.

Information source: I read the GCC source code.

like image 107
P Shved Avatar answered Oct 06 '22 20:10

P Shved


Found the C grammar in Yacc specification in the GCC version 3.3 in the file "c-parse.y"

like image 44
Haruki Avatar answered Oct 06 '22 18:10

Haruki