company logo

String constant

Keywords:  string constant

String constants are sequences of character values, which are enclosed in single or double apostrophes (' or "). When the string delimiter character appears within the string, it must be coded with a preceding backslash for being interpreted as part of the string.

The symbol is defined as built-in symbol std_string in BNFStandardSymbols.

Three ways of presenting the string constant: my name is "miller"

'my name is "miller" '

"my name is \"miller\" "

"my name is 'miller' "

Definition: 

string ::= ref(std_string)