C Language is a context free or a context sensitive language?
C Language is a context free or a context sensitive language?
It is a context-free language, as far as I can tell from this: http://en.wikipedia.org/wiki/Context-free_language
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
But friend where it is mentioned C Language!!!
C is nearly context free. The one exception I can think of is typedef. If typedef precedes a definition the symbol defined becomes a type rather than a variable.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Okay so what is the final answer?
So it's a "nearly context free", meaning that there are exceptions to the context freeness, but the majority of the language is context free. I guess it depends on your rules for where it ends up - is a context-free language that has one or two context-sensitive constructs context-free with exceptions [note that typedef, which is the one context-sensitive construct in C is avoidable - it just makes some things a bit harder to do].
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.