package acgtk

  1. Overview
  2. Docs

Parameters

module E : E

Signature

type bracket =
  1. | Round
  2. | Square
  3. | Curly
type lex_error =
  1. | Unstarted_comment
  2. | Unstarted_bracket
  3. | Mismatch_parentheses of bracket
  4. | Unclosed_comment
  5. | Expect of string
  6. | Bad_token
type synt_error = E.t
type error =
  1. | SyntError of synt_error
  2. | LexError of lex_error
  3. | SysError of string
exception Error of error * location

The exception that should be raised when an error occur

val error_msg : ?filename:string -> (error * location) -> string

error_msg e ~filename returns a string describing the error e while the file filename is being processed

val empty_bracket_stack : (bracket * location) list
val push_bracket : bracket -> location -> (bracket * location) list -> (bracket * location) list
val pop_bracket : bracket -> location -> (bracket * location) list -> (bracket * location) list
val check_brackets : (bracket * location) list -> unit