Let us use an example, given this grammar:
      
      ex = ex op term | term
        op = + | -
        term = ( ex ) | id
      
      which yields the following sentences:
id + id
      id + ( id + ... ) + ... )))( id + id ) - idex = term {op term}
      op = + | -
      term = ( ex ) | idop()
        if tok == +  match( + )
        else if tok == -  match( - )
        else error
      
      term()
        if tok == ( 
           match( ( )
           ex()
           match( ) )
        else if tok == id
           match( id )
        else
           error
      
      ex()
        term()
        if tok == + || tok == -
           op()
           term()push(arg)
      pushop(op)
      arg = pop()
      op = popop()newatom()
      cons()op()
        if tok == +  
          match( + )
          zpush( + )
        else if tok == -  
          match( - )
          zpush( - )
        else error
      
      term()
        if tok == ( 
           match( ( )
           ex()
           match( ) )
           makebintree()
        else if tok == id
           match( id )
           ypush( id )
        else
           error
      
      ex()
        term()
        if tok == + || tok == -
           op()
           term()
      
      makebintree()
        b = ypop()
        a = ypop()
        op = zpop()
        c = cons(op,cons(a,cons(b,NIL)))
        zpush(c)last update 24 Sept 2016