Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • 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
    • 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`Languages`Lisp`
LispAST
​
LispAST
[sexpr]
parses one or more s-expressions in the string sexpr to a standard syntax tree - a
ContainerNode
of
CallNode
,
LeafNode
and
PrefixNode
.
​
Details and Options
▪
LispAST
is the standard-AST mode of the Lisp reader: it runs
LispGrammar
over an internal AST algebra, so the result carries no Lisp-specific meaning, only structure - the same neutral node vocabulary the rest of the parser zoo emits.
▪
The grammar is a single self-similar rule: an atom (symbol, number or string), a parenthesised list, or a quoted form. Whitespace skips both spaces and
;
-to-end-of-line comments.
▪
A non-empty list
(fab)
becomes a
CallNode
whose head is the first element; the empty list
()
is a
GroupNode
with kind
"List"
.
▪
The reader-macro quote
'x
becomes a
PrefixNode
with operator descriptor
'
.
▪
A
LeafNode
keeps the literal source text (
"42"
, not
42
) and a
"Symbol"
,
"Integer"
,
"Real"
or
"String"
kind descriptor; values are only interpreted in the
LispRead
mode.
▪
LispRead
runs the same grammar over
LispSemantic
instead, reading to native Wolfram data. The grammar is written once; only the algebra differs.
▪
Input that does not parse to completion returns a
Failure
(see
Parse
).
​
Examples  
(4)
Basic Examples  
(1)
A nested call reads to a
CallNode
tree, head-first:
In[1]:=
LispAST
["(+ 1 (max 2 3))"]
Out[1]=
ContainerNode[String,{CallNode[LeafNode[Symbol,+,Source{{1,2},{1,3}}],{LeafNode[Integer,1,Source{{1,4},{1,5}}],CallNode[LeafNode[Symbol,max,Source{{1,7},{1,10}}],{LeafNode[Integer,2,Source{{1,11},{1,12}}],LeafNode[Integer,3,Source{{1,13},{1,14}}]},Source{{1,7},{1,14}}]},Source{{1,2},{1,14}}]},Source{{1,2},{1,14}}]
Every node carries a
"Source"
span of
{{
startLine
,
startCol
},{
endLine
,
endCol
}}
(
CodeParser
LineColumn). Each
LeafNode
spans just its token, and a composite spans its children: the inner
max
call runs columns
7
-
14
, the whole
+
call columns
2
-
14
.
The quote reader macro
'x
is a
PrefixNode
with descriptor
'
:
In[2]:=
LispAST
["'x"]
Out[2]=
ContainerNode[String,{PrefixNode[',LeafNode[Symbol,x,Source{{1,2},{1,3}}],Source{{1,2},{1,3}}]},Source{{1,2},{1,3}}]
The same source through
LispRead
is native data, not a tree:
In[3]:=
LispRead
["(+ 1 (max 2 3))"]
Out[3]=
{LispSymbol[+],1,{LispSymbol[max],2,3}}
Scope  
(1)

Properties & Relations  
(1)

Possible Issues  
(1)

SeeAlso
LispRead
 
▪
LispSymbol
 
▪
LispGrammar
 
▪
LispSemantic
 
▪
CallNode
 
▪
ContainerNode
RelatedGuides
▪
Parser Zoo
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com