Re: Reia PEG

6 views
Skip to first unread message

Tony Arcieri

unread,
Nov 29, 2010, 3:55:12 PM11/29/10
to Graeme Defty, Reia Mailing List
On Mon, Nov 29, 2010 at 12:34 AM, Graeme Defty <graeme...@gmail.com> wrote:
Tony,

After a bit of a delay I am back on this. The PEG grammar is complete (up to the point of a bit of testing, anyway ;-) )  and i am trying to integrate it into the Reia compiler.

Awesome!
 
So far, I have

- incorporated the PEG into my local source tree
- dummied out the build of Neotoma (you were right, I needed the new one, and I have it loaded already so this seemed easier than updating in the source tree as a temp measure)
- amended my source for the changes you have made around classes and modules (syntax fixes only, I am sure there will be errors in there, but I will check and adjust the unit tests later)
- so far so good but (now the bad bit) at the end of the build, when the tests run it produces the following...

bin/reiac -o ebin/object.reb src/builtins/object.re
bin/reiac -o ebin/code.reb src/core/code.re

Well that's all good. It sounds like it's working well enough to compile the core Reia modules and classes, which means your grammar is complete enough to parse all of the core classes and give the compiler something it at least doesn't choke on.
 
bin/reia test/runner.re
{"init terminating in do_boot",{badarg,[{re,run,[[{eol,9},{module,9},{module_name,9,'Dir'},{eol,10},{def,10},{identifier,10,list},{'(',10},{identifier,10,dir},{')',10},{eol,11},{case,11},{erl,11},{'.',11},{identifier,11,file},{'.',11},{identifier,11,list_dir},{'(',11},{identifier,11,dir},{'.',11},{identifier,11,to_list},{'(',11},{')',11},{')',11},{eol,12},{when,12},{'(',12},{atom,12,ok},{',',12},{identifier,12,filenames},{')',12},{eol,13},{'[',13},{identifier,13,filename},{'.',13},{identifier,13,to_string},{'(',13},{')',13},{for,13},{identifier,13,file
etc.

This looks like it's dying while trying to load the standard library. In this case, it's attempting to run a regex, except the argument appears to be the parse tree.

Any interesting directions to point me in?

Is this up on your github? If so I'll take a look.

--
Tony Arcieri
Medioh! A Kudelski Brand

Graeme Defty

unread,
Nov 29, 2010, 9:20:51 PM11/29/10
to Tony Arcieri, Reia Mailing List
Tony,

Not yet.

Give me a few hours to get home and I will push it.

g
Reply all
Reply to author
Forward
0 new messages