JADE_SL.lang.sl
Class SLParser

java.lang.Object
  extended byJADE_SL.lang.sl.SLParser
All Implemented Interfaces:
SLParserConstants

class SLParser
extends java.lang.Object
implements SLParserConstants

SLParser. This same parser embeds also lower profiles of SL, namely SL-0, SL-1 and SL-2.

Version:
$Date: 2003/10/09 13:00:36 $ $Revision: 1.1.1.1 $
Author:
Fabio Bellifemine, TILab S.p.A. (formerly CSELT S.p.A.)

Field Summary
(package private)  Ontology curOntology
           
private  java.util.Vector jj_expentries
           
private  int[] jj_expentry
           
private  int jj_gen
           
(package private)  ASCII_CharStream jj_input_stream
           
private  int jj_kind
           
private  int[] jj_la1
           
private  int[] jj_la1_0
           
private  int[] jj_la1_1
           
 Token jj_nt
           
private  int jj_ntk
           
(package private)  int slType
          (0 for FIPa-SL0, 1 for SL1, 2 for SL2, >2 for full SL)
 Token token
           
 SLParserTokenManager token_source
           
 
Fields inherited from interface JADE_SL.lang.sl.SLParserConstants
ACTION, ACTIONOP, ACTIONOPLL, ARITHMETICOP, BINARYLOGICALOP, DATETIME, DEFAULT, EOF, FLOATONE, FLOATTWO, HEXINTEGER, INTEGER, LBRACE, LBRACE2, MODALOP, OPERATORSTATE, PARAMETERNAME, QUANTIFIER, RBRACE, RBRACE2, REFERENTIALOP, STRING_LITERAL, STRING_LITERAL2, tokenImage, UNARYLOGICALOP, VARIABLE, WORD, WORD2
 
Constructor Summary
SLParser(java.io.InputStream stream)
           
SLParser(java.io.Reader stream)
           
SLParser(SLParserTokenManager tm)
           
 
Method Summary
 AbsAgentAction ActionExpression_NoBrace()
           
 AbsAgentAction ActionExpression()
           
 AbsPrimitive Constant()
           
 AbsContentElementList Content()
          This production rule represents the more general expression that can serve as content for an ACL message.
 AbsContentElement ContentExpression_NoBrace()
           
 AbsContentElement ContentExpression()
           
 void disable_tracing()
           
 void enable_tracing()
           
 AbsConcept FunctionalTerm_NoBrace()
           
 void FunctionalTermParameters(AbsConcept val)
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 AbsIRE IdentifyingExpression_NoBrace()
           
private  Token jj_consume_token(int kind)
           
private  int jj_ntk()
           
 void LBrace()
          Left Brace in all of the possible states of the Token Manager
static void main(java.lang.String[] args)
           
 AbsPrimitive Number()
           
 void Parameter(AbsConcept val)
           
(package private)  AbsContentElement parse(Ontology o, java.lang.String content)
           
 void RBrace()
          Right Brace in all of the possible states of the Token Manager
 void ReInit(java.io.InputStream stream)
           
 void ReInit(java.io.Reader stream)
           
 void ReInit(SLParserTokenManager tm)
           
(package private)  void setSLType(int slType)
          By default an object of this type implements a Full SLParser.
 java.lang.String String()
           String = WORD | STRING_LITERAL
 AbsTerm Term()
           
private  AbsTerm toAbsAgentAction(AbsTerm t)
          When an ActionExpression is parsed, if it is an AbsConcept then it must be casted upto an AbsAgentAction.
private  java.lang.String unescape(java.lang.String s)
           
 AbsVariable Variable()
           
 AbsPredicate Wff_NoBrace()
           
 AbsPredicate Wff()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

curOntology

Ontology curOntology

slType

int slType
(0 for FIPa-SL0, 1 for SL1, 2 for SL2, >2 for full SL)


token_source

public SLParserTokenManager token_source

jj_input_stream

ASCII_CharStream jj_input_stream

token

public Token token

jj_nt

public Token jj_nt

jj_ntk

private int jj_ntk

jj_gen

private int jj_gen

jj_la1

private final int[] jj_la1

jj_la1_0

private final int[] jj_la1_0

jj_la1_1

private final int[] jj_la1_1

jj_expentries

private java.util.Vector jj_expentries

jj_expentry

private int[] jj_expentry

jj_kind

private int jj_kind
Constructor Detail

SLParser

public SLParser(java.io.InputStream stream)

SLParser

public SLParser(java.io.Reader stream)

SLParser

public SLParser(SLParserTokenManager tm)
Method Detail

unescape

private java.lang.String unescape(java.lang.String s)

toAbsAgentAction

private AbsTerm toAbsAgentAction(AbsTerm t)
When an ActionExpression is parsed, if it is an AbsConcept then it must be casted upto an AbsAgentAction.


setSLType

void setSLType(int slType)
By default an object of this type implements a Full SLParser. This method allows to change this default.

Parameters:
slType - (0 for FIPa-SL0, 1 for SL1, 2 for SL2, >2 for full SL)

parse

AbsContentElement parse(Ontology o,
                        java.lang.String content)
                  throws ParseException,
                         TokenMgrError
Parameters:
content - the content to be parsed
o - the ontology, null if no ontology (this parameter is used to get the names of the slots when they are encoded as unnamed slots.
Throws:
ParseException
TokenMgrError

main

public static void main(java.lang.String[] args)

Content

public final AbsContentElementList Content()
                                    throws ParseException
This production rule represents the more general expression that can serve as content for an ACL message. Since different communicative acts have different content (action expressions for request, predicate for inform, etc.), any allowed SL content expression can be parsed from here.

Throws:
ParseException

LBrace

public final void LBrace()
                  throws ParseException
Left Brace in all of the possible states of the Token Manager

Throws:
ParseException

RBrace

public final void RBrace()
                  throws ParseException
Right Brace in all of the possible states of the Token Manager

Throws:
ParseException

ContentExpression

public final AbsContentElement ContentExpression()
                                          throws ParseException
Throws:
ParseException

ContentExpression_NoBrace

public final AbsContentElement ContentExpression_NoBrace()
                                                  throws ParseException
Throws:
ParseException

IdentifyingExpression_NoBrace

public final AbsIRE IdentifyingExpression_NoBrace()
                                           throws ParseException
Throws:
ParseException

Variable

public final AbsVariable Variable()
                           throws ParseException
Throws:
ParseException

Term

public final AbsTerm Term()
                   throws ParseException
Throws:
ParseException

Constant

public final AbsPrimitive Constant()
                            throws ParseException
Throws:
ParseException

FunctionalTerm_NoBrace

public final AbsConcept FunctionalTerm_NoBrace()
                                        throws ParseException
Throws:
ParseException

FunctionalTermParameters

public final void FunctionalTermParameters(AbsConcept val)
                                    throws ParseException
Throws:
ParseException

Parameter

public final void Parameter(AbsConcept val)
                     throws ParseException
Throws:
ParseException

ActionExpression_NoBrace

public final AbsAgentAction ActionExpression_NoBrace()
                                              throws ParseException
Throws:
ParseException

ActionExpression

public final AbsAgentAction ActionExpression()
                                      throws ParseException
Throws:
ParseException

Wff

public final AbsPredicate Wff()
                       throws ParseException
Throws:
ParseException

Wff_NoBrace

public final AbsPredicate Wff_NoBrace()
                               throws ParseException
Throws:
ParseException

Number

public final AbsPrimitive Number()
                          throws ParseException
Throws:
ParseException

String

public final java.lang.String String()
                              throws ParseException

String = WORD | STRING_LITERAL

Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(SLParserTokenManager tm)

jj_consume_token

private final Token jj_consume_token(int kind)
                              throws ParseException
Throws:
ParseException

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

jj_ntk

private final int jj_ntk()

generateParseException

public final ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.