Principles of programming languages Maarit Harsu / Matti Rintala / Henri Hansen
TUT Pervasive Computing
1
Description of a programming language
- Syntax
– describes the structure of a language – given as grammatical rules – which streams of symbols (characters) form a legal program
- Syntax checking (syntax analysis, parsing)
– construction of a parse tree – does the input program follow the grammatical rules – checking requires program transformation from a character string into a stream of tokes (lexical analysis, scanning)
- Semantics
– what is the meaning of a given legal program – which kind of computation does a legal program produce