Joe White’s Blog

Life, .NET, and Cats


Parsing Delphi expressions

It’s commit #111 to my local Subversion repository. I have 234 unit tests so far. And my parser can now handle expressions. Whether it’s 2+2 or Application.Forms[0].ClientWidth, it can build a parse tree for it.

Still far from done. It can’t handle statements yet, so no A := B, no if, no for..in. Nowhere near being able to parse an entire method or a type declaration, much less an entire unit. And it doesn’t have any sort of symbol tables yet, so it doesn’t know Application.Forms from a hole in the wall. But expressions were a big hairy part of the grammar. They took a bit of creative bootstrapping. And they’re working. I’m a happy geek.

No, I can’t post the code yet. Still waiting to hear back from my employer’s legal department on the extent to which they own my soul, and what that means for me in terms of open source.

But I’m psyched about being able to parse expressions. And Jennie is deeply concerned about my mental health.

There are no responses to “Parsing Delphi expressions” yet.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Joe White's Blog copyright © 2004-2008. Portions of the site layout use Yahoo! YUI Reset, Fonts, and Grids.
Proudly powered by WordPress. Entries (RSS) and Comments (RSS).