Class 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 uses SqlProduction as 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 TokenStream which is (potentially) shared.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getErrorMessage()
      This call is idempotent.
      com.rabbitmq.jms.parse.sql.SqlParseTree parse()
      This method returns the parse tree.
      boolean parseOk()
      This call is idempotent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • parse

        public com.rabbitmq.jms.parse.sql.SqlParseTree parse()
        Description copied from interface: Parser
        This method returns the parse tree. It is idempotent.
        Specified by:
        parse in interface Parser<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: Parser
        This call is idempotent.
        Specified by:
        parseOk in interface Parser<com.rabbitmq.jms.parse.sql.SqlTreeNode>
        Returns:
        true if the parse completed successfully, otherwise false, in which case the termination message is set.
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Description copied from interface: Parser
        This call is idempotent.
        Specified by:
        getErrorMessage in interface Parser<com.rabbitmq.jms.parse.sql.SqlTreeNode>
        Returns:
        a string with a reason for termination. Only valid if Parser.parseOk() returns false.