Pastebin

Paste #342:

< previous paste - next paste>

Pasted by tdn

Download View as text

A->aABC
A->
B->b
B->
C->BcCA
C->

Beregn FOLLOW:

Step 1:
S->A$
A->aABC
A->
B->b
B->
C->BcCA
C->

Step 2:

FOLLOW(A):
  Right hand side occurrences:   

    A->aABC:

    beta=BC
    
    m=FIRST(BC)
    FIRST(BC) \subsetq FOLLOW(A)
    /* skal der så ikke gøres mere her? */

    C->BcCA:
    beta=Ø
    /* skal der ikke gøres noget mere her? beta er jo Nullable, er den ikke? */

FOLLOW(B):
  Right hand side occurrences:   

  A->aABC:

  beta=C

  m=FIRST(C)
  FIRST(C) \subsetq FOLLOW(B)

  C->BcCA:
  
  beta=cCA
  
  m=FIRST(cCA)=c
  FIRST(cCA) \subsetq FOLLOW(B)

  FOLLOW(C) \subsetq FOLLOW(B)

FOLLOW(C):
  Right hand side occurrences:   

  A->aABC:
  beta=Ø
  /* Der skal ikke gøres mere, da beta er tom og nullable? */

  C->BcCA:
  beta=A
  m=FIRST(A)=a
  FIRST(A) \subsetq FOLLOW(C)

  FOLLOW(A) \subsetq FOLLOW(C)


Step 3:

Nu er jeg lidt tabt.
  

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.