CS179E Language Specification Script

Purpose To guide a team though the formal specification of a programming language.
Entry Criteria A programming language design
General The overriding criterion for a language's syntax is that programs should be readable and should facilitate semantic understanding of the program. Therefore, the syntactic forms and the semantic concepts should be (more or less) in one-to-one correspondence. Formalize the design with a formal or informal specification (syntax and semantics) to facilitate communication of the design to other people.
Phases Activities Description
1
Character 
Set
Select an appropriate character set

2

Lexical Structure Define the tokens using regular expressions 
3 Grammatical

Structure

Define the formal grammatical structure with a context-free grammar (BNF, EBNF) or syntax diagrams. 
4
Contextual 
Information
Define the semantic (contextual) constraints.
  • Scope rules
  • Type rules, 
  • Etc.
5
Semantics Define the semantics of the language as precisely as possible using a combination of formal and informal specification
Exit criteria
A language specification document
  • Formal specification of syntax
  • Informal specification of the semantics (contextual information)

Take One!