program:
program ::= stmts
| empty
no referencesstmts:
stmts ::= stmt [;]?
| stmt ';' stmts
| stmtb
| label stmts
| ';'
referenced by:
cases
class_stmts
decorator
dowhile
for
foreach
function
function_decorator
function_lambda
generator
if
iloop
program
stmts
trycatch
while
with
stmtb:
stmtb ::= define
| if
| with
| while
| dowhile
| for
| foreach
| switch
| iloop
| trycatch
referenced by:
dowhile
for
foreach
if
iloop
stmts
trycatch
while
with
stmt:
stmt ::= exp
| '<<' exp
| '>>' ( '[' exp ']' )? id
| 'goto' exp
| 'include' exp
| 'return' exp?
| 'sleep' exp
| 'load' exp
| 'typeof' id
| 'datinfo' exp
| 'exit'
| 'throw' exp
| 'global' identity
| 'break' num? ';'
| 'continue' num? ';'
referenced by:
dowhile
for
foreach
if
iloop
stmts
trycatch
while
with
label:
label ::= id ':'
referenced by:
stmts
define:
define ::= function
| class
referenced by:
stmtb
if:
if ::= 'if' exp ( '{' stmts? '}' | stmt ';' | stmtb ) ( 'else' ( '{' stmts? '}' | stmt ';' | stmtb ) )?
referenced by:
stmtb
with:
with ::= 'with' exp ( '{' stmts? '}' | stmt ';' | stmtb )
referenced by:
stmtb
while:
while ::= 'while' exp ( '{' stmts? '}' | stmt ';' | stmtb )
referenced by:
stmtb
dowhile:
dowhile ::= 'do' ( '{' stmts? '}' | stmt ';' | stmtb ) 'while' exp ';'
referenced by:
stmtb
for:
for ::= 'for' '('? exp? ';' exp? ';' exp? ')'? ( '{' stmts? '}' | stmt ';' | stmtb )
referenced by:
stmtb
foreach:
foreach ::= 'for' '('? ( id ( ':' id )? 'in' exp | exp 'as' id ( ':' id )? ) ')'? ( '{' stmts? '}' | stmt ';' | stmtb )
referenced by:
stmtb
switch:
switch ::= 'switch' '(' exp ')' '{' cases? '}'
referenced by:
stmtb
cases:
cases ::= 'case' exp ':' ( stmts cases | stmts | cases )
| 'default' ':' stmts
referenced by:
cases
switch
iloop:
iloop ::= '$' '(' exp ( 'as' id ( ':' id )? )? ( ',' exp )? ')' ( '{' stmts? '}' | stmt ';' | stmtb )
referenced by:
stmtb
trycatch:
trycatch ::= 'try' ( '{' stmts? '}' | stmt ';' | stmtb ) catch '(' id ')' ( '{' stmts? '}' | stmt ';' | stmtb )
referenced by:
stmtb
function:
function ::= '~' id '(' params_val? ')' '{' stmts? '}'
referenced by:
assignation
class_stmts
define
decorator:
decorator
::= '~~' id '(' params_val? ')' '{' stmts? '}'
no referencesclass:
class ::= 'class' id ( 'extends' id )? '{' class_stmts? '}'
referenced by:
define
class_stmts:
class_stmts
::=
| 'static' function class_stmts?
| 'private' function class_stmts?
| 'private' 'static' function class_stmts?
| stmts
referenced by:
class
class_stmts
params_val:
params_val
::= params_val ',' id '=' identity
| params ',' id '=' identity
| id '=' identity
| params
referenced by:
decorator
function
function_decorator
function_lambda
function_partial
params_val
params:
params ::= params ',' '&'? id
| '&'? id
referenced by:
params
params_val
exp:
exp ::= op1
referenced by:
access
arith_func
array_func
assignation
assignation_exp
cases
cast
date
dowhile
environment
file
for
foreach
function_lambda
generator
if
iloop
inc_dec
list
logical_func
pair
process
regexp_func
stmt
string_func
switch
tern
while
with
op1:
op1 ::= op1 ( '||' | 'or' ) op2
| op2
referenced by:
exp
op1
op2:
op2 ::= op2 ( '&&' | 'and' ) op3
| op3
referenced by:
op1
op2
op3:
op3 ::= '!' op3
| op4
referenced by:
op2
op3
op4:
op4 ::= op4 '<' op5
| op4 '<=' op5
| op4 '>' op5
| op4 '>=' op5
| op4 '==' op5
| op4 '!=' op5
| op4 '===' op5
| op4 '!==' op5
| op5
referenced by:
op3
op4
op5:
op5 ::= op5 '+' op6
| op5 '-' op6
| op6
referenced by:
op4
op5
op6:
op6 ::= op6 '*' op7
| op6 '/' op7
| op7
referenced by:
op5
op6
op7:
op7 ::= op7 '^' op8
| op7 '%' op8
| op8
referenced by:
op6
op7
op8:
op8 ::= op8 '.' op9
| op9
referenced by:
op7
op8
op9:
op9 ::= call '<<' op9
| call
referenced by:
op8
op9
call:
call ::= call '(' list? ')'
| opc
referenced by:
access
call
op9
opc:
opc ::= tern
| nullcoalescing
| unity
referenced by:
call
tern:
tern ::= exp '?' exp? ':' exp
| exp '?' exp
referenced by:
opc
nullcoalescing:
nullcoalescing
::= '[[' list ']]'
referenced by:
opc
unity:
unity ::= inc_dec
| assignation_exp
| cast
| logical_func
| arith_func
| array_func
| string_func
| regexp_func
| iloop_access
| class_exp
| func_exp
| file
| date
| process
| generator
| environments
| array
| identity
referenced by:
opc
inc_dec:
inc_dec ::= '++' exp
| exp '++'
| '--' exp
| exp '--'
referenced by:
unity
assignation_exp:
assignation_exp
::= id_assig '+=' exp
| id_assig '-=' exp
| id_assig '*=' exp
| id_assig '/=' exp
| id_assig '^=' exp
| id_assig '%=' exp
| id_assig '.=' exp
| assignation
referenced by:
unity
id_assig:
id_assig ::= id
| assignation
referenced by:
assignation
assignation_exp
cast:
cast ::= 'int' exp
| 'float' exp
| 'bool' exp
| 'str' exp
referenced by:
unity
logical_func:
logical_func
::= 'isnull' exp
| 'empty' exp
referenced by:
unity
arith_func:
arith_func
::= 'size' exp
| 'sizeof' exp
referenced by:
unity
string_func:
string_func
::= 'sprintf' '(' exp ',' exp ')'
| 'str_replace' '(' exp ',' exp ',' exp ( ',' exp )? ')'
| 'str_subreplace' '(' exp ',' exp ',' exp ',' exp ')'
| 'str_find' '(' exp ',' exp ( ',' exp )? ')'
| 'str_upper' '(' exp ')'
| 'str_lower' '(' exp ')'
referenced by:
unity
array_func:
array_func
::= 'array_explode' '(' exp ',' exp ')'
| 'array_implode' '(' exp ',' exp ')'
| 'array_chunck' '(' exp ',' exp ')'
| 'array_reduce' '(' exp ',' exp ')'
referenced by:
unity
class_exp:
class_exp
::= 'new' id ( '(' list? ')' )?
| 'this'
| 'parent'
| namespace
referenced by:
unity
array:
array ::= '{' list '}'
| '{' map '}'
| '{' '}'
| 'arrayop'
| access
referenced by:
unity
date:
date ::= 'date' '(' exp ')'
| 'time' '(' ')'
referenced by:
unity
file:
file ::= 'file' '(' exp ( ',' exp )? ')'
| 'fput' '(' exp ',' exp ')'
| 'fwrite' '(' exp ',' exp ')'
| 'fappend' '(' exp ',' exp ')'
| 'fget' '(' exp ( ',' exp )? ')'
| 'fread' '(' exp ')'
| 'fclose' '(' exp ')'
| 'fseek' '(' exp ',' exp ( ',' fposs )? ')'
| 'ftell' '(' exp ')'
referenced by:
unity
fpos:
fpos ::= FSET
| FCUR
| FEND
no referencesprocess:
process ::= 'exec' '(' exp ')'
| 'eval' '(' exp ')'
| 'fork' '(' ')'
| 'wait' '(' exp? ')'
| 'signal' '(' exp ',' exp ')'
| 'signalhandler' '(' exp ',' exp ')'
| 'exitProcess' '(' ')'
| 'getpid' '(' ')'
| 'getppid' '(' ')'
| 'process' '(' exp ( ',' list )? ')'
referenced by:
unity
environment:
environment
::= 'getenv' '(' exp ')'
no referencesgenerator:
generator
::= '(' exp ( ':' exp )? 'for' id ( ':' id )? 'in' exp ( 'if' exp )? ( '{' stmts '}' )? ')'
| '(' exp ( ':' exp )? 'for' '(' id ( ':' id )? 'in' exp ')' ( 'if' exp )? ( '{' stmts '}' )? ')'
referenced by:
unity
regexp_func:
regexp_func
::= 'regexp' '(' exp ')'
| 'search' '(' exp ',' exp ( ',' list )? ')'
| 'match' '(' exp ',' exp ')'
referenced by:
unity
iloop_access:
iloop_access
::= '$'
| '$' '{' NUM '}'
referenced by:
unity
identity:
identity ::= num
| 'true'
| 'false'
| 'null'
| str
| rexp
| id
referenced by:
params_val
stmt
unity
function_exp:
function_exp
::= function_lambda
| function_decorator
| function_partial
| function_context
referenced by:
function_partial
function_lambda:
function_lambda
::= '~' '(' params_val? ')' '{' stmts? '}'
| '~' params_val ':' exp
| '~&' id
referenced by:
function_exp
function_decorator:
function_decorator
::= '~~' '(' params_val? ')' '{' stmts? '}'
referenced by:
function_exp
function_partial:
function_partial
::= 'P' '[' params_val ']' '(' id ')'
| 'P' '[' params_val ']' '(' function_exp ')'
| 'P' '[' params_val ']' '(' arrayexp ')'
referenced by:
function_exp
function_context:
function_context
::= '~>'
referenced by:
function_exp
list:
list ::= list ',' exp?
| exp
referenced by:
array
call
class_exp
list
nullcoalescing
process
regexp_func
map:
map ::= map ',' pair?
| pair
referenced by:
array
map
pair:
pair ::= exp ':' exp
referenced by:
map
assignation:
assignation
::= id_assig '=' '&'? exp
| id_assig '=' function
referenced by:
assignation_exp
id_assig
access:
access ::= access '->' id
| access '[' exp? ']'
| call '->' id
| call '[' exp? ']'
referenced by:
access
array
namespace:
namespace
::= namespace '::' id
| id '::' id
| 'parent' '::' id
| 'static' '::' id
referenced by:
class_exp
namespace
id:
id ::= [a-zA-Z_] [a-zA-Z0-9_]*
referenced by:
access
class
class_exp
decorator
foreach
function
function_lambda
function_partial
generator
id_assig
identity
iloop
label
namespace
params
params_val
stmt
trycatch
comments:
comments ::= '/*' [^*]* '*/'
| '//' [^\n]
| '#' [^#]
no referencesnum:
num ::= '+' [0-9]+ ( . [0-9]+ )?
| '-' [0-9]+ ( . [0-9]+ )?
referenced by:
identity
stmt
str:
str ::= "'" .* "'"
referenced by:
identity
regexp:
regexp ::= '`' .* '`'
no references
... generated by Railroad Diagram Generator