Go to the first, previous, next, last section, table of contents.


4.15 Alternative Tokens

As in the coming C++ standard [Stroustrup95] [ANSI95], support for international character sets (i.e., keyboards without the full suite of ASCII characters) is provided in Larch/C++.

The following table gives the alternative tokens, and the primary form of the token to which they are equivalent. Only the primary form is used in the syntax in this manual, but the alternatives are recognized by the Larch/C++ tools in all contexts. (The __wchar_t token is a concession to GNU C++.)

  For All Contexts
alternative    primary
----------------------
<%             {
%>             }
<:             [
:>             ]
bitand         &
compl          ~
not_eq         !=
__wchar_t      wchar_t

In the definition of a C++ operator function interface, and in C++ statements and expressions, but not in a predicate or term (see section 6.1 Predicates), the following are recognized.

 C++ Operator Declarations,
Statements, and Expressions
         Only
alternative    primary
----------------------
and            &&
bitor          |
or             ||
xor            ^
and_eq         &=
or_eq          |=
xor_eq         ^=
not            !

In a predicate or term, one can use as tokens the LSL symbols \/ for "or" and /\ for "and". For negation, use compl, which works as a synonym for ~ in all contexts. In predicates and terms, various trait functions provide synonyms for !. In predicates and terms, there is no standard symbol for "exclusive-or"; the token ^ is used in predicates and terms to mean "the pre-state value of" (see section 6.2.1 State Functions), but it has a synonym \pre.


Go to the first, previous, next, last section, table of contents.