Skip to main content

Language

rascal-0.40.17

Synopsis

The set of strings defined by a Grammar.

Description

A Grammar or Syntax defines the formation rules for a language. A language is the (possible infinite) set of strings that are defined by a grammar.

Examples

  • The language of strings of at most 5 a 's: the finite set {"a", "aa", "aaa", "aaaa", "aaaaa"}.
  • The language of strings that correspond to even numbers: the infinite set {"0", "2", "4", "6", ...}
  • The Java language: the infinite set of syntactically correct Java programs.