5 ms·
well, that's like saying the compiler when it sees something like: int x; x = 1; it has to keep track of "x". of course it does. what programming langua
by zabzonk 2y ago
well, that's like saying the compiler when it sees something like:
int x;
x = 1;
it has to keep track of "x". of course it does. what programming languages don't?
- lilyball 2y agoThe 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.
- PaulHoule 2y agoYeah, it's a really weird thing when you look into the yacc grammar of a C compiler.