Markdown Extra Spec: Parsing Section
John MacFarlane
jgm at berkeley.edu
Fri May 16 01:37:19 EDT 2008
> And I was under the impression that you had given me a nearly complete
> cheatsheet of the PEG grammar in that previous email. What does $, ->>,
> <++>, and ## mean?
Sorry, these are not standard PEG symbols, but they are used in the
Haskell PEG library I'm using (Frisby). If you look at the source code
of Markdown.hs, you'll find a table correlating Frisby notation with
standard PEG notation:
http://github.com/jgm/markdown-peg/tree/master/Markdown.hs#L69
The only symbol not explained there is '$'. '$' is a standard Haskell sign
for function application; basically it's just a way to write things with
fewer parentheses. So, for example,
newRule $ blah blah blah
is the same as
newRule (blah blah blah)
John
More information about the Markdown-Discuss
mailing list