-
Notifications
You must be signed in to change notification settings - Fork 0
Identifiers
The names of variables, constants, methods, predicates, as well as types and objects, are called identifiers. A valid identifier for our domain description language is a sequence of one or more letters, digits, or underscore characters (_
). Spaces, punctuation marks, and symbols cannot be part of an identifier. In addition, identifiers shall always begin either with a letter or with an underline character (_
).
The domain description language uses a number of keywords to identify operations and data descriptions; therefore, identifiers created by a domain modeler cannot match these keywords. The standard reserved keywords that cannot be used as identifiers are:
bool
, class
, enum
, fact
, false
, goal
, new
, or
, predicate
, real
, return
, string
, this
, true
, typedef
, void
It is worth to notice that the domain description language is a "case sensitive" language. This means that an identifier written in capital letters is not equivalent to another one with the same name but written in small letters. For example, the variable names MAX
and max
will be considered as separate identifiers. Here are some examples of identifiers:
i
MAX
max
first_name
_second_name