infosapient.rulecompiler
Class CompileSPRule
java.lang.Object
|
+--infosapient.rulecompiler.CompileSPRule
- public class CompileSPRule
- extends java.lang.Object
- implements CompileSPRuleConstants
Created by Sun Microsystems JavaCC (java compiler compiler) from sprulegrammar.jj.
WARNING: Do NOT modify CompileSPRule, CompileSPRuleTokenManager, CompileSPRuleConstants as they are machine generated. Code is subject to change without notice.
If you find it necessary to change CompileSPRule, CompileSPRuleTokenManager, or CompileSPRuleConstants:
modify sprulegrammar.jj and then re-generate the CompileSPRule.java classes. Send me the changes you made.
JavaCC is now supported by and, can be obtained from: http://www.webgain.com/products/metamata/java_doc.html
- Version:
- $Revision: 1.1.1.1 $
Fields inherited from interface infosapient.rulecompiler.CompileSPRuleConstants |
ABOUT,
ABOVE,
ADDAGGREGATION,
AFTER,
ALPHACUT,
AND,
ARE,
AROUND,
ATTRIBUTES,
AVERAGEMAX,
AVERAGESPACE,
AVERAGESUPPORT,
BACKWARDCHAIN,
BE,
BEFORE,
BELOW,
BESTEVIDENCE,
BETA,
BETAWEIGHT,
BOOLEANATTRIBUTE,
BOUNDED_ADD,
BOUNDED_AND,
BOUNDED_MEAN,
CENTER,
CENTROID,
CLOSE,
CMEMBERSHIP,
CORRELATIONMETHOD,
COSINE_NOT,
CURRENTVALUE,
DECIMALPT,
DECREASED,
DEFAULT,
DEFINITELY,
DIGIT,
ELSE,
EOF,
EXTREMELY,
FLEXPOINT,
FP_LITERAL,
GAUSSIAN,
GENERALLY,
GTOREQLS,
HIGHDOMAIN,
IDENTIFIER,
IF,
IMPLICATIONMETHOD,
IN_COMMENT,
IN_LINE_COMMENT,
INCREASED,
IS,
KNOWLEDGEBASE,
LEAST_ENTROPY,
LESSTHANOREQLS,
LETTER,
LOWDOMAIN,
MAXIMUM,
MEAN_AND,
MEAN_OR,
MINIMUM,
MINMAX,
MINUS,
MOSTLY,
MUST,
MY,
N,
NEAR,
NEGATIVE,
NEGATIVELY,
NOT,
NP,
NPN,
OR,
OUR,
PI,
PLUS,
PN,
POSITIVE,
POSITIVELY,
PRODUCT,
PRODUCT_AND,
PRODUCT_OR,
RESOLUTIONMETHOD,
ROUGHLY,
RULES,
RUNUNCONDITIONALS,
SC,
SETTYPE,
SHOULD,
SINGLETON,
SINUSOIDAL,
SLASH,
SLIGHTLY,
SOMEWHAT,
SPLAT,
SUGENO_NOT,
THE,
THEN,
THRESHOLD_NOT,
TO,
tokenImage,
TRIANGLE,
VERY,
VICINITY,
VOTE_BOUNDED,
WEIGHTEDBETA,
WIDTH,
YAGER_AND,
YAGER_NOT,
YAGER_OR |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
handler
private java.util.Observable handler
errors
private int errors
kbName
private java.lang.String kbName
theKB
private FzyKnowledgebase theKB
hedgeCollection
private java.util.Vector hedgeCollection
setNames
private java.util.Vector setNames
attribNames
private java.util.Vector attribNames
ruleNames
private java.util.Vector ruleNames
referringRules
private java.util.Hashtable referringRules
deducingRules
private java.util.Hashtable deducingRules
solutionSetDict
private java.util.Hashtable solutionSetDict
trace_enabled
private boolean trace_enabled
trace_indent
private int trace_indent
token_source
public CompileSPRuleTokenManager 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_la1_2
private final int[] jj_la1_2
jj_la1_3
private final int[] jj_la1_3
jj_expentries
private java.util.Vector jj_expentries
jj_expentry
private int[] jj_expentry
jj_kind
private int jj_kind
CompileSPRule
public CompileSPRule(CompileSPRuleTokenManager tm)
CompileSPRule
public CompileSPRule(java.io.InputStream stream)
CompileSPRule
public CompileSPRule(java.io.Reader stream)
CompileSPRule
public CompileSPRule(FzyKnowledgebase kb,
CompileSPRuleTokenManager tm)
addDeducingRule
private void addDeducingRule(FzyRule r,
FzyAttribute aac)
addObserver
public void addObserver(java.util.Observer o)
addReferringRule
private void addReferringRule(FzyRule r,
FzyAttribute aac2)
attribId
public final java.lang.String attribId()
throws ParseException
attributeClause
public final FzyAttribClause attributeClause(FzyRule r)
throws ParseException
compileRule
public final FzyRule compileRule()
throws ParseException
- compileRule
consequent
public final FzyConsequent consequent(FzyRule r)
throws ParseException
disable_tracing
public final void disable_tracing()
enable_tracing
public final void enable_tracing()
expression
public final FzyClauseComponent expression(FzyRule r)
throws ParseException
generateParseException
public final ParseException generateParseException()
getHandler
public java.util.Observable getHandler()
getKB
public FzyKnowledgebase getKB()
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
hedge
public final FzyHedge hedge()
throws ParseException
hedgeCollection
public final java.util.Vector hedgeCollection()
throws ParseException
id
public final java.lang.Object[] id(FzyAttribute fa)
throws ParseException
- Return an identifier of some sort.
If FzyAttribute is null, then I expect the identifier to be an attribute name.
If FzyAttribute is not null, then I expect the identifier to be a fzyset name within the attribute specified.
- Parameters:
FzyAttribute
- fa - the fuzzy attribute- Returns:
- Object[] - an array with 2 values: the actual name found as a string, and the object that is named. (FzyAttribute or FzySet).
- Throws:
- ParseException -
jj_consume_token
private final Token jj_consume_token(int kind)
throws ParseException
jj_ntk
private final int jj_ntk()
kbId
public final java.lang.String kbId()
throws ParseException
newCompiler
public static CompileSPRule newCompiler(FzyKnowledgebase kb,
java.lang.String ruleAsString)
nLiteral
public final java.lang.Double nLiteral()
throws ParseException
operator
public final FzyOperator operator()
throws ParseException
parenClause
public final FzyClauseComponent parenClause(FzyRule r)
throws ParseException
premise
public final FzyPremise premise(FzyRule r)
throws ParseException
ReInit
public void ReInit(CompileSPRuleTokenManager tm)
ReInit
public void ReInit(java.io.InputStream stream)
ReInit
public void ReInit(java.io.Reader stream)
ReInit
public void ReInit(java.lang.String aRule)
- Reinitialize the compiler without having to create a new one.
(Creates a new TokenManager).
restrictionHedge
public final FzyHedge restrictionHedge()
throws ParseException
ruleId
public final java.lang.String ruleId()
throws ParseException
setId
public final java.lang.String setId()
throws ParseException
setKB
public void setKB(FzyKnowledgebase kb)
testCompiler
public static void testCompiler()
- Runs a couple of quick tests
trace_call
private final void trace_call(java.lang.String s)
trace_return
private final void trace_return(java.lang.String s)
trace_scan
private final void trace_scan(Token t1,
int t2)
trace_token
private final void trace_token(Token t,
java.lang.String where)
Copyright (c) 2001, Workplace Performance Tools, All Rights Reserved