All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Zql.ZqlParser

java.lang.Object
   |
   +----Zql.ZqlParser

public class ZqlParser
extends Object
ZqlParser: an SQL parser


Constructor Index

 o ZqlParser()
Create a new parser: before use, call initParser(InputStream) to specify an input stream for the parsing.
 o ZqlParser(InputStream)
Create a new parser to parse SQL statements from a given input stream.

Method Index

 o initParser(InputStream)
Initialize (or re-initialize) the input stream for the parser.
 o main(String[])
Test program: Parses SQL statements from stdin or from a text file.
If the program receives one argument, it is an SQL text file name; if there's no argument, the program reads from stdin.
 o readExpression()
Parse an SQL Expression (like the WHERE clause of an SQL query).
 o readStatement()
Parse an SQL Statement from the parser's input stream.
 o readStatements()
Parse a set of SQL Statements from the parser's input stream (all the available statements are parsed and returned).

Constructors

 o ZqlParser
 public ZqlParser(InputStream in)
Create a new parser to parse SQL statements from a given input stream.

Parameters:
in - The InputStream from which SQL statements will be read.
 o ZqlParser
 public ZqlParser()
Create a new parser: before use, call initParser(InputStream) to specify an input stream for the parsing.

Methods

 o main
 public static void main(String args[]) throws ParseException
Test program: Parses SQL statements from stdin or from a text file.
If the program receives one argument, it is an SQL text file name; if there's no argument, the program reads from stdin.

 o initParser
 public void initParser(InputStream in)
Initialize (or re-initialize) the input stream for the parser.

 o readStatement
 public ZStatement readStatement() throws ParseException
Parse an SQL Statement from the parser's input stream.

Returns:
An SQL statement, or null if there's no more statement.
 o readStatements
 public Vector readStatements() throws ParseException
Parse a set of SQL Statements from the parser's input stream (all the available statements are parsed and returned).

Returns:
A vector of ZStatement objects (SQL statements).
 o readExpression
 public ZExp readExpression() throws ParseException
Parse an SQL Expression (like the WHERE clause of an SQL query).

Returns:
An SQL expression.

All Packages  Class Hierarchy  This Package  Previous  Next  Index