Using the datalog reader for racklog

original commit: 12797fef41119f956e70537450a7f38339fa1d62
This commit is contained in:
Jay McCarthy 2010-06-28 11:08:03 -06:00
parent a89d757639
commit 96d80cf95a
8 changed files with 11 additions and 3 deletions

View File

@ -54,6 +54,7 @@
(provide/contract
[current-theory (parameter/c mutable-theory/c)]
[print-literals ((listof literal?) . -> . void)]
[eval-program (program/c . -> . void)]
[eval-top-level-statement (statement/c . -> . void)]
[eval-statement (statement/c . -> . (or/c void (listof literal?)))]

View File

@ -11,8 +11,7 @@
[(color-lexer)
(dynamic-require 'datalog/tool/syntax-color 'get-syntax-token)]
[(configure-runtime)
(λ ()
(current-read-interaction even-read))]
(λ () (current-read-interaction even-read))]
[else (default key defval)]))
(require datalog/parse
datalog/private/compiler)

View File

@ -22,7 +22,7 @@ on tabling intermediate results ensures that all queries terminate.
@table-of-contents[]
@section{Datalog Module Language}
@section[#:tag "datalog"]{Datalog Module Language}
@defmodulelang[datalog]

View File

@ -538,6 +538,9 @@ This library provides facilities for evaluating Datalog. It can be required via:
The @tech{theory} used by @racket[eval-program] and @racket[eval-stmt].
}
@defproc[(print-literals [ls (listof literal?)]) void]{
Pretty formats the literals for display. }
@defproc[(eval-program [p program/c])
void]{
Evaluates @racket[p] using @racket[(current-theory)] as the @tech{theory}, printing query answers as it goes.

View File

@ -0,0 +1,2 @@
permit(rams, store, rams_couch).
permit(will, fetch, rams_couch).

View File

@ -0,0 +1 @@
this_is_a_long_identifier_and_tests_the_scanners_concat_when_read_with_a_small_buffer.

View File

@ -0,0 +1 @@
says(tpme1, m1).

View File

@ -0,0 +1 @@
true.