next up previous contents index
Next: The Prop Language Up: General Concepts Previous: Basic syntactic classes

Literals

In addition to the usual C++ literals, Prop introduces two new type of literals: quark literals and regular expression literals. Quark literals are of type Quark and are written as strings prefixed by the # symbol.


Quark ::=#String

Quarks act like atoms in Lisp, in which name equality implies pointer equality. In contrast, in C++ two string literals that are identical in value do not necessarily reside in the same address. Given strings s1 and s2, strcmp(s1,s2) == 0 does not imply s1 == s2. Quarks are defined in the library include file <AD/strings/quark.h>.

Regular expression literals are similar to string literals except that they are quoted by slashes /. We'll discuss the regular expression in section 3.1.1.



Allen Leung
Mon Apr 7 14:33:55 EDT 1997