-->begin
/*
  Parser.frame file for NRefactory.
 */
using System;
using System.Reflection;

-->namespace


internal class Parser : AbstractParser
{
-->constants
	const  bool   T            = true;
	const  bool   x            = false;
	
-->declarations

/*
-->pragmas
*/

-->productions
	public Parser(ILexer lexer) : base(lexer)
	{
	}
	
	public override void Parse()
	{
-->parseRoot
	}
	
	protected void ExpectWeak(int n, int follow)
	{
		if (lexer.LookAhead.kind == n) {
			lexer.NextToken();
		} else {
			SynErr(n);
			while (!StartOf(follow)) {
				lexer.NextToken();
			}
		}
	}
	
	protected bool WeakSeparator(int n, int syFol, int repFol)
	{
		bool[] s = new bool[maxT + 1];
		
		if (lexer.LookAhead.kind == n) {
			lexer.NextToken();
			return true;
		} else if (StartOf(repFol)) {
			return false;
		} else {
			for (int i = 0; i <= maxT; i++) {
				s[i] = set[syFol, i] || set[repFol, i] || set[0, i];
			}
			SynErr(n);
			while (!s[lexer.LookAhead.kind]) {
				lexer.NextToken();
			}
			return StartOf(syFol);
		}
	}
	
	
	protected bool StartOf(int s)
	{
		return set[s, lexer.LookAhead.kind];
	}
	
	static bool[,] set = {
-->initialization
	};

	protected override void SynErr(int line, int col, int errorNumber)
	{
		errors.count++; 
		string s;
		switch (errorNumber) {
-->errors
			default: s = "error " + errorNumber; break;
		}
		errors.Error(line, col, s);
	}

} // end Parser

$$$
