Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
Cloud & Deployment
Core Language & Structure
Data Manipulation & Analysis
Engineering Data & Computation
External Interfaces & Connections
Financial Data & Computation
Geographic Data & Computation
Geometry
Graphs & Networks
Higher Mathematical Computation
Images
Knowledge Representation & Natural Language
Machine Learning
Notebook Documents & Presentation
Scientific and Medical Data & Computation
Social, Cultural & Linguistic Data
Strings & Text
Symbolic & Numeric Computation
System Operation & Setup
Time-Related Computation
User Interface Construction
Visualization & Graphics
Random Paclet
Alphabetical List
Using Paclets
Create a Paclet
Get Started
Download Definition Notebook
Learn More about
Wolfram Language
Parser
Tutorials
Building Language Front-Ends
Inside CodeAnalysis - How CodeStructure Parses C
Design and Compilation Strategy
Implementing the LaTeX Math Parser
MaTeX Comparison Showcase
The Parser Landscape - a Survey of What Exists Today
The Parser Zoo - language front-ends over a shared algebra
Parsing BNF Grammars (and bootstrapping a TPTP parser)
Parsing GrammarRules Locally
A Markdown Inline Parser in Parser Combinators
ParsingOpenQASM
Parsing TPTP, Auto-Generated from the Published BNF
PrattVsPEG
The Wolfram Box Typesetting Reference
Guides
Parsing in the Wolfram Language
Symbols
ASTAddSource
ASTAlgebra
ASTContainer
ASTLeafQ
ASTNodeQ
ASTStripSource
BinaryNode
BrainfuckAST
BrainfuckGrammar
BrainfuckRun
BrainfuckSemantic
CalculatorAST
CalculatorEval
CalculatorGrammar
CalculatorSemantic
CallNode
ContainerNode
EBNFParse
EBNFRules
ErrorNode
ExportLaTeX
GroupNode
InfixNode
JSONAST
JSONGrammar
JSONImport
JSONSemantic
LambdaAST
LambdaEval
LambdaGrammar
LambdaSemantic
LaTeXMathParse
LaTeXMathParser
LaTeXMathStyle
LeafNode
LispAST
LispGrammar
LispRead
LispSemantic
LispSymbol
MarkdownInlineParse
MarkdownInlineParser
MarkdownParse
MarkdownParser
ParseAction
ParseBetween
ParseChainLeft
ParseChainRight
ParseCharacter
ParseChoiceLongest
ParseChoice
ParseFail
ParseLiteral
ParseLookahead
ParseMany
Parse
ParseNotFollowedBy
ParseOperatorTable
ParseOptional
ParsePartial
ParsePosition
ParserCombinator
ParserCombinatorQ
ParserCompile
ParseRecursive
ParseRegex
ParseSepBy1
ParseSepBy
ParseSequence
ParseSome
ParseSucceed
ParseTry
PostfixNode
PrefixNode
RecCell
RecRef
SetRec
SpannedToken
TernaryNode
ToCodeParser
TPTPExport
TPTPImport
Overviews
WolframParser
Wolfram`Parser`
B
i
n
a
r
y
N
o
d
e
B
i
n
a
r
y
N
o
d
e
[
o
p
,
{
l
h
s
,
r
h
s
}
,
m
e
t
a
]
i
s
a
b
i
n
a
r
y
-
o
p
e
r
a
t
o
r
a
p
p
l
i
c
a
t
i
o
n
:
o
p
i
s
t
h
e
o
p
e
r
a
t
o
r
d
e
s
c
r
i
p
t
o
r
s
t
r
i
n
g
,
t
h
e
c
h
i
l
d
l
i
s
t
h
o
l
d
s
t
h
e
l
e
f
t
o
p
e
r
a
n
d
l
h
s
a
n
d
t
h
e
r
i
g
h
t
o
p
e
r
a
n
d
r
h
s
,
a
n
d
m
e
t
a
i
s
a
m
e
t
a
d
a
t
a
a
s
s
o
c
i
a
t
i
o
n
.
D
e
t
a
i
l
s
a
n
d
O
p
t
i
o
n
s
▪
B
i
n
a
r
y
N
o
d
e
is inert data: it carries no
D
o
w
n
V
a
l
u
e
s
, so building one just holds the three arguments. It mirrors
C
o
d
e
P
a
r
s
e
r
s
o
w
n
CodeParser
`
B
i
n
a
r
y
N
o
d
e
.
▪
op
stays a language-native descriptor string (
"
+
"
,
"
:
"
) rather than a Wolfram symbol, so one node serves arithmetic operators and a JSON
k
e
y
:
v
a
l
u
e
pairing alike.
▪
The child list always has exactly two elements. A left- or right-associative chain of the same operator nests as
B
i
n
a
r
y
N
o
d
e
inside
B
i
n
a
r
y
N
o
d
e
, rather than flattening into a single
I
n
f
i
x
N
o
d
e
.
▪
C
a
l
c
u
l
a
t
o
r
A
S
T
builds a
B
i
n
a
r
y
N
o
d
e
for each of
+
-
*
/
^
, with the operator table giving
^
right associativity and the rest left.
J
S
O
N
A
S
T
uses
B
i
n
a
r
y
N
o
d
e
[
"
:
"
,
{
key
,
value
}
]
for each object member.
▪
The zoo grammars use
B
i
n
a
r
y
N
o
d
e
(nested) where a flattening grammar might use
I
n
f
i
x
N
o
d
e
.
meta
holds a
"
S
o
u
r
c
e
"
position when the node comes from a real parse, and is an empty
when you build the node by hand.
Examples
(
3
)
Basic Examples
(
1
)
A binary node built literally holds its operator and two-element child list:
I
n
[
1
]
:
=
B
i
n
a
r
y
N
o
d
e
"
+
"
,
L
e
a
f
N
o
d
e
[
"
I
n
t
e
g
e
r
"
,
"
1
"
,
]
,
L
e
a
f
N
o
d
e
[
"
I
n
t
e
g
e
r
"
,
"
2
"
,
]
,
O
u
t
[
1
]
=
B
i
n
a
r
y
N
o
d
e
[
+
,
{
L
e
a
f
N
o
d
e
[
I
n
t
e
g
e
r
,
1
,
]
,
L
e
a
f
N
o
d
e
[
I
n
t
e
g
e
r
,
2
,
]
}
,
]
An arithmetic sum parses to a
B
i
n
a
r
y
N
o
d
e
[
"
+
"
,
…
]
:
I
n
[
2
]
:
=
C
a
l
c
u
l
a
t
o
r
A
S
T
[
"
1
+
2
"
]
O
u
t
[
2
]
=
C
o
n
t
a
i
n
e
r
N
o
d
e
[
S
t
r
i
n
g
,
{
B
i
n
a
r
y
N
o
d
e
[
+
,
{
L
e
a
f
N
o
d
e
[
I
n
t
e
g
e
r
,
1
,
S
o
u
r
c
e
{
{
1
,
1
}
,
{
1
,
2
}
}
]
,
L
e
a
f
N
o
d
e
[
I
n
t
e
g
e
r
,
2
,
S
o
u
r
c
e
{
{
1
,
3
}
,
{
1
,
4
}
}
]
}
,
S
o
u
r
c
e
{
{
1
,
1
}
,
{
1
,
4
}
}
]
}
,
S
o
u
r
c
e
{
{
1
,
1
}
,
{
1
,
4
}
}
]
Each JSON object member is a
B
i
n
a
r
y
N
o
d
e
[
"
:
"
,
…
]
pairing the key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