aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-07-11 03:17:10 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-07-11 03:17:10 -0300
commiteb81c07047979f3fe53383ff2a42393f0b29bd28 (patch)
treee9cac26f28e7f2ca3259be25769dfdd23e04f43b /lib
parent40376c3ea009eab4db9ba27837e61d8bec310b8f (diff)
downloadSOL-eb81c07047979f3fe53383ff2a42393f0b29bd28.tar.gz
SOL-eb81c07047979f3fe53383ff2a42393f0b29bd28.zip
embedding surface, host world test, deep recursion, line tracking
Diffstat (limited to 'lib')
-rw-r--r--lib/lexer.mll3
-rw-r--r--lib/world.mli7
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/lexer.mll b/lib/lexer.mll
index 417369b..90beacf 100644
--- a/lib/lexer.mll
+++ b/lib/lexer.mll
@@ -27,7 +27,8 @@ let ident = ['A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '0'-'9' '_']*
let string_body = ([^ '"' '\\'] | '\\' _)*
rule token = parse
- | [' ' '\t' '\r' '\n']+ { token lexbuf }
+ | '\n' { Lexing.new_line lexbuf; token lexbuf }
+ | [' ' '\t' '\r']+ { token lexbuf }
| '%' [^ '\n']* { token lexbuf }
| "#(" { HASH_LPAREN }
| '(' { LPAREN }
diff --git a/lib/world.mli b/lib/world.mli
index 0a3bb9a..51ee078 100644
--- a/lib/world.mli
+++ b/lib/world.mli
@@ -79,6 +79,13 @@ type pending = {
attribute value; admissible iff it has a solution. *)
}
+val expr_of_node : Ast.node -> (expr, error) result
+(** Compiles one surface expression: names resolve by context,
+ [Exists] lowers, quantified variables rename apart. This is the
+ embedding hosts' way in: they compile queries themselves and
+ answer for their own relations, so no standalone reference
+ checking happens here. *)
+
(** The standalone world: an immutable catalog loaded from program
text. This is Sol as a separate language; there are no branches,
no transitions, only the pure fragment. *)