Escaping Reserved Words
Last revised
6/4/2021.
Contact us.
The SADL grammar includes a number of
words, which are listed below. These words cannot, therefore, be directly
used as domain concept names since the parser would see them as keywords
in the grammar. For example, since "before" is a keyword, it is not
possible to define a domain property by saying
However, Xtext resolves this problem by allowing the escaping of words in
the grammar by preceding the word with "^", the caret. Therefore one can
create a property named "before" with this statement.
Note that the name of the concept is "before", not "^before". The caret
is dropped by the parser before the model is translated to OWL. It simply
tells the parser not to treat the word as a keyword in the grammar. Note
also that variable names are concept names and therefore "a" and "e"
cannot be used as variable names unless escaped with a caret.
Reserved Words in the SADL Grammar
The words currently used in the SADL grammar are the following.
- A
- a
- after
- alias
- always
- an
- An
- and
- annotation
- another
- any
- anySimpleType
- anyURI
- are
- as
- asc
- Ask
- ask
- at
- base64Binary
- be
- before
- boolean
- by
- byte
- can
- class
- classes
- construct
- contain
- contains
- count
- data
- date
- dateTime
- decimal
- Deductions
- default
- delete
- desc
- described
- describes
- disjoint
- distinct
- does
- double
- duration
- E
- e
- eighth
- element
- Equation
- exactly
- exists
- Explain:
- Expr:
- External
- false
- fifth
- first
- float
- for
- fourth
- from
- gDay
- given
- gMonth
- gMonthDay
- Graph
- gYear
- gYearMonth
- has
- hexBinary
- if
- import
- in
- index
- insert
- instances
- int
- integer
- inverse
- is
- known
- last
- least
- length
- level
- List
- located
- long
- matching
- Model
- most
- must
- negativeInteger
- ninth
- None
- nonNegativeInteger
- nonPositiveInteger
- not
- note
- of
- one
- only
- or
- order
- other
- PI
- plus
- positiveInteger
- Print:
- property
- Read:
- relationship
- Relationship
- return
- returns
- Rule
- same
- second
- see
- select
- seventh
- single
- sixth
- some
- Stage
- string
- subject
- sublist
- symmetrical
- table
- tenth
- Test:
- The
- the
- then
- there
- third
- time
- to
- top-level
- transitive
- true
- type
- types
- unique
- unsignedByte
- unsignedInt
- Update
- uri
- using
- value
- values
- version
- where
- with
- Write: