* Copyright (C) 2010 Robert Futrell
* robert_futrell at users.sourceforge.net
* http://fifesoft.com/rsyntaxtextarea
* This library is distributed under a modified BSD license. See the included
* RSTALanguageSupport.License.txt file for details.
package org.fife.rsta.ac.java.rjc.notices;
import org.fife.rsta.ac.java.rjc.lexer.Token;
* A notice (e.g., a warning or error) from a parser.
public class ParserNotice {
public ParserNotice(Token t, String msg) {
length = t.getLexeme().length();
* @param line The line of the notice.
* @param column The column of the notice.
* @param length The length of the code the message is concerned with.
* @param message The message.
public ParserNotice(int line, int column, int length, String message) {
* Returns the character offset into the line of the parser notice,
* Returns the length of the code the message is concerned with.
* @return The length of the code the message is concerned with.
* Returns the line number the notice is about, if any.
* @return The line number.
* Returns the message from the parser.
* @return The message from the parser.
public String getMessage() {
* Returns a string representation of this parser notice.
* @return This parser notice as a string.
public String toString() {
return "(" + getLine() + ", " + getColumn() + ": " + getMessage();