lexer.mli 695 B

1234567891011121314151617181920
  1. (** Provide a lexer for the langage. The function [main] read the source and
  2. identify the next to token to give to the parser.
  3. Personal note: parsing the QSP is really complicated. The language was
  4. designed for regex and I have to twist the lexer in order to get something
  5. working. *)
  6. exception EOF
  7. exception UnclosedQuote
  8. (** Error reported when a string is not closed properly *)
  9. exception LexError of string
  10. val discard : Lexbuf.t -> unit
  11. (** Discard the remaining element in the location until the end of this one.
  12. Used in case of unrecoverable error *)
  13. val main : Lexbuf.t -> Tokens.token
  14. (** Main entry point. This function is called after each token returned *)