From eb81c07047979f3fe53383ff2a42393f0b29bd28 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 11 Jul 2026 03:17:10 -0300 Subject: embedding surface, host world test, deep recursion, line tracking --- lib/lexer.mll | 3 ++- lib/world.mli | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') 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. *) -- cgit v1.2.3