Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > Prefix grammar


In computer science, a prefix grammar is a grammar, akin to the formal grammars, where strings are built up from a set of base strings by continually replacing prefixes. The prefix grammars describe exactly all regular languages.

1 Formal definition

A prefix grammar G is a 3-tuple, (Σ, S, P), where

Each production uv can only be applied to a string of the form uw.

2 Example

One simple prefix grammar can be defined by

which describes the language defined by the regular expression

Formal languages



Non User