class SLParser extends Object implements SLParserConstants
Modifier and Type | Field and Description |
---|---|
(package private) Ontology |
curOntology |
private Vector |
jj_expentries |
private int[] |
jj_expentry |
private int |
jj_gen |
(package private) SimpleCharStream |
jj_input_stream |
private int |
jj_kind |
private int[] |
jj_la1 |
private static int[] |
jj_la1_0 |
private static int[] |
jj_la1_1 |
Token |
jj_nt |
private int |
jj_ntk |
private static String |
META_EXCEPTION_MESSAGE |
private boolean |
metaAllowed
This variable is true, when meta symbols are allowed (metas are a semantics-specific extension to the SL Grammar)
|
(package private) int |
slType
(0 for FIPa-SL0, 1 for SL1, 2 for SL2, >2 for full SL)
|
Token |
token |
SLParserTokenManager |
token_source |
ACTION, ACTIONOP, ACTIONOPLL, ARITHMETICOP, BINARYLOGICALOP, DATETIME, DEFAULT, EOF, FLOATONE, FLOATTWO, HEXINTEGER, INTEGER, LBRACE, LBRACE2, METASYMBOL, METASYMBOL2, MODALOP, OPERATORSTATE, PARAMETERNAME, PARAMETERNAME_STRING, PREFIXBYTELENGTHENCODEDSTRING, QUANTIFIER, RBRACE, RBRACE2, REFERENTIALOP, STRING_LITERAL, STRING_LITERAL2, tokenImage, UNARYLOGICALOP, VARIABLE, WORD, WORD2
Constructor and Description |
---|
SLParser(InputStream stream) |
SLParser(InputStream stream,
String encoding) |
SLParser(Reader stream) |
SLParser(SLParserTokenManager tm) |
Modifier and Type | Method and Description |
---|---|
AbsAgentAction |
ActionExpression_NoBrace() |
AbsTerm |
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 static void |
jj_la1_0() |
private static void |
jj_la1_1() |
private int |
jj_ntk() |
void |
LBrace()
Left Brace in all of the possible states of the Token Manager
|
static void |
main(String[] args) |
String |
MetaSymbol()
This grammar rule is an extension to the FIPA SL Grammar.
|
AbsPrimitive |
Number() |
void |
Parameter(AbsConcept val) |
(package private) AbsContentElement |
parse(Ontology o,
String content)
Deprecated.
since JADE 3.4 it is preferrable to use reinit() and then call directly the method corresponding to the production rule (e.g. Content())
|
void |
RBrace()
Right Brace in all of the possible states of the Token Manager
|
void |
ReInit(InputStream stream) |
void |
ReInit(InputStream stream,
String encoding) |
(package private) void |
reinit(Ontology o,
String content)
Reinitialize the parser such as it is ready to parse a new expression.
|
void |
ReInit(Reader stream) |
void |
ReInit(SLParserTokenManager tm) |
(package private) void |
setSLType(int slType)
By default an object of this type implements a Full SLParser.
|
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 String |
unescape(String s) |
AbsVariable |
Variable() |
AbsPredicate |
Wff_NoBrace() |
AbsPredicate |
Wff() |
private static final String META_EXCEPTION_MESSAGE
private boolean metaAllowed
Ontology curOntology
int slType
public SLParserTokenManager token_source
SimpleCharStream jj_input_stream
public Token token
public Token jj_nt
private int jj_ntk
private int jj_gen
private final int[] jj_la1
private static int[] jj_la1_0
private static int[] jj_la1_1
private Vector jj_expentries
private int[] jj_expentry
private int jj_kind
public SLParser(InputStream stream)
public SLParser(InputStream stream, String encoding)
public SLParser(Reader stream)
public SLParser(SLParserTokenManager tm)
private AbsTerm toAbsAgentAction(AbsTerm t)
void setSLType(int slType)
slType
- (0 for FIPa-SL0, 1 for SL1, 2 for SL2, >2 for full SL)void reinit(Ontology o, String content)
content
- the content to be parsedo
- the ontology, null if no ontology (this parameter is used to get the names of the slots
when they are encoded as unnamed slots.AbsContentElement parse(Ontology o, String content) throws ParseException, TokenMgrError
content
- the content to be parsedo
- the ontology, null if no ontology (this parameter is used to get the names of the slots
when they are encoded as unnamed slots.ParseException
TokenMgrError
public static void main(String[] args)
public final AbsContentElementList Content() throws ParseException
request
, predicate for inform
, etc.), any
allowed SL content expression can be parsed from here.ParseException
public final void LBrace() throws ParseException
ParseException
public final void RBrace() throws ParseException
ParseException
public final AbsContentElement ContentExpression() throws ParseException
ParseException
public final AbsContentElement ContentExpression_NoBrace() throws ParseException
ParseException
public final AbsIRE IdentifyingExpression_NoBrace() throws ParseException
ParseException
public final AbsVariable Variable() throws ParseException
ParseException
public final AbsTerm Term() throws ParseException
ParseException
public final AbsPrimitive Constant() throws ParseException
ParseException
public final AbsConcept FunctionalTerm_NoBrace() throws ParseException
ParseException
public final void FunctionalTermParameters(AbsConcept val) throws ParseException
ParseException
public final void Parameter(AbsConcept val) throws ParseException
ParseException
public final AbsAgentAction ActionExpression_NoBrace() throws ParseException
ParseException
public final AbsTerm ActionExpression() throws ParseException
ParseException
public final AbsPredicate Wff() throws ParseException
ParseException
public final AbsPredicate Wff_NoBrace() throws ParseException
ParseException
public final AbsPrimitive Number() throws ParseException
ParseException
public final String String() throws ParseException
String = WORD | STRING_LITERAL
ParseException
public final String MetaSymbol() throws ParseException
ParseException
private static void jj_la1_0()
private static void jj_la1_1()
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(SLParserTokenManager tm)
private final Token jj_consume_token(int kind) throws ParseException
ParseException
public final Token getNextToken()
public final Token getToken(int index)
private final int jj_ntk()
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()