net.sf.saffron.sql.parser
Class SqlParser

java.lang.Object
  |
  +--net.sf.saffron.sql.parser.SqlParser

public class SqlParser
extends Object

A SqlParser parses a SQL statement.

Since:
Mar 18, 2003$
Version:
$Id: //open/saffron/src/net/sf/saffron/sql/parser/SqlParser.java#2 $
Author:
jhyde$

Field Summary
private  Parser parser
           
 
Constructor Summary
SqlParser(Reader reader)
          Creats a SqlParser which reads input from a reader.
SqlParser(String s)
          Creats a SqlParser which reads input from a string.
 
Method Summary
 SqlNode parseExpression()
          Parses a SQL expression.
 SqlNode parseQuery()
          Parses a SELECT statement.
 SqlNode parseStmt()
          Parses an SQL statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

private final Parser parser
Constructor Detail

SqlParser

public SqlParser(String s)
Creats a SqlParser which reads input from a string.


SqlParser

public SqlParser(Reader reader)
Creats a SqlParser which reads input from a reader.

Method Detail

parseExpression

public SqlNode parseExpression()
                        throws ParseException
Parses a SQL expression.

Throws:
ParseException - if there is a parse error

parseQuery

public SqlNode parseQuery()
                   throws ParseException
Parses a SELECT statement.

Returns:
A SqlSelect for a regular SELECT statement; a SqlBinaryOperator for a UNION, INTERSECT, or EXCEPT.
Throws:
ParseException - if there is a parse error

parseStmt

public SqlNode parseStmt()
                  throws ParseException
Parses an SQL statement.

Returns:
top-level SqlNode representing stmt
Throws:
ParseException - if there is a parse error

SourceForge.net_Logo