[Lazarus] How to write an eficient lexical scanner/parser?

silvioprog silvioprog at gmail.com
Wed Mar 11 03:04:49 CET 2015

On Fri, Mar 6, 2015 at 3:15 PM, Kostas Michalopoulos <
badsectoracula at gmail.com> wrote:

> This is a classic series of articles that show how to write a very simple
> compiler in Turbo Pascal. The fundamentals when it comes to scanning are
> the same:
> http://compilers.iecc.com/crenshaw/
> I've also written a BASIC implementation for Free Pascal and Lazarus. The
> scanner should be straightforward to understand:
> http://runtimelegend.com/rep/rbasic/artifact/2350e85c36a77e4d2d76adde23fd7d45731b5b22
> The compiler code shows how it can be used:
> http://runtimelegend.com/rep/rbasic/artifact/93859f52fd424edfc1e0d5dfd16a92ed8ac04855
> But you may also find the formatter code simpler. Although it is a bit too
> simple:
> http://runtimelegend.com/rep/rbasic/artifact/f3e9fb2d1ed8e60d36b50754c2d9a7d7c109fc40
> For general theory you can look on recursive descent parsers (they're the
> simplest to implement and AFAIK most compilers use them, either to build
> the token list or directly).

I downloaded the PDF with all articles.

Thank you very much!

Silvio Cl├ęcio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150310/6ae0594b/attachment-0003.html>

More information about the Lazarus mailing list