fipaos.parser.sl0
Class SL0Parser

java.lang.Object
  |
  +--fipaos.parser.sl0.SL0Parser
All Implemented Interfaces:
SL0ParserConstants

public class SL0Parser
extends java.lang.Object
implements SL0ParserConstants

The SL0Parser is used to parse a string that has the format of an SL0ContentExpression as defined by fipa97. For parsing to occur, the string should be converted to a StringReader and then passed to the constructor of the SLParser. Alternatively the static method parse() may be used to do this for the user.


Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 SL0ParserTokenManager token_source
           
 
Fields inherited from interface fipaos.parser.sl0.SL0ParserConstants
ACCObj, ACL, Action, AgentName, AGENTNAME, AlphaNumWord, AnyOtherToken, CommAddress, CommProtocol, DecimalLiteral, DEFAULT, DNSName, Done, EOF, Exponent, False, FloatingPointLiteral, HexLiteral, IntegerLiteral, IPAddress, Lparen, MessageType, Result, Rparen, StringLiteral, tokenImage, True, VariableIdentifier, Word
 
Constructor Summary
SL0Parser(java.io.InputStream stream)
           
SL0Parser(java.io.Reader stream)
           
SL0Parser(SL0ParserTokenManager tm)
           
 
Method Summary
 void ACLCommunicativeActWithoutLParen()
          ACLCommunicativeAct is parsed using the fipaos.parser.acl.string.ACLParser generated externally.
 void AgentName()
           
 void disable_tracing()
           
 void enable_tracing()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
static void main(java.lang.String[] args)
          Test Harness method where a file of strings is parsed.
 void NumericalConstant()
           
static void parse(java.lang.String sl0_content_expression)
          parse method is the preferred method for parsing an acl message string.
 void ReInit(java.io.InputStream stream)
           
 void ReInit(java.io.Reader stream)
           
 void ReInit(SL0ParserTokenManager tm)
           
 void SL0ActionExpression()
           
 void SL0ActionExpressionFactored()
          The production obtained by left-factorising SLActionExpression
 void SL0ActionOp()
           
 void SL0AtomicFormula()
           
 void SL0AtomicFormulaFactored()
          The production obtained by left-factorising SLAtomicFormula for the beginning parenthesis.
 void SL0ContentExpression()
           
 void SL0FunctionalTerm()
           
 void SL0Term()
           
 void SL0Wff()
           
 void SLAgent()
           
 void SLConstant()
           
 void SLFunctionSymbol()
           
 void SLPredicateSymbol()
           
 void SLPropositionSymbol()
           
 void SLVariable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public SL0ParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

SL0Parser

public SL0Parser(java.io.InputStream stream)

SL0Parser

public SL0Parser(java.io.Reader stream)

SL0Parser

public SL0Parser(SL0ParserTokenManager tm)
Method Detail

parse

public static void parse(java.lang.String sl0_content_expression)
                  throws ParseException
parse method is the preferred method for parsing an acl message string.
Parameters:
sl0_content_expression - the expression to parse

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test Harness method where a file of strings is parsed. Each line is regarded as a separate SL0ContentExpression

SL0ContentExpression

public final void SL0ContentExpression()
                                throws ParseException

SL0Wff

public final void SL0Wff()
                  throws ParseException

SL0AtomicFormula

public final void SL0AtomicFormula()
                            throws ParseException

SL0AtomicFormulaFactored

public final void SL0AtomicFormulaFactored()
                                    throws ParseException
The production obtained by left-factorising SLAtomicFormula for the beginning parenthesis.

SL0ActionOp

public final void SL0ActionOp()
                       throws ParseException

SL0Term

public final void SL0Term()
                   throws ParseException

SL0FunctionalTerm

public final void SL0FunctionalTerm()
                             throws ParseException

SLConstant

public final void SLConstant()
                      throws ParseException

NumericalConstant

public final void NumericalConstant()
                             throws ParseException

SLVariable

public final void SLVariable()
                      throws ParseException

SL0ActionExpression

public final void SL0ActionExpression()
                               throws ParseException

SL0ActionExpressionFactored

public final void SL0ActionExpressionFactored()
                                       throws ParseException
The production obtained by left-factorising SLActionExpression

SLPropositionSymbol

public final void SLPropositionSymbol()
                               throws ParseException

SLPredicateSymbol

public final void SLPredicateSymbol()
                             throws ParseException

SLFunctionSymbol

public final void SLFunctionSymbol()
                            throws ParseException

SLAgent

public final void SLAgent()
                   throws ParseException

AgentName

public final void AgentName()
                     throws ParseException

ACLCommunicativeActWithoutLParen

public final void ACLCommunicativeActWithoutLParen()
                                            throws ParseException
ACLCommunicativeAct is parsed using the fipaos.parser.acl.string.ACLParser generated externally. Note that the has been parsed in ActionExpression()

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(SL0ParserTokenManager 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()