Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. public parse_A() {
  2.    ttype = getToken();
  3.    if (ttype == atype)
  4.    {
  5.       parse_A();
  6.       ttype = getToken();
  7.       if (ttype == btype)
  8.             print "A -> aAb";
  9.       else
  10.             syntax_error();
  11. }
  12. else if  (ttype == btype || type == eof)
  13. {
  14.       ungetToken();
  15.       print "A -> epsilon";
  16.    }
  17.    else
  18.       syntax_error();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement