BNF for ij.jj

TOKENS

/* WHITE SPACE */
<DEFAULT> SKIP : {
" "
| "\t"
| "\r\n"
| "\n"
| "\r"
| "\f"
}

   
<DEFAULT> SPECIAL : {
<SINGLE_LINE_SQLCOMMENT: "--" (~["\n","\r"])* ("\n" | "\r" | "\r\n")>
}

   
<DEFAULT> MORE : {
"/*" : IN_BRACKETED_COMMENT
}

   
<IN_BRACKETED_COMMENT> MORE : {
"/*" : IN_NESTED_BRACKETED_COMMENT
}

   
<IN_BRACKETED_COMMENT> SKIP : {
"*/" : DEFAULT
}

   
<IN_NESTED_BRACKETED_COMMENT> MORE : {
"/*" : {
}

   
<IN_NESTED_BRACKETED_COMMENT> MORE : {
"*/" : {
}

   
<IN_BRACKETED_COMMENT,IN_NESTED_BRACKETED_COMMENT> MORE : {
<~[]>
}

   
<DEFAULT> TOKEN [IGNORE_CASE] : {
<ABSOLUTE: "absolute">
| <AFTER: "after">
| <ALIASES: "aliases">
| <ALL: "all">
| <AS: "as">
| <ASYNC: "async">
| <ATTRIBUTES: "attributes">
| <AUTOCOMMIT: "autocommit">
| <BANG: "!">
| <BEFORE: "before">
| <CLOSE: "close">
| <COMMIT: "commit">
| <CONNECT: "connect">
| <CONNECTION: "connection">
| <CONNECTIONS: "connections">
| <CURRENT: "current">
| <CURSOR: "cursor">
| <DESCRIBE: "describe">
| <DISCONNECT: "disconnect">
| <DRIVER: "driver">
| <ELAPSEDTIME: "elapsedtime">
| <ENABLED_ROLES: "enabled_roles">
| <END: "end">
| <EQUALS_OPERATOR: "=">
| <EXECUTE: "execute">
| <EXIT: "exit">
| <FAIL: "fail">
| <FIRST: "first">
| <FOR: "for">
| <FROM: "from">
| <FUNCTIONS: "functions">
| <GET: "get">
| <GETCURRENTROWNUMBER: "getcurrentrownumber">
| <HOLD: "hold">
| <HOLDFORCONNECTION: "holdforconnection">
| <HELP: "help">
| <IN: "in">
| <INDEXES: "indexes">
| <INSENSITIVE: "insensitive">
| <INTO: "into">
| <LAST: "last">
| <LOCALIZEDDISPLAY: "localizeddisplay">
| <MAXIMUMDISPLAYWIDTH: "maximumdisplaywidth">
| <NAME: "name">
| <NEXT: "next">
| <NOHOLD: "nohold">
| <NOHOLDFORCONNECTION: "noholdforconnection">
| <OFF: "off">
| <ON: "on">
| <PASSWORD: "password">
| <PERIOD: ".">
| <PREPARE: "prepare">
| <PREVIOUS: "previous">
| <PROCEDURE: "procedure">
| <PROCEDURES: "procedures">
| <PROPERTIES: "properties">
| <PROTOCOL: "protocol">
| <QUIT: "quit">
| <READONLY: "readonly">
| <RELATIVE: "relative">
| <REMOVE: "remove">
| <RESOURCE: "resource">
| <ROLES: "roles">
| <ROLLBACK: "rollback">
| <RUN: "run">
| <TO: "to">
| <SAVEPOINT: "savepoint">
| <SCHEMAS: "schemas">
| <SCROLL: "scroll">
| <SENSITIVE: "sensitive">
| <SET: "set">
| <SETTABLE_ROLES: "settable_roles">
| <SHOW: "show">
| <SHUTDOWN: "shutdown">
| <STATEMENT: "statement">
| <SYNONYMS: "synonyms">
| <TABLES: "tables">
| <USER: "user">
| <USING: "using">
| <VIEWS: "views">
| <WAIT: "wait">
| <WITH: "with">
| <XA_1PHASE: "XA_1phase">
| <XA_2PHASE: "XA_2phase">
| <XA_DATASOURCE: "XA_datasource">
| <XA_CONNECT: "XA_connect">
| <XA_COMMIT: "XA_commit">
| <XA_DISCONNECT: "XA_disconnect">
| <XA_END: "XA_end">
| <XA_ENDRSCAN: "XA_endrscan">
| <XA_FAIL: "XA_fail">
| <XA_FORGET: "XA_forget">
| <XA_GETCONNECTION: "XA_getconnection">
| <XA_JOIN: "XA_join">
| <XA_NOFLAGS: "XA_noflags">
| <XA_PREPARE: "XA_prepare">
| <XA_RECOVER: "XA_recover">
| <XA_RESUME: "XA_resume">
| <XA_ROLLBACK: "XA_rollback">
| <XA_START: "XA_start">
| <XA_STARTRSCAN: "XA_startrscan">
| <XA_SUCCESS: "XA_success">
| <XA_SUSPEND: "XA_suspend">
| <DATASOURCE: "datasource">
| <CP_DATASOURCE: "CP_datasource">
| <CP_CONNECT: "CP_connect">
| <CP_GETCONNECTION: "CP_getconnection">
| <CP_DISCONNECT: "CP_disconnect">
| <WORK: "work">
}

   
<DEFAULT> TOKEN : {
<AT: "@">
| <COMMA: ",">
| <LEFT_PAREN: "(">
| <RIGHT_PAREN: ")">
| <DOUBLE_QUOTE: "\"">
| <HASH: "#">
| <MINUS_SIGN: "-">
| <PLUS_SIGN: "+">
}

   
/**
TOKEN :
{
    
}
*/
<DEFAULT> TOKEN : {
<IDENTIFIER: (<LETTER> | "_") (<LETTER> | "_" | <DIGIT>)*>
}

   
<DEFAULT> TOKEN : {
<#LETTER: ["a"-"z","A"-"Z","\u00aa","\u00b5","\u00ba","\u00c0"-"\u00d6","\u00d8"-"\u00f6","\u00f8"-"\u01f5","\u01fa"-"\u0217","\u0250"-"\u02a8","\u02b0"-"\u02b8","\u02bb"-"\u02c1","\u02d0"-"\u02d1","\u02e0"-"\u02e4","\u037a","\u0386","\u0388"-"\u038a","\u038c","\u038e"-"\u03a1","\u03a3"-"\u03ce","\u03d0"-"\u03d6","\u03da","\u03dc","\u03de","\u03e0","\u03e2"-"\u03f3","\u0401"-"\u040c","\u040e"-"\u044f","\u0451"-"\u045c","\u045e"-"\u0481","\u0490"-"\u04c4","\u04c7"-"\u04c8","\u04cb"-"\u04cc","\u04d0"-"\u04eb","\u04ee"-"\u04f5","\u04f8"-"\u04f9","\u0531"-"\u0556","\u0559","\u0561"-"\u0587","\u05d0"-"\u05ea","\u05f0"-"\u05f2","\u0621"-"\u063a","\u0640"-"\u064a","\u0671"-"\u06b7","\u06ba"-"\u06be","\u06c0"-"\u06ce","\u06d0"-"\u06d3","\u06d5","\u06e5"-"\u06e6","\u0905"-"\u0939","\u093d","\u0958"-"\u0961","\u0985"-"\u098c","\u098f"-"\u0990","\u0993"-"\u09a8","\u09aa"-"\u09b0","\u09b2","\u09b6"-"\u09b9","\u09dc"-"\u09dd","\u09df"-"\u09e1","\u09f0"-"\u09f1","\u0a05"-"\u0a0a","\u0a0f"-"\u0a10","\u0a13"-"\u0a28","\u0a2a"-"\u0a30","\u0a32"-"\u0a33","\u0a35"-"\u0a36","\u0a38"-"\u0a39","\u0a59"-"\u0a5c","\u0a5e","\u0a72"-"\u0a74","\u0a85"-"\u0a8b","\u0a8d","\u0a8f"-"\u0a91","\u0a93"-"\u0aa8","\u0aaa"-"\u0ab0","\u0ab2"-"\u0ab3","\u0ab5"-"\u0ab9","\u0abd","\u0ae0","\u0b05"-"\u0b0c","\u0b0f"-"\u0b10","\u0b13"-"\u0b28","\u0b2a"-"\u0b30","\u0b32"-"\u0b33","\u0b36"-"\u0b39","\u0b3d","\u0b5c"-"\u0b5d","\u0b5f"-"\u0b61","\u0b85"-"\u0b8a","\u0b8e"-"\u0b90","\u0b92"-"\u0b95","\u0b99"-"\u0b9a","\u0b9c","\u0b9e"-"\u0b9f","\u0ba3"-"\u0ba4","\u0ba8"-"\u0baa","\u0bae"-"\u0bb5","\u0bb7"-"\u0bb9","\u0c05"-"\u0c0c","\u0c0e"-"\u0c10","\u0c12"-"\u0c28","\u0c2a"-"\u0c33","\u0c35"-"\u0c39","\u0c60"-"\u0c61","\u0c85"-"\u0c8c","\u0c8e"-"\u0c90","\u0c92"-"\u0ca8","\u0caa"-"\u0cb3","\u0cb5"-"\u0cb9","\u0cde","\u0ce0"-"\u0ce1","\u0d05"-"\u0d0c","\u0d0e"-"\u0d10","\u0d12"-"\u0d28","\u0d2a"-"\u0d39","\u0d60"-"\u0d61","\u0e01"-"\u0e2e","\u0e30","\u0e32"-"\u0e33","\u0e40"-"\u0e46","\u0e81"-"\u0e82","\u0e84","\u0e87"-"\u0e88","\u0e8a","\u0e8d","\u0e94"-"\u0e97","\u0e99"-"\u0e9f","\u0ea1"-"\u0ea3","\u0ea5","\u0ea7","\u0eaa"-"\u0eab","\u0ead"-"\u0eae","\u0eb0","\u0eb2"-"\u0eb3","\u0ebd","\u0ec0"-"\u0ec4","\u0ec6","\u0edc"-"\u0edd","\u0f40"-"\u0f47","\u0f49"-"\u0f69","\u10a0"-"\u10c5","\u10d0"-"\u10f6","\u1100"-"\u1159","\u115f"-"\u11a2","\u11a8"-"\u11f9","\u1e00"-"\u1e9b","\u1ea0"-"\u1ef9","\u1f00"-"\u1f15","\u1f18"-"\u1f1d","\u1f20"-"\u1f45","\u1f48"-"\u1f4d","\u1f50"-"\u1f57","\u1f59","\u1f5b","\u1f5d","\u1f5f"-"\u1f7d","\u1f80"-"\u1fb4","\u1fb6"-"\u1fbc","\u1fbe","\u1fc2"-"\u1fc4","\u1fc6"-"\u1fcc","\u1fd0"-"\u1fd3","\u1fd6"-"\u1fdb","\u1fe0"-"\u1fec","\u1ff2"-"\u1ff4","\u1ff6"-"\u1ffc","\u207f","\u2102","\u2107","\u210a"-"\u2113","\u2115","\u2118"-"\u211d","\u2124","\u2126","\u2128","\u212a"-"\u2131","\u2133"-"\u2138","\u3005","\u3031"-"\u3035","\u3041"-"\u3094","\u309b"-"\u309e","\u30a1"-"\u30fa","\u30fc"-"\u30fe","\u3105"-"\u312c","\u3131"-"\u318e","\u4e00"-"\u9fa5","\uac00"-"\ud7a3","\uf900"-"\ufa2d","\ufb00"-"\ufb06","\ufb13"-"\ufb17","\ufb1f"-"\ufb28","\ufb2a"-"\ufb36","\ufb38"-"\ufb3c","\ufb3e","\ufb40"-"\ufb41","\ufb43"-"\ufb44","\ufb46"-"\ufbb1","\ufbd3"-"\ufd3d","\ufd50"-"\ufd8f","\ufd92"-"\ufdc7","\ufdf0"-"\ufdfb","\ufe70"-"\ufe72","\ufe74","\ufe76"-"\ufefc","\uff21"-"\uff3a","\uff41"-"\uff5a","\uff66"-"\uffbe","\uffc2"-"\uffc7","\uffca"-"\uffcf","\uffd2"-"\uffd7","\uffda"-"\uffdc"]>
}

   
<DEFAULT> TOKEN : {
<#DIGIT: ["0"-"9","\u0660"-"\u0669","\u06f0"-"\u06f9","\u0966"-"\u096f","\u09e6"-"\u09ef","\u0a66"-"\u0a6f","\u0ae6"-"\u0aef","\u0b66"-"\u0b6f","\u0be7"-"\u0bef","\u0c66"-"\u0c6f","\u0ce6"-"\u0cef","\u0d66"-"\u0d6f","\u0e50"-"\u0e59","\u0ed0"-"\u0ed9","\u0f20"-"\u0f29","\uff10"-"\uff19"]>
}

   
<DEFAULT> TOKEN : {
<INTEGER: (["0"-"9"])+>
| <STRING: "\'" ("\'\'" | ~["\'"])* "\'">
}

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

NON-TERMINALS

//
// start of BNF rules
//
ijStatement
ijStatement ::= ( RollbackStatement | AbsoluteStatement | AfterLastStatement | AutocommitStatement | AsyncStatement | Bang | BeforeFirstStatement | CloseStatement | CommitStatement | ConnectStatement | DescTableStatement | DisconnectStatement | DriverStatement | ElapsedTimeStatement | ExecuteStatement | FirstStatement | ExitStatement | GetCursorStatement | GetCurrentRowNumber | HelpStatement | HoldForConnectionStatement | LastStatement | LocalizedDisplay | MaximumDisplayWidthStatement | NextStatement | NoHoldForConnectionStatement | PrepareStatement | PreviousStatement | ProtocolStatement | ReadOnlyStatement | RelativeStatement | RemoveStatement | RunStatement | SetConnectionStatement | ShowStatement | WaitForStatement | XA_DataSourceStatement | XA_ConnectStatement | XA_CommitStatement | XA_DisconnectStatement | XA_GetConnectionStatement | XA_EndStatement | XA_ForgetStatement | XA_PrepareStatement | XA_RecoverStatement | XA_RollbackStatement | XA_StartStatement | DataSourceStatement | CP_DataSourceStatement | CP_ConnectStatement | CP_GetConnectionStatement | CP_DisconnectStatement )? <EOF>

/**
 * ProtocolStatement is PROTOCOL 'JDBC protocol' where
 * the protocol is used to prefix any connect request that
 * cannot find a driver.  We will take a stab at loading
 * a driver as each protocol comes in -- we only know about
 * two.
 */
ProtocolStatement
ProtocolStatement ::= <PROTOCOL> <STRING> ( <AS> identifier )?

/**
 * DriverStatement is DRIVER 'class' where class is the
 * name of a class that is a JDBC driver. It is loaded
 * into the DriverManager with a Class.forName call.
 * 

* You can load as many drivers as you want, the idea is * to load up the appropriate one(s) for the connect(s) * that you will be issuing. */

DriverStatement
DriverStatement ::= <DRIVER> <STRING>

ConnectStatement
ConnectStatement ::= <CONNECT> ( <TO> ( dynamicConnection ) | ( dynamicConnection | staticConnection ) )

/**
 * ConnectStatement is CONNECT 'url' [ PROTOCOL proto ] 
	[ USER 	String PASSWORD String ] 
	[ATTRIBUTES attributeName = value [, attributeName = value]* ]
	[ AS ident ], where url is the
 * url for the database, i.e. jdbc:protocol:dbname etc.
 * Attributes are connection attributes to 
 * 

* There can only be one connection at a time; if there * is already one, it is put on hold and this one takes its place. *

* if a driver can't be found, the current protocol will * be added at the front. *

* the as ident part is used for set connection. If you don't * specify a name, we create one that is CONNECTION# for the # * of open connections that now exists. If the name duplicates, * an error results. */

dynamicConnection
dynamicConnection ::= <STRING> ( <PROTOCOL> identifier )? ( <USER> <STRING> )? ( <PASSWORD> <STRING> )? ( <ATTRIBUTES> ( attributeList )? )? ( <AS> identifier )?

/**
 * Handles DESCRIBE table
 */
DescTableStatement
DescTableStatement ::= <DESCRIBE> ( ( caIdentifier ( <PERIOD> caIdentifier )? ) | <STRING> )

/**
  * Handles CONNECT yadda.yadda.foo( stringArg, ... stringArg ) AS connectionName
  */
staticConnection
staticConnection ::= staticMethodName staticMethodArgs ( <AS> identifier )?

/**
 * SetConnectionStatement is SET CONNECTION ident
 * 

* Moves to the named session, if it exists. If it doesn't * exist, remains on the current session and returns an error. */

SetConnectionStatement
SetConnectionStatement ::= <SET> <CONNECTION> identifier

/**
 * Handles showing current connections for the current environment, and
 * SHOW TABLES/VIEWS/... commands.
 */
ShowStatement
ShowStatement ::= <SHOW> ( <CONNECTIONS> | ( <TABLES> | <VIEWS> | <SYNONYMS> | <ALIASES> ) ( <IN> caIdentifier )? | <INDEXES> ( ( <IN> caIdentifier ) | ( <FROM> caIdentifier ( <PERIOD> caIdentifier )? ) )? | <PROCEDURES> ( <IN> caIdentifier )? | <FUNCTIONS> ( <IN> caIdentifier )? | <SCHEMAS> | <ROLES> | <ENABLED_ROLES> | <SETTABLE_ROLES> )

/**
 * CommitStatement is simply COMMIT.
 * It commits the current transation.
 */
CommitStatement
CommitStatement ::= <COMMIT> ( <WORK> )?

/**
 * RollbackStatement is simply ROLLBACK.
 * It undoes the current transation.
 */
RollbackStatement
RollbackStatement ::= <ROLLBACK> ( <WORK> )?

/**
 * DisconnectStatement is simply DISCONNECT [ ALL | CURRENT | connectionName ]
 * it ends the specified connection(s) and
 * releases its statement resource.
 * 

* If ALL is specified, it disconnects all available sessions * in the current environment. */

DisconnectStatement
DisconnectStatement ::= <DISCONNECT> ( ( <CURRENT> | <ALL> | identifier ) )?

ExitStatement
ExitStatement ::= <EXIT>
| <QUIT>

PrepareStatement
PrepareStatement ::= <PREPARE> ( <PROCEDURE> <AS> <STRING> | qualifiedIdentifier <AS> <STRING> )

GetCursorStatement
GetCursorStatement ::= <GET> ( <SCROLL> scrollType )? ( <WITH> holdType )? <CURSOR> qualifiedIdentifier <AS> <STRING>

scrollType
scrollType ::= <INSENSITIVE>
| <SENSITIVE>

holdType
holdType ::= <HOLD>
| <NOHOLD>

AbsoluteStatement
AbsoluteStatement ::= <ABSOLUTE> intLiteral qualifiedIdentifier

RelativeStatement
RelativeStatement ::= <RELATIVE> intLiteral qualifiedIdentifier

BeforeFirstStatement
BeforeFirstStatement ::= <BEFORE> <FIRST> qualifiedIdentifier

FirstStatement
FirstStatement ::= <FIRST> qualifiedIdentifier

NextStatement
NextStatement ::= <NEXT> qualifiedIdentifier

AfterLastStatement
AfterLastStatement ::= <AFTER> <LAST> qualifiedIdentifier

LastStatement
LastStatement ::= <LAST> qualifiedIdentifier

PreviousStatement
PreviousStatement ::= <PREVIOUS> qualifiedIdentifier

GetCurrentRowNumber
GetCurrentRowNumber ::= <GETCURRENTROWNUMBER> qualifiedIdentifier

CloseStatement
CloseStatement ::= <CLOSE> qualifiedIdentifier

/**
 * Two forms of execute: immediate, with a string
 * and prepared, with the id of a prepared statement.
 * We expect the latter form will
 * eventually support a USING clause to supply
 * parameter values (that will be constants).
 * No parameters yet, however.
 * 

* Syntax: * EXECUTE statementSource [ USING statementSource] ; * * statementSource is an identifier of a previously prepared statement * or a string containing SQL-J text. */

ExecuteStatement
ExecuteStatement ::= <EXECUTE> ( <STATEMENT> <STRING> | <PROCEDURE> <STRING> | ( qualifiedIdentifier | <STRING> ) ( <USING> ( qualifiedIdentifier | <STRING> ) )? )

/**
 * Async: like execute immediate, without using,
 * but runs the statement in a separate thread, against
 * the current connection.
 * 

* Syntax: * ASYNC asyncName statementSource * * statementSource is a string containing SQL-J text. */

AsyncStatement
AsyncStatement ::= <ASYNC> qualifiedIdentifier <STRING>

/**
 * Wait for: the second half of Async, waits for completion
 * if needed and then supplies the result.  Only execute is done,
 * not row fetching.
 * 

* Syntax: * WAIT FOR asyncName * * asyncName is a name used in an ASYNC statement previously */

WaitForStatement
WaitForStatement ::= <WAIT> <FOR> qualifiedIdentifier

/**
 * RemoveStatement is REMOVE identifier. It identifies
 * a previously prepared statement.  We would prefer a DROP
 * syntax, but SQL-J is using that word and I want to point out
 * that special processing will be needed to give that parser
 * this parser's input for unrecognized text.
 */
RemoveStatement
RemoveStatement ::= <REMOVE> qualifiedIdentifier

RunStatement
RunStatement ::= <RUN> ( <RESOURCE> )? <STRING>

/**
 * Autocommit lets you control this aspect of the connection.
 * REMIND: should have a general way to set all connection attributes,
 * this is a shortcut for immediate needs.
 * 

* Syntax: * AUTOCOMMIT [ ON | OFF ] ; */

AutocommitStatement
AutocommitStatement ::= <AUTOCOMMIT> ( <ON> | <OFF> )

/**
 * By default, holdability is set to true for Connection objects. This syntax NOHOLDFORCONNECTION lets you set it to close cursors at commit.
 * Syntax:
 *   NOHOLDFORCONNECTION ;
 */
NoHoldForConnectionStatement
NoHoldForConnectionStatement ::= <NOHOLDFORCONNECTION>

/**
 * By default, holdability is set to true for Connection objects. This syntax HOLDFORCONNECTION lets you set it to the default.
 * Syntax:
 *   HOLDFORCONNECTION ;
 */
HoldForConnectionStatement
HoldForConnectionStatement ::= <HOLDFORCONNECTION>

/**
 * Localizeddisplay controls locale sensitive data representayion
 * 

* Syntax: * LOCALIZEDDISPLAY [ ON | OFF ] ; */

LocalizedDisplay
LocalizedDisplay ::= <LOCALIZEDDISPLAY> ( <ON> | <OFF> )

/**
 * ReadOnly lets you control this aspect of the connection.
 * REMIND: should have a general way to set all connection attributes,
 * this is a shortcut for immediate needs.
 * 

* Syntax: * READONLY [ ON | OFF ] ; */

ReadOnlyStatement
ReadOnlyStatement ::= <READONLY> ( <ON> | <OFF> )

/**
 * Elapsedtime on causes ij to dump out the elapsed time it takes
 * to run a user statement at the end of that statement.
 * 

* Syntax: * ELAPSEDTIME [ ON | OFF ] ; */

ElapsedTimeStatement
ElapsedTimeStatement ::= <ELAPSEDTIME> ( <ON> | <OFF> )

/**
 * MaximumDisplayWidth EXACT_NUMERIC changes the maximum display width for
 * java.lang.String to the specified EXACT_NUMERIC.
 * This is only used by the console view.
 * 

* Syntax: * MAXIMUMDISPLAYWIDTH INTEGER ; */

MaximumDisplayWidthStatement
MaximumDisplayWidthStatement ::= <MAXIMUMDISPLAYWIDTH> intValue

intValue
intValue ::= <INTEGER>

/**
 * Bang lets you issue a system command using System.exec.
 * 

* Syntax: * ! 'command to issue' ; */

Bang
Bang ::= <BANG> <STRING>

StringList
StringList ::= StringItem ( StringItem )*

StringItem
StringItem ::= <STRING>

/**
	Haven't included: ASYNC, !, EXPECT
	Don't include: XA_*
 **/
HelpStatement
HelpStatement ::= <HELP>

identifier
identifier ::= <IDENTIFIER>

/**
	A qualified identifier is localName [  sessionName ]
*/
qualifiedIdentifier
qualifiedIdentifier ::= identifier ( <AT> identifier )?

/**
    A case/connection respectful identifier.

    Like an ordinary identifier(), but require a connection in order
    to extract the case policy from database meta data.
*/
caIdentifier
caIdentifier ::= ( keyword | <IDENTIFIER> )

intLiteral
intLiteral ::= ( sign )? <INTEGER>

staticMethodName
staticMethodName ::= methodLeg ( <PERIOD> methodLeg )+

methodLeg
methodLeg ::= <IDENTIFIER>

staticMethodArgs
staticMethodArgs ::= <LEFT_PAREN> ( oneStaticArg ( <COMMA> oneStaticArg )* )? <RIGHT_PAREN>

oneStaticArg
oneStaticArg ::= <STRING>

/*
 * sign
 */
sign
sign ::= <PLUS_SIGN>
| <MINUS_SIGN>

/**
	Undocumented commands to help XA testing.

	This is the grammer for the XA commands

	<XA_DATASOURCE> 'dbname' ( <CREATE> | shutdown ) 
		 - get a XADataSource whose database name is dbname and make that
		XADataSource the current XADataSource

	<XA_CONNECT> 	[ <USER> 'user' ]
			[ <PASSWORD> 'password' ]
			[ <AS> xaconnid ] 
		- make an XAConnection using the current XADataSource and make
		that XAConnection the current XAConnection.  If xaconnid is 
		given, then associate xaconnid with the XAConnection.  
		(xaconnid not implemeneted)


	<XA_COMMIT>  ( <XA_1PHASE> | <XA_2PHASE> ) xid
		- commit a global transaction xid


	<XA_DISCONNECT> [ xaconnid = identifier() ] 
		- disconnect an XAConnection.  If xaconnid is given, then
		disconnect the XAConnection with the given xaconnid. 
		(xaconnid not implemeneted)


	<XA_END> ( <XA_SUSPEND> | <XA_SUCCESS> | <XA_FAIL> ) xid
		- dissociate a transaction from the current XAConnection or end
		an already suspened one 

	<XA_FORGET> xid		- forget about a global transaction

	<XA_GETCONNECTION>  [ <AS> connid ] 
		- get a Connection object from the current XAConnection.
		If connid is given, then associate connid with the connection.
		(connid not implemented)

	<XA_PREPARE> xid	- prepare a global transaction

	<XA_RECOVER> ( <XA_NOFLAGS> | <XA_STARTRSCAN> | <XA_ENDRSCAN> )
	 	- return the list of in-doubt transactions

	<XA_ROLLBACK> xid	- rollback a global transaction

	<XA_START> ( <XA_NOFLAGS> | <XA_JOIN> | <XA_RESUME> ) xid
		- associate a transaction or start a new global
		transaction with the current XAConnection.

	The following is for testing other JDBC2.0 ext interface, DataSource
	and ConnectionPoolDataSource.  Strictly speaking, these are not xa, but
	their functionality will be lumped into xaHelper because these are here
	only for testing purposes.

	<DATASOURCE> 'dbname'	[ <PROTOCOL> 'protocol' ]
				[ <USER> 'user' ]
				[ <PASSWORD> 'password' ]
				[ <AS> n=identifier() ]
		- get a data source whose database name is dbname and make that
		DataSource the current DataSource.  If <PROTOCOL> is specified,
		the DataSource may be remote.   Get a connection from that
		dataSource and use the user/password if specified.

	<CP_DATASOURCE> 'dbname' [ <PROTOCOL> 'protocol' ]
		- get a connection pool data source whose database name is
		dbname and make that DataSource the current CPDataSource.  
		If <PROTOCOL> is specified, the DataSource may be
		remote.

	<CP_CONNECT>	[ <USER> 'user' ]
			[ <PASSWORD> 'password' ]
			[ <AS> cpconnid ]
		- make a PooledConnection using the current CPDataSource and
		make that PooledConnection the current PooledConnection.
		If cpconnid is given, then associate cpconnid with the
		PooledConnection. (cpconnid not implemented).

	<CP_GETCONNECTION> [ <AS> connid ]
		- get a Connection object from the current PooledConnection.
		If connid is given, the associate connid with the connection.
		(connid not implemented)

	<CP_DISCONNECT> [  cpconnid = identifier() ] 
		- disconnect a PooledConnection.  If cpconnid is given, then
		disconnect the PooledConnection with the given cpconnid. 
		(cpconnid not implemented)

*/


/**
 * XA_DataSourceStatement is XA_DataSource 'dbname' ( create | shutdown )
 * We new'ed an instance of XADataSource as the current DataSource and set its
 * database name to dbname.
 */
XA_DataSourceStatement
XA_DataSourceStatement ::= <XA_DATASOURCE> <STRING> ( ( <SHUTDOWN> | identifier ) )?

/**
 * XA_ConnectStatement is XA_CONNECT (<AS> connid)
 * make a XAConnection using the currentXADataSource and make that XAConnection
 * the current XAConnection.  If connid is given, then associate connid with
 * the XAConnection.  This connid is not th xid.
 */
XA_ConnectStatement
XA_ConnectStatement ::= <XA_CONNECT> ( <USER> <STRING> )? ( <PASSWORD> <STRING> )? ( <AS> identifier )?

/**
 * XA_DisconnectStatement is XA_DISCONNECT [xaconnid = identifier()]
 * disconnect the current XAConnection 
 * If xaconnid is given, then disconnect XAConnection with xaconnid (xaconnid
 *	not implemented).
 * 
 */
XA_DisconnectStatement
XA_DisconnectStatement ::= <XA_DISCONNECT> ( identifier )?

/**
 * XA_CommitStatement is XA_COMMIT [ XA_1PHASE | XA_2PHASE ] xid
 * commits a global transaction xid
 */
XA_CommitStatement
XA_CommitStatement ::= <XA_COMMIT> ( <XA_1PHASE> | <XA_2PHASE> ) intValue

/**
 * XA_EndStatement is XA_END [ XA_SUSPEND | XA_SUCCESS | XA_FAIL] xid
 * dissociates a transaction from the current XAConnection or end an already
 * suspended one
 */
XA_EndStatement
XA_EndStatement ::= <XA_END> xatmflag intValue

/**
 * XA_ForgetStatement is XA_FORGET xid
 * forgets about a heuristically completed transaction
 */
XA_ForgetStatement
XA_ForgetStatement ::= <XA_FORGET> intValue

/**
 * XA_GetConnectionStatement is XA_GETCONNECTION
 * it gets a Connection from the currentXAConnection and uses that as the
 * current connection 
 */
XA_GetConnectionStatement
XA_GetConnectionStatement ::= <XA_GETCONNECTION> ( <AS> identifier )?

/**
 * XA_PrepareStatement is XA_PREPARE xid
 * prepares a global transaction
 */
XA_PrepareStatement
XA_PrepareStatement ::= <XA_PREPARE> intValue

/**
 * XA_RecoverStatement is XA_RECOVER flag
 * displays the list of prepared transactions
 */
XA_RecoverStatement
XA_RecoverStatement ::= <XA_RECOVER> xatmflag

/**
 * XA_RollbackStatement is XA_Rollback xid
 * rolls back a global transaction
 */
XA_RollbackStatement
XA_RollbackStatement ::= <XA_ROLLBACK> intValue

/**
 * XA_StartStatement is XA_START [ XA_NOFLAGS | XA_JOIN | XA_RESUME ] xid
 * start or associates a transaction with the current XAConnection
 */
XA_StartStatement
XA_StartStatement ::= <XA_START> xatmflag intValue

xatmflag
xatmflag ::= <XA_ENDRSCAN>
| <XA_FAIL>
| <XA_JOIN>
| <XA_NOFLAGS>
| <XA_RESUME>
| <XA_STARTRSCAN>
| <XA_SUCCESS>
| <XA_SUSPEND>

/**
 * DataSourceStatement is 
 *	DataSource 'dbname' 
 *		[ <PROTCOL> 'protocol']
 *		[ <USER> 'user' ]
 *		[ <PASSWORD> 'password' ]
 *		[ <AS> n=identifier() ]
 *
 * We new'ed an instance of DataSource as the current DataSource and set its
 * database name to dbname.  Also get a connection
 */
DataSourceStatement
DataSourceStatement ::= <DATASOURCE> <STRING> ( <PROTOCOL> <STRING> )? ( <USER> <STRING> )? ( <PASSWORD> <STRING> )? ( <AS> identifier )?

/**
 * CP_DataSourceStatement is
 *	CP_DataSource 'dbname' [ <PROTOCOL> 'protocol' ]
 *		- get a connection pool data source whose database name is
 *		dbname and make that DataSource the current CPDataSource.  
 *		If <PROTOCOL> is specified, the DataSource may be
 *		remote.
 */
CP_DataSourceStatement
CP_DataSourceStatement ::= <CP_DATASOURCE> <STRING> ( <PROTOCOL> <STRING> )?

/**
 * CP_ConnectStatement is
 *	<CP_CONNECT>	[ <USER> 'user' ]
 *			[ <PASSWORD> 'password' ]
 *			[ <AS> cpconnid ]
 * make a PooledConnection using the current CPDataSource and
 * make that PooledConnection the current PooledConnection.
 * If cpconnid is given, then associate cpconnid with the
 * PooledConnection. (cpconnid not implemented).
 */
CP_ConnectStatement
CP_ConnectStatement ::= <CP_CONNECT> ( <USER> <STRING> )? ( <PASSWORD> <STRING> )? ( <AS> identifier )?

/**
 * CP_GetConnectionStatement is
 *	<CP_GETCONNECTION> [ <AS> connid ]
 * get a Connection object from the current PooledConnection.
 * If connid is given, the associate connid with the connection.
 * (connid not implemented)
 */
CP_GetConnectionStatement
CP_GetConnectionStatement ::= <CP_GETCONNECTION> ( <AS> identifier )?

/**
 * CP_DisconnectStatement is
 *	<CP_DISCONNECT> [ cpconnid = identifier() ]
 * disconnect a PooledConnection.  If cpconnid is given, then
 * disconnect the PooledConnection with the given cpconnid. 
 * (cpconnid not implemented)
 */
CP_DisconnectStatement
CP_DisconnectStatement ::= <CP_DISCONNECT> ( identifier )?

attributeList
attributeList ::= ( property ( <COMMA> property )* )

property
property ::= caseSensitiveIdentifierOrKeyword <EQUALS_OPERATOR> caseSensitiveIdentifierOrKeyword

caseSensitiveIdentifierOrKeyword
caseSensitiveIdentifierOrKeyword ::= keyword
| <IDENTIFIER>

caseSensitiveIdentifier
caseSensitiveIdentifier ::= <IDENTIFIER>

keyword
keyword ::= ( <ABSOLUTE> | <AFTER> | <ALIASES> | <ALL> | <AS> | <ASYNC> | <ATTRIBUTES> | <AUTOCOMMIT> | <BANG> | <BEFORE> | <CLOSE> | <COMMIT> | <CONNECT> | <CONNECTION> | <CONNECTIONS> | <CURRENT> | <CURSOR> | <DESCRIBE> | <DISCONNECT> | <DRIVER> | <ELAPSEDTIME> | <END> | <EXECUTE> | <EXIT> | <FAIL> | <FIRST> | <FOR> | <FROM> | <GET> | <GETCURRENTROWNUMBER> | <HOLD> | <HELP> | <IN> | <INDEXES> | <INSENSITIVE> | <INTO> | <LAST> | <LOCALIZEDDISPLAY> | <MAXIMUMDISPLAYWIDTH> | <NAME> | <NEXT> | <NOHOLD> | <NOHOLDFORCONNECTION> | <OFF> | <ON> | <PASSWORD> | <PERIOD> | <PREPARE> | <PREVIOUS> | <PROCEDURE> | <PROCEDURES> | <PROPERTIES> | <PROTOCOL> | <QUIT> | <READONLY> | <RELATIVE> | <REMOVE> | <RESOURCE> | <ROLLBACK> | <RUN> | <TO> | <SCHEMAS> | <SCROLL> | <SENSITIVE> | <SET> | <SHOW> | <SHUTDOWN> | <STATEMENT> | <SYNONYMS> | <TABLES> | <USER> | <USING> | <VIEWS> | <WAIT> | <WITH> | <XA_1PHASE> | <XA_2PHASE> | <XA_DATASOURCE> | <XA_CONNECT> | <XA_COMMIT> | <XA_DISCONNECT> | <XA_END> | <XA_ENDRSCAN> | <XA_FAIL> | <XA_FORGET> | <XA_GETCONNECTION> | <XA_JOIN> | <XA_NOFLAGS> | <XA_PREPARE> | <XA_RECOVER> | <XA_RESUME> | <XA_ROLLBACK> | <XA_START> | <XA_STARTRSCAN> | <XA_SUCCESS> | <XA_SUSPEND> | <DATASOURCE> | <CP_DATASOURCE> | <CP_CONNECT> | <CP_GETCONNECTION> | <CP_DISCONNECT> | <WORK> )