# GnuCOBOL compiler - list of reserved words
#
# Copyright (C) 2016-2017,2021,2023 Free Software Foundation, Inc.
# Written by Simon Sobisch, Edward Hart
#
# This file is part of GnuCOBOL.
#
# The GnuCOBOL compiler is free software: you can redistribute it
# and/or modify it under the terms of the GNU 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 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/>.


# Word list for dialect: RM-COBOL

# Note: only used for strict dialect and when
#       requested by compiler directive >> IMP WORDS RM
#       the default reserved word list will not be used.

# Value: Word to make up reserved words list (case independent)
# All reserved entries listed will replace entire default reserved words list.
#   Words ending with * will be treated as context-sensitive words. This will be
# ignored if GnuCOBOL uses that word as a reserved word.
#   Entries of the form word-1=word-2 define word-1 as an alias for default
# reserved word word-2. No spaces are allowed around the equal sign.
reserved:	ACCEPT
reserved:	ACCESS
reserved:	ADD
reserved:	ADDRESS
reserved:	ADVANCING
reserved:	AFTER
reserved:	ALL
reserved:	ALPHABET
reserved:	ALPHABETIC
reserved:	ALPHABETIC-LOWER
reserved:	ALPHABETIC-UPPER
reserved:	ALPHANUMERIC
reserved:	ALPHANUMERIC-EDITED
reserved:	ALSO
reserved:	ALTER
reserved:	ALTERNATE
reserved:	AND
reserved:	ANY
reserved:	ARE
reserved:	AREA
reserved:	AREAS
reserved:	AS
reserved:	ASCENDING
reserved:	ASSIGN
reserved:	AT
reserved:	AUTHOR
reserved:	AUTO*
reserved:	AUTO-SKIP*=AUTO
reserved:	AUTOMATIC*
reserved:	BACKGROUND*=BACKGROUND-COLOR
reserved:	BACKGROUND-COLOR*
reserved:	BEEP=BELL
reserved:	BEFORE
reserved:	BELL
reserved:	BINARY
reserved:	BINARY-SEQUENTIAL*
reserved:	BLANK
reserved:	BLINK
reserved:	BLOCK
reserved:	BOTTOM
reserved:	BY
reserved:	CALL
reserved:	CANCEL
reserved:	CASE-INSENSITIVE*
reserved:	CASE-SENSITIVE*
reserved:	CD
reserved:	CENTURY-DATE
reserved:	CENTURY-DAY
reserved:	CHARACTER
reserved:	CHARACTERS
reserved:	CLASS
reserved:	CLOCK-UNITS
reserved:	CLOSE
reserved:	CODE
reserved:	CODE-SET
reserved:	COL
reserved:	COLLATING
reserved:	COLUMN
reserved:	COMMA
reserved:	COMMON
reserved:	COMMUNICATION
reserved:	COMP
reserved:	COMP-1
reserved:	COMP-3
reserved:	COMP-4
reserved:	COMP-5
reserved:	COMP-6
reserved:	COMPUTATIONAL=COMP
reserved:	COMPUTATIONAL-1=COMP-1
reserved:	COMPUTATIONAL-3=COMP-3
reserved:	COMPUTATIONAL-4=COMP-4
reserved:	COMPUTATIONAL-5=COMP-5
reserved:	COMPUTATIONAL-6=COMP-6
reserved:	COMPUTE
reserved:	CONFIGURATION
reserved:	CONTAINS
reserved:	CONTENT
reserved:	CONTINUE
reserved:	CONTROL
reserved:	COBOL
reserved:	CONVERT
reserved:	CONVERTING
reserved:	COPY
reserved:	CORR=CORRESPONDING
reserved:	CORRESPONDING
reserved:	COUNT
reserved:	COUNT-MAX
reserved:	COUNT-MIN
reserved:	CRT*
reserved:	CURRENCY
reserved:	CURSOR
reserved:	CYCLE*
reserved:	DATA
reserved:	DATA-POINTER
reserved:	DATE
reserved:	DATE-AND-TIME
reserved:	DATE-COMPILED
reserved:	DATE-WRITTEN
reserved:	DAY
reserved:	DAY-AND-TIME
# note: the following words are reserved but cannot be used - DEBUGGING module not supported
reserved:	DEBUG-CONTENTS
reserved:	DEBUG-ITEM
reserved:	DEBUG-LINE
reserved:	DEBUG-NAME
reserved:	DEBUG-SUB-1
reserved:	DEBUG-SUB-2
reserved:	DEBUG-SUB-3
# end of not included DEBUGGING module
reserved:	DEBUGGING
reserved:	DECIMAL-POINT
reserved:	DECLARATIVES
reserved:	DEFAULT
reserved:	DELETE
reserved:	DELIMITED
reserved:	DELIMITER
reserved:	DEPENDING
reserved:	DESCENDING
reserved:	DESTINATION
reserved:	DISABLE
reserved:	DISPLAY
reserved:	DIVIDE
reserved:	DIVISION
reserved:	DOWN
reserved:	DUPLICATES
reserved:	DYNAMIC
reserved:	ECHO
reserved:	EGI
reserved:	ELSE
reserved:	EMI
reserved:	ENABLE
reserved:	END
reserved:	END-ACCEPT
reserved:	END-ADD
reserved:	END-CALL
reserved:	END-COMPUTE
reserved:	END-COPY*
reserved:	END-DELETE
reserved:	END-DIVIDE
reserved:	END-EVALUATE
reserved:	END-IF
reserved:	END-MULTIPLY
reserved:	END-OF-PAGE
reserved:	END-PERFORM
reserved:	END-READ
reserved:	END-RECEIVE
reserved:	END-REPLACE*
reserved:	END-RETURN
reserved:	END-REWRITE
reserved:	END-SEARCH
reserved:	END-START
reserved:	END-STRING
reserved:	END-SUBTRACT
reserved:	END-UNSTRING
reserved:	END-WRITE
reserved:	ENTER
reserved:	ENVIRONMENT
reserved:	EOL*
reserved:	EOP
reserved:	EOS*
reserved:	EQUAL
reserved:	ERASE
reserved:	ERROR
reserved:	ESCAPE
reserved:	ESI
reserved:	EVALUATE
reserved:	EVERY
reserved:	EXCEPTION
reserved:	EXCLUSIVE
reserved:	EXIT
reserved:	EXTEND
reserved:	EXTERNAL
reserved:	FALSE
reserved:	FD
reserved:	FILE
reserved:	FILE-CONTROL
reserved:	FILLER
reserved:	DAY-OF-WEEK
reserved:	FIRST
reserved:	FIXED
reserved:	FOOTING
reserved:	FOR
reserved:	FOREGROUND*=FOREGROUND-COLOR
reserved:	FOREGROUND-COLOR*
reserved:	FROM
reserved:	FULL*
reserved:	GIVING
reserved:	GLOBAL
reserved:	GO
reserved:	GOBACK
reserved:	GREATER
reserved:	HIGH
reserved:	HIGH-VALUE
reserved:	HIGH-VALUES=HIGH-VALUE
reserved:	HIGHEST-VALUE			# SPECIAL-REGISTER
reserved:	HIGHLIGHT
reserved:	I-O
reserved:	I-O-CONTROL
reserved:	ID
reserved:	IDENTIFICATION
reserved:	IF
reserved:	IMP
reserved:	IMP*
reserved:	IN
reserved:	INDEX
reserved:	INDEXED
reserved:	INDICATE
reserved:	INITIAL
reserved:	INITIAL-VALUE
reserved:	INITIALIZE
reserved:	INPUT
reserved:	INPUT-OUTPUT
reserved:	INSPECT
reserved:	INSTALLATION
reserved:	INTO
reserved:	INVALID
reserved:	IS
reserved:	JUST=JUSTIFIED
reserved:	JUSTIFIED
reserved:	KEY
reserved:	LABEL
reserved:	LAST
reserved:	LEADING
reserved:	LEFT
reserved:	LENGTH
reserved:	LESS
reserved:	LIKE
reserved:	LIMITS
reserved:	LINAGE
reserved:	LINAGE-COUNTER
reserved:	LINE
reserved:	LINE-SEQUENTIAL*
reserved:	LINES
reserved:	LINKAGE
reserved:	LOCK
reserved:	LOW
reserved:	LOW-VALUE
reserved:	LOW-VALUES=LOW-VALUE
reserved:	LOWEST-VALUE		# SPECIAL-REGISTER
reserved:	LOWLIGHT
reserved:	MANUAL*
reserved:	MAX-VALUE			# SPECIAL-REGISTER
reserved:	MEMORY
reserved:	MERGE
reserved:	MESSAGE
reserved:	MIN-VALUE			# SPECIAL-REGISTER
reserved:	MODE
reserved:	MODULES
reserved:	MOVE
reserved:	MULTIPLE*
reserved:	MULTIPLY
reserved:	NATIVE
reserved:	NEGATIVE
reserved:	NEXT
reserved:	NO
reserved:	NOT
reserved:	NULL
reserved:	NULLS=NULL
reserved:	NUMBER
reserved:	NUMERIC
reserved:	NUMERIC-EDITED
reserved:	OBJECT-COMPUTER
reserved:	OCCURS
reserved:	OF
reserved:	OFF
reserved:	OMITTED
reserved:	ON
reserved:	OPEN
reserved:	OPTIONAL
reserved:	OR
reserved:	ORDER
reserved:	ORGANIZATION
reserved:	OTHER
reserved:	OUTPUT
reserved:	OVERFLOW
reserved:	PACKED-DECIMAL
reserved:	PADDING
reserved:	PAGE
reserved:	PARAGRAPH*
reserved:	PERFORM
reserved:	PIC=PICTURE
reserved:	PICTURE
reserved:	PLUS
reserved:	POINTER
reserved:	POSITION
reserved:	POSITIVE
reserved:	PREVIOUS*
reserved:	PRINTING
reserved:	PROCEDURE
reserved:	PROCEDURE-NAME
reserved:	PROCEED
reserved:	PROGRAM
reserved:	PROGRAM-ID
reserved:	PROMPT
reserved:	PURGE
reserved:	QUEUE
reserved:	QUOTE
reserved:	QUOTES=QUOTE
reserved:	RANDOM
reserved:	READ
reserved:	RECEIVE
reserved:	RECORD
reserved:	RECORDS
reserved:	REDEFINES
reserved:	REEL
reserved:	REFERENCE
reserved:	RELATIVE
reserved:	RELEASE
reserved:	REMAINDER
reserved:	REMARKS
reserved:	REMOVAL
reserved:	RENAMES
reserved:	REPLACE
reserved:	REPLACING
reserved:	REQUIRED*
reserved:	RERUN
reserved:	RESERVE
reserved:	RETURN
reserved:	RETURNING
reserved:	REVERSE
reserved:	REVERSE-VIDEO
reserved:	REVERSED
reserved:	REWIND
reserved:	REWRITE
reserved:	RIGHT
reserved:	ROUNDED
reserved:	RUN
reserved:	SAME
reserved:	SCREEN
reserved:	SD
reserved:	SEARCH
reserved:	SECTION
reserved:	SECURE
reserved:	SECURITY
reserved:	SEGMENT
reserved:	SEGMENT-LIMIT
reserved:	SELECT
reserved:	SEND
reserved:	SENTENCE
reserved:	SEPARATE
reserved:	SEQUENCE
reserved:	SEQUENTIAL
reserved:	SET
reserved:	SIGN
reserved:	SIZE
reserved:	SORT
reserved:	SORT-MERGE
reserved:	SOURCE
reserved:	SOURCE-COMPUTER
reserved:	SPACE
reserved:	SPACES=SPACE
reserved:	SPECIAL-NAMES
reserved:	STANDARD
reserved:	STANDARD-1
reserved:	STANDARD-2
reserved:	START
reserved:	STATUS
reserved:	STOP
reserved:	STRING
reserved:	SUB-QUEUE-1
reserved:	SUB-QUEUE-2
reserved:	SUB-QUEUE-3
reserved:	SUBTRACT
reserved:	SUPPRESS
reserved:	SYMBOLIC
reserved:	SYNC=SYNCHRONIZED
reserved:	SYNCHRONIZED
reserved:	TAB
reserved:	TABLE
reserved:	TALLYING
reserved:	TAPE
reserved:	TERMINAL
reserved:	TEST
reserved:	TEXT
reserved:	THAN
reserved:	THEN
reserved:	THROUGH=THRU
reserved:	THRU
reserved:	TIME
reserved:	TIMES
reserved:	TO
reserved:	TOP
reserved:	TRAILING
reserved:	TRIMMED*
reserved:	TRUE
reserved:	UNDERLINE*
reserved:	UNIT
reserved:	UNLOCK
reserved:	UNSTRING
reserved:	UNTIL
reserved:	UP
reserved:	UPDATE
reserved:	UPON
reserved:	USAGE
reserved:	USE
reserved:	USING
reserved:	VALUE
reserved:	VALUES
reserved:	VARYING
reserved:	WHEN
reserved:	WHILE*
reserved:	WITH
reserved:	WORDS
reserved:	WORKING-STORAGE
reserved:	WRITE
reserved:	YYYYDDD*
reserved:	YYYYMMDD*
reserved:	ZERO
reserved:	ZEROES=ZERO
reserved:	ZEROS=ZERO

# registered more "unused" words because these are reserved words in
# unsupported modules of ANSI 85 or other COBOL dialects:

reserved:	CF
reserved:	CH
reserved:	CONTROLS
reserved:	DE
reserved:	DETAIL
reserved:	FINAL
reserved:	FUNCTION
reserved:	GENERATE
reserved:	GROUP
reserved:	HEADING
reserved:	INITIATE
reserved:	LIMIT
reserved:	LINE-COUNTER
reserved:	PAGE-COUNTER
reserved:	PF
reserved:	PH
reserved:	PROCEDURES
reserved:	RD
reserved:	RECORDING
reserved:	REFERENCES
reserved:	REPORT
reserved:	REPORTING
reserved:	REPORTS
reserved:	RESET
reserved:	RF
reserved:	RH
reserved:	SUM
reserved:	TERMINATE
reserved:	TYPE
reserved:	VARIABLE


# list of registers:
# TO-DO: Should PROCEDURE-NAME [IN|OF] {PARAGRAPH|PROCEDURE|SECTION} be a register?
not-register:	DIALECT-ALL	# disable all registers, specify used below
# register:	"ADDRESS\ IN"
register:	"ADDRESS\ OF"
# register:	"COUNT-MAX\ IN"
# register:	"COUNT-MAX\ OF"
# register:	"COUNT-MIN\ IN"
# register:	"COUNT-MIN\ OF"
# register:	"COUNT\ IN"
# register:	"COUNT\ OF"
register:	DEBUG-ITEM
# register:	"HIGHEST-VALUE\ IN"
# register:	"HIGHEST-VALUE\ OF"
# register:	"INITIAL-VALUE\ IN"
# register:	"INITIAL-VALUE\ OF"
# register:	"LENGTH\ IN"
register:	"LENGTH\ OF"
# register:	"LINAGE-COUNTER\ IN"
# register:	"LINAGE-COUNTER\ OF"
# register:	"LOWEST-VALUE\ IN"
# register:	"LOWEST-VALUE\ OF"
# register:	"MAX-VALUE\ IN"
# register:	"MAX-VALUE\ OF"
# register:	"MIN-VALUE\ IN"
# register:	"MIN-VALUE\ OF"
# register:	PROGRAM-ID
register:	RETURN-CODE
register:	WHEN-COMPILED


# list of system names:
not-system-name:	DIALECT-ALL-SWITCHES
system-name:	SWITCH-1
system-name:	SWITCH-2
system-name:	SWITCH-3
system-name:	SWITCH-4
system-name:	SWITCH-5
system-name:	SWITCH-6
system-name:	SWITCH-7
system-name:	SWITCH-8
system-name:	UPSI-0
system-name:	UPSI-1
system-name:	UPSI-2
system-name:	UPSI-3
system-name:	UPSI-4
system-name:	UPSI-5
system-name:	UPSI-6
system-name:	UPSI-7

system-name:	CONSOLE


# Intrinsic Functions - explicit not supported by RM-COBOL
not-intrinsic-function:	DIALECT-ALL
