top | item 43386352

(no title)

kwon-young | 11 months ago

Funny how we can stumble on the same idea from a different perspective. In my case, I wanted to generate efficient C code for an array library written in prolog. The logical solution was to manipulate a C ast from prolog, but since a lot of the ast needed to be written by me, I chose to make it very similar to the original C syntax. Here is the grammar generating tokens from the ast and then c code from tokens: https://github.com/kwon-young/array/blob/master/c99.pl

And some example uses: https://github.com/kwon-young/array/blob/master/kernel.pl#L5...

discuss

order

No comments yet.