ln002 - Formal Language Specification Programming languages...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Formal Language Specification Programming languages are only useful if they are “understood” by a computer. In order to insure this, programming languages must have: A concise form (syntax), and A concise meaning (semantics) neither one can be ambiguous.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Formal Language Specification Language Specifications consist of two parts: The syntax of a programming language is the part of the language definition that says what programs look like; their form and structure . The semantics of a programming language is the part of the language definition that says what programs do; their behavior and meaning .
Background image of page 2
Formal Language Specification In order to insure conciseness of language specifications we need tools: Grammars are used to define the syntax . Mathematical constructs (such as functions and sets) are used to define the semantics .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Grammars Example: a grammar for simple English sentences. <Sentence>*
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

ln002 - Formal Language Specification Programming languages...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online