/*
   Copyright (C) 2022-2023 Free Software Foundation, Inc.
   Written by Simon Sobisch

   This file is part of GnuCOBOL.

   The GnuCOBOL runtime library is free software: you can redistribute it
   and/or modify it under the terms of the GNU Lesser General Public License
   as published by the Free Software Foundation, either version 3 of the
   License, or (at your option) any later version.

   GnuCOBOL is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GnuCOBOL.  If not, see <https://www.gnu.org/licenses/>.
*/

/* COB_STATEMENT (name, string representation)
   
   the order of these definitions may not change and new entries
   must always be added to the end, as those are used both as enums
   (cobc + libcob intern) _and_ as their integer values in generated
   modules: cob_trace_statement (STMT_ADD) -> cob_trace_statement (1)
*/

COB_STATEMENT (STMT_ADD, "ADD")
COB_STATEMENT (STMT_SUBTRACT, "SUBTRACT")
COB_STATEMENT (STMT_MULTIPLY, "MULTIPLY")
COB_STATEMENT (STMT_DIVIDE, "DIVIDE")
COB_STATEMENT (STMT_COMPUTE, "COMPUTE")

COB_STATEMENT (STMT_MOVE, "MOVE")
COB_STATEMENT (STMT_INITIALIZE, "INITIALIZE")

COB_STATEMENT (STMT_STRING, "STRING")
COB_STATEMENT (STMT_UNSTRING, "UNSTRING")

COB_STATEMENT (STMT_INSPECT, "INSPECT")
COB_STATEMENT (STMT_EXAMINE, "EXAMINE")
COB_STATEMENT (STMT_VALIDATE, "VALIDATE")

COB_STATEMENT (STMT_CONTINUE, "CONTINUE")
COB_STATEMENT (STMT_CONTINUE_AFTER, "CONTINUE AFTER")

COB_STATEMENT (STMT_ACCEPT, "ACCEPT")
COB_STATEMENT (STMT_DISPLAY, "DISPLAY")
COB_STATEMENT (STMT_EXHIBIT, "EXHIBIT")
COB_STATEMENT (STMT_STOP, "STOP")
COB_STATEMENT (STMT_STOP_ERROR, "STOP ERROR")

COB_STATEMENT (STMT_DISPLAY_WINDOW, "DISPLAY WINDOW")
COB_STATEMENT (STMT_INQUIRE, "INQUIRE")
COB_STATEMENT (STMT_DESTROY, "DESTROY")
COB_STATEMENT (STMT_MODIFY, "MODIFY")
COB_STATEMENT (STMT_CLOSE_WINDOW, "CLOSE WINDOW")

COB_STATEMENT (STMT_SEARCH, "SEARCH")
COB_STATEMENT (STMT_SEARCH_ALL, "SEARCH ALL")
COB_STATEMENT (STMT_SEARCH_VARYING, "SEARCH VARYING")
COB_STATEMENT (STMT_AT_END, "AT END")
COB_STATEMENT (STMT_NEXT_SENTENCE, "NEXT SENTENCE")

COB_STATEMENT (STMT_CALL, "CALL")
COB_STATEMENT (STMT_CANCEL, "CANCEL")
COB_STATEMENT (STMT_CHAIN, "CHAIN")

COB_STATEMENT (STMT_GOBACK, "GOBACK")
COB_STATEMENT (STMT_EXIT_PROGRAM, "EXIT PROGRAM")
COB_STATEMENT (STMT_EXIT_FUNCTION, "EXIT FUNCTION")
COB_STATEMENT (STMT_STOP_RUN, "STOP RUN")
COB_STATEMENT (STMT_STOP_THREAD, "STOP THREAD")
COB_STATEMENT (STMT_LOCK_THREAD, "LOCK THREAD")
COB_STATEMENT (STMT_WAITH_THREAD, "WAIT FOR THREAD")
COB_STATEMENT (STMT_RAISE, "RAISE")
COB_STATEMENT (STMT_RESUME, "RESUME")


/* COMMUNICATION SECTION */
COB_STATEMENT (STMT_DISABLE, "DISABLE")
COB_STATEMENT (STMT_ENABLE, "ENABLE")
COB_STATEMENT (STMT_PURGE, "PURGE")
COB_STATEMENT (STMT_SEND, "SEND")
COB_STATEMENT (STMT_RECEIVE, "RECEIVE")

COB_STATEMENT (STMT_END, "END")
COB_STATEMENT (STMT_NOTE, "NOTE")

COB_STATEMENT (STMT_PERFORM, "PERFORM")
COB_STATEMENT (STMT_UNTIL, "UNTIL")
COB_STATEMENT (STMT_VARYING, "VARYING")
COB_STATEMENT (STMT_EXIT_PERFORM, "EXIT PERFORM")
COB_STATEMENT (STMT_END_PERFORM, "END-PERFORM")

COB_STATEMENT (STMT_SET, "SET")
COB_STATEMENT (STMT_END_SET, "END-SET")	/* realia extension */

COB_STATEMENT (STMT_ENTER, "ENTER")

COB_STATEMENT (STMT_INVOKE, "INVOKE")
COB_STATEMENT (STMT_END_INVOKE, "END-INVOKE")

COB_STATEMENT (STMT_ENTRY, "ENTRY")
COB_STATEMENT (STMT_ENTRY_FOR_GO_TO, "ENTRY FOR GO TO")	/* GC extension for code-generators */

COB_STATEMENT (STMT_GO_TO, "GO TO")
COB_STATEMENT (STMT_ALTER, "ALTER")

COB_STATEMENT (STMT_IF, "IF")
COB_STATEMENT (STMT_ELSE, "ELSE")
COB_STATEMENT (STMT_END_IF, "END-IF")
COB_STATEMENT (STMT_VALUE_THRU, "VALUE THRU")	/* note: this is a hack only used in the compiler */

COB_STATEMENT (STMT_EVALUATE, "EVALUATE")
COB_STATEMENT (STMT_WHEN, "WHEN")
COB_STATEMENT (STMT_WHEN_OTHER, "WHEN OTHER")
COB_STATEMENT (STMT_END_EVALUATE, "END-EVALUATE")

COB_STATEMENT (STMT_EXECUTE, "EXECUTE")

COB_STATEMENT (STMT_EXIT, "EXIT")
COB_STATEMENT (STMT_EXIT_SECTION, "EXIT SECTION")
COB_STATEMENT (STMT_EXIT_PARAGRAPH, "EXIT PARAGRAPH")
COB_STATEMENT (STMT_EXIT_PERFORM_CYCLE, "EXIT PERFORM CYCLE")

COB_STATEMENT (STMT_OPEN, "OPEN")
COB_STATEMENT (STMT_REWRITE, "REWRITE")
COB_STATEMENT (STMT_WRITE, "WRITE")
COB_STATEMENT (STMT_DELETE, "DELETE")
COB_STATEMENT (STMT_CLOSE, "CLOSE")
COB_STATEMENT (STMT_START, "START")
COB_STATEMENT (STMT_READ, "READ")
COB_STATEMENT (STMT_UNLOCK, "UNLOCK")
COB_STATEMENT (STMT_LOCK_FILE, "LOCK FILE")
COB_STATEMENT (STMT_DELETE_FILE, "DELETE FILE")
COB_STATEMENT (STMT_ROLLBACK, "ROLLBACK")
COB_STATEMENT (STMT_COMMIT, "COMMIT")

COB_STATEMENT (STMT_ALLOCATE, "ALLOCATE")
COB_STATEMENT (STMT_FREE, "FREE")

COB_STATEMENT (STMT_INITIATE, "INITIATE")
COB_STATEMENT (STMT_GENERATE, "GENERATE")
COB_STATEMENT (STMT_TERMINATE, "TERMINATE")
COB_STATEMENT (STMT_SUPPRESS, "SUPPRESS")
COB_STATEMENT (STMT_PRESENT_WHEN, "PRESENT WHEN")

COB_STATEMENT (STMT_SORT, "SORT")
COB_STATEMENT (STMT_MERGE, "MERGE")
COB_STATEMENT (STMT_RELEASE, "RELEASE")
COB_STATEMENT (STMT_RETURN, "RETURN")

COB_STATEMENT (STMT_READY_TRACE, "READY TRACE")
COB_STATEMENT (STMT_RESET_TRACE, "RESET TRACE")

COB_STATEMENT (STMT_OTHERWISE, "OTHERWISE")
COB_STATEMENT (STMT_RECOVER, "RECOVER")
COB_STATEMENT (STMT_SERVICE, "SERVICE")
COB_STATEMENT (STMT_TRANSFORM, "TRANSFORM")

COB_STATEMENT (STMT_JSON_GENERATE, "JSON GENERATE")
COB_STATEMENT (STMT_JSON_PARSE, "JSON GENERATE")

COB_STATEMENT (STMT_XML_GENERATE, "XML GENERATE")
COB_STATEMENT (STMT_XML_PARSE, "XML GENERATE")

COB_STATEMENT (STMT_INIT_STORAGE, "INIT STORAGE")	/* codegen intern only */
COB_STATEMENT (STMT_BEFORE_CALL, "INIT CALL")	/* codegen intern only (runtime checks) */
COB_STATEMENT (STMT_BEFORE_UDF, "INIT UDF")	/* codegen intern only (runtime checks) */
