gt: 			TypedNode right = Term();
context: /*
   * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
   *
   * This code is distributed in the hope that it will be useful, but WITHOUT
   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   * version 2 for more details (a copy is included in the LICENSE file that
   * accompanied this code).
   *
   * You should have received a copy of the GNU General Public License version
   * 2 along with this work; if not, write to the Free Software Foundation,
   * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   *
   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
   // The content of this file is automatically generated. DO NOT EDIT.
  
  package com.oracle.truffle.sl.parser;
  import java.util.*;
  
  import com.oracle.truffle.sl.*;
  import com.oracle.truffle.sl.nodes.*;
  
  // Checkstyle: stop
  // @formatter:off
  public class Parser {
  	public static final int _EOF = 0;
  	public static final int _identifier = 1;
  	public static final int _stringLiteral = 2;
  	public static final int _numericLiteral = 3;
  	public static final int maxT = 28;
  
      static final boolean T = true;
      static final boolean x = false;
      static final int minErrDist = 2;
  
      public Token t; // last recognized token
      public Token la; // lookahead token
      int errDist = minErrDist;
  
      public final Scanner scanner;
      public final Errors errors;
      private final NodeFactory factory;
      
      public Parser(Scanner scanner, NodeFactory factory) {
          this.scanner = scanner;
          this.factory = factory;
          errors = new Errors();
      }
  
      void SynErr(int n) {
          if (errDist >= minErrDist)
              errors.SynErr(la.line, la.col, n);
          errDist = 0;
      }
  
      public void SemErr(String msg) {
          if (errDist >= minErrDist)
              errors.SemErr(t.line, t.col, msg);
          errDist = 0;
      }
  
      void Get() {
          for (;;) {
              t = la;
              la = scanner.Scan();
              if (la.kind <= maxT) {
                  ++errDist;
                  break;
              }
  
              la = t;
          }
      }
  
      void Expect(int n) {
          if (la.kind == n)
              Get();
          else {
              SynErr(n);
          }
      }
  
      boolean StartOf(int s) {
          return set[s][la.kind];
      }
  
      void ExpectWeak(int n, int follow) {
          if (la.kind == n)
              Get();
          else {
              SynErr(n);
              while (!StartOf(follow))
                  Get();
          }
      }
  
      boolean WeakSeparator(int n, int syFol, int repFol) {
          int kind = la.kind;
          if (kind == n) {
              Get();
              return true;
          } else if (StartOf(repFol))
              return false;
          else {
              SynErr(n);
              while (!(set[syFol][kind] || set[repFol][kind] || set[0][kind])) {
                  Get();
                  kind = la.kind;
              }
              return StartOf(syFol);
          }
      }
  
  	void SimpleLanguage() {
  		Function();
  		while (la.kind == 4) {
  			Function();
  		}
  	}
  
  	void Function() {
  		Expect(4);
  		factory.startFunction(); 
  		Expect(1);
  		String name = t.val; 
  		StatementNode body = Block();
  		factory.createFunction(body, name); 
  	}
  
  	StatementNode  Block() {
  		StatementNode  result;
  		List<StatementNode> statements = new ArrayList<>(); 
  		Expect(5);
  		while (StartOf(1)) {
  			StatementNode statement = Statement();
  			statements.add(statement); 
  		}
  		Expect(6);
  		result = factory.createBlock(statements); 
  		return result;
  	}
  
  	StatementNode  Statement() {
  		StatementNode  result;
  		result = null; 
  		if (la.kind == 7) {
  			result = WhileStatement();
  		} else if (la.kind == 1) {
  			result = AssignmentStatement();
  		} else if (la.kind == 12) {
  			result = OutputStatement();
  		} else if (la.kind == 13) {
  			result = ReturnStatement();
  		} else SynErr(29);
  		return result;
  	}
  
  	StatementNode  WhileStatement() {
  		StatementNode  result;
  		Expect(7);
  		Expect(8);
  		ConditionNode condition = Expression();
  		Expect(9);
  		StatementNode body = Block();
  		result = factory.createWhile(condition, body); 
  		return result;
  	}
  
  	StatementNode  AssignmentStatement() {
  		StatementNode  result;
  		Expect(1);
  		String name = t.val; 
  		Expect(10);
  		TypedNode rvalue = Expression();
  		Expect(11);
  		result = factory.createAssignment(name, rvalue); 
  		return result;
  	}
  
  	StatementNode  OutputStatement() {
  		StatementNode  result;
  		List<TypedNode> expressions = new ArrayList<>(); 
  		Expect(12);
  		while (StartOf(2)) {
  			TypedNode value = Expression();
  			expressions.add(value); 
  		}
  		Expect(11);
  		result = factory.createPrint(expressions); 
  		return result;
  	}
  
  	StatementNode  ReturnStatement() {
  		StatementNode  result;
  		Expect(13);
  		TypedNode value = Expression();
  		Expect(11);
  		result = factory.createReturn(value); 
  		return result;
  	}
  
  	TypedNode  Expression() {
  		TypedNode  result;
  		result = ValueExpression();
  		if (StartOf(3)) {
  			switch (la.kind) {
  			case 14: {
  				Get();
  				break;
  			}
  			case 15: {
  				Get();
  				break;
  			}
  			case 16: {
  				Get();
  				break;
  			}
  			case 17: {
  				Get();
  				break;
  			}
  			case 18: {
  				Get();
  				break;
  			}
  			case 19: {
  				Get();
  				break;
  			}
  			}
  			String op = t.val; 
  			TypedNode right = ValueExpression();
  			result = factory.createBinary(op, result, right); 
  		}
  		return result;
  	}
  
  	TypedNode  ValueExpression() {
  		TypedNode  result;
  		result = Term();
  		while (la.kind == 20 || la.kind == 21) {
  			if (la.kind == 20) {
  				Get();
  			} else {
  				Get();
  			}
  			String op = t.val; 
  