Multi-character string literals use double quotes (e.g. "hello"). A single-character literal uses single quotes (e.g. 'x').
The
single quote immediately after an expression is usable only in a
postcondition annotation, and it refers to the updated value of a "var"
parameter. This is described on pages 48-50 of version 8.0 of the ParaSail
Reference Manual (the "Annotations" chapter).
So for example, if you want to specify the pre- and postconditions of a Stack "Pop" operation, you could write:
func Pop(var S : Stack {Count(S) > 0}) -> Component
{Count(S ’) == Count(S) − 1} is ...
which
indicates that, before calling "Pop," Count(S) must be greater than zero (i.e. stack must not
be empty), and after calling "Pop," the final value of
Count(S) will be one less than the original value of Count(S).
The single quote used in this "postcondition" context is pronounced "prime." Hence, "the Count of S prime is one less than the Count of the original value of S." This notation was adopted for two reasons. One, the notion of "X prime" is common in mathematics to represent the result of a transformation of some sort (e.g. see
https://en.wikipedia.org/wiki/Prime_(symbol)#Use_in_mathematics,_statistics,_and_science). Programming languages have sometimes adopted an alternative notation, where the original value is marked specially (e.g. ~X or X'Old) while the new value is unmarked. The second reason is the following -- in ParaSail, we wanted preconditions and postconditions to have the same meaning for the same symbols, because they might appear next to one another, so in both, the unmarked variable name refers to the incoming, original value, and in postconditions, the "prime notation" is used to refer to the updated, final value.
This single-quote "prime" notation is only recognized by the lexer when it occurs immediately after an identifier, ')', or ']'. See parser/parasail_lex.l if you want the details -- look for the "TICK" state, and the "PRIME" token.