20.11.2014 Views

Limbaje Formale, Automate şi Compilatoare

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Gramatici de tip 3 <strong>şi</strong> automate finite<br />

De la gramatici de tip 3 la automate finite<br />

Pentru orice gramatică G de tip 3 (în formă normală) există un<br />

automat A (nedeterminist) astfel ca L(A) = L(G):<br />

În gramatica G În automatul A<br />

T Σ = T<br />

N Q = N ∪{f}, F = {f}<br />

S<br />

q 0 = S<br />

q → ap p ∈ δ(q, a)<br />

q → a f ∈ δ(q, a)<br />

dacă S → ǫ se adaugă S la F<br />

LFAC (2014-15) Curs 3 13 / 30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!