The Problems We Faced Each of the secondary functions of region descriptor processing was implemented ad hoc , each in its own program with its own lexical analyzer and parser. Each parser defined the region descriptor language somewhat differently. Each parser had side effects, making it difficult to add or change functionality. We determined that the underlying metaphor of a software CPU , executing instructions compiled by the parser, remained a sound conceptual framework for the syntactic and semantic analysis of region descriptors. Lexical analysis provides tokens to a compiler.
Compilation produces an object program of software CPU instructions.
Execution of the object program creates a mask or other resultant. We retained xyacc as the language definition language. Using xyacc simplified generating a correct and reliable parser. The integral processing, with xyacc, from lexical analysis through compilation challenged flexibility that we wanted in using the lexical analysis and object program. We defined a uniform and extensible system of control flags to achieve the desired flexibility in using information at any stage of the linguistic analysis.