Permalink
Browse files

Create gh-pages branch via GitHub

  • Loading branch information...
1 parent ed8f6e1 commit 178e3881798ebe6fbb9f189770de989bde543225 Cetin Sert committed Nov 18, 2012
Showing with 12 additions and 10 deletions.
  1. +6 −4 index.html
  2. +1 −1 params.json
  3. +5 −5 stylesheets/styles.css
View
@@ -38,6 +38,7 @@
<div class="highlight"><pre><span class="k">open</span> <span class="nc">XParsec</span>
<span class="k">open</span> <span class="nn">XParsec</span><span class="p">.</span><span class="nc">Xml</span>
+<span class="o">[&lt;</span><span class="nc">EntryPoint</span><span class="o">&gt;]</span>
<span class="k">let</span> <span class="n">main</span> <span class="o">_</span> <span class="o">=</span>
<span class="k">let</span> <span class="n">test</span> <span class="n">parse</span> <span class="o">=</span> <span class="n">printfn</span> <span class="s2">"%A"</span> <span class="o">&lt;&lt;</span> <span class="n">reply</span> <span class="o">&lt;&lt;</span> <span class="n">parse</span> <span class="o">&lt;&lt;</span> <span class="nn">E</span><span class="p">.</span><span class="n">source</span>
@@ -56,13 +57,13 @@
<span class="k">let</span> <span class="n">parser2</span> <span class="o">=</span> <span class="o">(</span><span class="n">parent</span> <span class="o">=&gt;</span> <span class="n">name</span><span class="o">)</span> <span class="o">&lt;/&gt;</span> <span class="o">(!*</span><span class="n">child</span> <span class="o">&gt;.</span> <span class="o">!@</span><span class="s2">"font"</span><span class="o">)</span>
<span class="c1">// graceful non-linear look-ahead (here = down in Xml)</span>
- <span class="k">let</span> <span class="n">parser3</span> <span class="o">=</span> <span class="n">ahead</span> <span class="n">parser1</span> <span class="o">.&gt;.</span> <span class="o">(</span><span class="n">current</span> <span class="o">=&gt;</span> <span class="n">name</span><span class="o">)</span>
+ <span class="k">let</span> <span class="n">parser3</span> <span class="o">=</span> <span class="o">!!</span><span class="n">parser1</span> <span class="o">.&gt;.</span> <span class="o">(</span><span class="n">current</span> <span class="o">=&gt;</span> <span class="n">name</span><span class="o">)</span>
<span class="c1">// brand-new non-linear look-back (here = up in Xml)</span>
<span class="k">let</span> <span class="nc">S</span> <span class="n">d</span><span class="o">,_</span> <span class="o">=</span> <span class="nn">E</span><span class="p">.</span><span class="n">source</span> <span class="n">root</span> <span class="o">|&gt;</span> <span class="o">(!*</span><span class="n">child</span> <span class="o">&gt;.</span> <span class="n">current</span><span class="o">)</span>
- <span class="k">let</span> <span class="n">parser4</span> <span class="o">=</span> <span class="o">(</span><span class="n">ahead</span> <span class="o">&lt;|</span> <span class="n">many</span> <span class="o">(</span><span class="n">parent</span> <span class="o">=&gt;</span> <span class="n">name</span><span class="o">))</span> <span class="o">.&gt;.</span> <span class="o">(</span><span class="n">current</span> <span class="o">=&gt;</span> <span class="n">name</span><span class="o">)</span>
+ <span class="k">let</span> <span class="n">parser4</span> <span class="o">=</span> <span class="o">!!(</span><span class="n">many</span> <span class="o">(</span><span class="n">parent</span> <span class="o">=&gt;</span> <span class="n">name</span><span class="o">))</span> <span class="o">.&gt;.</span> <span class="o">(</span><span class="n">current</span> <span class="o">=&gt;</span> <span class="n">name</span><span class="o">)</span>
- <span class="n">test</span> <span class="n">parser1</span> <span class="n">root</span><span class="o">;</span> <span class="n">test</span> <span class="n">parser2</span> <span class="n">root</span><span class="o">;</span> <span class="n">test</span> <span class="n">parser3</span> <span class="n">root</span><span class="o">;</span> <span class="n">test</span> <span class="n">parser4</span> <span class="n">d</span>
+ <span class="n">test</span> <span class="n">parser1</span> <span class="n">root</span><span class="o">;</span> <span class="n">test</span> <span class="n">parser2</span> <span class="n">root</span><span class="o">;</span> <span class="n">test</span> <span class="n">parser3</span> <span class="n">root</span><span class="o">;</span> <span class="n">test</span> <span class="n">parser4</span> <span class="n">d</span><span class="o">;</span> <span class="mi">0</span>
</pre></div>
<div class="highlight"><pre><span class="nc">S</span> <span class="o">([</span><span class="s2">"a"</span><span class="o">;</span> <span class="s2">"b"</span><span class="o">;</span> <span class="s2">"c"</span><span class="o">;</span> <span class="s2">"d"</span><span class="o">],</span> <span class="s2">"Arial"</span><span class="o">)</span>
@@ -80,6 +81,7 @@
<span class="k">type</span> <span class="nc">Xobj</span> <span class="o">=</span> <span class="nc">I</span> <span class="k">of</span> <span class="kt">int</span> <span class="o">|</span> <span class="nc">L</span> <span class="k">of</span> <span class="nc">Xobj</span> <span class="kt">list</span>
+<span class="o">[&lt;</span><span class="nc">EntryPoint</span><span class="o">&gt;]</span>
<span class="k">let</span> <span class="n">main</span> <span class="o">_</span> <span class="o">=</span>
<span class="k">let</span> <span class="n">root</span> <span class="o">=</span> <span class="nn">E</span><span class="p">.</span><span class="nc">Parse</span> <span class="s2">"&lt;list&gt;&lt;int v='1'/&gt;&lt;list&gt;&lt;int v='2'/&gt;&lt;/list&gt;&lt;int v='3'/&gt;&lt;/list&gt;"</span>
@@ -91,7 +93,7 @@
<span class="k">do</span> <span class="n">e'</span> <span class="o">:=</span> <span class="n">int_</span> <span class="o">&lt;/&gt;</span> <span class="kt">list</span>
- <span class="n">test</span> <span class="n">e</span> <span class="n">root</span>
+ <span class="n">test</span> <span class="n">e</span> <span class="n">root</span><span class="o">;</span> <span class="mi">0</span>
</pre></div>
<div class="highlight"><pre><span class="nc">S</span> <span class="o">(</span><span class="nc">L</span> <span class="o">[</span><span class="nc">I</span> <span class="mi">1</span><span class="o">;</span> <span class="nc">L</span> <span class="o">[</span><span class="nc">I</span> <span class="mi">2</span><span class="o">];</span> <span class="nc">I</span> <span class="mi">3</span><span class="o">])</span>
View
@@ -1 +1 @@
-{"note":"Don't delete this file! It's used internally to help with page regeneration.","name":"XParsec","body":"**XParsec** works with **[any type](https://github.com/corsis/XParsec/blob/master/XParsec.fsi#L26)**, is **[very easy to extend](https://github.com/corsis/XParsec/blob/master/XParsec.fs#81)**, supports **[domain-specific non-linear navigation](https://github.com/corsis/XParsec/blob/master/XParsec.fs#L122)** and is **[implemented in a single F# file with just ~100 source lines of code](https://github.com/corsis/XParsec/blob/master/XParsec.fs)**.\r\n\r\n(FParsec only works with `Char`s and can only go forward on a one dimensional `String`.)\r\n\r\n# Example 1\r\n\r\n**[XParsec.Xml](https://github.com/corsis/XParsec/blob/master/XParsec.fsi#L65)** is the first XParsec extension. It is **implemented in just 14 source lines of code** for the examples used below and provides complete freedom in navigating XML trees.\r\n\r\n```fsharp\r\nopen XParsec\r\nopen XParsec.Xml\r\n\r\nlet main _ =\r\n\r\n let test parse = printfn \"%A\" << reply << parse << E.source\r\n\r\n let root = E.Parse \"<root><a><b><c><d font='Arial'></d></c></b></a></root>\"\r\n\r\n // domain-specific\r\n // navigation\r\n // v\r\n let parser1 = many (child => name) .>. !@\"font\"\r\n // ^ ^\r\n // powerful first-class\r\n // combinators extensibility\r\n\r\n // graceful choices\r\n let parser2 = (parent => name) </> (!*child >. !@\"font\")\r\n\r\n // graceful non-linear look-ahead (here = down in Xml)\r\n let parser3 = ahead parser1 .>. (current => name)\r\n\r\n // brand-new non-linear look-back (here = up in Xml)\r\n let S d,_ = E.source root |> (!*child >. current)\r\n let parser4 = (ahead <| many (parent => name)) .>. (current => name)\r\n\r\n test parser1 root; test parser2 root; test parser3 root; test parser4 d\r\n```\r\n```fsharp\r\nS ([\"a\"; \"b\"; \"c\"; \"d\"], \"Arial\")\r\nS \"Arial\"\r\nS (([\"a\"; \"b\"; \"c\"; \"d\"], \"Arial\"), \"root\")\r\nS ([\"c\"; \"b\"; \"a\"; \"root\"], \"d\")\r\n```\r\n\r\n# Example 2\r\n\r\nRecursion &ndash; handled with ease.\r\n\r\n```fsharp\r\nopen XParsec\r\nopen XParsec.Xml\r\n\r\ntype Xobj = I of int | L of Xobj list\r\n\r\nlet main _ =\r\n\r\n let root = E.Parse \"<list><int v='1'/><list><int v='2'/></list><int v='3'/></list>\"\r\n\r\n let e,e' = future ()\r\n\r\n let int_ = !<>\"int\" >. !@\"v\" => (Int32.Parse >> I)\r\n let list = !<>\"list\" >. children e => L\r\n\r\n do e' := int_ </> list\r\n\r\n test e root\r\n```\r\n```fsharp\r\nS (L [I 1; L [I 2]; I 3])\r\n```\r\n\r\n# Browse\r\n\r\n+ [Signatures](https://github.com/corsis/XParsec/blob/master/XParsec.fsi#slider)\r\n+ [Implementation](https://github.com/corsis/XParsec/blob/master/XParsec.fs#slider)\r\n\r\n# License\r\n\r\n```\r\nCopyright (c) 2012, Cetin Sert\r\n\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions are\r\nmet:\r\n\r\n * Redistributions of source code must retain the above copyright\r\n notice, this list of conditions and the following disclaimer.\r\n\r\n * Redistributions in binary form must reproduce the above\r\n copyright notice, this list of conditions and the following\r\n disclaimer in the documentation and/or other materials provided\r\n with the distribution.\r\n\r\n * The names of contributors may not be used to endorse or promote\r\n products derived from this software without specific prior\r\n written permission. \r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n```\r\n\r\n# Contact\r\n\r\n[![corsis]](https://github.com/corsis/)\r\n\r\n[cetin@corsis.eu](mailto:fusion@corsis.eu)\r\n\r\n[corsis]: http://portfusion.sourceforge.net/i/l100.png \"Corsis Research\"","tagline":"extensible, type-and-source-polymorphic, non-linear applicative parser combinator library for F# 3.0","google":""}
+{"google":"","body":"**XParsec** works with **[any type](https://github.com/corsis/XParsec/blob/master/XParsec.fsi#L26)**, is **[very easy to extend](https://github.com/corsis/XParsec/blob/master/XParsec.fs#L81)**, supports **[domain-specific non-linear navigation](https://github.com/corsis/XParsec/blob/master/XParsec.fs#L122)** and is **[implemented in a single F# file with just ~100 source lines of code](https://github.com/corsis/XParsec/blob/master/XParsec.fs)**.\r\n\r\n(FParsec only works with `Char`s and can only go forward on a one dimensional `String`.)\r\n\r\n# Example 1\r\n\r\n**[XParsec.Xml](https://github.com/corsis/XParsec/blob/master/XParsec.fsi#L65)** is the first XParsec extension. It is **implemented in just 14 source lines of code** for the examples used below and provides complete freedom in navigating XML trees.\r\n\r\n```fsharp\r\nopen XParsec\r\nopen XParsec.Xml\r\n\r\n[<EntryPoint>]\r\nlet main _ =\r\n\r\n let test parse = printfn \"%A\" << reply << parse << E.source\r\n\r\n let root = E.Parse \"<root><a><b><c><d font='Arial'></d></c></b></a></root>\"\r\n\r\n // domain-specific\r\n // navigation\r\n // v\r\n let parser1 = many (child => name) .>. !@\"font\"\r\n // ^ ^\r\n // powerful first-class\r\n // combinators extensibility\r\n\r\n // graceful choices\r\n let parser2 = (parent => name) </> (!*child >. !@\"font\")\r\n\r\n // graceful non-linear look-ahead (here = down in Xml)\r\n let parser3 = !!parser1 .>. (current => name)\r\n\r\n // brand-new non-linear look-back (here = up in Xml)\r\n let S d,_ = E.source root |> (!*child >. current)\r\n let parser4 = !!(many (parent => name)) .>. (current => name)\r\n\r\n test parser1 root; test parser2 root; test parser3 root; test parser4 d; 0\r\n```\r\n```fsharp\r\nS ([\"a\"; \"b\"; \"c\"; \"d\"], \"Arial\")\r\nS \"Arial\"\r\nS (([\"a\"; \"b\"; \"c\"; \"d\"], \"Arial\"), \"root\")\r\nS ([\"c\"; \"b\"; \"a\"; \"root\"], \"d\")\r\n```\r\n\r\n# Example 2\r\n\r\nRecursion &ndash; handled with ease.\r\n\r\n```fsharp\r\nopen XParsec\r\nopen XParsec.Xml\r\n\r\ntype Xobj = I of int | L of Xobj list\r\n\r\n[<EntryPoint>]\r\nlet main _ =\r\n\r\n let root = E.Parse \"<list><int v='1'/><list><int v='2'/></list><int v='3'/></list>\"\r\n\r\n let e,e' = future ()\r\n\r\n let int_ = !<>\"int\" >. !@\"v\" => (Int32.Parse >> I)\r\n let list = !<>\"list\" >. children e => L\r\n\r\n do e' := int_ </> list\r\n\r\n test e root; 0\r\n```\r\n```fsharp\r\nS (L [I 1; L [I 2]; I 3])\r\n```\r\n\r\n# Browse\r\n\r\n+ [Signatures](https://github.com/corsis/XParsec/blob/master/XParsec.fsi#slider)\r\n+ [Implementation](https://github.com/corsis/XParsec/blob/master/XParsec.fs#slider)\r\n\r\n# License\r\n\r\n```\r\nCopyright (c) 2012, Cetin Sert\r\n\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions are\r\nmet:\r\n\r\n * Redistributions of source code must retain the above copyright\r\n notice, this list of conditions and the following disclaimer.\r\n\r\n * Redistributions in binary form must reproduce the above\r\n copyright notice, this list of conditions and the following\r\n disclaimer in the documentation and/or other materials provided\r\n with the distribution.\r\n\r\n * The names of contributors may not be used to endorse or promote\r\n products derived from this software without specific prior\r\n written permission. \r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n```\r\n\r\n# Contact\r\n\r\n[![corsis]](https://github.com/corsis/)\r\n\r\n[cetin@corsis.eu](mailto:fusion@corsis.eu)\r\n\r\n[corsis]: http://portfusion.sourceforge.net/i/l100.png \"Corsis Research\"","note":"Don't delete this file! It's used internally to help with page regeneration.","tagline":"extensible, type-and-source-polymorphic, non-linear applicative parser combinator library for F# 3.0","name":"XParsec"}
View
@@ -71,7 +71,7 @@ header {
header h1 {
margin: 0;
padding: 0;
- font-size: 48px;
+ font-size: 24px;
line-height: 1.2;
color: #069;
text-shadow: rgba(255, 255, 255, 0.9) 0 1px 0;
@@ -82,8 +82,8 @@ header.without-description h1 {
header p {
margin: 0;
color: #61778B;
- width: 440px;
- font-size: 18px;
+ width: 300px;
+ font-size: 13px;
}
header p.view {
display: none;
@@ -233,7 +233,7 @@ img {
}
code, pre {
- font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, monospace;
+ font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;
color: #333;
font-size: 12px;
overflow-x: auto;
@@ -353,4 +353,4 @@ footer p + p {
header p.view a small:before {
content: 'at http://github.com/';
}
-}
+}

0 comments on commit 178e388

Please sign in to comment.