Package fr.uga.pddl4j.parser
Class ErrorManager
java.lang.Object
fr.uga.pddl4j.parser.ErrorManager
- All Implemented Interfaces:
Serializable
This class implements the error manager used by the parser and java PDDL compiler.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Initialize the error manager.Returns the list of all messages from the error manager.getMessages(Message.Type type)Returns the list of messages of a specific type.getMessages(Message.Type type, File file)Returns the list of messages of a specific type concerning a specific file.getMessages(File file)Returns the list of messages that concerns a specific file.booleanisEmpty()Returns if the error manager is empty, i.e., contains no message of any type.voidlogLexicalError(String msg, File file, int line, int column)Log an lexical error message.voidlogParserError(String msg, File file, int line, int column)Log an error message to the current print stream.voidlogParserWarning(String msg, File file, int line, int column)Log a warning message to the current print stream.voidprint(Message.Type type)Print the messages log in the error manager.voidprint(Message.Type type, File file)Print the messages log in the error manager of a specific and concerning a specific file.voidPrint the messages log in the error manager that concerns a specific file.voidprintAll()Print the all the message of the error manager.
-
Constructor Details
-
ErrorManager
public ErrorManager()Creates a new error manager.
-
-
Method Details
-
print
Print the messages log in the error manager.- Parameters:
type- the type of message to print.
-
print
Print the messages log in the error manager that concerns a specific file.- Parameters:
file- The file.
-
print
Print the messages log in the error manager of a specific and concerning a specific file.- Parameters:
type- the type of message to print.file- the file.
-
printAll
public void printAll()Print the all the message of the error manager. -
getMessages
Returns the list of all messages from the error manager.- Returns:
- The list of messages.
-
getMessages
Returns the list of messages that concerns a specific file.- Parameters:
file- The file.- Returns:
- The list of messages.
-
getMessages
Returns the list of messages of a specific type concerning a specific file.- Parameters:
type- The type of messages.file- The file.- Returns:
- The list of messages of a specific type concerning a specific file.
-
getMessages
Returns the list of messages of a specific type.- Parameters:
type- The type of messages.- Returns:
- The list of messages of a specific type
-
clear
public void clear()Initialize the error manager. -
isEmpty
public boolean isEmpty()Returns if the error manager is empty, i.e., contains no message of any type.- Returns:
trueif the error manager is empty;falseotherwise.
-
logParserError
Log an error message to the current print stream.- Parameters:
msg- the error message.file- the file where the warning was encoutered.line- the line of the error.column- the column of the error.
-
logLexicalError
Log an lexical error message.- Parameters:
msg- the error message.file- the file where the error was encoutered.line- the line of the error.column- the column of the error.
-
logParserWarning
Log a warning message to the current print stream.- Parameters:
msg- the warning message.file- the file where the warning was encoutered.line- the line of the warning.column- the column of the warning.
-