program: stmts empty program ::= stmts | empty no referencesstmts: stmt ; stmt ; stmts stmtb label stmts ; 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: define if with while dowhile for foreach switch iloop trycatch stmtb ::= define | if | with | while | dowhile | for | foreach | switch | iloop | trycatch referenced by: dowhile for foreach if iloop stmts trycatch while with 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 ; 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: id : label ::= id ':' referenced by: stmts define: function class define ::= function | class referenced by: stmtb if: if exp { stmts } stmt ; stmtb else { stmts } stmt ; stmtb if ::= 'if' exp ( '{' stmts? '}' | stmt ';' | stmtb ) ( 'else' ( '{' stmts? '}' | stmt ';' | stmtb ) )? referenced by: stmtb with: with exp { stmts } stmt ; stmtb with ::= 'with' exp ( '{' stmts? '}' | stmt ';' | stmtb ) referenced by: stmtb while: while exp { stmts } stmt ; stmtb while ::= 'while' exp ( '{' stmts? '}' | stmt ';' | stmtb ) referenced by: stmtb dowhile: do { stmts } stmt ; stmtb while exp ; dowhile ::= 'do' ( '{' stmts? '}' | stmt ';' | stmtb ) 'while' exp ';' referenced by: stmtb for: for ( exp ; exp ; exp ) { stmts } stmt ; stmtb for ::= 'for' '('? exp? ';' exp? ';' exp? ')'? ( '{' stmts? '}' | stmt ';' | stmtb ) referenced by: stmtb foreach: for ( id : id in exp exp as id : id ) { stmts } stmt ; stmtb foreach ::= 'for' '('? ( id ( ':' id )? 'in' exp | exp 'as' id ( ':' id )? ) ')'? ( '{' stmts? '}' | stmt ';' | stmtb ) referenced by: stmtb switch: switch ( exp ) { cases } switch ::= 'switch' '(' exp ')' '{' cases? '}' referenced by: stmtb cases: case exp : stmts cases stmts cases default : stmts cases ::= 'case' exp ':' ( stmts cases | stmts | cases ) | 'default' ':' stmts referenced by: cases switch iloop: $ ( exp as id : id , exp ) { stmts } stmt ; stmtb iloop ::= '$' '(' exp ( 'as' id ( ':' id )? )? ( ',' exp )? ')' ( '{' stmts? '}' | stmt ';' | stmtb ) referenced by: stmtb trycatch: try { stmts } stmt ; stmtb catch ( id ) { stmts } stmt ; stmtb trycatch ::= 'try' ( '{' stmts? '}' | stmt ';' | stmtb ) catch '(' id ')' ( '{' stmts? '}' | stmt ';' | stmtb ) referenced by: stmtb function: ~ id ( params_val ) { stmts } function ::= '~' id '(' params_val? ')' '{' stmts? '}' referenced by: assignation class_stmts define decorator: ~~ id ( params_val ) { stmts } decorator ::= '~~' id '(' params_val? ')' '{' stmts? '}' no referencesclass: class id extends id { class_stmts } class ::= 'class' id ( 'extends' id )? '{' class_stmts? '}' referenced by: define class_stmts: static function class_stmts private function class_stmts private static function class_stmts 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 , id = identity params , id = identity id = identity params 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 , & id & id params ::= params ',' '&'? id | '&'? id referenced by: params params_val exp: op1 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 || or op2 op2 op1 ::= op1 ( '||' | 'or' ) op2 | op2 referenced by: exp op1 op2: op2 && and op3 op3 op2 ::= op2 ( '&&' | 'and' ) op3 | op3 referenced by: op1 op2 op3: ! op3 op4 op3 ::= '!' op3 | op4 referenced by: op2 op3 op4: op4 < op5 op4 <= op5 op4 > op5 op4 >= op5 op4 == op5 op4 != op5 op4 === op5 op4 !== op5 op5 op4 ::= op4 '<' op5 | op4 '<=' op5 | op4 '>' op5 | op4 '>=' op5 | op4 '==' op5 | op4 '!=' op5 | op4 '===' op5 | op4 '!==' op5 | op5 referenced by: op3 op4 op5: op5 + op6 op5 - op6 op6 op5 ::= op5 '+' op6 | op5 '-' op6 | op6 referenced by: op4 op5 op6: op6 * op7 op6 / op7 op7 op6 ::= op6 '*' op7 | op6 '/' op7 | op7 referenced by: op5 op6 op7: op7 ^ op8 op7 % op8 op8 op7 ::= op7 '^' op8 | op7 '%' op8 | op8 referenced by: op6 op7 op8: op8 . op9 op9 op8 ::= op8 '.' op9 | op9 referenced by: op7 op8 op9: call << op9 call op9 ::= call '<<' op9 | call referenced by: op8 op9 call: call ( list ) opc call ::= call '(' list? ')' | opc referenced by: access call op9 opc: tern nullcoalescing unity opc ::= tern | nullcoalescing | unity referenced by: call tern: exp ? exp : exp exp ? exp tern ::= exp '?' exp? ':' exp | exp '?' exp referenced by: opc nullcoalescing: [[ list ]] nullcoalescing ::= '[[' list ']]' referenced by: opc 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 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: ++ exp exp ++ -- exp exp -- inc_dec ::= '++' exp | exp '++' | '--' exp | exp '--' referenced by: unity assignation_exp: id_assig += exp id_assig -= exp id_assig *= exp id_assig /= exp id_assig ^= exp id_assig %= exp id_assig .= exp assignation 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 assignation id_assig ::= id | assignation referenced by: assignation assignation_exp cast: int exp float exp bool exp str exp cast ::= 'int' exp | 'float' exp | 'bool' exp | 'str' exp referenced by: unity logical_func: isnull exp empty exp logical_func ::= 'isnull' exp | 'empty' exp referenced by: unity arith_func: size exp sizeof exp arith_func ::= 'size' exp | 'sizeof' exp referenced by: unity 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 ) 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_explode ( exp , exp ) array_implode ( exp , exp ) array_chunck ( exp , exp ) array_reduce ( exp , exp ) array_func ::= 'array_explode' '(' exp ',' exp ')' | 'array_implode' '(' exp ',' exp ')' | 'array_chunck' '(' exp ',' exp ')' | 'array_reduce' '(' exp ',' exp ')' referenced by: unity class_exp: new id ( list ) this parent namespace class_exp ::= 'new' id ( '(' list? ')' )? | 'this' | 'parent' | namespace referenced by: unity array: { list } { map } { } arrayop access array ::= '{' list '}' | '{' map '}' | '{' '}' | 'arrayop' | access referenced by: unity date: date ( exp ) time ( ) date ::= 'date' '(' exp ')' | 'time' '(' ')' referenced by: unity 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 ) 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: FSET FCUR FEND fpos ::= FSET | FCUR | FEND no referencesprocess: exec ( exp ) eval ( exp ) fork ( ) wait ( exp ) signal ( exp , exp ) signalhandler ( exp , exp ) exitProcess ( ) getpid ( ) getppid ( ) process ( exp , list ) process ::= 'exec' '(' exp ')' | 'eval' '(' exp ')' | 'fork' '(' ')' | 'wait' '(' exp? ')' | 'signal' '(' exp ',' exp ')' | 'signalhandler' '(' exp ',' exp ')' | 'exitProcess' '(' ')' | 'getpid' '(' ')' | 'getppid' '(' ')' | 'process' '(' exp ( ',' list )? ')' referenced by: unity environment: getenv ( exp ) environment ::= 'getenv' '(' exp ')' no referencesgenerator: ( exp : exp for id : id in exp if exp { stmts } ) ( exp : exp for ( id : id in exp ) if exp { stmts } ) 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 ( exp ) search ( exp , exp , list ) match ( exp , exp ) regexp_func ::= 'regexp' '(' exp ')' | 'search' '(' exp ',' exp ( ',' list )? ')' | 'match' '(' exp ',' exp ')' referenced by: unity iloop_access: $ $ { NUM } iloop_access ::= '$' | '$' '{' NUM '}' referenced by: unity identity: num true false null str rexp id identity ::= num | 'true' | 'false' | 'null' | str | rexp | id referenced by: params_val stmt unity function_exp: function_lambda function_decorator function_partial function_context function_exp ::= function_lambda | function_decorator | function_partial | function_context referenced by: function_partial function_lambda: ~ ( params_val ) { stmts } ~ params_val : exp ~& id function_lambda ::= '~' '(' params_val? ')' '{' stmts? '}' | '~' params_val ':' exp | '~&' id referenced by: function_exp function_decorator: ~~ ( params_val ) { stmts } function_decorator ::= '~~' '(' params_val? ')' '{' stmts? '}' referenced by: function_exp function_partial: P [ params_val ] ( id ) P [ params_val ] ( function_exp ) P [ params_val ] ( arrayexp ) 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 , exp exp list ::= list ',' exp? | exp referenced by: array call class_exp list nullcoalescing process regexp_func map: map , pair pair map ::= map ',' pair? | pair referenced by: array map pair: exp : exp pair ::= exp ':' exp referenced by: map assignation: id_assig = & exp id_assig = function assignation ::= id_assig '=' '&'? exp | id_assig '=' function referenced by: assignation_exp id_assig access: access -> id access [ exp ] call -> id call [ exp ] access ::= access '->' id | access '[' exp? ']' | call '->' id | call '[' exp? ']' referenced by: access array namespace: namespace :: id id :: id parent :: id static :: id namespace ::= namespace '::' id | id '::' id | 'parent' '::' id | 'static' '::' id referenced by: class_exp namespace id: [a-z] [A-Z] _ [a-z] [A-Z] [0-9] _ 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: /* [^*] */ // [^\n] # [^#] comments ::= '/*' [^*]* '*/' | '//' [^\n] | '#' [^#] no referencesnum: + [0-9] . [0-9] - [0-9] . [0-9] 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 R R