Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

GrammarApply

GrammarApply[grammar,input]
attempts to parse input according to the grammar defined by grammar.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Deploy a simple grammar for adding numbers:

In[1]:=
Click for copyable input
Out[1]=

Apply the deployed grammar to a natural language string:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2014
(10.0)
| Updated in 2015
(10.3)