<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 11, 2015 at 6: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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>> However, I have a question: is there any article about 'how to write<br>
lexical parsers' using Object Pascal?<br>
<br>
</span>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></blockquote><div><br></div><div>Buddy, thanks alot for that information. I'll take a look at this! =) </div><div><br></div></div>--<br><div>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a></div>
</div></div>