lexer.mli 634 B

1234567891011121314151617
  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. exception LexError of string
  9. val discard : Lexbuf.t -> unit
  10. (** Discard the remaining element in the location until the end of this one.
  11. Used in case of unrecoverable error *)
  12. val main : Lexbuf.t -> Tokens.token
  13. (** Main entry point. This function is called after each token returned *)