Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
WL syntax | Lowers to | Combinator | |
p1|p2 | |||
p1~~p2 | |||
p.. | |||
p... | |||
ParseCharacter |
ParseLiteral |
ParseCharacter |
Constructor | Returns ParserCombinator[...] | What it matches | |
ParseLiteral[s] | Literal | the exact string / token s | |
ParseCharacter[pat] | Character | a single character matching pat [a,b] Alternatives | |
ParseToken[type] | Token | a tagged Token[type,_,_] | |
ParseSucceed[val] | Succeed | always succeed with val | |
ParseFail[msg] | Fail | always fail with msg | |
ParseSequence[p1,p2,...] | Sequence | each pi | |
ParseChoice[p1,p2,...] | Choice | first pi | |
ParseMany[p] | Many | zero or more p | |
ParseSome[p] | Some | one or more p | |
ParseOptional[p] | Optional | zero or one p | |
ParseBetween[open,p,close] | Between | open p close p | |
ParseSepBy[p,sep] | SepBy | zero or more p sep | |
ParseSepBy1[p,sep] | SepBy1 | one or more p sep | |
ParseChainLeft[p,op,init] | ChainLeft | left-associative operator chain | |
ParseChainRight[p,op,init] | ChainRight | right-associative operator chain | |
ParseLookahead[p] | Lookahead | succeed iff p | |
ParseNotFollowedBy[p] | NotFollowedBy | succeed iff p | |
ParseTry[p] | Try | backtrack on failure even after consuming | |
ParseAction[p,f] | Action | apply f p | |
ParseCapture[name,p] | Capture | tag p name GrammarRules | |
ParseRecursive[name,body] | Recursive | a named recursive parser body |
ParseCharacter |
ParseLiteral |
ParseCharacter |
ParseSequence |
ParseSome |
ParseCharacter |
ParseOptional |
ParseSequence |
ParseLiteral |
ParseMany |
ParseCharacter |
ParseSequence |
ParseCharacter |
ParseOptional |
ParseLiteral |
ParseCharacter |
Parse |
ParserCompile |