<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 11, 2015 at 2:38 AM, leledumbo <span dir="ltr"><<a href="mailto:leledumbo_cool@yahoo.co.id" target="_blank">leledumbo_cool@yahoo.co.id</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> However, I have a question: is there any article about 'how to write<br>
lexical parsers' using Object Pascal?<br>
<br>
First, you need to differentiate them correctly. Lexical scanner (or simply<br>
lexer) and parser, not lexical parser :)<br>
<br>
I've written some simple languages, generating GraphViz, LLVM or C code,<br>
using both self learning reference from the almighty Prof. Niklaus Wirth's<br>
articles, Jack Crenshaw's, the legendary dragon book and many others plus my<br>
compiler course in college.<br>
<br>
I really really suggest Prof. Niklaus Wirth's one<br>
(<a href="http://www.inf.ethz.ch/personal/wirth/" target="_blank">http://www.inf.ethz.ch/personal/wirth/</a>, click the Compiler Construction<br>
link) as it's concise, simple, doesn't use stupid generator (i.e.: easy to<br>
implement by hand) while covering most important parts of the subject. While<br>
he didn't use or stress or even discourage the usage of abstract syntax<br>
tree, he did explain it that's good enough to understand.<br>
<br>
Here's what I've written in the past and is publicly available:<br>
- <a href="https://bitbucket.org/leledumbo/erd-maker" target="_blank">https://bitbucket.org/leledumbo/erd-maker</a> (generates GraphViz code for ERD<br>
visualization)<br>
- <a href="https://bitbucket.org/leledumbo/linguc" target="_blank">https://bitbucket.org/leledumbo/linguc</a> (generates LLVM code that can be<br>
compiled as a library for a mathematically provable language focusing in<br>
database driven application)<br>
<br>
I don't use the direct code generation approach anymore as I found the<br>
abstract syntax tree to be usable for more than just code generation.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-How-to-write-an-eficient-lexical-scanner-parser-tp4041002p4041083.html" target="_blank">http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-How-to-write-an-eficient-lexical-scanner-parser-tp4041002p4041083.html</a><br>
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.<br>
<br>
--<br>
_______________________________________________<br></blockquote></div><br><br><br></div><div class="gmail_extra">When there is NO license information in your repositories , this means that <br><br></div><div class="gmail_extra">"NO one can use them ."<br><br></div><div class="gmail_extra">with respect to copy right laws or conventions .<br><br><br></div><div class="gmail_extra">Thank you very much .<br><br></div><div class="gmail_extra">Mehmet Erol Sanliturk<br><br><br></div></div>