Source: wikibot/prefix-grammar

= Prefix grammar
{wiki=Prefix_grammar}

Prefix grammar is a type of formal grammar that defines strings where the prefix of any valid string can also be considered as a valid string. This concept is particularly important in the study of formal languages, syntax, and automata theory. In more intuitive terms, if a grammar generates a string, then all substrings that can be derived from the beginning of that string (i.e., its prefixes) are also included in the language defined by that grammar.