four classes of grammar, known as Chomsky hierarchy, are described. • Type 0: unrestricted language / (0型文法) – generates all (formal) languages and can be recognized by Turing machine. • Type 1: context-sensitive grammar / 文脈依存文法 – αAβ → αγβ ; rules are written with context. • Type 2: context-free grammar / 文脈自由文法 – A → γ ; rules are written without context. • Type 3: regular grammar / 正規文法 – A → a or A → aB where A, B are strings of non-terminals, a is single terminal, and α, β, and γ are strings of non-terminals or terminals.