ignore comments at REPL
Cut-and-paste from .dyna files into the repl currently fails because the repl doesn't quite know about comments. A trailing comment gives an error that the line doesn't end in a period ... unless the comment ends in a period!
I think you just need to do the period check after stripping comments, not before.
... and multi-line rules aren't handled correctly.
Oh right, I ran into that too.
On Tue, Jun 18, 2013 at 12:04 PM, Tim Vieira [email protected]:
... and multi-line aren't handled correctly.
— Reply to this email directly or view it on GitHubhttps://github.com/nwf/dyna/issues/22#issuecomment-19621566 .
Tim, after the LI thing, we should figure out how to make the compiler have a captive mode for the REPL's use. This seems like as good a bug as any upon which to note that.
As a temporary measure you can now use the REPL command > paste which will pull rules from your clipboard and load them all at once. So, if there is a comment or line break it shouldn't break stuff.
$ ./dyna
> paste
pathto(start) min= 0 with_key [start].
pathto(V) min= pathto(U) + edge(U,V) with_key [V | bestpath(U)].
bestpath(V) = $key(pathto(V)).
>>> ok? [Y/n]
entertaining ...
This is how IPython does it...
On Fri, Aug 2, 2013 at 12:37 PM, Jason Eisner [email protected]:
entertaining ...
— Reply to this email directly or view it on GitHubhttps://github.com/nwf/dyna/issues/22#issuecomment-22017736 .