## dods.dap.parser
Class ExprParser

    java.lang.Object
      dods.dap.parser.ExprParser

All Implemented Interfaces:
  ExprParserConstants

public class ExprParser
extends Object
implements ExprParserConstants

The constraint expression parser class.

Because it only makes sense to evaluate CEs when serving data, the BaseTyeFactory must create instances of the SDtype classes, not the Dtype classes. The is because we use the setRead method of the class ServerMethods when creating constants (to ensure that the evaluator doesn't try to read tem from the dataset!).

Nested Class Summary
`(package private) static class` `ExprParser.JJCalls`

Field Summary
`(package private) SimpleCharStream` `jj_input_stream`
`Token` `jj_nt`
`boolean` `lookingAhead`
`Token` `token`
`ExprParserTokenManager` `token_source`

Fields inherited from interface dods.dap.parser.ExprParserConstants
`AMPERSAND, ASTERISK, COLON, COMMA, DEFAULT, EOF, EQUAL, EXPONENT, FLOAT, GREATER, GREATER_EQL, ID, INT, LBRACE, LBRACKET, LESS, LESS_EQL, LPAREN, MANTISSA, NOT_EQUAL, QUOTED_STR, RBRACE, RBRACKET, REGEXP, RPAREN, SEPARATOR, STR, tokenImage, UNQUOTED_STR, UNTERM_QUOTE`

Constructor Summary
`ExprParser(ExprParserTokenManager tm)`
`ExprParser(InputStream stream)`
`ExprParser(Reader stream)`

Method Summary
`Vector` `arg_list()`
`void` `array_index(int count, ServerArrayMethods bt)`
`Clause` `bool_function()`
`Clause` `clause()`
`Stack` `component(Stack components)`
`BaseType` `constant()`
`void` `constraint_expression(CEEvaluator ceEval, BaseTypeFactory factory, ClauseFactory clauseFactory)` This is the entry point for the Constraint expression parser.
`void` `disable_tracing()`
`void` `enable_tracing()`
`String` `field()`
`ParseException` `generateParseException()`
`Token` `getNextToken()`
`Token` `getToken(int index)`
`void` `proj_clause()`
`void` `proj_variable()`
`void` `projection()`
`void` `ReInit(ExprParserTokenManager tm)`
`void` `ReInit(InputStream stream)`
`void` `ReInit(Reader stream)`
`int` `rel_op()`
`void` `selection()`
`SubClause` `value()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### token_source

    public ExprParserTokenManager token_source

### jj_input_stream

    SimpleCharStream jj_input_stream

### token

    public Token token

### jj_nt

    public Token jj_nt

### lookingAhead

    public boolean lookingAhead

Constructor Detail

### ExprParser

    public ExprParser(InputStream stream)

### ExprParser

    public ExprParser(Reader stream)

### ExprParser

    public ExprParser(ExprParserTokenManager tm)

Method Detail

### constraint_expression

    public final void constraint_expression(CEEvaluator ceEval,
                                            BaseTypeFactory factory,
                                            ClauseFactory clauseFactory)
                                     throws ParseException,
                                            NoSuchVariableException,
                                            NoSuchFunctionException,
                                            InvalidOperatorException,
                                            DODSException,
                                            InvalidParameterException,
                                            SBHException,
                                            WrongTypeException

  This is the entry point for the Constraint expression parser.

  Note that this method catches any ParserException and recasts it to a DODSException after replacing all double quotes with single quotes.

  Parameters:
    `ceEval` - A CEEvaluator instance where any select clauses will be dumped and from which the DDS, which supplies the evaluation environment, will be read.
    `factory` - A BaseTypeFactory used to generate instances of variables as needed (e.g., to hold values of constants).
    `clauseFactory` - A ClauseFactory used to generate instances of each type of clause.
  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `DODSException`
    `InvalidParameterException`
    `SBHException`
    `WrongTypeException`

### selection

    public final void selection()
                         throws ParseException,
                                NoSuchVariableException,
                                NoSuchFunctionException,
                                InvalidOperatorException,
                                ParseException,
                                SBHException,
                                DODSException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `SBHException`
    `DODSException`

### clause

    public final Clause clause()
                        throws ParseException,
                               NoSuchVariableException,
                               NoSuchFunctionException,
                               InvalidOperatorException,
                               ParseException,
                               DODSException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `DODSException`

### bool_function

    public final Clause bool_function()
                               throws ParseException,
                                      NoSuchVariableException,
                                      NoSuchFunctionException,
                                      InvalidOperatorException,
                                      ParseException,
                                      DODSException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `DODSException`

### rel_op

    public final int rel_op()
                     throws ParseException

  Throws:
    `ParseException`

### projection

    public final void projection()
                          throws ParseException,
                                 NoSuchVariableException,
                                 NoSuchFunctionException,
                                 InvalidOperatorException,
                                 ParseException,
                                 InvalidParameterException,
                                 SBHException,
                                 WrongTypeException,
                                 DODSException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `InvalidParameterException`
    `SBHException`
    `WrongTypeException`
    `DODSException`

### proj_clause

    public final void proj_clause()
                           throws ParseException,
                                  NoSuchVariableException,
                                  NoSuchFunctionException,
                                  InvalidOperatorException,
                                  ParseException,
                                  InvalidParameterException,
                                  SBHException,
                                  WrongTypeException,
                                  DODSException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `InvalidParameterException`
    `SBHException`
    `WrongTypeException`
    `DODSException`

### proj_variable

    public final void proj_variable()
                             throws ParseException,
                                    NoSuchVariableException,
                                    NoSuchFunctionException,
                                    InvalidOperatorException,
                                    ParseException,
                                    InvalidParameterException,
                                    SBHException,
                                    WrongTypeException,
                                    DODSException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `InvalidParameterException`
    `SBHException`
    `WrongTypeException`
    `DODSException`

### component

    public final Stack component(Stack components)
                          throws ParseException,
                                 ParseException,
                                 DODSException

  Throws:
    `ParseException`
    `DODSException`

### arg_list

    public final Vector arg_list()
                          throws ParseException,
                                 NoSuchVariableException,
                                 NoSuchFunctionException,
                                 InvalidOperatorException,
                                 ParseException,
                                 DODSException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `DODSException`

### array_index

    public final void array_index(int count,
                                  ServerArrayMethods bt)
                           throws ParseException,
                                  ParseException,
                                  DODSException,
                                  InvalidParameterException,
                                  SBHException

  Throws:
    `ParseException`
    `DODSException`
    `InvalidParameterException`
    `SBHException`

### value

    public final SubClause value()
                          throws ParseException,
                                 NoSuchVariableException,
                                 NoSuchFunctionException,
                                 InvalidOperatorException,
                                 DODSException,
                                 ParseException

  Throws:
    `ParseException`
    `NoSuchVariableException`
    `NoSuchFunctionException`
    `InvalidOperatorException`
    `DODSException`

### field

    public final String field()
                       throws ParseException,
                              ParseException

  Throws:
    `ParseException`

### constant

    public final BaseType constant()
                            throws ParseException,
                                   DODSException,
                                   ParseException

  Throws:
    `ParseException`
    `DODSException`

### ReInit

    public void ReInit(InputStream stream)

### ReInit

    public void ReInit(Reader stream)

### ReInit

    public void ReInit(ExprParserTokenManager tm)

### getNextToken

    public final Token getNextToken()

### getToken

    public final Token getToken(int index)

### generateParseException

    public final ParseException generateParseException()

### enable_tracing

    public final void enable_tracing()

### disable_tracing

    public final void disable_tracing()