Table of Contents

Literals

RL provides the following literals.

Note that term literals are described elsewhere.

An odd property of the literals is that, while each has a default type, you can override the type if you wish.

Symbols

A symbol has two forms.

While you don't really need to escape double quotation marks in a symbol, the choice to allow the escape makes this consistent with strings.

The following are examples of symbols.

  fred
  _primary_
  ''
  '5'
  '$ 9\'-'
  Set_3

The default type for all symbols is the root type SYMBOL, but the type of a symbol can be given explicitly. This allows distinguishing between root types (like STRING:^ROOT) and symbols with the same name (like STRING:SYMBOL). The following are legal symbols.

'_' Would otherwise conflict with the wildcard '_'
'^ROOT' Would otherwise conflict with the root term
'ANY' and ANY:SYMBOL Would otherwise conflict with the wildcard 'ANY'
'NONE' and NONE:SYMBOL Would otherwise conflict with the wildcard 'NONE'
'INTEGER' and INTEGER:SYMBOL Would otherwise conflict with the root type 'INTEGER'

+%7B+symbol+%3D+usual_symbol+%7C+quoted_symbol+.+usual_symbol+%3D+%22%5Ba-zA-Z%5D%5Ba-zA-Z0-9_%5D%2A%22+%7C+%22_%5Ba-zA-Z0-9_%5D%2B%22+.+quoted_symbol+%3D+%22%27%22+%7B+%27%5B%5E%5C%5C%5C%5C%22%5D%27+%7C+ESCAPE+%7D+%22%27%22+.+ESCAPE+%3D+%27%5C%5C%5C%5Cn%27+%7C+%27%5C%5C%5C%5Cr%27+%7C+%27%5C%5C%5C%5Ct%27+%7C+%27%5C%5C%5C%5C%5C%5C%5C%5C%27+%7C+%27%5C%5C%5C%5C%22%27+%7C+%22%5C%5C%5C%5C%27%22+%7C+UNICODE+.+UNICODE+%3D+%27%5C%5C%5C%5Cu%7B%27+%22%5B0-9a-fA-F%5D%2B%22+%27%7D%27+.+%7D+

Strings

A string has two forms.

As we will see later, strings can be composed with the applicative dot, so “Hello ”.“”“world”“” becomes the string “Hello world”.