HackerTrans
トップ新着トレンドコメント過去質問紹介求人

russell

no profile record

コメント

russell
·15 年前·議論
IIRC C was not context free, a requirement for BNF. The problem was in variable declarations, probably structures, but I dont remember the details. (It may have been fixed by C99.) It is often possible to transform a grammar from context sensitive to context free by trickery in the lexer. Because of this I dont recommend C as a first compiler language, although it makes an excellent target language.