/**
  *
  *                      OOAS Compiler
  *
  *       Copyright 2015, AIT Austrian Institute of Technology.
  * This code is based on the C# Version of the OOAS Compiler, which is
  * copyright 2015 by the Institute of Software Technology, Graz University
  * of Technology with portions copyright by the AIT Austrian Institute of
  * Technology. All rights reserved.
  *
  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
  *
  * If you modify the file please update the list of contributors below to in-
  * clude your name. Please also stick to the coding convention of using TABs
  * to do the basic (block-level) indentation and spaces for anything after
  * that. (Enable the display of special chars and it should be pretty obvious
  * what this means.) Also, remove all trailing whitespace.
  *
  * Contributors:
  *               Willibald Krenn (AIT)
  *               Stephan Zimmerer (AIT)
  *               Markus Demetz (AIT)
  *               Christoph Czurda (AIT)
  *
  */


package org.momut.ooas.parser;

import org.antlr.runtime.Token;

public class CompilerMessage
{
	private final String m_file;
	private final int m_line;
	private final int m_column;
	private final String m_message;

	public CompilerMessage(String aFile, int aLine, int aColumn, String aMessage)
	{
		m_file = aFile;
		m_line = aLine;
		m_column = aColumn;
		m_message = aMessage;
	}

	public CompilerMessage(String aFile, Token aSymbol, String aMessage)
	{
		m_file = aFile;
		m_line = aSymbol.getLine();
		m_column = aSymbol.getCharPositionInLine();
		m_message = aMessage;
	}

	public String file() { return m_file; }
	public int line() { return m_line; }
	public int column() { return m_column; }
	public String message() { return m_message; }
}
