Hacker News new | ask | show | jobs
by lilyball 660 days ago
The weird thing about C is the syntax does not clearly identify which tokens refer to types and which tokens refer to other things. A statement like `myint x` is only a variable declaration if `myint` is a type, which means in order to identify a variable declaration, you have to know the complete set of named types, so constructing an AST requires keeping track of types.
1 comments

Yeah, it's a really weird thing when you look into the yacc grammar of a C compiler.