$Failed
Guide Page
|
AUTHORING
​
Paclet:
|
Preview
?
$Failed
1-Line Function
Functions Inline
|
Template Input
|
Section Header
Delimiter
WolframParser
Wolfram`Parser`
is a Parsec-style parser combinator library: every parser is a
ParserCombinator
value built from
Parse*
constructors, runnable directly via
Parse
or compiled with
ParserCompile
.
GrammarRules
declarations are lowered to the same combinators (no
CloudDeploy
round-trip).
LaTeXMathParse
is a working LaTeX-math parser built on the combinator core;
EBNFParse
reads a BNF grammar file into a parser map.
​
Parse
apply a parser to an input; returns its value or a
ParseError
ParsePartial
return
{result,leftover-suffix}
instead of requiring whole-input match
ParserCompile
materialize the
FunctionCompile
d form
ParserCombinator
the single computable head every parser is represented as
ParserCombinatorQ
test whether an expression is a
ParserCombinator
ParseLiteral
match an exact string
ParseCharacter
match a single character against a character class
ParseSucceed
always succeed with the given value, consuming nothing
ParseFail
always fail with the given message
ParseSequence
each parser in order
ParseChoice
the first that matches, PEG-ordered
ParseBetween
open, then
p
, then close; the result is
p
's
ParseSepBy
zero or more
p
separated by
sep
ParseSepBy1
one or more
p
separated by
sep
ParseChainLeft
left-associative operator chain
ParseChainRight
right-associative operator chain
ParseMany
zero or more
ParseSome
one or more
ParseOptional
zero or one
ParseLookahead
succeed iff
p
would match, consuming nothing
ParseNotFollowedBy
succeed iff
p
would not match, consuming nothing
ParseTry
backtrack on failure even after partial consumption
ParseAction
apply a function to a parser's result
ParseRecursive
defer the lookup of a parser definition until parse time
ParseError
structured failure with
"Position"
,
"Expected"
,
"Found"
keys
LaTeXMathParse
parse LaTeX math source into a tree of Wolfram boxes
EBNFParse
read a BNF grammar (a string or
File
[path]
) and return an
Associationname->[ParserCombinator]
EBNFRules
return the unlowered list of
EBNFRule[name,kind,body]
records
Tech Notes
Related Guides
StringManipulation
Related Links
Parser combinator (Wikipedia)
Parsing expression grammar (Wikipedia)
Metadata
New in:
XX
| Modified in:
| Obsolete in:
Categorization

Keywords
