Overview
- Define the new language's concrete syntax
- Define the new language's abstract syntax
- Define the meaning of each syntactic element using a known language
- Evaluation semantics (execution)
- Static semantics (type checking)
There are three ways of doing this:
- denotational - map each language structure to a mathematical function
- operational - define how legal strings in a language are evaluated
- axiomatic - define pre/post-conditions on execution of language constructs
Defining Syntax
A set of language rules can be infinitely large with a finite number of symbols
Interpreters
Generally, they map language to a value.
Parser will translate numbers into the language.
Common Symbols (important):
! - bank
? - hook
* - splat
#! - shebang