com.ibm.able.rules
Class AbleARLParser
java.lang.Object
|
+--antlr.Parser
|
+--antlr.LLkParser
|
+--com.ibm.able.rules.AbleARLParser
- All Implemented Interfaces:
- AbleARLParserTokenTypes
- public class AbleARLParser
- extends antlr.LLkParser
- implements AbleARLParserTokenTypes
This class parses ABLE rule language source files and
instantiates a specified AbleRuleSet object.
Fields inherited from class antlr.Parser |
astFactory, inputState, returnAST, tokenNames, traceDepth |
Fields inherited from interface com.ibm.able.rules.AbleARLParserTokenTypes |
DIV, EOF, ESC, EXPONENT, FLOAT_SUFFIX, HEX_DIGIT, JAVADOC_COMMENT, LITERAL_about, LITERAL_above, LITERAL_and, LITERAL_below, LITERAL_class, LITERAL_closeto, LITERAL_do, LITERAL_else, LITERAL_extremely, LITERAL_false, LITERAL_for, LITERAL_functions, LITERAL_fuzzy, LITERAL_generally, LITERAL_if, LITERAL_import, LITERAL_inputs, LITERAL_invicinityof, LITERAL_is, LITERAL_library, LITERAL_new, LITERAL_not, LITERAL_or, LITERAL_outputs, LITERAL_positively, LITERAL_predicates, LITERAL_return, LITERAL_ruleset, LITERAL_slightly, LITERAL_somewhat, LITERAL_static, LITERAL_template, LITERAL_then, LITERAL_true, LITERAL_until, LITERAL_using, LITERAL_variables, LITERAL_very, LITERAL_when, LITERAL_while, LITERAL_xor, MINUS, ML_COMMENT, MOD, NULL_TREE_LOOKAHEAD, PLUS, SL_COMMENT, STAR, TokAmp, TokAND, TokArrow1, TokArrow2, TokBar, TokBitBSR, TokBitSL, TokBitSR, TokBitXOR, TokBraceL, TokBraceR, TokBrackL, TokBrackR, TokChar, TokColon, TokComma, TokDC, TokDot, TokDouble, TokEq, TokEq2, TokGt, TokGtEq, TokId, TokInt, TokLt, TokLtEq, TokNeq, TokNotBang, TokNotTilde, TokOR, TokParenL, TokParenR, TokSemicolon, TokStr, UNARY_MINUS, UNARY_PLUS, WS |
Methods inherited from class antlr.LLkParser |
consume, LA, LT, traceIn, traceOut |
Methods inherited from class antlr.Parser |
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, isDebugMode, mark, match, match, matchNot, panic, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_tokenNames
public static final java.lang.String[] _tokenNames
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
_tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_3
_tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_4
_tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_5
_tokenSet_6
public static final antlr.collections.impl.BitSet _tokenSet_6
_tokenSet_7
public static final antlr.collections.impl.BitSet _tokenSet_7
_tokenSet_8
public static final antlr.collections.impl.BitSet _tokenSet_8
_tokenSet_9
public static final antlr.collections.impl.BitSet _tokenSet_9
_tokenSet_10
public static final antlr.collections.impl.BitSet _tokenSet_10
_tokenSet_11
public static final antlr.collections.impl.BitSet _tokenSet_11
_tokenSet_12
public static final antlr.collections.impl.BitSet _tokenSet_12
_tokenSet_13
public static final antlr.collections.impl.BitSet _tokenSet_13
_tokenSet_14
public static final antlr.collections.impl.BitSet _tokenSet_14
_tokenSet_15
public static final antlr.collections.impl.BitSet _tokenSet_15
_tokenSet_16
public static final antlr.collections.impl.BitSet _tokenSet_16
AbleARLParser
protected AbleARLParser(antlr.TokenBuffer tokenBuf,
int k)
AbleARLParser
public AbleARLParser(antlr.TokenBuffer tokenBuf)
AbleARLParser
protected AbleARLParser(antlr.TokenStream lexer,
int k)
AbleARLParser
public AbleARLParser(antlr.TokenStream lexer)
AbleARLParser
public AbleARLParser(antlr.ParserSharedInputState state)
setStopOnAbleParException
public void setStopOnAbleParException(boolean theStopOnAbleParExceptionFlag)
isStopOnAbleParException
public boolean isStopOnAbleParException()
getARLTree
public AbleARLTreeNode getARLTree()
parseRuleSetInput
public final void parseRuleSetInput(AbleRuleSet theRuleSet,
boolean theStopOnAbleParExceptionFlag)
throws antlr.RecognitionException,
antlr.TokenStreamException,
AbleParException
- The method parseRuleSetInput is the initial rule.
- Parameters:
theRuleSet
- provides context to resolve identifier names, etc.
Note: ruleset object must be clear()ed before calling this method.theStopOnAbleParExceptionFlag
- If true, throw exception
on the first error; if false, collect all exceptions
and throw an AbleParException with the list as the
included object.
parseRuleBlockInput
public final AbleRuleBlock parseRuleBlockInput(AbleRuleSet theRuleSet,
boolean theStopOnAbleParExceptionFlag)
throws antlr.RecognitionException,
antlr.TokenStreamException,
AbleParException
- The method parseRuleBlockInput parses a String into an AbleRuleBlock object.
- Parameters:
theRuleSet
- provides context to resolve identifier names, etc.theStopOnAbleParExceptionFlag
- If true, throw exception
on the first error; if false, collect all exceptions
and throw an AbleParException with the list as the
included object.
parseConsultRuleBlockInput
public final AbleRuleBlock parseConsultRuleBlockInput(AbleRuleSet theRuleSet,
boolean theStopOnAbleParExceptionFlag)
throws antlr.RecognitionException,
antlr.TokenStreamException,
AbleParException
- The method parseRuleBlockInput parses a predicate consult() AbleRuleBlock object.
- Parameters:
theRuleSet
- provides context to resolve identifier names, etc.theStopOnAbleParExceptionFlag
- If true, throw exception
on the first error; if false, collect all exceptions
and throw an AbleParException with the list as the
included object.
parseRuleInput
public final AbleRule parseRuleInput(AbleRuleSet theRuleSet,
java.lang.String theRuleBlockName,
boolean theStopOnAbleParExceptionFlag,
boolean theReplacementMode)
throws antlr.RecognitionException,
antlr.TokenStreamException,
AbleParException
- The method parseRuleInput parses a String into an AbleRule object.
- Parameters:
theRuleSet
- provides context to resolve identifier names, etc.theStopOnAbleParExceptionFlag
- If true, throw exception
on the first error; if false, collect all exceptions
and throw an AbleParException with the list as the
included object.theReplacementMode
- Replace existing rule when true, add new rule if false.
parseExpressionInput
public final AbleRd parseExpressionInput(AbleRuleSet theRuleSet,
boolean theStopOnAbleParExceptionFlag)
throws antlr.RecognitionException,
antlr.TokenStreamException,
AbleParException
- The method parseExpressionInput parses a String into an AbleExpression object.
- Parameters:
theRuleSet
- provides context to resolve identifier names, etc.theStopOnAbleParExceptionFlag
- If true, throw exception
on the first error; if false, collect all exceptions
and throw an AbleParException with the list as the
included object.
(C) Copyright IBM Corporation 1999, 2003