One-pass compiler: Difference between revisions

Content deleted Content added
Arrays are passed by value in pascal. They are not automatically passed by reference. Some compilers will make that optimization if an array parameter is marked as const, but absent the parameter being a "var" or "const" it is passed by value. One source of confusion is that there aren't "dynamic arrays" in standard pascal. Standard pascal only has static arrays (i.e. arrays with a fixed size as part of the type definition). Dynamic arrays are typically a reference type and passed by reference, but not static arrays, even in non-standard versions of pascal.
Difficulties: "presence or not" → "presence or absence"
Line 13:
 
==Difficulties==
The basic problem is of forward references. The correct interpretation of a symbol at some point in the source file may be dependent on the presence or notabsence of other symbols further on in the source file and until they are encountered, correct code for the current symbol cannot be produced. This is the problem of context dependence, and the span can be anywhere from adjacent symbols to arbitrarily large amounts of source text.
 
===Local context===