Re:The earliest versions of the first C compiler known to exist
by mort96 on Wednesday March 26, 2025 @07:57AM
(#43481220)
Huh? How are you supposed to parse a statement like 'x * y;' without some form of semantic analysis? You need to be able to look up whether 'x' has been declared as a variable or a type, and parse it as either a multiplication expression or a variable declaration. Am I wrong on this?
[ Parent
| on HN ]
Re:The earliest versions of the first C compiler known to exist
by uecker on Wednesday March 26, 2025 @09:14AM
(#43481929)
True. But this does not require full semantic analysis, it only requires distinguishing between typedef names and other identifiers. You can argue that this part of semantic analysis, but this would be rather pedantic. Tracking this could equally seen as part of parsing.