net.sf.saffron.sql.parser
Class Parser

java.lang.Object
  |
  +--net.sf.saffron.sql.parser.Parser
All Implemented Interfaces:
ParserConstants

class Parser
extends Object
implements ParserConstants

SQL parser, generated from Parser.jj and CommonParser.jj by JavaCC.

The public wrapper for this parser is SqlParser.

Since:
Mar 18, 2003
Version:
$Id: //open/saffron/src/net/sf/saffron/sql/parser/Parser.jj#8 $
Author:
jhyde

Nested Class Summary
(package private) static class Parser.JJCalls
           
 
Field Summary
private  Parser.JJCalls[] jj_2_rtns
           
private  int jj_endpos
           
private  Vector jj_expentries
           
private  int[] jj_expentry
           
private  int jj_gc
           
private  int jj_gen
           
(package private)  JavaCharStream 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 static int[] jj_la1_2
           
private  Token jj_lastpos
           
private  int[] jj_lasttokens
           
 Token jj_nt
           
private  int jj_ntk
           
private  boolean jj_rescan
           
private  Token jj_scanpos
           
private  boolean jj_semLA
           
private  Logger logger
           
 boolean lookingAhead
           
private  SqlOperatorTable opTab
           
 Token token
           
 ParserTokenManager token_source
           
 
Fields inherited from interface net.sf.saffron.sql.parser.ParserConstants
AND, AS, ASC, ASCENDING, BY, COLON, COMMA, CONCAT, CROSS, DECIMAL_LITERAL, DEFAULT, DELETE, DESC, DESCENDING, DIGIT, DISTINCT, DOT, DOUBLE_PERIOD, EOF, EQ, EXCEPT, EXISTS, EXPLAIN, EXPONENT, FALSE, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, FROM, FULL, GE, GROUP, GT, HAVING, HEX_LITERAL, HOOK, IDENTIFIER, IMPLEMENTATION, IN, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INNER, INSERT, INTERSECT, INTO, IS, JOIN, LBRACE, LBRACE_D, LBRACE_T, LBRACE_TS, LBRACKET, LE, LEFT, LETTER, LPAREN, LT, MINUS, MULTI_LINE_COMMENT, NATURAL, NE, NOT, NULL, ON, OR, ORDER, OUTER, PLAN, PLUS, QUOTED_IDENTIFIER, RBRACE, RBRACKET, RIGHT, RPAREN, SELECT, SEMICOLON, SINGLE_LINE_COMMENT, SLASH, STAR, STRING_LITERAL, tokenImage, TRUE, UNION, UNIQUE, USING, VALUES, WHERE, WITH, WITHOUT
 
Constructor Summary
Parser(InputStream stream)
           
Parser(ParserTokenManager tm)
           
Parser(Reader stream)
           
 
Method Summary
 SqlNode AtomicExpression()
           
 String BinaryOperator()
           
 SqlIdentifier CompoundIdentifier()
           
(package private)  void debug_message1()
           
 void disable_tracing()
           
(package private)  void E()
           
 void enable_tracing()
           
 SqlNode Expression()
           
 SqlNode Expression2()
          Binary expression
 SqlNode Expression3()
          Unary expression
 List ExpressionCommaList()
           
 List ExpressionCommaListOpt()
           
 SqlNode FromClause()
           
 SqlNode FunctionCall()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 SqlNode GroupByOpt()
           
 SqlNode HavingOpt()
           
 String Identifier()
           
private  boolean jj_2_1(int xla)
           
private  boolean jj_2_2(int xla)
           
private  boolean jj_2_3(int xla)
           
private  boolean jj_2_4(int xla)
           
private  boolean jj_2_5(int xla)
           
private  boolean jj_2_6(int xla)
           
private  boolean jj_2_7(int xla)
           
private  boolean jj_2_8(int xla)
           
private  boolean jj_3_1()
           
private  boolean jj_3_2()
           
private  boolean jj_3_3()
           
private  boolean jj_3_4()
           
private  boolean jj_3_5()
           
private  boolean jj_3_6()
           
private  boolean jj_3_7()
           
private  boolean jj_3_8()
           
private  boolean jj_3R_12()
           
private  boolean jj_3R_13()
           
private  boolean jj_3R_14()
           
private  boolean jj_3R_15()
           
private  boolean jj_3R_16()
           
private  boolean jj_3R_17()
           
private  boolean jj_3R_18()
           
private  boolean jj_3R_19()
           
private  boolean jj_3R_20()
           
private  boolean jj_3R_21()
           
private  boolean jj_3R_22()
           
private  boolean jj_3R_23()
           
private  boolean jj_3R_24()
           
private  boolean jj_3R_25()
           
private  boolean jj_3R_26()
           
private  boolean jj_3R_27()
           
private  boolean jj_3R_28()
           
private  boolean jj_3R_29()
           
private  boolean jj_3R_30()
           
private  boolean jj_3R_31()
           
private  boolean jj_3R_32()
           
private  boolean jj_3R_33()
           
private  boolean jj_3R_34()
           
private  boolean jj_3R_35()
           
private  boolean jj_3R_36()
           
private  boolean jj_3R_37()
           
private  boolean jj_3R_38()
           
private  boolean jj_3R_39()
           
private  boolean jj_3R_40()
           
private  boolean jj_3R_41()
           
private  boolean jj_3R_42()
           
private  boolean jj_3R_43()
           
private  boolean jj_3R_44()
           
private  boolean jj_3R_45()
           
private  boolean jj_3R_46()
           
private  boolean jj_3R_47()
           
private  boolean jj_3R_48()
           
private  boolean jj_3R_49()
           
private  boolean jj_3R_50()
           
private  boolean jj_3R_51()
           
private  boolean jj_3R_52()
           
private  boolean jj_3R_53()
           
private  boolean jj_3R_54()
           
private  boolean jj_3R_55()
           
private  boolean jj_3R_56()
           
private  boolean jj_3R_57()
           
private  boolean jj_3R_58()
           
private  boolean jj_3R_59()
           
private  boolean jj_3R_60()
           
private  boolean jj_3R_61()
           
private  boolean jj_3R_62()
           
private  boolean jj_3R_63()
           
private  boolean jj_3R_64()
           
private  boolean jj_3R_65()
           
private  boolean jj_3R_66()
           
private  boolean jj_3R_67()
           
private  boolean jj_3R_68()
           
private  boolean jj_3R_69()
           
private  boolean jj_3R_70()
           
private  boolean jj_3R_71()
           
private  boolean jj_3R_72()
           
private  boolean jj_3R_73()
           
private  boolean jj_3R_74()
           
private  boolean jj_3R_75()
           
private  boolean jj_3R_76()
           
private  boolean jj_3R_77()
           
private  boolean jj_3R_78()
           
private  boolean jj_3R_79()
           
private  boolean jj_3R_80()
           
private  boolean jj_3R_81()
           
private  boolean jj_3R_82()
           
private  boolean jj_3R_83()
           
private  boolean jj_3R_84()
           
private  boolean jj_3R_85()
           
private  boolean jj_3R_86()
           
private  boolean jj_3R_87()
           
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 static void jj_la1_2()
           
private  int jj_ntk()
           
private  void jj_rescan_token()
           
private  void jj_save(int index, int xla)
           
private  boolean jj_scan_token(int kind)
           
 SqlLiteral Literal()
           
 List LiteralList()
           
 SqlNodeList OrderByOpt()
           
 SqlNode OrderItem()
           
 String PostfixOperator()
           
 String PrefixOperator()
           
 void ReInit(InputStream stream)
           
 void ReInit(ParserTokenManager tm)
           
 void ReInit(Reader stream)
           
 SqlNode RowConstructor()
           
 SqlNodeList RowConstructorList()
           
 SqlNode SelectExpression()
           
 SqlNode SelectItem()
           
 List SelectList()
           
 SqlIdentifier SimpleIdentifier()
           
 List SimpleIdentifierCommaList()
           
 SqlNode SqlDelete()
           
 SqlNode SqlExplain()
           
 SqlNode SqlExpressionEof()
          Parses a SQL expression (such as might occur in a WHERE clause) followed by the end-of-file symbol.
 SqlNode SqlInsert()
           
 SqlNode SqlQuery()
          Syntactical Descriptions *
 SqlNode SqlQuery2()
           
 SqlNode SqlQueryEof()
          Parses a query (select, union, intersect, except) followed by the end-of-file symbol.
 SqlSelect SqlSelect()
           
 SqlNode SqlStmtEof()
          Parses an SQL statement followed by the end-of-file symbol.
(package private)  List startList(Object o)
           
 SqlNode TableConstructor()
           
 SqlNode TableRef()
           
 SqlNode WhereOpt()
           
 boolean WithImplementation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

opTab

private final SqlOperatorTable opTab

logger

private final Logger logger

token_source

public ParserTokenManager token_source

jj_input_stream

JavaCharStream 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_la1_2

private static int[] jj_la1_2

jj_2_rtns

private final Parser.JJCalls[] jj_2_rtns

jj_rescan

private boolean jj_rescan

jj_gc

private int jj_gc

jj_expentries

private 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

Parser

public Parser(InputStream stream)

Parser

public Parser(Reader stream)

Parser

public Parser(ParserTokenManager tm)
Method Detail

debug_message1

void debug_message1()
              throws ParseException
ParseException

E

void E()
 throws ParseException
ParseException

startList

List startList(Object o)
         throws ParseException
ParseException

SqlQuery

public final SqlNode SqlQuery()
                       throws ParseException
Syntactical Descriptions *

ParseException

SqlQuery2

public final SqlNode SqlQuery2()
                        throws ParseException
ParseException

SqlQueryEof

public final SqlNode SqlQueryEof()
                          throws ParseException
Parses a query (select, union, intersect, except) followed by the end-of-file symbol.

ParseException

SqlStmtEof

public final SqlNode SqlStmtEof()
                         throws ParseException
Parses an SQL statement followed by the end-of-file symbol.

ParseException

SqlSelect

public final SqlSelect SqlSelect()
                          throws ParseException
ParseException

SqlExplain

public final SqlNode SqlExplain()
                         throws ParseException
ParseException

WithImplementation

public final boolean WithImplementation()
                                 throws ParseException
ParseException

SqlInsert

public final SqlNode SqlInsert()
                        throws ParseException
ParseException

SqlDelete

public final SqlNode SqlDelete()
                        throws ParseException
ParseException

SelectList

public final List SelectList()
                      throws ParseException
ParseException

SelectItem

public final SqlNode SelectItem()
                         throws ParseException
ParseException

SelectExpression

public final SqlNode SelectExpression()
                               throws ParseException
ParseException

FromClause

public final SqlNode FromClause()
                         throws ParseException
ParseException

TableRef

public final SqlNode TableRef()
                       throws ParseException
ParseException

TableConstructor

public final SqlNode TableConstructor()
                               throws ParseException
ParseException

RowConstructorList

public final SqlNodeList RowConstructorList()
                                     throws ParseException
ParseException

RowConstructor

public final SqlNode RowConstructor()
                             throws ParseException
ParseException

LiteralList

public final List LiteralList()
                       throws ParseException
ParseException

WhereOpt

public final SqlNode WhereOpt()
                       throws ParseException
ParseException

GroupByOpt

public final SqlNode GroupByOpt()
                         throws ParseException
ParseException

HavingOpt

public final SqlNode HavingOpt()
                        throws ParseException
ParseException

OrderByOpt

public final SqlNodeList OrderByOpt()
                             throws ParseException
ParseException

OrderItem

public final SqlNode OrderItem()
                        throws ParseException
ParseException

SqlExpressionEof

public final SqlNode SqlExpressionEof()
                               throws ParseException
Parses a SQL expression (such as might occur in a WHERE clause) followed by the end-of-file symbol.

ParseException

Expression

public final SqlNode Expression()
                         throws ParseException
ParseException

Expression2

public final SqlNode Expression2()
                          throws ParseException
Binary expression

ParseException

Expression3

public final SqlNode Expression3()
                          throws ParseException
Unary expression

ParseException

AtomicExpression

public final SqlNode AtomicExpression()
                               throws ParseException
ParseException

Literal

public final SqlLiteral Literal()
                         throws ParseException
ParseException

Identifier

public final String Identifier()
                        throws ParseException
ParseException

SimpleIdentifier

public final SqlIdentifier SimpleIdentifier()
                                     throws ParseException
ParseException

SimpleIdentifierCommaList

public final List SimpleIdentifierCommaList()
                                     throws ParseException
ParseException

CompoundIdentifier

public final SqlIdentifier CompoundIdentifier()
                                       throws ParseException
ParseException

FunctionCall

public final SqlNode FunctionCall()
                           throws ParseException
ParseException

ExpressionCommaList

public final List ExpressionCommaList()
                               throws ParseException
ParseException

ExpressionCommaListOpt

public final List ExpressionCommaListOpt()
                                  throws ParseException
ParseException

BinaryOperator

public final String BinaryOperator()
                            throws ParseException
ParseException

PrefixOperator

public final String PrefixOperator()
                            throws ParseException
ParseException

PostfixOperator

public final String PostfixOperator()
                             throws ParseException
ParseException

jj_2_1

private final boolean jj_2_1(int xla)

jj_2_2

private final boolean jj_2_2(int xla)

jj_2_3

private final boolean jj_2_3(int xla)

jj_2_4

private final boolean jj_2_4(int xla)

jj_2_5

private final boolean jj_2_5(int xla)

jj_2_6

private final boolean jj_2_6(int xla)

jj_2_7

private final boolean jj_2_7(int xla)

jj_2_8

private final boolean jj_2_8(int xla)

jj_3R_70

private final boolean jj_3R_70()

jj_3R_49

private final boolean jj_3R_49()

jj_3R_67

private final boolean jj_3R_67()

jj_3R_66

private final boolean jj_3R_66()

jj_3R_65

private final boolean jj_3R_65()

jj_3R_47

private final boolean jj_3R_47()

jj_3R_17

private final boolean jj_3R_17()

jj_3R_87

private final boolean jj_3R_87()

jj_3R_83

private final boolean jj_3R_83()

jj_3R_12

private final boolean jj_3R_12()

jj_3R_18

private final boolean jj_3R_18()

jj_3R_30

private final boolean jj_3R_30()

jj_3R_29

private final boolean jj_3R_29()

jj_3R_20

private final boolean jj_3R_20()

jj_3R_13

private final boolean jj_3R_13()

jj_3R_19

private final boolean jj_3R_19()

jj_3R_28

private final boolean jj_3R_28()

jj_3R_23

private final boolean jj_3R_23()

jj_3R_85

private final boolean jj_3R_85()

jj_3R_84

private final boolean jj_3R_84()

jj_3R_82

private final boolean jj_3R_82()

jj_3R_33

private final boolean jj_3R_33()

jj_3_2

private final boolean jj_3_2()

jj_3R_32

private final boolean jj_3R_32()

jj_3R_46

private final boolean jj_3R_46()

jj_3R_31

private final boolean jj_3R_31()

jj_3R_24

private final boolean jj_3R_24()

jj_3R_45

private final boolean jj_3R_45()

jj_3R_15

private final boolean jj_3R_15()

jj_3R_44

private final boolean jj_3R_44()

jj_3R_73

private final boolean jj_3R_73()

jj_3R_43

private final boolean jj_3R_43()

jj_3R_42

private final boolean jj_3R_42()

jj_3R_86

private final boolean jj_3R_86()

jj_3R_41

private final boolean jj_3R_41()

jj_3R_40

private final boolean jj_3R_40()

jj_3R_68

private final boolean jj_3R_68()

jj_3R_39

private final boolean jj_3R_39()

jj_3R_38

private final boolean jj_3R_38()

jj_3R_22

private final boolean jj_3R_22()

jj_3R_37

private final boolean jj_3R_37()

jj_3R_27

private final boolean jj_3R_27()

jj_3R_21

private final boolean jj_3R_21()

jj_3R_14

private final boolean jj_3R_14()

jj_3R_81

private final boolean jj_3R_81()

jj_3_7

private final boolean jj_3_7()

jj_3R_80

private final boolean jj_3R_80()

jj_3_6

private final boolean jj_3_6()

jj_3R_79

private final boolean jj_3R_79()

jj_3R_72

private final boolean jj_3R_72()

jj_3_3

private final boolean jj_3_3()

jj_3R_64

private final boolean jj_3R_64()

jj_3_1

private final boolean jj_3_1()

jj_3R_69

private final boolean jj_3R_69()

jj_3R_36

private final boolean jj_3R_36()

jj_3R_63

private final boolean jj_3R_63()

jj_3R_48

private final boolean jj_3R_48()

jj_3R_26

private final boolean jj_3R_26()

jj_3R_34

private final boolean jj_3R_34()

jj_3_8

private final boolean jj_3_8()

jj_3_4

private final boolean jj_3_4()

jj_3R_25

private final boolean jj_3R_25()

jj_3R_16

private final boolean jj_3R_16()

jj_3R_78

private final boolean jj_3R_78()

jj_3R_77

private final boolean jj_3R_77()

jj_3R_76

private final boolean jj_3R_76()

jj_3R_75

private final boolean jj_3R_75()

jj_3R_71

private final boolean jj_3R_71()

jj_3_5

private final boolean jj_3_5()

jj_3R_62

private final boolean jj_3R_62()

jj_3R_61

private final boolean jj_3R_61()

jj_3R_60

private final boolean jj_3R_60()

jj_3R_59

private final boolean jj_3R_59()

jj_3R_74

private final boolean jj_3R_74()

jj_3R_58

private final boolean jj_3R_58()

jj_3R_57

private final boolean jj_3R_57()

jj_3R_56

private final boolean jj_3R_56()

jj_3R_55

private final boolean jj_3R_55()

jj_3R_54

private final boolean jj_3R_54()

jj_3R_53

private final boolean jj_3R_53()

jj_3R_52

private final boolean jj_3R_52()

jj_3R_51

private final boolean jj_3R_51()

jj_3R_35

private final boolean jj_3R_35()

jj_3R_50

private final boolean jj_3R_50()

jj_la1_0

private static void jj_la1_0()

jj_la1_1

private static void jj_la1_1()

jj_la1_2

private static void jj_la1_2()

ReInit

public void ReInit(InputStream stream)

ReInit

public void ReInit(Reader stream)

ReInit

public void ReInit(ParserTokenManager tm)

jj_consume_token

private final Token jj_consume_token(int kind)
                              throws ParseException
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)

SourceForge.net_Logo