Package opendap.servers.parsers
Class CeParser
java.lang.Object
opendap.servers.parsers.Ceparse
opendap.servers.parsers.CeParser
- All Implemented Interfaces:
ExprParserConstants
A Bison parser, automatically generated from ce.y.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCommunication interface between the scanner and the Bison-generated parser CeParser. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the skeleton that generated this parser.static final StringVersion number for the Bison executable that generated this parser.static booleanstatic final intReturned by a Bison action in order to stop the parsing process and return failure (false).static final intReturned by a Bison action in order to stop the parsing process and return success (true).static final intReturned by a Bison action in order to start error recovery without printing an error message.Fields inherited from interface opendap.servers.parsers.ExprParserConstants
AMPERSAND, COLON, COMMA, DEFAULT, EOF, 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
ConstructorsConstructorDescriptionCeParser(opendap.dap.BaseTypeFactory factory) Instantiates the Bison-generated parser.CeParser(CeParser.Lexer yylexer) Instantiates the Bison-generated parser. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanconstraint_expression(CEEvaluator ceEval, opendap.dap.BaseTypeFactory factory, ClauseFactory clauseFactory, String constraint, String url) final intAnswer the verbosity of the debugging output; 0 means that all kinds of output from the parser are suppressed.final PrintStreamReturn the PrintStream on which the debugging output is printed.final booleanReturn whether verbose error messages are enabled.getURL()booleanparse()Parse input from the scanner that was specified at object construction time.final booleanReturn whether error recovery is being done.voidsetConstraint(String constraint) final voidsetDebugLevel(int level) Set the verbosity of the debugging output; 0 means that all kinds of output from the parser are suppressed.final voidSet the PrintStream on which the debug output is printed.final voidsetErrorVerbose(boolean verbose) Set the verbosity of error messages.voidprotected final voidfinal voidPrint an error message via the lexer.Methods inherited from class opendap.servers.parsers.Ceparse
constraint_expression, getAST, getASTnodeset
-
Field Details
-
bisonVersion
Version number for the Bison executable that generated this parser.- See Also:
-
bisonSkeleton
Name of the skeleton that generated this parser.- See Also:
-
YYACCEPT
public static final int YYACCEPTReturned by a Bison action in order to stop the parsing process and return success (true).- See Also:
-
YYABORT
public static final int YYABORTReturned by a Bison action in order to stop the parsing process and return failure (false).- See Also:
-
YYERROR
public static final int YYERRORReturned by a Bison action in order to start error recovery without printing an error message.- See Also:
-
DEBUG
public static boolean DEBUG
-
-
Constructor Details
-
CeParser
Instantiates the Bison-generated parser.- Parameters:
yylexer- The scanner that will supply tokens to the parser.
-
CeParser
public CeParser(opendap.dap.BaseTypeFactory factory) Instantiates the Bison-generated parser.- Parameters:
factory- The scanner that will supply tokens to the parser.
-
-
Method Details
-
getErrorVerbose
public final boolean getErrorVerbose()Return whether verbose error messages are enabled. -
setErrorVerbose
public final void setErrorVerbose(boolean verbose) Set the verbosity of error messages.- Parameters:
verbose- True to request verbose error messages.
-
getDebugStream
Return the PrintStream on which the debugging output is printed. -
setDebugStream
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:
getDebugLevelin classCeparse
-
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:
setDebugLevelin classCeparse- Parameters:
level- The verbosity level for debugging output.
-
yyerror
Print an error message via the lexer.- Parameters:
msg- The error message.
-
yycdebug
-
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 opendap.dap.parsers.ParseException, opendap.dap.parsers.ParseExceptionParse input from the scanner that was specified at object construction time. Return whether the end of the input was reached successfully. -
constraint_expression
public static boolean constraint_expression(CEEvaluator ceEval, opendap.dap.BaseTypeFactory factory, ClauseFactory clauseFactory, String constraint, String url) throws opendap.dap.DAP2Exception, opendap.dap.parsers.ParseException - Throws:
opendap.dap.DAP2Exceptionopendap.dap.parsers.ParseException
-
setURL
-
getURL
-
setConstraint
- Specified by:
setConstraintin classCeparse
-
getConstraint
- Specified by:
getConstraintin classCeparse
-