Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Gramaticas Limpias

Compiladores
by

Edson Ruiz Ramirez

on 8 April 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Gramaticas Limpias

Cristian Arango
Edson Ruiz Definición Algoritmo 1 Algoritmo 2 Se dice que una gramática está limpia si no tiene símbolos inútiles.

Un símbolo A es inútil si no es terminable o no es alcanzable. S-->Aa | B
A-->aA | a
B-->b | bC
C-->eE
D-->dD | €(vacio)
E-->cC Se tienen dos algoritmos para eliminar símbolos inútiles:

*Algoritmo 1: Permite encontrar los símbolos terminables.

*Algoritmo 2: Permite encontrar los símbolos alcanzables. 1. Inicializar
TERM:={A€N: A-->w | w€E*}

2.Repetir
TERM:=TERMU{A€N | (A-->w)€P, donde w€(EUTERM)*}
Hasta que no se añadan símbolos a TERM 1. Inicializar
ALC:={S}

2. Repetir
ALC:=ALCU{A€N | (B-->uAv)€P, donde B€ALC}
Hasta que no se añadan símbolos a ALC Gramaticas Limpias *C y E no son terminables, es decir, no se pueden generar símbolos terminables.

*D es no alcanzable, es decir, desde el símbolo inicial S no se puede llegar a D.
Full transcript