<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Looks like Applicative style.  This is good, even while I don&#39;t really</div>

know why we are seeing &lt;@&gt; and &lt;#&gt; instead of &lt;$&gt; and &lt;*&gt;.<br>
<br>
How does Grempa compare with other parsing libraries/tools, such as<br>
Parsec, Attoparsec and Happy, with regard to ease of use and<br>
performance?<br>
<br>
Cheers! =)<br>
<br>
--<br>
<font color="#888888">Felipe.<br></font></blockquote><div> </div></div><meta http-equiv="content-type" content="text/html; charset=utf-8">Yes, it is indeed in applicative style. The reason for &lt;@&gt; and &lt;#&gt; is that the functions have slightly different constraints to them, compared to the Applicative equivalents. The arguments passed to the function have to be instances of the ToSym class, which converts terminals and non-terminals to symbols. This allows writing the grammars in the way seen above (&quot;Plus &lt;@&gt; e &lt;# &#39;+&#39; &lt;#&gt; t&quot;) instead of something like &quot;Plus &lt;@&gt; nont e &lt;# tok &#39;+&#39; &lt;#&gt; nont t&quot;.<div>
<br></div><div>I have yet to do any library comparisons on performance, but it should be faster than monadic combinator style libraries, as it does not have the exponential corner-cases that those parsers can have. It is also easier to write the grammars in Grempa&#39;s BNF-like syntax where left-recursion is permitted. Some comparison benchmarks would be interesting though, and I will look into it in the future. I have already done some profiling to eliminate the worst deficiencies of Grempa, but there is definitely room for improvements still.</div>
<div><br></div><div>The library does not do lexing for you, which some of the other libraries have support for, which can make it harder to use. A plus for me (compared to Happy) is that you do not have to run an external program every time your grammar has changed, but can instead just recompile your project.</div>
<div><br></div><div>I&#39;m glad to see some interest in the project!</div>