<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif"><br>
The original question was about a lexer do use with buffalo. PEG
parsers do the equivalent of yacc + lex but it should be
possible to use a PEG parser to do only the lexer part to use
with buffalo.<br>
Optima (and optima.ppcre) is another library that can be used
for lexers.<br>
<br>
Marc<br>
<br>
</font></font>
<div class="moz-cite-prefix">On 2/14/15 17:31, Paul Tarvydas wrote:<br>
</div>
<blockquote
cite="mid:D70F02CD-5E96-4856-9DA0-8BCCB5C74611@gmail.com"
type="cite">
<pre wrap="">I wish that I’d had PEG 20 years ago,
PEG parses a wider set of grammars than YACC can.
PEG is backtracking, but, it uses a trick, memoizing, that minimizes the cost of backtracking.
Given the hardware we have these days, I don’t see why anyone would use anything but PEG and packrat parsing.
Google phrase “bryan ford peg”
Building a PEG parser is way, way easier than dealing with Lex and YACC.
I’m not sure if I’ve answered all of your questions … please feel free to ask again....
pt
</pre>
<blockquote type="cite">
<pre wrap="">On Feb 14, 2015, at 4:47 PM, Gary King <a class="moz-txt-link-rfc2396E" href="mailto:garywarrenking@gmail.com"><garywarrenking@gmail.com></a> wrote:
Hi Paul,
What is the performance of Esrap vis-a-vis something like cl-yac? Given a BN grammar, how hard is it to build up a PEG parser?
thanks,
</pre>
<blockquote type="cite">
<pre wrap="">On Feb 13, 2015, at 10:04 AM, Paul Tarvydas <a class="moz-txt-link-rfc2396E" href="mailto:paultarvydas@gmail.com"><paultarvydas@gmail.com></a> wrote:
Esrap is a PEG parser. PEG is Lex and Yacc combined. I'm sure that you could use esrap as a lexer-only, if you wish to.
<a class="moz-txt-link-freetext" href="http://nikodemus.github.io/esrap/">http://nikodemus.github.io/esrap/</a>
On my github there's an experimental PEG syntax overlaid over esrap syntax, if you care. <a class="moz-txt-link-freetext" href="https://github.com/guitarvydas">https://github.com/guitarvydas</a>
Ping me if you need ref's to papers about PEG.
pt
_______________________________________________
pro mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pro@common-lisp.net">pro@common-lisp.net</a>
<a class="moz-txt-link-freetext" href="https://mailman.common-lisp.net/cgi-bin/mailman/listinfo/pro">https://mailman.common-lisp.net/cgi-bin/mailman/listinfo/pro</a>
</pre>
</blockquote>
<pre wrap="">
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM * gwking on twitter
_______________________________________________
pro mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pro@common-lisp.net">pro@common-lisp.net</a>
<a class="moz-txt-link-freetext" href="https://mailman.common-lisp.net/cgi-bin/mailman/listinfo/pro">https://mailman.common-lisp.net/cgi-bin/mailman/listinfo/pro</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
pro mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pro@common-lisp.net">pro@common-lisp.net</a>
<a class="moz-txt-link-freetext" href="https://mailman.common-lisp.net/cgi-bin/mailman/listinfo/pro">https://mailman.common-lisp.net/cgi-bin/mailman/listinfo/pro</a>
</pre>
</blockquote>
<br>
</body>
</html>