RIPAL: Responsive and Intuitive Parsing for the Analysis of Language

Pages

Language examples

Example

Σ = {big, walrus}

L = {big walrus}

This language contains only a single string: "big walrus".

This is a an example of a finite language.

Example

Σ = {a, b}

L = {a, aa, ab, aaa, aab, aba, ...}

This language contains all non-empty strings over Σ that start with a.

This is an example of a regular language.

Example

Σ = {0, 1}

L = {0n1n | n >= 1}

This language contains some positive number of 0s followed by the same number of 1s.

This is an example of a context-free language.

Example

Σ = {0, 1, 2}

L = {0n1n2n | n >= 1}

This language contains some positive number of 0s followed by the same number of 1s and then 2s.

This is an example of a context-sensitive language.

Note

The language classifications of finite, regular, context-free and context-sensitive will be explaned on subsequent pages.


GitHub Repository: https://github.com/bprollinson/ripal

Copyright © 2017 Brendan Rollinson-Lorimer