Spelling Prompt Literals

The spelling prompt literal is always of type Prompt.

SpellingPrompt:
SpellingPromptDeclarator [ ComplexLiteralInputChars ]
SpellingPromptDeclarator [ Expression ]
SpellingPromptDeclarator [ Expression , Expression ]
SpellingPromptDeclarator:
s S
Spelling prompts correspond to a string being spelled back one character at a time:
  • If the sequence of characters can be parsed as an Expression of any type then its string representation, returned by the Java method toString() of the object, is spelled back. If an additional Expression can be parsed then it must be of type Boolean and represents whether or not special characters must be spelled back as well instead of being played back as silences if it is false.

  • If the sequence of characters cannot be parsed properly as described above, then it is considered to be the text to be spelled back.

This form also assumes that the language of the text correspond to the current language of the context unless the prompt is further qualified using the @ operator.

Example Spelling Prompt Literals:

S[A]
S[John Doe]
S[\n b];
S["some text"]
S['\f']
S['a' + " nice day"]
S["b"]
S[u"\t"]
S["a", true]
S[java.util.Locale.US]
S[java.util.Locale.US, false]