fipaos.parser.sl0
Class SL0Parser


public class SL0Parser
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.


Inner Class Summary
 (package private) static classSL0Parser.JJCalls
           

Field Summary
 (package private) ASCII_CharStreamjj_input_stream
           
 Tokenjj_nt
           
 booleanlookingAhead
           
 Tokentoken
           
 SL0ParserTokenManagertoken_source
           

Constructor Summary
SL0Parser(java.io.InputStream stream)
           
SL0Parser(java.io.Reader stream)
           
SL0Parser(SL0ParserTokenManager tm)
           

Method Summary
 final voidACLCommunicativeActWithoutLParen()
          ACLCommunicativeAct is parsed using the fipaos.parser.acl.string.ACLParser generated externally.
 final voidAgentName()
           
 final voiddisable_tracing()
           
 final voidenable_tracing()
           
 final ParseExceptiongenerateParseException()
           
 final TokengetNextToken()
           
 final TokengetToken(int index)
           
 static voidmain(String[] args)
          Test Harness method where a file of strings is parsed.
 final voidNumericalConstant()
           
 static voidparse(String sl0_content_expression)
          parse method is the preferred method for parsing an acl message string.
 voidReInit(java.io.InputStream stream)
           
 voidReInit(java.io.Reader stream)
           
 voidReInit(SL0ParserTokenManager tm)
           
 (package private) Stringskip_to_matching_paren()
           
 final voidSL0ActionExpression()
           
 final voidSL0ActionExpressionFactored()
          The production obtained by left-factorising SLActionExpression
 final voidSL0ActionOp()
           
 final voidSL0AtomicFormula()
           
 final voidSL0AtomicFormulaFactored()
          The production obtained by left-factorising SLAtomicFormula for the beginning parenthesis.
 final voidSL0ContentExpression()
           
 final voidSL0FunctionalTerm()
           
 final voidSL0Term()
           
 final voidSL0Wff()
           
 final voidSLAgent()
           
 final voidSLConstant()
           
 final voidSLFunctionSymbol()
           
 final voidSLPredicateSymbol()
           
 final voidSLPropositionSymbol()
           
 final voidSLVariable()
           

Field Detail

jj_input_stream

ASCII_CharStream jj_input_stream

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead

token

public Token token

token_source

public SL0ParserTokenManager token_source
Constructor Detail

SL0Parser

public SL0Parser(java.io.InputStream stream)

SL0Parser

public SL0Parser(java.io.Reader stream)

SL0Parser

public SL0Parser(SL0ParserTokenManager tm)
Method Detail

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()

AgentName

public final void AgentName()
throws ParseException

disable_tracing

public final void disable_tracing()

enable_tracing

public final void enable_tracing()

generateParseException

public final ParseException generateParseException()

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

main

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

NumericalConstant

public final void NumericalConstant()
throws ParseException

parse

public static void parse(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

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(SL0ParserTokenManager tm)

skip_to_matching_paren

String skip_to_matching_paren()
throws ParseException

SL0ActionExpression

public final void SL0ActionExpression()
throws ParseException

SL0ActionExpressionFactored

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

SL0ActionOp

public final void SL0ActionOp()
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.

SL0ContentExpression

public final void SL0ContentExpression()
throws ParseException

SL0FunctionalTerm

public final void SL0FunctionalTerm()
throws ParseException

SL0Term

public final void SL0Term()
throws ParseException

SL0Wff

public final void SL0Wff()
throws ParseException

SLAgent

public final void SLAgent()
throws ParseException

SLConstant

public final void SLConstant()
throws ParseException

SLFunctionSymbol

public final void SLFunctionSymbol()
throws ParseException

SLPredicateSymbol

public final void SLPredicateSymbol()
throws ParseException

SLPropositionSymbol

public final void SLPropositionSymbol()
throws ParseException

SLVariable

public final void SLVariable()
throws ParseException

Association Links

to Class fipaos.parser.sl0.SL0ParserTokenManager

to Class fipaos.parser.sl0.ASCII_CharStream

to Class fipaos.parser.sl0.Token

to Class fipaos.parser.sl0.Token

to Class fipaos.parser.sl0.SL0Parser.JJCalls

to Class java.util.Vector