Toggle navigation
Compiler Toolbox in 编译原理课 30240382
Introduction
Try converting the given context free grammar to Chomsky normal form.
Supported grammars
A -> A c | A a d | b d | ϵ
(All tokens must be separated by space characters)
A -> A c
| A a d
| b d
| ϵ
S -> A a | b
A -> A c | S d | ϵ
(Copy ϵ to input if needed)
Examples
S -> S S + | S S * | a
S -> 0 S 1 | 0 1
S -> + S S | * S S | a
S -> S ( S ) S | ϵ
S -> S + S | S S | ( S ) | S * | a
S -> ( L ) | a L -> L , S | S
S -> a S b S | b S a S | ϵ
bexpr -> bexpr or bterm | bterm
bterm -> bterm and bfactor | bfactor
bfactor -> not bfactor | ( bexpr ) | true | false
Input:
Convert
×
Invalid Grammar
Output:
URL: