aboutsummaryrefslogtreecommitdiff
path: root/lib/qparser/lexbuf.mli
diff options
context:
space:
mode:
authorChimrod <>2023-10-06 08:35:56 +0200
committerChimrod <>2023-10-06 08:35:56 +0200
commit97ab5c9a21166f0bffee482210d69877fd6809fa (patch)
treed1fa44000fa07631edc8924a90020f2cfe637263 /lib/qparser/lexbuf.mli
parent40f4dbe7844725e0ab07f03f25c35f55b4699b46 (diff)
Moved qparser and syntax in the library folder
Diffstat (limited to 'lib/qparser/lexbuf.mli')
-rw-r--r--lib/qparser/lexbuf.mli25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/qparser/lexbuf.mli b/lib/qparser/lexbuf.mli
new file mode 100644
index 0000000..41f07d1
--- /dev/null
+++ b/lib/qparser/lexbuf.mli
@@ -0,0 +1,25 @@
+type t
+
+val from_lexbuf : ?reset_line:bool -> Sedlexing.lexbuf -> t
+(** Create a new buffer *)
+
+val start : t -> unit
+(** Intialize a new run *)
+
+val buffer : t -> Sedlexing.lexbuf
+(** Extract the sedlex buffer. Required in each rule. *)
+
+val positions : t -> Lexing.position * Lexing.position
+(** Extract the starting and ending position for the matched token *)
+
+val content : t -> string
+(** Extract the token matched by the rule *)
+
+val set_start_position : t -> Lexing.position -> unit
+val tokenize : (t -> 'a) -> t -> unit -> 'a * Lexing.position * Lexing.position
+val incr_level : t -> unit
+val decr_level : t -> unit
+val reset_level : t -> unit
+
+val level : t -> int
+(** Return the nested expression level *)