maradydd: (Default)
[personal profile] maradydd
I just wrote an attribute grammar for the general object-encoding rules. (Not all of BER; that's next. Just section 8.1 of X.690.) Unless sections 8.2 through 8.22 throw me a curveball, which it doesn't look like they will, QED. It's fully left-recursive and uses only synthesized attributes, for all your efficient parsing needs. Boo yah.

If anyone playing along at home wants to have a look, drop me a comment.

FWIW, attribute grammars are absurdly simple in Haskell; Happy supports them natively. (Attribute grammars are somewhat intractable in strictly-evaluated languages because if you have to use strict evaluation, the data dependency graph gets impractically large very quickly. Haskell, which uses lazy evaluation, doesn't have this problem. Every day I come to love this little language more and more. Oh, and I can do a multiple-entry-point approach to support CER and DER. Seriously, how cool is that?)

Don Knuth, Haskell Curry, Simon Peyton-Jones, Simon Marlow and Andy Gill are totally my heroes forever and ever.

(no subject)

Date: 2009-08-11 08:53 pm (UTC)
From: [identity profile] alexey-rom.livejournal.com
I expect you've seen this already: http://www.haskell.org/haskellwiki/The_Monad.Reader/Issue4/Why_Attribute_Grammars_Matter

(no subject)

Date: 2009-08-11 09:05 pm (UTC)
From: [identity profile] maradydd.livejournal.com
I had not, though that's awesome and I may very well end up citing it in my thesis. Thanks!

(no subject)

Date: 2009-08-14 11:57 am (UTC)
From: [identity profile] http://users.livejournal.com/_rck_/
What is the thesis about? (And yes, I would like to see the code.)

Profile

maradydd: (Default)
maradydd

September 2010

S M T W T F S
   1234
567891011
12131415 161718
19202122232425
26 27282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags