represents the absence of whitespace between elements in a grammar rules pattern.


NoWhitespace
represents the absence of whitespace between elements in a grammar rules pattern.
Details

- FixedOrder[GrammarToken["a"],NoWhitespace,GrammarToken["b"]] matches a sequence that matches GrammarToken["a"] followed by GrammarToken["b"], only when there is no whitespace between them.
Examples
open all close allBasic Examples (1)
By default, FixedOrder may permit optional whitespace between its sequence of elements:
Use NoWhitespace to disallow whitespace between the tokens:
Possible Issues (1)
Application of the grammar might not observe elements if there is no natural break:
Use a StringExpression instead:
See Also
Related Guides
History
Text
Wolfram Research (2015), NoWhitespace, Wolfram Language function, https://reference.wolfram.com/language/ref/NoWhitespace.html.
CMS
Wolfram Language. 2015. "NoWhitespace." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NoWhitespace.html.
APA
Wolfram Language. (2015). NoWhitespace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NoWhitespace.html
BibTeX
@misc{reference.wolfram_2025_nowhitespace, author="Wolfram Research", title="{NoWhitespace}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/NoWhitespace.html}", note=[Accessed: 16-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_nowhitespace, organization={Wolfram Research}, title={NoWhitespace}, year={2015}, url={https://reference.wolfram.com/language/ref/NoWhitespace.html}, note=[Accessed: 16-August-2025]}