All Downloads are FREE. Search and download functionalities are using the official Maven repository.

beaver.Scanner Maven / Gradle / Ivy

There is a newer version: 4.6.0
Show newest version
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * This file is part of Beaver Parser Generator.                       *
 * Copyright (C) 2003,2004 Alexander Demenchuk .  *
 * All rights reserved.                                                *
 * See the file "LICENSE" for the terms and conditions for copying,    *
 * distribution and modification of Beaver.                            *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

package beaver;

import java.io.IOException;



/**
 * Defines an interface expected by a generated parser.
 */
public abstract class Scanner
{
	public static class Exception extends java.lang.Exception
	{
		public final int line;
		public final int column;
		
		public Exception(String msg)
		{
			this(0, 0, msg);
		}
		
		public Exception(int line, int column, String msg)
		{
			super(msg);
			this.line = line;
			this.column = column;
		}
	}

	public abstract Symbol nextToken() throws IOException, Scanner.Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy