|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.parser.sl.SLParser
The SLParser is used to parse a string that has the format of an Content as defined by XC00008 Fipa2000 (Experimental). 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
|
SLParserTokenManager |
token_source
|
Fields inherited from interface fipaos.parser.sl.SLParserConstants |
Action, All, And, Any, AnyOtherToken, Append, Belief, Cons, Contains, DateTime, Day, DecimalLiteral, DEFAULT, Difference, Divide, Done, Dot, EOF, Equal, Equiv, Exists, Exponent, False, Feasible, First, Float, FloatExponent, FloatMantissa, Forall, GreaterThan, GreaterThanOrEqual, HexLiteral, Hour, Implies, Integer, Intention, Intersection, Iota, LessThan, LessThanOrEqual, Lparen, Member, MilliSecond, Minus, Minute, Month, Multiply, Not, NotEqual, Nth, OPERATOR, Or, ParameterName, PersistentGoal, Pipe, Plus, Remainder, Rest, Result, Rparen, Second, SemiColon, Sequence, Set, Sign, SPECIAL, String, StringLiteral, tokenImage, True, TypeDesignator, Uncertainty, Union, VariableIdentifier, Word, XSPECIAL, Year |
Constructor Summary | |
SLParser()
Empty constructor for manipulating Parser instance |
|
SLParser(java.io.InputStream stream)
|
|
SLParser(java.io.Reader stream)
|
|
SLParser(SLParserTokenManager tm)
|
Method Summary | |
Content |
ActionExpression()
|
Content |
ActionExpressionFactored()
The production obtained by left-factorising SLActionExpression |
Content |
ActionFactored()
|
java.lang.String |
ActionOp()
|
Content |
Agent()
|
java.lang.String |
ArithmeticOp()
|
Content |
AtomicFormula()
|
Content |
AtomicFormulaFactored()
The production obtained by left-factorising SLAtomicFormula for the beginning parenthesis. |
java.lang.String |
BinaryLogicalOp()
|
java.lang.String |
BinaryTermOp()
|
boolean |
canParse(java.lang.String content)
Determines if the Parser implementation can parse the given content |
Content |
Constant()
|
Content |
Content()
|
Content |
ContentExpression()
|
java.lang.String |
deparse(Content sl_content)
This method converts a Content object into a document which is of a format determined by the Parser implementation. |
void |
disable_tracing()
|
void |
enable_tracing()
|
Content |
FunctionalTerm()
|
Content |
FunctionalTermFactored()
|
java.lang.String |
FunctionSymbol()
|
ParseException |
generateParseException()
|
Token |
getNextToken()
|
java.lang.String |
getParserType()
Returns the type of content language that the Parser implementation handles. |
Token |
getToken(int index)
|
Content |
IdentifyingExpression()
|
static void |
main(java.lang.String[] args)
Test Harness method where a file of strings is parsed. |
java.lang.String |
ModalOp()
|
java.lang.String |
NumericalConstant()
|
Content |
Parameter()
|
Content |
ParameterValue()
|
Content |
parse(java.lang.String sl_content)
This method converts a content String into a set of Content objects |
static Content |
parseActionExpression(java.lang.String sl_action_expression)
parseActionExpression method is the preferred method for parsing an SL actionExpression message string. |
static Content |
parseAtomicFormula(java.lang.String sl_atomic_formula)
parseAtomicFormula method is the preferred method for parsing an SL atomicFormula message string. |
static Content |
parseContent(java.lang.String sl_content)
parse method is the preferred method for parsing an SL content message string. |
static Content |
parseTerm(java.lang.String sl_term)
parseTerm method is the preferred method for parsing an SL term message string. |
java.lang.String |
PredicateSymbol()
|
Content |
Proposition()
|
java.lang.String |
PropositionSymbol()
|
java.lang.String |
Quantifier()
|
java.lang.String |
ReferentialOperator()
|
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(java.io.Reader stream)
|
void |
ReInit(SLParserTokenManager tm)
|
Content |
Sequence()
|
Content |
Set()
|
Content |
symbolTermFactored()
|
Content |
Term()
|
java.lang.String |
UnaryLogicalOp()
|
java.lang.String |
Variable()
|
Content |
Wff()
|
Content |
WffFactored()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public SLParserTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
Constructor Detail |
public SLParser()
public SLParser(java.io.InputStream stream)
public SLParser(java.io.Reader stream)
public SLParser(SLParserTokenManager tm)
Method Detail |
public static Content parseContent(java.lang.String sl_content) throws ParserException
sl_content_expression
- the expression to parsepublic static Content parseTerm(java.lang.String sl_term) throws ParseException
sl_term
- the term to parsepublic static Content parseAtomicFormula(java.lang.String sl_atomic_formula) throws ParseException
sl_atomic_formula
- the formula to parsepublic static Content parseActionExpression(java.lang.String sl_action_expression) throws ParseException
sl_term
- the term to parsepublic Content parse(java.lang.String sl_content) throws ParserException
parse
in interface Parser
content
- The String to parse into Content objectspublic java.lang.String deparse(Content sl_content)
deparse
in interface Parser
content
- The Content object to deparsepublic boolean canParse(java.lang.String content)
canParse
in interface Parser
A
- content String.public java.lang.String getParserType()
getParserType
in interface Parser
public static void main(java.lang.String[] args) throws java.lang.Exception
public final Content Content() throws ParseException
public final Content ContentExpression() throws ParseException
public final Content Proposition() throws ParseException
public final Content Wff() throws ParseException
public final java.lang.String UnaryLogicalOp() throws ParseException
public final java.lang.String BinaryLogicalOp() throws ParseException
public final java.lang.String BinaryTermOp() throws ParseException
public final Content WffFactored() throws ParseException
public final Content ActionFactored() throws ParseException
public final Content AtomicFormula() throws ParseException
public final Content AtomicFormulaFactored() throws ParseException
public final java.lang.String Quantifier() throws ParseException
public final java.lang.String ModalOp() throws ParseException
public final java.lang.String ActionOp() throws ParseException
public final Content Term() throws ParseException
public final Content IdentifyingExpression() throws ParseException
public final java.lang.String ReferentialOperator() throws ParseException
public final Content FunctionalTerm() throws ParseException
public final Content FunctionalTermFactored() throws ParseException
public final Content symbolTermFactored() throws ParseException
public final java.lang.String ArithmeticOp() throws ParseException
public final Content Constant() throws ParseException
public final java.lang.String NumericalConstant() throws ParseException
public final java.lang.String Variable() throws ParseException
public final Content ActionExpression() throws ParseException
public final Content ActionExpressionFactored() throws ParseException
public final java.lang.String PropositionSymbol() throws ParseException
public final java.lang.String PredicateSymbol() throws ParseException
public final java.lang.String FunctionSymbol() throws ParseException
public final Content Agent() throws ParseException
public final Content Sequence() throws ParseException
public final Content Set() throws ParseException
public final Content Parameter() throws ParseException
public final Content ParameterValue() throws ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.Reader stream)
public void ReInit(SLParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public final ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |