- java.lang.Object
-
- com.rabbitmq.jms.parse.sql.SqlParser
-
- All Implemented Interfaces:
Parser<com.rabbitmq.jms.parse.sql.SqlTreeNode>
public class SqlParser extends java.lang.Object implements Parser<com.rabbitmq.jms.parse.sql.SqlTreeNode>
This usesSqlProductionas a naïve parser for the grammar defined in that type.This class is not thread-safe during construction since it then modifies the passed
TokenStreamwhich is (potentially) shared.
-
-
Constructor Summary
Constructors Constructor Description SqlParser(SqlTokenStream tokenStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetErrorMessage()This call is idempotent.com.rabbitmq.jms.parse.sql.SqlParseTreeparse()This method returns the parse tree.booleanparseOk()This call is idempotent.
-
-
-
Constructor Detail
-
SqlParser
public SqlParser(SqlTokenStream tokenStream)
-
-
Method Detail
-
parse
public com.rabbitmq.jms.parse.sql.SqlParseTree parse()
Description copied from interface:ParserThis method returns the parse tree. It is idempotent.- Specified by:
parsein interfaceParser<com.rabbitmq.jms.parse.sql.SqlTreeNode>- Returns:
- a
ParseTree<Node>capturing the result of a complete parse attempt.
-
parseOk
public boolean parseOk()
Description copied from interface:ParserThis call is idempotent.
-
getErrorMessage
public java.lang.String getErrorMessage()
Description copied from interface:ParserThis call is idempotent.- Specified by:
getErrorMessagein interfaceParser<com.rabbitmq.jms.parse.sql.SqlTreeNode>- Returns:
- a string with a reason for termination. Only valid if
Parser.parseOk()returnsfalse.
-
-