Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`static java.lang.String[]` | `_tokenNames`
`static antlr.collections.impl.BitSet` | `_tokenSet_0`
`static antlr.collections.impl.BitSet` | `_tokenSet_1`
`static antlr.collections.impl.BitSet` | `_tokenSet_10`
`static antlr.collections.impl.BitSet` | `_tokenSet_11`
`static antlr.collections.impl.BitSet` | `_tokenSet_12`
`static antlr.collections.impl.BitSet` | `_tokenSet_13`
`static antlr.collections.impl.BitSet` | `_tokenSet_14`
`static antlr.collections.impl.BitSet` | `_tokenSet_15`
`static antlr.collections.impl.BitSet` | `_tokenSet_16`
`static antlr.collections.impl.BitSet` | `_tokenSet_17`
`static antlr.collections.impl.BitSet` | `_tokenSet_18`
`static antlr.collections.impl.BitSet` | `_tokenSet_19`
`static antlr.collections.impl.BitSet` | `_tokenSet_2`
`static antlr.collections.impl.BitSet` | `_tokenSet_20`
`static antlr.collections.impl.BitSet` | `_tokenSet_21`
`static antlr.collections.impl.BitSet` | `_tokenSet_22`
`static antlr.collections.impl.BitSet` | `_tokenSet_23`
`static antlr.collections.impl.BitSet` | `_tokenSet_24`
`static antlr.collections.impl.BitSet` | `_tokenSet_25`
`static antlr.collections.impl.BitSet` | `_tokenSet_26`
`static antlr.collections.impl.BitSet` | `_tokenSet_27`
`static antlr.collections.impl.BitSet` | `_tokenSet_28`
`static antlr.collections.impl.BitSet` | `_tokenSet_29`
`static antlr.collections.impl.BitSet` | `_tokenSet_3`
`static antlr.collections.impl.BitSet` | `_tokenSet_30`
`static antlr.collections.impl.BitSet` | `_tokenSet_31`
`static antlr.collections.impl.BitSet` | `_tokenSet_32`
`static antlr.collections.impl.BitSet` | `_tokenSet_4`
`static antlr.collections.impl.BitSet` | `_tokenSet_5`
`static antlr.collections.impl.BitSet` | `_tokenSet_6`
`static antlr.collections.impl.BitSet` | `_tokenSet_7`
`static antlr.collections.impl.BitSet` | `_tokenSet_8`
`static antlr.collections.impl.BitSet` | `_tokenSet_9`

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_actions, LITERAL_and, LITERAL_below, LITERAL_break, LITERAL_case, LITERAL_class, LITERAL_cloneable, LITERAL_closeto, LITERAL_condition, LITERAL_decisions, LITERAL_default, LITERAL_defevent, LITERAL_do, LITERAL_effect, LITERAL_else, LITERAL_expansion, LITERAL_extends, LITERAL_extremely, LITERAL_false, LITERAL_final, LITERAL_for, LITERAL_functions, LITERAL_fuzzy, LITERAL_generally, LITERAL_if, LITERAL_import, LITERAL_include, LITERAL_inputs, LITERAL_invicinityof, LITERAL_is, LITERAL_library, LITERAL_new, LITERAL_not, LITERAL_or, LITERAL_outputs, LITERAL_parameters, LITERAL_positively, LITERAL_precondition, LITERAL_preconditions, LITERAL_predicates, LITERAL_return, LITERAL_ruleset, LITERAL_slightly, LITERAL_somewhat, LITERAL_static, LITERAL_switch, 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, Tok, 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`

Constructor Summary
`` | `AbleARLParser(antlr.ParserSharedInputState state)`
`` | `AbleARLParser(antlr.TokenBuffer tokenBuf)`
`protected` | `AbleARLParser(antlr.TokenBuffer tokenBuf, int k)`
`` | `AbleARLParser(antlr.TokenStream lexer)`
`protected` | `AbleARLParser(antlr.TokenStream lexer, int k)`

Method Summary
`AbleARLTreeNode` | `getARLTree()`
`boolean` | `isStopOnAbleParException()`
`AbleRd` | `parseActionInput(AbleRuleSet theRuleSet, boolean theStopOnAbleParExceptionFlag)` The method parseExpressionInput parses a String into an AbleExpression object.
`AbleRuleBlock` | `parseConsultRuleBlockInput(AbleRuleSet theRuleSet, boolean theStopOnAbleParExceptionFlag)` The method parseRuleBlockInput parses a predicate consult() AbleRuleBlock object.
`AbleRd` | `parseExpressionInput(AbleRuleSet theRuleSet, boolean theStopOnAbleParExceptionFlag)` The method parseExpressionInput parses a String into an AbleExpression object.
`void` | `parseRuleBlockDeclarations(AbleRuleSet theRuleSet, boolean theStopOnAbleParExceptionFlag)` Parses rule block declarations.
`AbleRuleBlock` | `parseRuleBlockInput(AbleRuleSet theRuleSet, boolean theStopOnAbleParExceptionFlag)` The method parseRuleBlockInput parses a String into an AbleRuleBlock object.
`AbleRule` | `parseRuleInput(AbleRuleSet theRuleSet, java.lang.String theRuleBlockKey, boolean theStopOnAbleParExceptionFlag, boolean theReplacementMode)` Parses a String into an AbleRule object.
`void` | `parseRuleSetInput(AbleRuleSet theRuleSet, boolean theStopOnAbleParExceptionFlag)` The method parseRuleSetInput is the initial rule.
`void` | `parseSetDefinitionInput(AbleRuleSet theRuleSet, AbleFuzzyVariable theFuzzyVar)` The method parseSetDefinitionInput parses a String into an AbleFuzzySet object.
`void` | `parseVariableDeclarations(AbleRuleSet theRuleSet, boolean theStopOnAbleParExceptionFlag)` Parses variable declarations.
`void` | `reset(antlr.TokenStream lexer)`
`void` | `setStopOnAbleParException(boolean theStopOnAbleParExceptionFlag)`

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`

Field Detail

### _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

### _tokenSet_17

    public static final antlr.collections.impl.BitSet _tokenSet_17

### _tokenSet_18

    public static final antlr.collections.impl.BitSet _tokenSet_18

### _tokenSet_19

    public static final antlr.collections.impl.BitSet _tokenSet_19

### _tokenSet_20

    public static final antlr.collections.impl.BitSet _tokenSet_20

### _tokenSet_21

    public static final antlr.collections.impl.BitSet _tokenSet_21

### _tokenSet_22

    public static final antlr.collections.impl.BitSet _tokenSet_22

### _tokenSet_23

    public static final antlr.collections.impl.BitSet _tokenSet_23

### _tokenSet_24

    public static final antlr.collections.impl.BitSet _tokenSet_24

### _tokenSet_25

    public static final antlr.collections.impl.BitSet _tokenSet_25

### _tokenSet_26

    public static final antlr.collections.impl.BitSet _tokenSet_26

### _tokenSet_27

    public static final antlr.collections.impl.BitSet _tokenSet_27

### _tokenSet_28

    public static final antlr.collections.impl.BitSet _tokenSet_28

### _tokenSet_29

    public static final antlr.collections.impl.BitSet _tokenSet_29

### _tokenSet_30

    public static final antlr.collections.impl.BitSet _tokenSet_30

### _tokenSet_31

    public static final antlr.collections.impl.BitSet _tokenSet_31

### _tokenSet_32

    public static final antlr.collections.impl.BitSet _tokenSet_32

Constructor Detail

### 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)

Method Detail

### setStopOnAbleParException

    public void setStopOnAbleParException(boolean theStopOnAbleParExceptionFlag)

### isStopOnAbleParException

    public boolean isStopOnAbleParException()

### getARLTree

    public AbleARLTreeNode getARLTree()

### reset

    public void reset(antlr.TokenStream lexer)

### 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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`

### 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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`

### 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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`

### parseRuleInput

    public final AbleRule parseRuleInput(AbleRuleSet theRuleSet,
                                         java.lang.String theRuleBlockKey,
                                         boolean theStopOnAbleParExceptionFlag,
                                         boolean theReplacementMode)
                                  throws antlr.RecognitionException,
                                         antlr.TokenStreamException,
                                         AbleParException

  Parses a String into an AbleRule object.

  Parameters:
    `theRuleSet` - provides context to resolve identifier names, etc.
    `theRuleBlockKey` - The key to the rule block that will eventually contain the rule. The rule block key consists of the rule block's name and parameter signature. For example, `"foo()"` or `"foo(String,Boolean,Double)"`.
    `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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`

### 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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`

### parseActionInput

    public final AbleRd parseActionInput(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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`

### parseSetDefinitionInput

    public final void parseSetDefinitionInput(AbleRuleSet theRuleSet,
                                              AbleFuzzyVariable theFuzzyVar)
                                       throws antlr.RecognitionException,
                                              antlr.TokenStreamException,
                                              AbleParException

  The method parseSetDefinitionInput parses a String into an AbleFuzzySet object.

  Parameters:
    `theRuleSet` - provides context to resolve identifier names, etc.
    `theFuzzyVar` - The fuzzy variable on which the set is defined.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`

### parseRuleBlockDeclarations

    public final void parseRuleBlockDeclarations(AbleRuleSet theRuleSet,
                                                 boolean theStopOnAbleParExceptionFlag)
                                          throws antlr.RecognitionException,
                                                 antlr.TokenStreamException,
                                                 AbleParException

  Parses rule block declarations.

  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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`
  Since:
    ABLE 2.2.0

### parseVariableDeclarations

    public final void parseVariableDeclarations(AbleRuleSet theRuleSet,
                                                boolean theStopOnAbleParExceptionFlag)
                                         throws antlr.RecognitionException,
                                                antlr.TokenStreamException,
                                                AbleParException

  Parses variable declarations.

  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.
  Throws:
    `antlr.RecognitionException`
    `antlr.TokenStreamException`
    `AbleParException`
  Since:
    ABLE 2.2.0

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005