WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

GrammarToken [form]

is a grammar rules pattern object that represents any input of the specified form.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
Related Guides
History
Cite this Page

GrammarToken [form]

is a grammar rules pattern object that represents any input of the specified form.

Details

Examples

open all close all

Basic Examples  (2)

Deploy a grammar that makes use of a built-in GrammarToken :

Apply the grammar to an input:

Deploy a grammar that defines and uses an "Appliance" token:

Apply the grammar to an input:

Scope  (1)

A custom GrammarToken can be used before and after its definition in the GrammarRules :

Applications  (1)

New tokens can be used to build up complicated expressions, e.g. to deploy a simple calculator:

Apply the calculator grammar and actions:

Properties & Relations  (1)

If a definition is given for a built-in GrammarToken , the given definition is used, not the built-in one:

Apply the new definition to an input string:

The replacement for GrammarToken ["City" ] prevents use of the usual one by this grammar:

Wolfram Research (2014), GrammarToken, Wolfram Language function, https://reference.wolfram.com/language/ref/GrammarToken.html.

Text

Wolfram Research (2014), GrammarToken, Wolfram Language function, https://reference.wolfram.com/language/ref/GrammarToken.html.

CMS

Wolfram Language. 2014. "GrammarToken." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GrammarToken.html.

APA

Wolfram Language. (2014). GrammarToken. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GrammarToken.html

BibTeX

@misc{reference.wolfram_2025_grammartoken, author="Wolfram Research", title="{GrammarToken}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/GrammarToken.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_grammartoken, organization={Wolfram Research}, title={GrammarToken}, year={2014}, url={https://reference.wolfram.com/language/ref/GrammarToken.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /