Generated from spec/jbc.y by spec/tools/grammar_diagrams.py; do not edit.
Diagrams read left to right; a track that turns back is a repetition.
program ::= section
program
: section
;statement
::= '@' Identifier '=' resultant
| 'PROGRAM'
| Label
| Identifier ( '(' st_parameter_list ')' )? ident_assignments
| ( '++' | '--' | 'COLLECTDATA' ) ident_options
| mat_statement ( 'MAT' Identifier | resultant )
| case_structure
| 'CONTINUE'
| 'DEFB' Identifier '(' ')'
| ( 'DEFC' | 'DEFCPP' | 'DEFCE' ) 'STATIC'? c_func_types? ( Identifier | CFUNC ) '(' c_var_list? ')'
| 'DECLARE' ( 'FUNCTION' funcname | ( 'SUB' | 'SUBROUTINE' ) )
| ( 'DEFFUN' | 'DEFB' ) ( Identifier | CFUNC ) '(' b_var_list? ')'
| 'DEL' ident_options '<' nocollect_mult_arg_list? '>'
| CFUNC '(' nocollect_mult_arg_list? ')'
| 'FILELOCK' ident_options? ( ',' resultant )? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )?
| 'FILEUNLOCK' ident_options? error_cond_body?
| 'FIND' resultant 'IN' resultant ( ',' resultant )? ( 'RETURNING' | 'SETTING' ) ident_options ( ',' ident_options )? ( ',' ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'FINDSTR' resultant 'IN' resultant ( ',' resultant )? ( 'RETURNING' | 'SETTING' ) ident_options ( ',' ident_options )? ( ',' ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'FOOTING' opt_on resultant
| 'FOR' Identifier ( '(' st_parameter_list ')' )? '=' resultant 'TO' resultant ( 'STEP' resultant )? statements_and_opt_while_until_body 'NEXT' ( Identifier ( '(' st_parameter_list ')' )? )?
| 'GROUPSTORE' resultant 'IN' ident_options 'USING' resultant ',' resultant ( ',' resultant )?
| ( 'HEADING' | 'HEADINGE' | 'HEADINGN' ) opt_on resultant
| 'IF' resultant cond_body_p1 ( 'ELSE' cond_stats )?
| 'INS' resultant 'BEFORE' ident_options '<' nocollect_mult_arg_list? '>'
| 'LOCATE' ( resultant 'IN' resultant opt_loc_dyns ( ',' resultant )? ( 'BY' resultant )? ( 'RETURNING' | 'SETTING' ) ident_options
| '(' nocollect_mult_arg_list? ';' ident_options ( ';' resultant )? ')'
) cond_body_p1 ( 'ELSE' cond_stats )?
| 'LOOP' single_line_statements? statements_and_opt_while_until_body 'REPEAT'
| 'CLOSE' ident_options ( error_cond_body | ',' close_identifier_list )?
| 'OBJEXCALLBACK' ident_options ',' ident_options cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'OPEN' | 'OPENPATH' ) collect_mult_arg_list? ( 'TO' ident_options )? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| 'OPENINDEX' resultant ',' resultant 'TO' ident_options ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'OPENDEV' | 'OPENSEQ' | 'OSOPEN' ) 'EXISTING'? ( 'APPEND' | 'APPENDING' )? collect_mult_arg_list? 'READONLY'? 'TO' ident_options ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| 'OPENSER' collect_mult_arg_list? 'TO' ident_options ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'PAUSE' | 'UNLOCK' ) resultant?
| 'CREATE' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'RANDOMIZE' ( '(' resultant? ')' )?
| 'READSEQ' ident_options_or_attype 'FROM' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| 'OSREAD' ident_options_or_attype 'FROM' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| 'OSBREAD' ident_options_or_attype 'FROM' resultant 'AT' resultant 'LENGTH' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? error_cond_body?
| 'OSBWRITE' resultant ( 'ON' | 'TO' ) resultant 'AT' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? error_cond_body?
| 'READBLK' ident_options_or_attype 'FROM' resultant ',' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'WRITEBLK' resultant ( 'ON' | 'TO' ) resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'WRITESEQ' | 'WRITESEQF' ) resultant ( 'APPEND' | 'APPENDING' )? ( 'ON' | 'TO' ) ident_options ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| 'OSWRITE' resultant ( 'APPEND' | 'APPENDING' )? ( 'ON' | 'TO' ) resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )?
| ( 'WAKE' | FUNC_ARGS1 | 'CHAIN' | 'DELETELIST' | 'OUT' | 'PRECISION' | 'PROCWRITE' | 'RTNDATA' ) resultant
| 'WEOFSEQ' ident_options ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( null_sw_cond_body_p1 ( 'ELSE' cond_stats )? )?
| ( 'CLOSESEQ' | 'OSCLOSE' ) ident_options error_cond_body?
| 'DELETESEQ' collect_mult_arg_list? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| 'OSDELETE' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )?
| ( 'READLIST' | 'READSELECT' ) ident_options ( 'FROM' resultant )? ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'STATUS' ident_options 'FROM' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'FORMLIST' resultant opt_select_to ( ( 'RETURNING' | 'SETTING' ) ident_options )?
| 'GETLIST' resultant opt_select_to ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'READNEXT' | 'READPREV' ) 'KEY'? ident_options_or_attype ( ',' ident_options )? ( ',' ident_options )? ( 'FROM' resultant )? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'READT' | 'READTX' ) opt_mtu ident_options ( ( 'ON' | 'FROM' ) resultant )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'REMOVE' ident_options_or_attype 'FROM' ident_options_or_attype ( 'AT' ident_options )? ( 'RETURNING' | 'SETTING' ) ident_options
| 'REWIND' opt_mtu ( ( 'ON' | 'FROM' ) resultant )? cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'SELECT' | 'SELECTN' | 'SELECTV' ) ident_options? opt_select_to ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ATKEY' nocollect_mult_arg_list? )? error_cond_body?
| ( 'SSELECT' | 'SSELECTN' | 'SSELECTV' ) ident_options? opt_select_to ( ( 'RETURNING' | 'SETTING' ) ident_options )? error_cond_body?
| 'SELECTE' opt_select_to ( ( 'RETURNING' | 'SETTING' ) ident_options )?
| 'SELECTINDEX' resultant ( ',' resultant )? 'FROM' ident_options opt_select_to ( ( 'RETURNING' | 'SETTING' ) ident_options )?
| ( 'ABORT' | 'STOP' ) stop_argument_list?
| 'ASSIGN' resultant 'TO' 'SYSTEM' '(' resultant ')'
| 'BREAK' ( 'ON' | 'OFF' | resultant )?
| BFUNC opt_func_mat_arg_list
| 'CALLC' '@'? ( CFUNC | Identifier ) opt_func_mat_arg_list
| 'CALLJ' resultant ',' resultant ',' resultant ( 'RETURNING' | 'SETTING' ) Identifier ( 'ON' 'ERROR' cond_stats )?
| CALLdotNET resultant ',' resultant ',' resultant ( 'RETURNING' | 'SETTING' ) Identifier ( 'ON' 'ERROR' cond_stats )?
| 'CALL' ( '(' mat_argument_list ')' )?
| ( ( 'CHANGE' | 'EREPLACE' ) | 'SWAP' ) resultant ( 'TO' | 'WITH' ) resultant 'IN' ident_options opt_dyns
| 'CLEAR'
| 'CLEARCOMMON' opt_namedcommon_name
| 'CLEARDATA'
| 'CLEARFILE' ident_options? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )?
| 'CLEARSELECT' ( 'ALL' | opt_sel_list1 )
| ( 'COM' | 'COMMON' ) opt_common_name common_identifier_list
| 'CONVERT' resultant 'TO' resultant 'IN' ident_options opt_dyns
| ( 'CRT' | 'DISPLAY' ) multiple_print_arg?
| 'DATA' collect_mult_arg_list?
| 'DEBUG'
| ( 'DELETE' | 'DELETEU' ) nocollect_mult_arg_list? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )?
| ( 'DIM' | 'DIMENSION' ) dimvar_list
| 'ENTER'
| 'EXEC' 'SQL' sql_stats
| exec_perf resultant optional_exec_stuff?
| 'EXIT' ( '(' resultant ')' )?
| 'GET' '(' ( 'ARG.' ( ',' resultant )? ')' ident_options ( null_cond_body_p1 ( 'ELSE' cond_stats )? )?
| 'MSG.' ( ',' resultant )? ')' ident_options cond_body_p1 ( 'ELSE' cond_stats )?
)
| ( 'GET' | 'GETX' ) ident_options ( ',' resultant )? ( ( 'RETURNING' | 'SETTING' ) ident_options )? 'FROM' resultant ( 'UNTIL' resultant )? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'WAITING' resultant )? cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'SEND' | 'SENDX' ) resultant 'TO' resultant cond_body_p1 ( 'ELSE' cond_stats )?
| 'GOSUB' Label ':'?
| ( 'GO' | 'GOTO' ) Label ':'?
| 'IN' ident_options_or_attype optional_time
| 'INPUT' ( cursorpos ':'? )? ident_options_or_attype optional_input_limit optional_input_colon ( 'WITH' resultant )? Constant? optional_time
| 'TA' 'CLEAR'
| ( 'CLEARINPUT' | 'INPUTCLEAR' )
| ( 'ECHO' | 'HUSH' ) ( 'ON' | 'OFF' | resultant )
| ( 'GARBAGECOLLECT' | 'NULL' )
| 'LOCK' resultant ( null_cond_body_p1 ( 'ELSE' cond_stats )? )?
| 'MATBUILD' ident_options 'FROM' ident_options opt_matbp_start_end opt_matbp_delimiter
| 'MATPARSE' ident_options opt_matbp_start_end 'FROM' resultant opt_matbp_delimiter ( ( 'RETURNING' | 'SETTING' ) ident_options )?
| ( 'MATREAD' | 'MATREADU' | 'MATREADL' ) ident_options 'FROM' file_specifier ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'MATWRITE' | 'MATWRITEU' ) ident_options ( 'ON' | 'TO' ) file_specifier ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )?
| ( 'NOBUF' | 'FLUSH' ) resultant? ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( null_cond_body_p1 ( 'ELSE' cond_stats )? )?
| 'ON' resultant ( 'GOSUB' gosub_label_list | ( 'GO' | 'GOTO' ) goto_label_list )
| 'INPUTTRAP' resultant ( 'GOSUB' gosub_label_list | ( 'GO' | 'GOTO' ) goto_label_list )
| 'PAGE' opt_on resultant?
| 'PRINT' ( 'ON' simple_print_expression )? multiple_print_arg?
| 'PRINTERR' resultant ( 'FROM' resultant )?
| 'PRINTER' ptr_on_off_reset_close opt_on
| 'PROCREAD' ident_options cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'RECORDLOCKU' | 'RECORDLOCKL' ) file_specifier ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )?
| read_statement ident_options_or_attype 'FROM' file_specifier ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'WAITING' resultant )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'READV' | 'READVU' | 'READVL' ) ident_options_or_attype 'FROM' attr_file_specifier ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )? sw_cond_body_p1 ( 'ELSE' cond_stats )?
| 'RELEASE' nocollect_mult_arg_list? error_cond_body?
| 'RETURN' ( 'TO' Label ':'? | resultant | '(' resultant? ')' )?
| 'SEEK' resultant ( ',' resultant )? ( ',' resultant )? ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| ( ( 'SUB' | 'SUBROUTINE' ) | 'FUNCTION' ) ( '(' ident_list ')' )?
| 'TRANSABORT' collect_mult_arg_list? cond_body_p1 ( 'ELSE' cond_stats )?
| 'TRANSTART' sync_resultant cond_body_p1 ( 'ELSE' cond_stats )?
| 'TRANSEND' collect_mult_arg_list? cond_body_p1 ( 'ELSE' cond_stats )?
| 'TTYCTL' resultant ',' resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'TTYGET' ident_options 'FROM' filevar_or_lptr_or_mtu ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'TTYSET' resultant 'ON' filevar_or_lptr_or_mtu ( ( 'RETURNING' | 'SETTING' ) ident_options )? cond_body_p1 ( 'ELSE' cond_stats )?
| 'TIMEOUT' resultant ',' resultant
| 'WEOF' opt_mtu ( ( 'ON' | 'FROM' ) resultant )? cond_body_p1 ( 'ELSE' cond_stats )?
| write_statement resultant ( 'ON' | 'TO' ) file_specifier ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )?
| 'WRITELIST' resultant ( 'ON' | 'TO' ) resultant ( ( 'RETURNING' | 'SETTING' ) ident_options )? error_cond_body?
| ( 'WRITET' | 'WRITETX' ) opt_mtu resultant ( ( 'ON' | 'FROM' ) resultant )? cond_body_p1 ( 'ELSE' cond_stats )?
| ( 'WRITEV' | 'WRITEVU' ) resultant ( 'ON' | 'TO' ) attr_file_specifier ( ( 'RETURNING' | 'SETTING' ) ident_options )? ( 'ON' 'ERROR' cond_stats )? ( 'LOCKED' cond_stats )?statement
: '@' Identifier {} '=' {} resultant
| PROGRAM
| program_label
| Identifier {} matrix_assign_list ident_assignments
| PP ident_options
| MM ident_options
| mat_statement JAC_MAT Identifier
| mat_statement resultant
| case_structure
| CONTINUE
| DEFB Identifier '(' {} ')'
| func_declarator opt_static_decl c_func_type func_ident '(' {} opt_c_var_list ')'
| DECLARE FUNCTION funcname
| DECLARE SUBROUTINE
| basic_declarator func_ident {} '(' {} opt_b_var_list ')'
| DEL {} ident_options LOC_SDYN {} nocollect_argument_list end_dyn
| CFUNC '(' {} opt_nocollect_argument_list ')'
| FILELOCK opt_select_fdsc opt_param opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause
| FILEUNLOCK opt_select_fdsc {} opt_cond_body
| FIND {} resultant IN resultant opt_param SETTING ident_options opt_identifier opt_identifier {} cond_body_p1 cond_body_p2
| FINDSTR {} resultant IN resultant opt_param SETTING ident_options opt_identifier opt_identifier {} cond_body_p1 cond_body_p2
| FOOTING opt_on resultant
| FOR Identifier {} for_mat_assign_list '=' {} resultant TO resultant optional_step {} statements_and_opt_while_until_body NEXT opt_next_var
| GROUPSTORE resultant IN ident_options USING resultant ',' resultant opt_param
| heading_type opt_on resultant
| IF resultant {} cond_body_p1 cond_body_p2
| INS resultant BEFORE ident_options SDYN {} nocollect_argument_list end_dyn
| loc_stat {} resultant IN {} resultant opt_loc_dyns {} opt_param opt_by_seq SETTING ident_options {} cond_body_p1 cond_body_p2
| loc_stat LP {} nocollect_argument_list ';' ident_options opt_seq rp {} cond_body_p1 cond_body_p2
| LOOP {} opt_single_line_statements statements_and_opt_while_until_body REPEAT
| CLOSE ident_options {} opt_cond_body
| CLOSE ident_options ',' {} close_identifier_list
| OBJEXCBACK ident_options ',' ident_options {} cond_body_p1 cond_body_p2
| OPEN {} collect_argument_list {} opt_open_fdsc opt_io_setting {} opt_sw_onerror_clause sw_cond_body_p1 sw_cond_body_p2
| OPENINDEX resultant ',' resultant TO ident_options opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause sw_cond_body_p1 sw_cond_body_p2
| OPENSEQ opt_existing opt_append {} collect_argument_list {} opt_readonly TO ident_options opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause sw_cond_body_p1 sw_cond_body_p2
| OPENSER {} collect_argument_list {} TO ident_options opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause sw_cond_body_p1 sw_cond_body_p2
| PAUSE optional_pause
| CREATE resultant opt_io_setting {} cond_body_p1 cond_body_p2
| RANDOMIZE
| RANDOMIZE '(' rp
| RANDOMIZE '(' resultant rp
| READSEQ ident_options_or_attype FROM resultant opt_io_setting {} opt_sw_onerror_clause sw_cond_body_p1 sw_cond_body_p2
| OSREAD ident_options_or_attype FROM resultant opt_io_setting {} opt_sw_onerror_clause sw_cond_body_p1 sw_cond_body_p2
| OSBREAD ident_options_or_attype FROM resultant {} AT resultant JAC_LENGTH resultant opt_io_setting {} opt_cond_body
| OSBWRITE resultant on_or_to resultant AT resultant opt_io_setting {} opt_cond_body
| READBLK ident_options_or_attype FROM resultant ',' resultant opt_io_setting {} cond_body_p1 cond_body_p2
| WRITEBLK resultant on_or_to resultant opt_io_setting {} cond_body_p1 cond_body_p2
| writeseq_type resultant opt_append on_or_to ident_options opt_io_setting {} opt_sw_onerror_clause sw_cond_body_p1 sw_cond_body_p2
| OSWRITE resultant opt_append on_or_to resultant opt_io_setting {} opt_sw_onerror_clause
| WAKE resultant
| WEOFSEQ ident_options opt_io_setting {} opt_sw_onerror_clause opt_null_sw_cond_body
| CLOSESEQ ident_options {} opt_cond_body
| DELETESEQ {} collect_argument_list {} opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause sw_cond_body_p1 sw_cond_body_p2
| OSDELETE resultant opt_io_setting {} opt_sw_onerror_clause
| READLIST ident_options optional_from opt_matbp_setting {} cond_body_p1 cond_body_p2
| STATUS ident_options FROM resultant opt_io_setting {} cond_body_p1 cond_body_p2
| FORMLIST resultant opt_select_to opt_setting
| GETLIST resultant opt_select_to opt_matbp_setting {} cond_body_p1 cond_body_p2
| opt_read_next_or_prev opt_key ident_options_or_attype opt_identifier opt_identifier optional_from opt_io_setting {} opt_sw_onerror_clause sw_cond_body_p1 sw_cond_body_p2
| opt_readt opt_mtu ident_options opt_tape_channel {} cond_body_p1 cond_body_p2
| REMOVE ident_options_or_attype FROM ident_options_or_attype opt_remove_at SETTING ident_options
| REWIND opt_mtu opt_tape_channel {} cond_body_p1 cond_body_p2
| SELECT opt_select_fdsc opt_select_to opt_setting {} opt_cond_body
| SELECT opt_select_fdsc opt_select_to opt_setting ATKEY {} nocollect_argument_list {} opt_cond_body
| sselect_or_sselectn_or_sselectv opt_select_fdsc opt_select_to opt_setting {} opt_cond_body
| SELECTE opt_select_to opt_setting
| SELECTINDEX resultant opt_param FROM ident_options opt_select_to opt_setting
| opt_sleep optional_sleep
| FUNC_ARGS1 resultant
| ABORT {} opt_stop_argument_list
| ASSIGNED resultant TO SYSTEM '(' resultant rp
| BREAK
| BREAK ON
| BREAK OFF
| BREAK resultant
| BFUNC {} opt_func_mat_arg_list
| CALLC opt_at CFUNC_or_Identifier {} opt_func_mat_arg_list
| CALLJ resultant ',' resultant ',' resultant {} SETTING Identifier {} opt_sw_onerror_clause
| CALLdotNET resultant ',' resultant ',' resultant {} SETTING Identifier {} opt_sw_onerror_clause
| CALL {} opt_mat_arg_list
| CHAIN resultant
| change_or_swap resultant to_or_with resultant IN ident_options opt_dyns
| CLEAR
| CLEARCOMMON {} opt_namedcommon_name
| CLEARDATA
| CLEARFILE opt_clearf_fdsc opt_setting {} opt_sw_onerror_clause opt_sw_locked_clause
| CLEARSELECT ALL
| CLEARSELECT opt_sel_list1
| COMMON {} opt_common_name common_identifier_list
| CONVERT resultant TO resultant IN ident_options opt_dyns
| CRT {} optional_prints
| DATA {} collect_argument_list
| JAC_DEBUG
| DELETELIST resultant
| delete_statement {} nocollect_argument_list opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause
| DIM {} dimvar_list
| ENTER
| sql_prefix sql_stats
| exec_perf resultant {} optional_exec_options
| EXIT
| EXIT '(' resultant ')'
| GET '(' JAC_ARG opt_param ')' ident_options {} opt_null_cond_body
| GET '(' JAC_MSG opt_param ')' ident_options {} cond_body_p1 cond_body_p2
| get_getx ident_options opt_get_length opt_setting FROM resultant opt_until opt_returning opt_waiting {} cond_body_p1 cond_body_p2
| send_sendx {} resultant TO {} resultant {} cond_body_p1 cond_body_p2
| GOSUB {} Label_opt_colon
| GOTO {} Label_opt_colon
| IN ident_options_or_attype {} optional_time
| INPUT optional_curpos ident_options_or_attype {} optional_input_limit optional_input_colon optional_input_with optional_input_mask {} optional_time
| TA CLEAR
| INPUTCLEAR
| echo_or_hush ON
| echo_or_hush OFF
| echo_or_hush resultant
| JAC_NULL
| LOCK resultant {} opt_null_cond_body
| MATBUILD ident_options FROM {} ident_options {} opt_matbp_start_end opt_matbp_delimiter
| MATPARSE {} ident_options {} opt_matbp_start_end FROM resultant opt_matbp_delimiter opt_matbp_setting
| matread_statement {} ident_options {} FROM file_specifier opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause sw_cond_body_p1 sw_cond_body_p2
| matwrite_statement {} ident_options {} on_or_to file_specifier opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause
| nobuf_or_flush opt_resultant opt_io_setting {} opt_null_cond_body
| ON resultant GOSUB {} gosub_label_list
| ON resultant GOTO {} goto_label_list
| INPUTTRAP resultant GOSUB {} gosub_label_list
| INPUTTRAP resultant GOTO {} goto_label_list
| OUT resultant
| PAGE opt_on opt_gen_resultant
| PRECISION resultant
| PRINT {} opt_print_on optional_prints
| PRINTERR resultant optional_from
| PRINTER ptr_on_off_reset_close opt_on
| PROCREAD ident_options {} cond_body_p1 cond_body_p2
| PROCWRITE resultant
| recordlock_statement file_specifier opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause
| read_statement ident_options_or_attype FROM file_specifier opt_io_setting opt_sw_wait_clause {} opt_sw_onerror_clause opt_sw_locked_clause sw_cond_body_p1 sw_cond_body_p2
| readv_statement ident_options_or_attype FROM attr_file_specifier opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause sw_cond_body_p1 sw_cond_body_p2
| RELEASE {} opt_nocollect_argument_list {} opt_cond_body
| RETURN
| RETURN TO {} Label_opt_colon
| RETURN resultant
| RETURN '(' opt_resultant rp
| STOP {} opt_stop_argument_list
| SEEK resultant opt_param opt_param opt_io_setting {} cond_body_p1 cond_body_p2
| function_or_subroutine {} opt_ident_list
| TRANSABORT {} opt_collect_argument_list {} cond_body_p1 cond_body_p2
| TRANSTART sync_resultant {} cond_body_p1 cond_body_p2
| TRANSEND {} opt_collect_argument_list {} cond_body_p1 cond_body_p2
| TTYCTL resultant ',' resultant opt_io_setting {} cond_body_p1 cond_body_p2
| TTYGET ident_options {} FROM filevar_or_lptr_or_mtu opt_io_setting {} cond_body_p1 cond_body_p2
| TTYSET resultant {} ON filevar_or_lptr_or_mtu opt_io_setting {} cond_body_p1 cond_body_p2
| TIMEOUT resultant ',' resultant
| UNLOCK
| UNLOCK resultant
| JAC_WEOF opt_mtu opt_tape_channel {} cond_body_p1 cond_body_p2
| write_statement resultant on_or_to file_specifier opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause
| WRITELIST resultant on_or_to resultant opt_io_setting {} opt_cond_body
| opt_writet opt_mtu resultant opt_tape_channel {} cond_body_p1 cond_body_p2
| writev_statement resultant on_or_to attr_file_specifier opt_io_setting {} opt_sw_onerror_clause opt_sw_locked_clause
| RTNDATA resultant
| COLLECTDATA ident_options
;resultant
::= ( '@' ( Identifier | 'DATA' | 'SENTENCE' | FUNC_PARM0 )
| ( '-' | '+' ) resultant
| cursorpos
| 'BITLOAD' '(' nocollect_mult_arg_list? ')'
| 'CALLC' '@'? ( CFUNC | Identifier ) opt_func_mat_arg_list
| BFUNC opt_func_mat_arg_list
| CFUNC '(' nocollect_mult_arg_list? ')'
| ( ( 'CHANGE' | 'EREPLACE' ) | 'SWAP' ) '(' nocollect_mult_arg_list? ')'
| ( 'KEYIN' | 'IN' ) '(' ')'
| 'CHAR' '(' resultant ')'
| 'COMPARE' '(' nocollect_mult_arg_list? ')'
| 'CONTROLCHAR' '(' nocollect_mult_arg_list? ')'
| 'CONVERT' '(' nocollect_mult_arg_list? ')'
| 'DELETE' '(' nocollect_mult_arg_list? ')'
| 'GETENV' '(' resultant ( ',' ident_options )? ')'
| 'EXTRACT' '(' nocollect_mult_arg_list? ')'
| 'CRC' '(' nocollect_mult_arg_list? ')'
| 'DROUND' '(' resultant ( ',' resultant )? ')'
| 'FFIX' '(' resultant ( ',' resultant )? ')'
| ( 'FIELD' | 'FIELDS' ) '(' nocollect_mult_arg_list? ')'
| 'TA' '(' resultant ')'
| FUNC_PARM1 '(' resultant ')'
| FUNC_PARM2 '(' resultant ',' resultant ')'
| FUNC_PARM3 '(' nocollect_mult_arg_list? ')'
| FUNC_PARM0 '(' ')'
| 'SELECTINFO' '(' nocollect_mult_arg_list? ')'
| 'ERRTEXT' '(' resultant ( ',' stop_argument_list )? ')'
| 'GETCWD' '(' ident_options ')'
| 'GROUP' '(' nocollect_mult_arg_list? ')'
| 'INDICES' '(' ident_options ( ',' resultant )? ')'
| 'INMAT' '(' nocollect_mult_arg_list? ')'
| 'INSERT' '(' nocollect_mult_arg_list? ( ';' resultant )? ')'
| 'INT' '(' resultant ')'
| 'JQLCOMPILE' '(' resultant ',' resultant ',' resultant ',' ident_options ')'
| 'JQLGETPROPERTY' '(' ident_options ',' ident_options ',' resultant ',' resultant ')'
| 'JQLPUTPROPERTY' '(' resultant ',' ident_options ',' resultant ',' resultant ')'
| 'JQLEXECUTE' '(' ident_options ',' ident_options ')'
| 'JQLFETCH' '(' ident_options ',' ident_options ',' ident_options ')'
| xml_type '(' resultant ',' resultant ( ',' ident_options )? ')'
| 'VALIDATE_PRODUCT_LICENSE' '(' resultant ')'
| 'VALIDATE_METRICS_LICENSE' '(' resultant ')'
| 'CONSUME_METRICS_LICENSE' '(' resultant ',' resultant ')'
| 'PERROR' '(' resultant ')'
| ( 'READNEXT' | 'READPREV' ) 'KEY'? ident_options_or_attype ( ',' ident_options )? ( ',' ident_options )? ( 'FROM' resultant )? ( ( 'RETURNING' | 'SETTING' ) ident_options )?
| 'REPLACE' '(' nocollect_mult_arg_list? ( ';' resultant )? ')'
| opt_str_math '(' nocollect_mult_arg_list? ')'
| 'SENTENCE' '(' resultant? ')'
| 'SPOOLER' '(' nocollect_mult_arg_list? ')'
| 'SYSTEM' '(' resultant ')'
| ( 'TRANS' | 'XLATE' ) '(' nocollect_mult_arg_list? ')'
| 'TRIM' '(' nocollect_mult_arg_list? ')'
| dynamic_reference
| ( 'FMT' | 'FMTS' ) '(' resultant ',' resultant ')'
| 'STATUS' '(' ')'
| 'REMOVE' '(' resultant ',' ident_options ')'
| ( '++' | '--' ) ident_options
| post_ident_expressions
| Constant
| '(' resultant ')'
| 'IF' resultant 'THEN' resultant 'ELSE' resultant
) ( ( '+' | '^' | '-' | '/' | '*' | '=' | '<' | '>=' | '<=' | '#' | 'AND' | 'OR' | ( 'MATCH' | 'MATCHES' ) ) resultant
| ':' resultant?
| '[' resultant ( ',' resultant ( ',' resultant )? )? ']'
| '>' '='? resultant
| format_options
)*resultant
: '@' Identifier
| '@' DATA
| '@' SENTENCE
| '@' FUNC_PARM0
| '-' resultant
| '+' resultant
| resultant '+' resultant
| resultant '^' resultant
| resultant '-' resultant
| resultant '/' resultant
| resultant '*' resultant
| resultant ':' resultant
| resultant ':'
| resultant EQ resultant
| resultant '=' resultant
| resultant '[' resultant rsq
| resultant '[' resultant ',' resultant rsq
| resultant '[' resultant ',' resultant ',' resultant rsq
| resultant GT resultant
| resultant GT EQ resultant
| resultant LT resultant
| resultant GE resultant
| resultant LE resultant
| resultant NE resultant
| resultant AND resultant
| cursorpos
| resultant OR resultant
| BITLOAD '(' {} opt_nocollect_argument_list rp
| CALLC opt_at CFUNC_or_Identifier {} opt_func_mat_arg_list
| BFUNC {} opt_func_mat_arg_list
| CFUNC '(' {} opt_nocollect_argument_list ')'
| change_or_swap '(' {} nocollect_argument_list rp
| keyin_or_in '(' rp
| CHAR '(' resultant ')'
| COMPARE {} '(' nocollect_argument_list rp
| CONTROLCHAR '(' {} nocollect_argument_list rp
| CONVERT '(' {} nocollect_argument_list rp
| DELETE {} '(' nocollect_argument_list rp
| GETENV '(' resultant rp
| GETENV '(' resultant ',' ident_options rp
| EXTRACT '(' {} nocollect_argument_list rp
| CRC {} '(' nocollect_argument_list rp
| DROUND '(' resultant opt_param rp
| FFIX '(' resultant opt_param rp
| field_type '(' {} nocollect_argument_list rp
| TA '(' resultant rp
| FUNC_PARM1 '(' resultant rp
| FUNC_PARM2 '(' resultant ',' resultant rp
| FUNC_PARM3 '(' {} nocollect_argument_list rp
| FUNC_PARM0 '(' rp
| SELECTINFO '(' {} nocollect_argument_list rp
| ERRTEXT '(' resultant {} opt_err_argument_list rp
| GETCWD '(' ident_options rp
| GROUP '(' {} nocollect_argument_list rp
| INDICES '(' ident_options opt_param ')'
| INMAT '(' {} opt_nocollect_argument_list rp
| INSERT {} '(' nocollect_argument_list insert_delims rp
| JAC_INT '(' resultant rp
| JQLCOMPILE '(' resultant ',' resultant ',' resultant ',' ident_options rp
| JQLGETPROPERTY '(' ident_options ',' ident_options ',' resultant ',' resultant rp
| JQLPUTPROPERTY '(' resultant ',' ident_options ',' resultant ',' resultant rp
| JQLEXECUTE '(' ident_options ',' ident_options rp
| JQLFETCH '(' ident_options ',' ident_options ',' ident_options rp
| xml_type '(' resultant ',' resultant rp
| xml_type '(' resultant ',' resultant ',' ident_options rp
| VALIDATE_PRODUCT_LICENSE '(' resultant rp
| VALIDATE_METRICS_LICENSE '(' resultant rp
| CONSUME_METRICS_LICENSE '(' resultant ',' resultant rp
| PERROR '(' resultant rp
| resultant MATCHES resultant
| opt_read_next_or_prev opt_key ident_options_or_attype opt_identifier opt_identifier optional_from opt_io_setting
| REPLACE {} '(' nocollect_argument_list insert_delims rp
| opt_str_math '(' {} nocollect_argument_list rp
| SENTENCE '(' rp
| SENTENCE '(' resultant rp
| SPOOLER {} '(' nocollect_argument_list rp
| SYSTEM '(' resultant rp
| TRANS '(' {} nocollect_argument_list rp
| TRIM {} '(' nocollect_argument_list rp
| dynamic_reference
| fmt_type '(' resultant ',' resultant ')'
| STATUS '(' rp
| REMOVE '(' resultant ',' ident_options rp
| resultant format_options %prec Identifier
| PP ident_options
| MM ident_options
| post_ident_expressions
| Constant
| '(' resultant rp
| IF resultant THEN resultant ELSE resultant
;section ::= statements opt_end_prog
section
: statements opt_end_prog
;st_parameter_list ::= resultant ( ',' resultant )*st_parameter_list
: resultant
| st_parameter_list ',' resultant
;ident_assignments ::= '++' | '--' | assign_options assign_operators resultant
ident_assignments
: PP
| MM
| assign_options assign_operators {} resultant
;ident_options ::= Identifier '(' ex_parameter_list ')' | Identifier
ident_options
: mat_extract ex_parameter_list rp
| Identifier
;mat_statement ::= 'MAT' Identifier '='
mat_statement
: JAC_MAT Identifier {} '='
;case_structure ::= 'BEGIN' 'CASE' statement_separator cases 'END' 'CASE'
case_structure
: JAC_BEGIN CASE statement_separator cases {} JAC_END CASE
;c_func_types ::= 'INT' | 'FLOAT' | 'VAR' | 'STRING'
c_func_types
: JAC_INT
| JAC_FLOAT
| JAC_VAR
| JAC_STRING
;c_var_list ::= c_func_types ( ',' c_func_types )*c_var_list
: c_func_types
| c_var_list ',' c_func_types
;funcname ::= Identifier ( ',' Identifier )*
funcname
: Identifier
| funcname ',' Identifier
;b_var_list ::= ( Identifier | 'MAT' Identifier ) ( ',' ( Identifier | 'MAT' Identifier ) )*
b_var_list
: b_func_types
| b_var_list ',' b_func_types
;nocollect_mult_arg_list ::= resultant ( ',' resultant )*nocollect_mult_arg_list
: resultant
| nocollect_mult_arg_list ',' resultant
;cond_stats ::= statements 'END' | single_line_statementscond_stats
: statements JAC_END
| single_line_statements
;error_cond_body ::= 'ON' 'ERROR' cond_stats
error_cond_body
: ON ERROR {} cond_stats
;cond_body_p1 ::= 'THEN' cond_stats | 'THEN'? 'ELSE' cond_stats
cond_body_p1
: THEN {} cond_stats
| opt_dummy_then ELSE {} cond_stats
;opt_on ::= ( 'ON' ( Constant | ident_options ) )?
opt_on
: ON Constant
| ON ident_options
|
;statements_and_opt_while_until_body
::= statements ( while_until 'DO'? stat_body )? ( while_until 'DO'? stat_body )?*statements_and_opt_while_until_body
: statements opt_while_until_body
| statements_and_opt_while_until_body opt_while_until_body
;opt_loc_dyns ::= ( '<' resultant ( ',' resultant )? ( ',' resultant )? '>' )?
opt_loc_dyns
: LOC_SDYN {} resultant opt_param opt_param end_dyn
|
;single_line_statements ::= statement ( ';' statement? )*single_line_statements
: statement
| single_line_statements stat_sep
| single_line_statements stat_sep statement
;close_identifier_list ::= ident_options ( ',' ident_options )*close_identifier_list
: ident_options
| close_identifier_list ',' ident_options
;collect_mult_arg_list ::= resultant ( ',' resultant )*collect_mult_arg_list
: resultant
| collect_mult_arg_list ',' resultant
;sw_cond_body_p1 ::= 'THEN' cond_stats | 'THEN'? 'ELSE' cond_stats
sw_cond_body_p1
: THEN {} cond_stats
| opt_dummy_then ELSE {} cond_stats
;ident_options_or_attype ::= ident_options | '@' Identifier
ident_options_or_attype
: ident_options
| '@' Identifier
;null_sw_cond_body_p1 ::= ( 'THEN' | 'ELSE' ) cond_stats
null_sw_cond_body_p1
: THEN {} cond_stats
| ELSE {} cond_stats
;opt_select_to ::= ( 'TO' ( ident_options | Constant ) )?
opt_select_to
:
| TO ident_options
| TO Constant
;opt_mtu ::= ( 'UNIT' '(' resultant ')' )?
opt_mtu
:
| UNIT '(' resultant ')'
;stop_argument_list ::= resultant ( ',' resultant )*stop_argument_list
: resultant
| stop_argument_list ',' resultant
;opt_func_mat_arg_list ::= '(' opt_func_mat_argument_list ')'
opt_func_mat_arg_list
: LP {} opt_func_mat_argument_list ')'
;mat_argument_list ::= matrix_arg ( ',' matrix_arg )*mat_argument_list
: matrix_arg
| mat_argument_list ',' matrix_arg
;opt_dyns ::= ( '<' resultant ( ',' resultant )? ( ',' resultant )? '>' )?
opt_dyns
: SDYN resultant opt_param opt_param end_dyn
|
;opt_namedcommon_name ::= ( '/' Constant '/' )?
opt_namedcommon_name
: '/' {} Constant {} '/'
|
;opt_sel_list1 ::= ( ident_options | Constant )?opt_sel_list1
: ident_options
|
| Constant
;opt_common_name ::= ( '/' Constant '/' )?
opt_common_name
: '/' {} Constant {} '/'
|
;common_identifier_list ::= common_identifier ( ',' common_identifier )*common_identifier_list
: common_identifier
| common_identifier_list ',' common_identifier
;multiple_print_arg ::= print_arg+
multiple_print_arg
: print_arg
| multiple_print_arg print_arg
;dimvar_list ::= dimvar ( ',' dimvar )*dimvar_list
: dimvar
| dimvar_list ',' dimvar
;sql_stats
::= ( 'DECLARE' Identifier 'TABLE' '(' sql_tabdefs ')' ';'
| 'BEGIN' 'DECLARE' 'SECTION' ';' sql_declarations 'EXEC' 'SQL' 'END' 'DECLARE' 'SECTION' ';'
| ';'
)?sql_stats
: DECLARE Identifier TABLE '(' {} sql_tabdefs ')' ';'
| JAC_BEGIN DECLARE SECTION ';' {} sql_declarations sql_prefix JAC_END DECLARE SECTION ';'
| ';'
|
;exec_perf ::= 'EXECUTE' | 'PERFORM' | 'PCPERFORM' | 'MDPERFORM' | 'UDTEXECUTE' | 'EXEC'
exec_perf
: EXECUTE
| PERFORM
| PCPERFORM
| MDPERFORM
| UDTEXECUTE
| EXEC
;optional_exec_stuff ::= optional_exec_stats+
optional_exec_stuff
: optional_exec_stats
| optional_exec_stuff optional_exec_stats
;null_cond_body_p1 ::= ( 'THEN' | 'ELSE' ) cond_stats
null_cond_body_p1
: THEN {} cond_stats
| ELSE {} cond_stats
;optional_time
::= ( 'UNFILTERED'
| ( 'FOR' | 'WAITING' ) resultant 'UNFILTERED'? cond_body_p1 ( 'ELSE' cond_stats )?
)?optional_time
: opt_unfiltered
| for_or_waiting resultant opt_unfiltered {} cond_body_p1 cond_body_p2
;cursorpos ::= 'POSCUR' '(' nocollect_mult_arg_list? ')'
cursorpos
: POSCUR '(' {} nocollect_argument_list rp
;optional_input_limit ::= ( ',' resultant ( ',' resultant )? )?
optional_input_limit
:
| ',' resultant
| ',' resultant ',' resultant
;optional_input_colon ::= ( ':' '_'? | '_' ':'? )?
optional_input_colon
:
| ':'
| '_'
| '_' ':'
| ':' '_'
;opt_matbp_start_end ::= ( ',' resultant ( ',' resultant )? )?
opt_matbp_start_end
:
| ',' resultant
| ',' resultant ',' resultant
;opt_matbp_delimiter ::= ( ( 'USING' | ',' ) resultant )?
opt_matbp_delimiter
:
| USING resultant
| ',' resultant
;file_specifier ::= resultant | ident_options ',' resultantfile_specifier
: resultant
| ident_options ',' resultant
;gosub_label_list ::= Label ':'? ( ',' Label ':'? )*
gosub_label_list
: Label_opt_colon
| gosub_label_list ',' {} Label_opt_colon
;goto_label_list ::= Label ':'? ( ',' Label ':'? )*
goto_label_list
: Label_opt_colon
| goto_label_list ',' {} Label_opt_colon
;simple_print_expression
::= ( Constant | '(' resultant ')' | ident_options ) ( ( '+' | '-' ) simple_print_expression )*simple_print_expression
: Constant
| '(' resultant ')'
| ident_options
| simple_print_expression '+' simple_print_expression
| simple_print_expression '-' simple_print_expression
;ptr_on_off_reset_close ::= 'ON' | 'OFF' | 'RESET' | 'CLOSE'
ptr_on_off_reset_close
: ON
| OFF
| RESET
| CLOSE
;read_statement ::= 'READ' | 'READU' | 'READL' | 'READX' | 'READXU' | 'READXL' | 'READXML' | 'READXMLU'
read_statement
: READ
| READU
| READL
| READX
| READXU
| READXL
| READXML
| READXMLU
;attr_file_specifier ::= nocollect_mult_arg_list?
attr_file_specifier
: {} nocollect_argument_list
;ident_list ::= ( Identifier | 'MAT' Identifier ) ( ',' 'MAT'? Identifier )*
ident_list
: Identifier
| ident_list ',' Identifier
| JAC_MAT Identifier
| ident_list ',' JAC_MAT Identifier
;sync_resultant ::= ( 'SYNC' resultant? | resultant )?sync_resultant
: SYNC
| SYNC resultant
| resultant
|
;filevar_or_lptr_or_mtu ::= resultant | ( 'LPTR' | 'MTU' ) resultant
filevar_or_lptr_or_mtu
: resultant
| JAC_LPTR resultant
| MTU resultant
;write_statement ::= 'WRITE' | 'WRITEX' | 'WRITEU' | 'WRITEXU' | 'WRITEXML' | 'WRITEXMLU'
write_statement
: WRITE
| WRITEX
| WRITEU
| WRITEXU
| WRITEXML
| WRITEXMLU
;xml_type
::= 'DYNTOXML' | 'XMLTODYN' | 'XMLTOXML' | 'XML.ADD.TEXT' | 'XML.ADD.NODE' | 'XML.VALIDATE' | 'XML.GET.TAG.VALUE'xml_type
: DYNTOXML
| XMLTODYN
| XMLTOXML
| XMLADDTEXT
| XMLADDNODE
| XMLVALIDATE
| XMLGETTAGVALUE
;opt_str_math ::= 'SADD' | 'SSUB' | 'SDIV' | 'SMUL'
opt_str_math
: SADD
| SSUB
| SDIV
| SMUL
;dynamic_reference ::= resultant '<' nocollect_mult_arg_list? '>'
dynamic_reference
: resultant SDYN {} nocollect_argument_list end_dyn
;post_ident_expressions ::= ident_options ( '++' | '--' )?
post_ident_expressions
: ident_options
| ident_options PP
| ident_options MM
;format_options ::= Constant | ident_options | dynamic_var_referenceformat_options
: Constant
| ident_options
| dynamic_var_reference
;statements ::= ( statement_separator statement? )*
statements
: statements statement_separator statement
| statements statement_separator
| statements error EOL
|
;opt_end_prog ::= ( 'END' eols )? ( 'END' eols redundant_statements )*
opt_end_prog
:
| JAC_END eols
| opt_end_prog JAC_END {} eols redundant_statements
;assign_options ::= ( '<' nocollect_mult_arg_list? '>' )? ( '[' nocollect_mult_arg_list? ']' )?
assign_options
: attrib_assign_list substring_assign_list
;assign_operators ::= '=' | '+=' | '-=' | '*=' | '/=' | ':='
assign_operators
: '='
| PE
| ME
| TE
| DE
| CE
;ex_parameter_list ::= resultant ( ',' resultant )*ex_parameter_list
: resultant
| ex_parameter_list ',' resultant
;statement_separator ::= ( 'end of line' | ';' )+
statement_separator
: statement_separator new_line
| statement_separator stat_sep
| new_line
| stat_sep
;cases ::= ( 'CASE' resultant stat_body )? ( 'CASE' resultant stat_body )*
cases
:
| CASE resultant {} stat_body
| cases CASE resultant {} stat_body
| cases error
;while_until ::= ( 'WHILE' | 'UNTIL' ) resultant
while_until
: WHILE resultant
| UNTIL resultant
;stat_body ::= statements | single_line_statements
stat_body
: statements
| single_line_statements
;opt_func_mat_argument_list ::= ( matrix_arg | mat_argument_list ',' matrix_arg )?opt_func_mat_argument_list
:
| matrix_arg
| mat_argument_list ',' matrix_arg
;matrix_arg ::= resultant | 'MAT' Identifier
matrix_arg
: resultant
| matrix
;common_identifier ::= Identifier | dimvarcommon_identifier
: Identifier
| dimvar
;print_arg ::= ',' | resultantprint_arg
: ','
| resultant
;dimvar ::= Identifier '(' nocollect_mult_arg_list? ')'
dimvar
: Identifier '(' {} nocollect_argument_list rp
;sql_tabdefs ::= sql_tabfld ( ',' sql_tabfld )*sql_tabdefs
: sql_tabfld
| sql_tabdefs ',' {} sql_tabfld
;sql_declarations ::= sql_declare+
sql_declarations
: sql_declare
| sql_declarations sql_declare
;optional_exec_stats
::= ( 'CAPTURING' | ( 'RETURNING' | 'SETTING' ) | 'RTNDATA' ) ident_options
| 'PASSLIST' resultant?
| 'RTNLIST' opt_sel_list1
| 'PASSDATA' resultantoptional_exec_stats
: CAPTURING ident_options
| SETTING ident_options
| PASSLIST opt_sel_list2
| RTNLIST opt_sel_list1
| PASSDATA resultant
| RTNDATA ident_options
;dynamic_var_reference ::= ident_options '<' nocollect_mult_arg_list? '>'
dynamic_var_reference
: ident_options SDYN {} nocollect_argument_list end_dyn
;eols ::= 'end of line'+eols
: EOL
| eols EOL
;redundant_statements ::= statements
redundant_statements
: statements
;sql_tabfld ::= ( 'SMALLINT' | 'INT' | 'FLOAT' ) Identifier | 'STRING' '(' Constant ')' Identifier
sql_tabfld
: SMALLINT Identifier
| JAC_INT Identifier
| JAC_STRING '(' Constant ')' Identifier
| JAC_FLOAT Identifier
;sql_declare
::= 'SMALLINT' Identifier ';'
| 'INT' Identifier ';'
| 'FLOAT' Identifier ';'
| ( 'STRING' | 'BLOB' | 'VARCHAR' ) '(' Constant ')' Identifier ';'
| 'EXEC' 'SQL' 'VAR'sql_declare
: SMALLINT Identifier ';'
| JAC_INT Identifier ';'
| JAC_FLOAT Identifier ';'
| opt_sql_type '(' Constant ')' Identifier ';'
| sql_prefix JAC_VAR
;| Binds | Associativity | Tokens |
|---|---|---|
| 1 | right | ++ -- |
| 2 | left | ^ THEN ELSE |
| 3 | left | * / |
| 4 | left | + - |
| 6 | left | : |
| 7 | left | MATCH / MATCHES |
| 8 | left | >= <= > < |
| 9 | left | = # |
| 10 | left | OR AND |
| 11 | right | += -= *= /= := |