parser
Class MiniSql

java.lang.Object
  extended by parser.MiniSql
All Implemented Interfaces:
MiniSqlConstants, MiniSqlTreeConstants

public class MiniSql
extends java.lang.Object
implements MiniSqlTreeConstants, MiniSqlConstants


Nested Class Summary
(package private) static class MiniSql.JJCalls
           
private static class MiniSql.LookaheadSuccess
           
 
Field Summary
private  MiniSql.JJCalls[] jj_2_rtns
           
private  int jj_endpos
           
private  java.util.Vector jj_expentries
           
private  int[] jj_expentry
           
private  int jj_gc
           
private  int jj_gen
           
(package private)  SimpleCharStream jj_input_stream
           
private  int jj_kind
           
private  int jj_la
           
private  int[] jj_la1
           
private static int[] jj_la1_0
           
private static int[] jj_la1_1
           
private  Token jj_lastpos
           
private  int[] jj_lasttokens
           
private  MiniSql.LookaheadSuccess jj_ls
           
 Token jj_nt
           
private  int jj_ntk
           
private  boolean jj_rescan
           
private  Token jj_scanpos
           
private  boolean jj_semLA
           
protected  JJTMiniSqlState jjtree
           
 boolean lookingAhead
           
 Token token
           
 MiniSqlTokenManager token_source
           
 
Fields inherited from interface parser.MiniSqlTreeConstants
JJT_ANDEXPR, JJT_COLUMNTYPE, JJT_CREATEINDEX, JJT_CREATETABLE, JJT_DELETE, JJT_DESCRIBE, JJT_DROPINDEX, JJT_DROPTABLE, JJT_EXPRPRED, JJT_EXPRVALUE, JJT_IDENTLIST, JJT_INSERT, JJT_ORDERBY, JJT_OREXPR, JJT_SELECT, JJT_START, JJT_UPDATE, jjtNodeName, JJTVOID
 
Fields inherited from interface parser.MiniSqlConstants
DEFAULT, DIGIT, EOF, K_AND, K_BY, K_CREATE, K_DELETE, K_DESC, K_DESCRIBE, K_DISTINCT, K_DROP, K_EXPLAIN, K_FLOAT, K_FROM, K_HELP, K_INDEX, K_INSERT, K_INTEGER, K_INTO, K_ON, K_OR, K_ORDER, K_QUIT, K_SELECT, K_SET, K_STATS, K_STRING, K_TABLE, K_UPDATE, K_VALUES, K_WHERE, LETTER, LINE_COMMENT, MULTI_LINE_COMMENT, O_COMMA, O_EQ, O_GT, O_GTE, O_LPAREN, O_LT, O_LTE, O_NEQ, O_RPAREN, O_SEMI, O_STAR, S_FLOAT, S_IDENTIFIER, S_INTEGER, S_STRING, SPECIAL_CHAR, tokenImage
 
Constructor Summary
MiniSql(java.io.InputStream stream)
           
MiniSql(java.io.InputStream stream, java.lang.String encoding)
           
MiniSql(MiniSqlTokenManager tm)
           
MiniSql(java.io.Reader stream)
           
 
Method Summary
 void ColumnList()
          \ Statement Clauses \
 void ColumnType()
           
 void ColumnValues()
           
 void CreateIndexStmt()
           
 void CreateTableStmt()
           
 void DeleteStatement()
           
 void DescribeStatement()
           
 void disable_tracing()
           
 void DropIndexStmt()
           
 void DropTableStmt()
           
 void enable_tracing()
           
 void FromClause()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 void InsertStatement()
           
private  boolean jj_2_1(int xla)
           
private  boolean jj_2_2(int xla)
           
private  boolean jj_3_1()
           
private  boolean jj_3_2()
           
private  boolean jj_3R_10()
           
private  boolean jj_3R_9()
           
private  void jj_add_error_token(int kind, int pos)
           
private  Token jj_consume_token(int kind)
           
private static void jj_la1_0()
           
private static void jj_la1_1()
           
private  int jj_ntk()
           
private  void jj_rescan_token()
           
private  void jj_save(int index, int xla)
           
private  boolean jj_scan_token(int kind)
           
static void main(java.lang.String[] args)
           
 void OrderByClause()
           
 void ReInit(java.io.InputStream stream)
           
 void ReInit(java.io.InputStream stream, java.lang.String encoding)
           
 void ReInit(MiniSqlTokenManager tm)
           
 void ReInit(java.io.Reader stream)
           
 void Relop()
           
 void SelectClause()
           
 void SelectStatement()
           
 void SqlAndExpression()
           
 void SqlExpression()
          \ SQL Expressions \
 void SqlPrimaryExpression()
           
 void SqlRelationalExpression()
           
 void SqlStatement()
           
 void SqlValueExpression()
           
 void SqlValueExpressionList()
           
 AST_Start Start()
          \ Top-Level Statements \
 void UpdateStatement()
           
 void WhereClause()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected JJTMiniSqlState jjtree

token_source

public MiniSqlTokenManager token_source

jj_input_stream

SimpleCharStream jj_input_stream

token

public Token token

jj_nt

public Token jj_nt

jj_ntk

private int jj_ntk

jj_scanpos

private Token jj_scanpos

jj_lastpos

private Token jj_lastpos

jj_la

private int jj_la

lookingAhead

public boolean lookingAhead

jj_semLA

private boolean jj_semLA

jj_gen

private int jj_gen

jj_la1

private final int[] jj_la1

jj_la1_0

private static int[] jj_la1_0

jj_la1_1

private static int[] jj_la1_1

jj_2_rtns

private final MiniSql.JJCalls[] jj_2_rtns

jj_rescan

private boolean jj_rescan

jj_gc

private int jj_gc

jj_ls

private final MiniSql.LookaheadSuccess jj_ls

jj_expentries

private java.util.Vector jj_expentries

jj_expentry

private int[] jj_expentry

jj_kind

private int jj_kind

jj_lasttokens

private int[] jj_lasttokens

jj_endpos

private int jj_endpos
Constructor Detail

MiniSql

public MiniSql(java.io.InputStream stream)

MiniSql

public MiniSql(java.io.InputStream stream,
               java.lang.String encoding)

MiniSql

public MiniSql(java.io.Reader stream)

MiniSql

public MiniSql(MiniSqlTokenManager tm)
Method Detail

main

public static void main(java.lang.String[] args)
                 throws ParseException
Throws:
ParseException

Start

public final AST_Start Start()
                      throws ParseException
\ Top-Level Statements \

Throws:
ParseException

SqlStatement

public final void SqlStatement()
                        throws ParseException
Throws:
ParseException

CreateTableStmt

public final void CreateTableStmt()
                           throws ParseException
Throws:
ParseException

CreateIndexStmt

public final void CreateIndexStmt()
                           throws ParseException
Throws:
ParseException

DropTableStmt

public final void DropTableStmt()
                         throws ParseException
Throws:
ParseException

DropIndexStmt

public final void DropIndexStmt()
                         throws ParseException
Throws:
ParseException

DescribeStatement

public final void DescribeStatement()
                             throws ParseException
Throws:
ParseException

InsertStatement

public final void InsertStatement()
                           throws ParseException
Throws:
ParseException

SelectStatement

public final void SelectStatement()
                           throws ParseException
Throws:
ParseException

UpdateStatement

public final void UpdateStatement()
                           throws ParseException
Throws:
ParseException

DeleteStatement

public final void DeleteStatement()
                           throws ParseException
Throws:
ParseException

ColumnList

public final void ColumnList()
                      throws ParseException
\ Statement Clauses \

Throws:
ParseException

ColumnType

public final void ColumnType()
                      throws ParseException
Throws:
ParseException

SelectClause

public final void SelectClause()
                        throws ParseException
Throws:
ParseException

FromClause

public final void FromClause()
                      throws ParseException
Throws:
ParseException

WhereClause

public final void WhereClause()
                       throws ParseException
Throws:
ParseException

OrderByClause

public final void OrderByClause()
                         throws ParseException
Throws:
ParseException

ColumnValues

public final void ColumnValues()
                        throws ParseException
Throws:
ParseException

SqlExpression

public final void SqlExpression()
                         throws ParseException
\ SQL Expressions \

Throws:
ParseException

SqlAndExpression

public final void SqlAndExpression()
                            throws ParseException
Throws:
ParseException

SqlRelationalExpression

public final void SqlRelationalExpression()
                                   throws ParseException
Throws:
ParseException

Relop

public final void Relop()
                 throws ParseException
Throws:
ParseException

SqlPrimaryExpression

public final void SqlPrimaryExpression()
                                throws ParseException
Throws:
ParseException

SqlValueExpression

public final void SqlValueExpression()
                              throws ParseException
Throws:
ParseException

SqlValueExpressionList

public final void SqlValueExpressionList()
                                  throws ParseException
Throws:
ParseException

jj_2_1

private final boolean jj_2_1(int xla)

jj_2_2

private final boolean jj_2_2(int xla)

jj_3R_9

private final boolean jj_3R_9()

jj_3R_10

private final boolean jj_3R_10()

jj_3_2

private final boolean jj_3_2()

jj_3_1

private final boolean jj_3_1()

jj_la1_0

private static void jj_la1_0()

jj_la1_1

private static void jj_la1_1()

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.InputStream stream,
                   java.lang.String encoding)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(MiniSqlTokenManager tm)

jj_consume_token

private final Token jj_consume_token(int kind)
                              throws ParseException
Throws:
ParseException

jj_scan_token

private final boolean jj_scan_token(int kind)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

jj_ntk

private final int jj_ntk()

jj_add_error_token

private void jj_add_error_token(int kind,
                                int pos)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()

jj_rescan_token

private final void jj_rescan_token()

jj_save

private final void jj_save(int index,
                           int xla)