opendap.Server.parsers
Class CeParser

java.lang.Object
  extended by opendap.Server.parsers.Ceparse
      extended by opendap.Server.parsers.CeParser
All Implemented Interfaces:
ExprParserConstants

public class CeParser
extends Ceparse

A Bison parser, automatically generated from ce.y.

Author:
LALR (1) parser skeleton written by Paolo Bonzini.

Nested Class Summary
static interface CeParser.Lexer
          Communication interface between the scanner and the Bison-generated parser CeParser.
 
Field Summary
static String bisonSkeleton
          Name of the skeleton that generated this parser.
static String bisonVersion
          Version number for the Bison executable that generated this parser.
static int EOF
          Token returned by the scanner to signal the end of its input.
 boolean errorVerbose
          True if verbose error messages are enabled.
static int SCAN_NUMBERCONST
          Token number, to be returned by the scanner.
static int SCAN_STRINGCONST
          Token number, to be returned by the scanner.
static int SCAN_WORD
          Token number, to be returned by the scanner.
static int YYABORT
          Returned by a Bison action in order to stop the parsing process and return failure (false).
static int YYACCEPT
          Returned by a Bison action in order to stop the parsing process and return success (true).
static int YYERROR
          Returned by a Bison action in order to start error recovery without printing an error message.
static int YYFAIL
          Returned by a Bison action in order to print an error message and start error recovery.
 
Fields inherited from class opendap.Server.parsers.Ceparse
cedebug
 
Fields inherited from interface opendap.Server.parsers.ExprParserConstants
AMPERSAND, COLON, COMMA, DEFAULT, EQUAL, FLOATCONST, FUNCTION, GREATER, GREATER_EQL, INTCONST, LBRACE, LBRACKET, LESS, LESS_EQL, LPAREN, NOT_EQUAL, operatorImage, RBRACE, RBRACKET, REGEXP, RPAREN, SEPARATOR, STRINGCONST, tokenImage, VAR, WORD
 
Constructor Summary
CeParser(BaseTypeFactory factory)
          Instantiates the Bison-generated parser.
CeParser(CeParser.Lexer yylexer)
          Instantiates the Bison-generated parser.
 
Method Summary
static boolean constraint_expression(CEEvaluator ceEval, BaseTypeFactory factory, ClauseFactory clauseFactory, String constraint, String url)
           
 String getConstraint()
           
 int getDebugLevel()
          Answer the verbosity of the debugging output; 0 means that all kinds of output from the parser are suppressed.
 PrintStream getDebugStream()
          Return the PrintStream on which the debugging output is printed.
 String getURL()
           
 boolean parse()
          Parse input from the scanner that was specified at object construction time.
 boolean recovering()
          Return whether error recovery is being done.
 void setConstraint(String constraint)
           
 void setDebugLevel(int level)
          Set the verbosity of the debugging output; 0 means that all kinds of output from the parser are suppressed.
 void setDebugStream(PrintStream s)
          Set the PrintStream on which the debug output is printed.
 void setURL(String url)
           
protected  void yycdebug(String s)
           
protected  void yyerror(String s)
           
 
Methods inherited from class opendap.Server.parsers.Ceparse
constraint_expression, getAST, getASTnodeset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bisonVersion

public static final String bisonVersion
Version number for the Bison executable that generated this parser.

See Also:
Constant Field Values

bisonSkeleton

public static final String bisonSkeleton
Name of the skeleton that generated this parser.

See Also:
Constant Field Values

errorVerbose

public boolean errorVerbose
True if verbose error messages are enabled.


EOF

public static final int EOF
Token returned by the scanner to signal the end of its input.

See Also:
Constant Field Values

SCAN_WORD

public static final int SCAN_WORD
Token number, to be returned by the scanner.

See Also:
Constant Field Values

SCAN_STRINGCONST

public static final int SCAN_STRINGCONST
Token number, to be returned by the scanner.

See Also:
Constant Field Values

SCAN_NUMBERCONST

public static final int SCAN_NUMBERCONST
Token number, to be returned by the scanner.

See Also:
Constant Field Values

YYACCEPT

public static final int YYACCEPT
Returned by a Bison action in order to stop the parsing process and return success (true).

See Also:
Constant Field Values

YYABORT

public static final int YYABORT
Returned by a Bison action in order to stop the parsing process and return failure (false).

See Also:
Constant Field Values

YYERROR

public static final int YYERROR
Returned by a Bison action in order to start error recovery without printing an error message.

See Also:
Constant Field Values

YYFAIL

public static final int YYFAIL
Returned by a Bison action in order to print an error message and start error recovery. Formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed.

See Also:
Constant Field Values
Constructor Detail

CeParser

public CeParser(CeParser.Lexer yylexer)
Instantiates the Bison-generated parser.

Parameters:
yylexer - The scanner that will supply tokens to the parser.

CeParser

public CeParser(BaseTypeFactory factory)
Instantiates the Bison-generated parser.

Parameters:
yylexer - The scanner that will supply tokens to the parser.
Method Detail

getDebugStream

public final PrintStream getDebugStream()
Return the PrintStream on which the debugging output is printed.


setDebugStream

public final void setDebugStream(PrintStream s)
Set the PrintStream on which the debug output is printed.

Parameters:
s - The stream that is used for debugging output.

getDebugLevel

public final int getDebugLevel()
Answer the verbosity of the debugging output; 0 means that all kinds of output from the parser are suppressed.

Specified by:
getDebugLevel in class Ceparse

setDebugLevel

public final void setDebugLevel(int level)
Set the verbosity of the debugging output; 0 means that all kinds of output from the parser are suppressed.

Specified by:
setDebugLevel in class Ceparse
Parameters:
level - The verbosity level for debugging output.

yyerror

protected final void yyerror(String s)

yycdebug

protected final void yycdebug(String s)

recovering

public final boolean recovering()
Return whether error recovery is being done. In this state, the parser reads token until it reaches a known state, and then restarts normal operation.


parse

public boolean parse()
              throws ParseException,
                     ParseException
Parse input from the scanner that was specified at object construction time. Return whether the end of the input was reached successfully.

Specified by:
parse in class Ceparse
Returns:
true if the parsing succeeds. Note that this does not imply that there were no syntax errors.
Throws:
ParseException

constraint_expression

public static boolean constraint_expression(CEEvaluator ceEval,
                                            BaseTypeFactory factory,
                                            ClauseFactory clauseFactory,
                                            String constraint,
                                            String url)
                                     throws DAP2Exception,
                                            ParseException
Throws:
DAP2Exception
ParseException

setURL

public void setURL(String url)
Specified by:
setURL in class Ceparse

getURL

public String getURL()
Specified by:
getURL in class Ceparse

setConstraint

public void setConstraint(String constraint)
Specified by:
setConstraint in class Ceparse

getConstraint

public String getConstraint()
Specified by:
getConstraint in class Ceparse


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.