![]() |
![]() |
![]() |
![]() |
![]() |
Basic Compiling Theory
A programming language can be defined by describing what its programs look like (the syntax of the language) and what its programs mean (the semantics of the language).
For specifying the syntax of a language, such as TTCN, the widely used notation called context-free grammar, or BNF (Backus-Naur Form) is used. (A more precise definition of context-free grammar will be defined in Syntax Definition).
To describe the semantics of a language is more difficult, as no appropriate notation for semantic description is available. Consequently, when specifying the semantics of a language an informal description technique has to be used. TTCN uses Semantic actions that, in natural language, describes the actual semantic given a specific context.
Besides specifying the syntax of a language, a context-free grammar can be used to help guide the translation of a programs. A grammar oriented compiling technique, known as syntax-directed translation, is very helpful for organizing a compiler front end.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |