module Pdfgenlex:sig..end
A very fast lexer for very basic tokens
type t =
| |
LexNull |
| |
LexBool of |
| |
LexInt of |
| |
LexReal of |
| |
LexString of |
| |
LexName of |
| |
LexLeftSquare |
| |
LexRightSquare |
| |
LexLeftDict |
| |
LexRightDict |
| |
LexStream of |
| |
LexEndStream |
| |
LexObj |
| |
LexEndObj |
| |
LexR |
| |
LexComment of |
| |
StopLexing |
| |
LexNone |
To avoid too much storage allocation (and hence garbage collection), we use
the same data type for this very basic lexing module as for the main lexing in
Pdfread. Eventually, we may unify this with the parsing type too.
val string_of_token : t -> stringFor debug only.
val string_of_tokens : t list -> stringFor debug only.
val lex_single : Pdfio.input -> tLex a single token from a Pdfio.input.
val lex : Pdfio.input -> t listLex all the token in a Pdfio.input.
val lex_string : string -> t listLex all the tokens from a string.