aboutsummaryrefslogtreecommitdiff
path: root/gcc/cobol/genapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cobol/genapi.h')
-rw-r--r--gcc/cobol/genapi.h71
1 files changed, 32 insertions, 39 deletions
diff --git a/gcc/cobol/genapi.h b/gcc/cobol/genapi.h
index 447b62e..36d947b 100644
--- a/gcc/cobol/genapi.h
+++ b/gcc/cobol/genapi.h
@@ -7,7 +7,7 @@
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
+ * * Redistributions in binary form must reproduce the above`
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
@@ -119,26 +119,26 @@ parser_divide(size_t nC, cbl_num_result_t *C,
void *compute_error = NULL); // This has to be cast to a tree pointer to int
void
-parser_add( struct cbl_refer_t tgt,
- struct cbl_refer_t a, struct cbl_refer_t b,
+parser_add( const cbl_refer_t& tgt,
+ const cbl_refer_t& a, const cbl_refer_t& b,
enum cbl_round_t = truncation_e );
void
-parser_subtract( struct cbl_refer_t tgt,
- struct cbl_refer_t a, struct cbl_refer_t b,
+parser_subtract( const cbl_refer_t& tgt,
+ const cbl_refer_t& a, const cbl_refer_t& b,
enum cbl_round_t = truncation_e );
void
-parser_multiply( struct cbl_refer_t tgt,
- struct cbl_refer_t a, struct cbl_refer_t b,
+parser_multiply( const cbl_refer_t& tgt,
+ const cbl_refer_t& a, const cbl_refer_t& b,
enum cbl_round_t = truncation_e );
void
-parser_divide( struct cbl_refer_t quotient,
- struct cbl_refer_t divisor,
- struct cbl_refer_t dividend,
+parser_divide( const cbl_refer_t& quotient,
+ const cbl_refer_t& divisor,
+ const cbl_refer_t& dividend,
enum cbl_round_t = truncation_e,
- struct cbl_refer_t remainder = cbl_refer_t());
+ const cbl_refer_t& remainder = cbl_refer_t());
// void
// parser_exponentiation( cbl_refer_t cref,
@@ -225,7 +225,7 @@ parser_perform_conditional_end( struct cbl_perform_tgt_t *tgt );
* For an in-line loop body, tgt->from.type == LblLoop, and tgt->to is NULL.
*/
void
-parser_perform( struct cbl_perform_tgt_t *tgt, struct cbl_refer_t N );
+parser_perform( const cbl_perform_tgt_t *tgt, cbl_refer_t N );
/*
* A simple UNTIL loop uses 1 varys element. For VARY loops, the
@@ -255,7 +255,7 @@ parser_end_program(const char *name=NULL);
void parser_sleep(cbl_refer_t seconds);
-void parser_exit( cbl_refer_t refer, ec_type_t = ec_none_e );
+void parser_exit( const cbl_refer_t& refer, ec_type_t = ec_none_e );
void parser_exit_section(void);
void parser_exit_paragraph(void);
void parser_exit_perform( struct cbl_perform_tgt_t *tgt, bool cycle );
@@ -297,7 +297,7 @@ void
parser_symbol_add(struct cbl_field_t *field);
void
-parser_initialize(struct cbl_refer_t refer, bool like_parser_symbol_add=false);
+parser_initialize(const cbl_refer_t& refer, bool like_parser_symbol_add=false);
void
parser_initialize_programs(size_t nprog, struct cbl_refer_t *progs);
@@ -315,7 +315,7 @@ void
parser_alter( cbl_perform_tgt_t *tgt );
void
-parser_set_conditional88( struct cbl_refer_t tgt, bool which_way );
+parser_set_conditional88( const cbl_refer_t& tgt, bool which_way );
void
parser_set_numeric(struct cbl_field_t *tgt, ssize_t value);
@@ -406,14 +406,12 @@ void
parser_sort(cbl_refer_t table,
bool duplicates,
cbl_alphabet_t *alphabet,
- size_t nkey,
- cbl_key_t *keys );
+ const std::vector<cbl_key_t>& keys );
void
parser_file_sort( cbl_file_t *file,
bool duplicates,
cbl_alphabet_t *alphabet,
- size_t nkey,
- cbl_key_t *keys,
+ const std::vector<cbl_key_t>& keys,
size_t ninput,
cbl_file_t **inputs,
size_t noutput,
@@ -423,8 +421,7 @@ parser_file_sort( cbl_file_t *file,
void
parser_file_merge( cbl_file_t *file,
cbl_alphabet_t *alphabet,
- size_t nkey,
- cbl_key_t *keys,
+ const std::vector<cbl_key_t>& keys,
size_t ninput,
cbl_file_t **inputs,
size_t noutput,
@@ -492,12 +489,12 @@ void
parser_string_overflow_end( cbl_label_t *name );
void
-parser_string( cbl_refer_t tgt,
- cbl_refer_t pointer,
- size_t nsource,
- cbl_string_src_t *sources,
- cbl_label_t *overflow,
- cbl_label_t *not_overflow );
+parser_string(const cbl_refer_t& tgt,
+ const cbl_refer_t& pointer,
+ size_t nsource,
+ cbl_string_src_t *sources,
+ cbl_label_t *overflow,
+ cbl_label_t *not_overflow );
void
parser_unstring( cbl_refer_t src,
@@ -518,13 +515,7 @@ void parser_return_atend( cbl_file_t *file );
void parser_return_notatend( cbl_file_t *file );
void parser_return_finish( cbl_file_t *file );
-void parser_exception_prepare( const cbl_name_t statement_name,
- const cbl_enabled_exceptions_array_t *enabled );
-
-//void parser_exception_condition( cbl_field_t *ec );
-
struct cbl_exception_file;
-struct cbl_exception_files_t;
void parser_exception_raise(ec_type_t ec);
@@ -533,10 +524,11 @@ void parser_call_exception_end( cbl_label_t *name );
//void parser_stash_exceptions(const cbl_enabled_exceptions_array_t *enabled);
-void parser_match_exception(cbl_field_t *index,
- cbl_field_t *blob);
+void parser_match_exception(cbl_field_t *index);
void parser_check_fatal_exception();
void parser_clear_exception();
+void parser_push_exception();
+void parser_pop_exception();
void parser_call_targets_dump();
size_t parser_call_target_update( size_t caller,
@@ -557,7 +549,7 @@ void parser_entry_activate( size_t iprog, const cbl_label_t *declarative );
void parser_entry( cbl_field_t *name,
size_t narg = 0, cbl_ffi_arg_t args[] = NULL);
-bool is_ascending_key(cbl_refer_t key);
+bool is_ascending_key(const cbl_refer_t& key);
void register_main_switch(const char *main_string);
@@ -569,8 +561,6 @@ void parser_print_long(const char *fmt, long N); // fmt needs to have a %ls in i
void parser_print_string(const char *ach);
void parser_print_string(const char *fmt, const char *ach); // fmt needs to have a %s in it
void parser_set_statement(const char *statement);
-void parser_set_handled(ec_type_t ec_handled);
-void parser_set_file_number(int file_number);
void parser_exception_clear();
void parser_init_list_size(int count_of_variables);
@@ -579,6 +569,9 @@ void parser_init_list();
tree file_static_variable(tree type, const char *name);
-void parser_statement_begin();
+void parser_statement_begin( const cbl_name_t name, tree ecs, tree dcls );
+
+tree parser_compile_ecs( const std::vector<uint64_t>& ecs );
+tree parser_compile_dcls( const std::vector<uint64_t>& dcls );
#endif