fipaos.parser.acl.string
Class ACLParser
java.lang.Object
|
+--fipaos.parser.acl.string.ACLParser
- All Implemented Interfaces:
- ACLParserConstants
- public class ACLParser
- extends java.lang.Object
- implements ACLParserConstants
The ACLParser is used to parse a string that has the
format of an acl message as defined by fipa97.
For parsing to occur, the string should be converted
to a StringReader and then passed to the constructor
of the ACLParse
Fields inherited from interface fipaos.parser.acl.string.ACLParserConstants |
ACCObj, AlphaNumWord, AnyOtherToken, ByteLengthEncodedString, CommAddress, CommProtocol, Content, CONTENTEXPR, ConversationID, DateTimeToken, DATETIMETOKEN, Day, DECIMAL_LITERAL, DEFAULT, Digit, DNSName, Envelope, EOF, EXPONENT, Float, FLOATING_POINT_LITERAL, Hour, InReplyTo, Integer, IORToken, IPAddress, Language, LPAREN, MessageType, Millisecond, Minute, Month, MSGPARAM, NONMSGPARAM, Number, Ontology, Protocol, Receiver, ReceiverAgentName, RECIPIENTEXPR, ReplyBy, ReplyTo, ReplyWith, RPAREN, Second, Sender, SenderAgentName, SENDERNAME, StringLiteral, tokenImage, TypeDesignator, Word, Year |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public ACLParserTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
ACLParser
public ACLParser(java.io.InputStream stream)
ACLParser
public ACLParser(java.io.Reader stream)
ACLParser
public ACLParser(ACLParserTokenManager tm)
parse
public static ACLMessage parse(java.lang.String acl_msg)
throws ParseException
- parse method is the preferred method for parsing an
acl message string.
getSender
public static java.lang.String getSender()
- a dummy method insert for legacy reasons. This shouldn't
really be called as the current design allows concurrent
parsing thus rendering this previous method meaningless.
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- A test harness method.
ACLCommunicativeAct
public final ACLMessage ACLCommunicativeAct()
throws ParseException
- Returns:
- an ACLMessage if parsed successfully.
Message
public final void Message(ACLMessage acl_message)
throws ParseException
MessageParameter
public final void MessageParameter(ACLMessage acl_message)
throws ParseException
Expression
public final java.lang.String Expression()
throws ParseException
KeyValuePairList
public final java.util.Vector KeyValuePairList()
throws ParseException
KeyValuePair
public final KeywordValuePair KeyValuePair()
throws ParseException
RecipientExpr
public final java.lang.String RecipientExpr()
throws ParseException
- returns the recipient expression as a String.
SenderAgentName
public final java.lang.String SenderAgentName()
throws ParseException
- Recipient
String
public final java.lang.String String()
throws ParseException
ReInit
public void ReInit(java.io.InputStream stream)
ReInit
public void ReInit(java.io.Reader stream)
ReInit
public void ReInit(ACLParserTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public final ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()