A system and method for compiler error recovery, comprising analyzing the
syntactic structure of a first program in a first programming language,
wherein the first program can be represented by a first set of tokens,
detecting a syntax error in the first program, remedying the syntax error
by adding at least one token to the first set of tokens according to one
of: 1) a prefix definition; and 2) an idiom definition, and wherein the
detection of the syntax error occurs at the behest of an extensible
compiler framework.