Stewart Gordon wrote:
Have you written a compiler for a superset of C in which arbitrary forward references are allowed? How did you do with overcoming the difficulty that is C's context-sensitive grammar?
C (minus preprocessor, of course) is only context-sensitive with regards to casts AFAIK. Since casts are always expressions, you can rewrite parenthesized expressions to casts (or vice versa) in a second pass but still allow forward references. Java and C# are also context-sensitive as far as casts go.
