2026-08-28·par Sijie Wang#idea#math

regular-grammar

Parent: regular-languages

The generative face of the regular class — rules that produce the strings (vs a machine that recognizes them).

Right-linear grammar

Productions have a single terminal-prefixed right-hand side with at most one nonterminal, on the right: A → a B and A → a (and optionally A → ε). Derive by rewriting from the start symbol until only terminals remain.

Example (binary strings ending in 1): S → 0S | 1S | 1.

Why it's exactly a finite automaton

The form A → a B means "emit a, then continue as B" — i.e. a transition A --a--> B in an NFA; A → a (or A → ε) marks an accepting move. So:

  • nonterminals = states, S = start;
  • A → aB = a labelled transition;
  • terminal-only rules = acceptance.

Reading a derivation off left to right is running the automaton. (Left-linear grammars A → Ba are equally powerful — they build the string in reverse.)

This is the third of the three formalisms; the equivalence with regex and automata is its own article.

à propos de cette entrée

L'une des entrées de wiki de sijie. L'IA sur ce site est fondée sur le même corpus et répond à la voix de sijie, avec citations revenant à des entrées comme celle-ci — répondre coûte argent à sijie, donc cela attend derrière un code : entrer un code d'accès →

regular-grammar — Sijie Wang