Fbsql
Rules
STATIC
ROLES
TRIGGER
BEFORE
AFTER
AS
NO
COMPRESSION
BEST
SPEED
DECLARE
PROCEDURE
TYPE
JAVA
JS
EXEC
URL
OPTIONS
FILE
STATEMENT
CONNECT
TO
USER
PASSWORD
PROPERTIES
DRIVER
LIB
CONNECTION
POOL
SIZE
MIN
MAX
UNDECLARED
STATEMENTS
INCOMING
CONNECTIONS
ALLOW
REJECT
IF
EXISTS
SWITCH
SCHEDULE
AT
INCLUDE
NULL
native_sql
parameter
procedure
role_name
trigger_before_procedure_name
trigger_after_procedure_name
compression_level
connection_alias
statement_alias
procedure_name
json
jdbc_url
user
password
jdbc_connection_properties
jdbc_driver_class_name
jar_file
connection_pool_size_min
connection_pool_size_max
sql_script_file
json_file
cron_expression
connect_to_stmt
switch_to_stmt
declare_statement_stmt
declare_procedure_stmt
include_script_file_stmt
schedule_stmt
native_stmt
IDENTIFIER
NUMERIC_LITERAL
STRING_LITERAL
SINGLE_LINE_COMMENT
MULTILINE_COMMENT
SPACES
UNEXPECTED_CHAR
DIGIT
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
STATIC
Top
Text notation:
STATIC
:
S
T
A
T
I
C
;
Visual notation:
ROLES
Top
Text notation:
ROLES
:
R
O
L
E
S
;
Visual notation:
TRIGGER
Top
Text notation:
TRIGGER
:
T
R
I
G
G
E
R
;
Visual notation:
BEFORE
Top
Text notation:
BEFORE
:
B
E
F
O
R
E
;
Visual notation:
AFTER
Top
Text notation:
AFTER
:
A
F
T
E
R
;
Visual notation:
AS
Top
Text notation:
AS
:
A
S
;
Visual notation:
NO
Top
Text notation:
NO
:
N
O
;
Visual notation:
COMPRESSION
Top
Text notation:
COMPRESSION
:
C
O
M
P
R
E
S
S
I
O
N
;
Visual notation:
BEST
Top
Text notation:
BEST
:
B
E
S
T
;
Visual notation:
SPEED
Top
Text notation:
SPEED
:
S
P
E
E
D
;
Visual notation:
DECLARE
Top
Text notation:
DECLARE
:
D
E
C
L
A
R
E
;
Visual notation:
PROCEDURE
Top
Text notation:
PROCEDURE
:
P
R
O
C
E
D
U
R
E
;
Visual notation:
TYPE
Top
Text notation:
TYPE
:
T
Y
P
E
;
Visual notation:
JAVA
Top
Text notation:
JAVA
:
J
A
V
A
;
Visual notation:
JS
Top
Text notation:
JS
:
J
S
;
Visual notation:
EXEC
Top
Text notation:
EXEC
:
E
X
E
C
;
Visual notation:
URL
Top
Text notation:
URL
:
U
R
L
;
Visual notation:
OPTIONS
Top
Text notation:
OPTIONS
:
O
P
T
I
O
N
S
;
Visual notation:
FILE
Top
Text notation:
FILE
:
F
I
L
E
;
Visual notation:
STATEMENT
Top
Text notation:
STATEMENT
:
S
T
A
T
E
M
E
N
T
;
Visual notation:
CONNECT
Top
Text notation:
CONNECT
:
C
O
N
N
E
C
T
;
Visual notation:
TO
Top
Text notation:
TO
:
T
O
;
Visual notation:
USER
Top
Text notation:
USER
:
U
S
E
R
;
Visual notation:
PASSWORD
Top
Text notation:
PASSWORD
:
P
A
S
S
W
O
R
D
;
Visual notation:
PROPERTIES
Top
Text notation:
PROPERTIES
:
P
R
O
P
E
R
T
I
E
S
;
Visual notation:
DRIVER
Top
Text notation:
DRIVER
:
D
R
I
V
E
R
;
Visual notation:
LIB
Top
Text notation:
LIB
:
L
I
B
;
Visual notation:
CONNECTION
Top
Text notation:
CONNECTION
:
C
O
N
N
E
C
T
I
O
N
;
Visual notation:
POOL
Top
Text notation:
POOL
:
P
O
O
L
;
Visual notation:
SIZE
Top
Text notation:
SIZE
:
S
I
Z
E
;
Visual notation:
MIN
Top
Text notation:
MIN
:
M
I
N
;
Visual notation:
MAX
Top
Text notation:
MAX
:
M
A
X
;
Visual notation:
UNDECLARED
Top
Text notation:
UNDECLARED
:
U
N
D
E
C
L
A
R
E
D
;
Visual notation:
STATEMENTS
Top
Text notation:
STATEMENTS
:
S
T
A
T
E
M
E
N
T
S
;
Visual notation:
INCOMING
Top
Text notation:
INCOMING
:
I
N
C
O
M
I
N
G
;
Visual notation:
CONNECTIONS
Top
Text notation:
CONNECTIONS
:
C
O
N
N
E
C
T
I
O
N
S
;
Visual notation:
ALLOW
Top
Text notation:
ALLOW
:
A
L
L
O
W
;
Visual notation:
REJECT
Top
Text notation:
REJECT
:
R
E
J
E
C
T
;
Visual notation:
IF
Top
Text notation:
IF
:
I
F
;
Visual notation:
EXISTS
Top
Text notation:
EXISTS
:
E
X
I
S
T
S
;
Visual notation:
SWITCH
Top
Text notation:
SWITCH
:
S
W
I
T
C
H
;
Visual notation:
SCHEDULE
Top
Text notation:
SCHEDULE
:
S
C
H
E
D
U
L
E
;
Visual notation:
AT
Top
Text notation:
AT
:
A
T
;
Visual notation:
INCLUDE
Top
Text notation:
INCLUDE
:
I
N
C
L
U
D
E
;
Visual notation:
NULL
Top
Text notation:
NULL
:
N
U
L
L
;
Visual notation:
native_sql
Top
Text notation:
native_sql
:
.
*
?
;
Visual notation:
parameter
Top
Text notation:
parameter
:
':'
IDENTIFIER
|
NUMERIC_LITERAL
|
STRING_LITERAL
|
NULL
|
procedure
;
Visual notation:
procedure
Top
Text notation:
procedure
:
procedure_name
'('
parameter
?
(
','
parameter
)
*
')'
;
Visual notation:
role_name
Top
Text notation:
role_name
:
IDENTIFIER
|
STRING_LITERAL
;
Visual notation:
trigger_before_procedure_name
Top
Text notation:
trigger_before_procedure_name
:
IDENTIFIER
;
Visual notation:
trigger_after_procedure_name
Top
Text notation:
trigger_after_procedure_name
:
IDENTIFIER
;
Visual notation:
compression_level
Top
Text notation:
compression_level
:
NO
COMPRESSION
|
BEST
COMPRESSION
|
BEST
SPEED
;
Visual notation:
connection_alias
Top
Text notation:
connection_alias
:
IDENTIFIER
|
STRING_LITERAL
;
Visual notation:
statement_alias
Top
Text notation:
statement_alias
:
IDENTIFIER
|
STRING_LITERAL
;
Visual notation:
procedure_name
Top
Text notation:
procedure_name
:
IDENTIFIER
|
STRING_LITERAL
;
Visual notation:
json
Top
Text notation:
json
:
STRING_LITERAL
;
Visual notation:
jdbc_url
Top
Text notation:
jdbc_url
:
STRING_LITERAL
;
Visual notation:
user
Top
Text notation:
user
:
IDENTIFIER
|
STRING_LITERAL
;
Visual notation:
password
Top
Text notation:
password
:
STRING_LITERAL
;
Visual notation:
jdbc_connection_properties
Top
Text notation:
jdbc_connection_properties
:
STRING_LITERAL
;
Visual notation:
jdbc_driver_class_name
Top
Text notation:
jdbc_driver_class_name
:
STRING_LITERAL
;
Visual notation:
jar_file
Top
Text notation:
jar_file
:
STRING_LITERAL
;
Visual notation:
connection_pool_size_min
Top
Text notation:
connection_pool_size_min
:
NUMERIC_LITERAL
;
Visual notation:
connection_pool_size_max
Top
Text notation:
connection_pool_size_max
:
NUMERIC_LITERAL
;
Visual notation:
sql_script_file
Top
Text notation:
sql_script_file
:
STRING_LITERAL
;
Visual notation:
json_file
Top
Text notation:
json_file
:
STRING_LITERAL
;
Visual notation:
cron_expression
Top
Text notation:
cron_expression
:
STRING_LITERAL
;
Visual notation:
connect_to_stmt
Top
Text notation:
connect_to_stmt
:
CONNECT
TO
jdbc_url
(
(
USER
user
)
|
(
PASSWORD
password
)
|
(
PROPERTIES
jdbc_connection_properties
)
|
(
DRIVER
jdbc_driver_class_name
)
|
(
LIB
jar_file
(
','
jar_file
)
*
)
|
(
CONNECTION
POOL
(
(
MIN
connection_pool_size_min
)
|
(
MAX
connection_pool_size_max
)
)
+
)
|
(
UNDECLARED
STATEMENTS
(
ALLOW
|
REJECT
)
+
)
|
(
INCOMING
CONNECTIONS
(
ALLOW
|
REJECT
)
+
(
IF
EXISTS
'('
native_sql
')'
)
?
)
|
(
AS
?
connection_alias
)
)
*
;
Visual notation:
switch_to_stmt
Top
Text notation:
switch_to_stmt
:
SWITCH
TO
connection_alias
;
Visual notation:
declare_statement_stmt
Top
Text notation:
declare_statement_stmt
:
DECLARE
STATEMENT
'('
native_sql
')'
(
STATIC
|
(
COMPRESSION
compression_level
)
|
(
ROLES
'('
role_name
(
','
role_name
)
*
')'
)
|
(
TRIGGER
BEFORE
trigger_before_procedure_name
)
|
(
TRIGGER
AFTER
trigger_after_procedure_name
)
|
(
AS
?
statement_alias
)
)
*
;
Visual notation:
declare_procedure_stmt
Top
Text notation:
declare_procedure_stmt
:
DECLARE
PROCEDURE
procedure_name
TYPE
(
JAVA
|
JS
|
EXEC
|
URL
)
*
(
OPTIONS
json
|
OPTIONS
FILE
json_file
)
?
;
Visual notation:
include_script_file_stmt
Top
Text notation:
include_script_file_stmt
:
INCLUDE
sql_script_file
(
','
sql_script_file
)
*
;
Visual notation:
schedule_stmt
Top
Text notation:
schedule_stmt
:
SCHEDULE
procedure_name
AT
cron_expression
;
Visual notation:
native_stmt
Top
Text notation:
native_stmt
:
(
.
*
?
procedure
.
*
?
)
*
;
Visual notation:
IDENTIFIER
Top
Text notation:
IDENTIFIER
:
'"'
(
~
'"'
|
'""'
)
*
'"'
|
'`'
(
~
'`'
|
'``'
)
*
'`'
|
'['
~
']'
*
']'
|
[
a-zA-Z_
] [
a-zA-Z_0-9
]
*
;
Visual notation:
NUMERIC_LITERAL
Top
Text notation:
NUMERIC_LITERAL
:
DIGIT
+
(
'.'
DIGIT
*
)
?
(
E
[
-+
]
?
DIGIT
+
)
?
|
'.'
DIGIT
+
(
E
[
-+
]
?
DIGIT
+
)
?
;
Visual notation:
STRING_LITERAL
Top
Text notation:
STRING_LITERAL
:
'\''
(
~
'\''
|
'\'\''
)
*
'\''
;
Visual notation:
SINGLE_LINE_COMMENT
Top
Text notation:
SINGLE_LINE_COMMENT
:
'--'
~
[
\r\n
]
*
->
channel
(
HIDDEN
)
;
Visual notation:
MULTILINE_COMMENT
Top
Text notation:
MULTILINE_COMMENT
:
'/*'
.
*
?
(
'*/'
|
EOF
)
->
channel
(
HIDDEN
)
;
Visual notation:
SPACES
Top
Text notation:
SPACES
: [
\u000B\t\r\n
]
->
channel
(
HIDDEN
)
;
Visual notation:
UNEXPECTED_CHAR
Top
Text notation:
UNEXPECTED_CHAR
:
.
;
Visual notation:
DIGIT
Top
Text notation:
DIGIT
: [
0-9
] ;
Visual notation:
A
Top
Text notation:
A
: [
aA
] ;
Visual notation:
B
Top
Text notation:
B
: [
bB
] ;
Visual notation:
C
Top
Text notation:
C
: [
cC
] ;
Visual notation:
D
Top
Text notation:
D
: [
dD
] ;
Visual notation:
E
Top
Text notation:
E
: [
eE
] ;
Visual notation:
F
Top
Text notation:
F
: [
fF
] ;
Visual notation:
G
Top
Text notation:
G
: [
gG
] ;
Visual notation:
H
Top
Text notation:
H
: [
hH
] ;
Visual notation:
I
Top
Text notation:
I
: [
iI
] ;
Visual notation:
J
Top
Text notation:
J
: [
jJ
] ;
Visual notation:
K
Top
Text notation:
K
: [
kK
] ;
Visual notation:
L
Top
Text notation:
L
: [
lL
] ;
Visual notation:
M
Top
Text notation:
M
: [
mM
] ;
Visual notation:
N
Top
Text notation:
N
: [
nN
] ;
Visual notation:
O
Top
Text notation:
O
: [
oO
] ;
Visual notation:
P
Top
Text notation:
P
: [
pP
] ;
Visual notation:
Q
Top
Text notation:
Q
: [
qQ
] ;
Visual notation:
R
Top
Text notation:
R
: [
rR
] ;
Visual notation:
S
Top
Text notation:
S
: [
sS
] ;
Visual notation:
T
Top
Text notation:
T
: [
tT
] ;
Visual notation:
U
Top
Text notation:
U
: [
uU
] ;
Visual notation:
V
Top
Text notation:
V
: [
vV
] ;
Visual notation:
W
Top
Text notation:
W
: [
wW
] ;
Visual notation:
X
Top
Text notation:
X
: [
xX
] ;
Visual notation:
Y
Top
Text notation:
Y
: [
yY
] ;
Visual notation:
Z
Top
Text notation:
Z
: [
zZ
] ;
Visual notation: