Parser(3) OCaml library Parser(3)

# [NAME](#NAME)

Parser - no description

# [Module](#Module)

Module Parser

# [Documentation](#Documentation)

Module **Parser**  
: **sig end**

*type token* =  
| WITH  
| WHILE  
| WHEN  
| VIRTUAL  
| VAL  
| UNDERSCORE  
| UIDENT **of** **string**  
| TYPE  
| TRY  
| TRUE  
| TO  
| TILDE  
| THEN  
| STRUCT  
| STRING **of** **(string * Location.t * string option)**  
| STAR  
| SIG  
| SEMISEMI  
| SEMI  
| RPAREN  
| REC  
| RBRACKET  
| RBRACE  
| QUOTED\_STRING\_ITEM **of** **(string * Location.t * string * Location.t * string option)**  
| QUOTED\_STRING\_EXPR **of** **(string * Location.t * string * Location.t * string option)**  
| QUOTE  
| QUESTION  
| PRIVATE  
| PREFIXOP **of** **string**  
| PLUSEQ  
| PLUSDOT  
| PLUS  
| PERCENT  
| OR  
| OPTLABEL **of** **string**  
| OPEN  
| OF  
| OBJECT  
| NONREC  
| NEW  
| MUTABLE  
| MODULE  
| MINUSGREATER  
| MINUSDOT  
| MINUS  
| METHOD  
| METAOCAML\_ESCAPE  
| METAOCAML\_BRACKET\_OPEN  
| METAOCAML\_BRACKET\_CLOSE  
| MATCH  
| LPAREN  
| LIDENT **of** **string**  
| LETOP **of** **string**  
| LET  
| LESSMINUS  
| LESS  
| LBRACKETPERCENTPERCENT  
| LBRACKETPERCENT  
| LBRACKETLESS  
| LBRACKETGREATER  
| LBRACKETBAR  
| LBRACKETATATAT  
| LBRACKETATAT  
| LBRACKETAT  
| LBRACKET  
| LBRACELESS  
| LBRACE  
| LAZY  
| LABEL **of** **string**  
| INT **of** **(string * char option)**  
| INITIALIZER  
| INHERIT  
| INFIXOP4 **of** **string**  
| INFIXOP3 **of** **string**  
| INFIXOP2 **of** **string**  
| INFIXOP1 **of** **string**  
| INFIXOP0 **of** **string**  
| INCLUDE  
| IN  
| IF  
| HASHOP **of** **string**  
| HASH  
| GREATERRBRACKET  
| GREATERRBRACE  
| GREATER  
| FUNCTOR  
| FUNCTION  
| FUN  
| FOR  
| FLOAT **of** **(string * char option)**  
| FALSE  
| EXTERNAL  
| EXCEPTION  
| EQUAL  
| EOL  
| EOF  
| END  
| ELSE  
| EFFECT  
| DOWNTO  
| DOTOP **of** **string**  
| DOTDOT  
| DOT  
| DONE  
| DOCSTRING **of** **Docstrings.docstring**  
| DO  
| CONSTRAINT  
| COMMENT **of** **(string * Location.t)**  
| COMMA  
| COLONGREATER  
| COLONEQUAL  
| COLONCOLON  
| COLON  
| CLASS  
| CHAR **of** **char**  
| BEGIN  
| BARRBRACKET  
| BARBAR  
| BAR  
| BANG  
| BACKQUOTE  
| ASSERT  
| AS  
| ANDOP **of** **string**  
| AND  
| AMPERSAND  
| AMPERAMPER

*exception Error*

*val use\_file* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.toplevel\_phrase list**

*val toplevel\_phrase* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.toplevel\_phrase**

*val parse\_val\_longident* : **(Lexing.lexbuf -&gt; token) -&gt; Lexing.lexbuf -&gt; Longident.t**

*val parse\_pattern* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.pattern**

*val parse\_mty\_longident* : **(Lexing.lexbuf -&gt; token) -&gt; Lexing.lexbuf -&gt; Longident.t**

*val parse\_module\_type* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.module\_type**

*val parse\_module\_expr* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.module\_expr**

*val parse\_mod\_longident* : **(Lexing.lexbuf -&gt; token) -&gt; Lexing.lexbuf -&gt; Longident.t**

*val parse\_mod\_ext\_longident* : **(Lexing.lexbuf -&gt; token) -&gt; Lexing.lexbuf -&gt; Longident.t**

*val parse\_expression* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.expression**

*val parse\_core\_type* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.core\_type**

*val parse\_constr\_longident* : **(Lexing.lexbuf -&gt; token) -&gt; Lexing.lexbuf -&gt; Longident.t**

*val parse\_any\_longident* : **(Lexing.lexbuf -&gt; token) -&gt; Lexing.lexbuf -&gt; Longident.t**

*val interface* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.signature**

*val implementation* : **(Lexing.lexbuf -&gt; token) -&gt;** **Lexing.lexbuf -&gt; Parsetree.structure**

*module MenhirInterpreter :* **sig end**

*module Incremental :* **sig end**

2026-10-01 OCamldoc

---

Document: Parser(3o) from ocaml 5.5.1-r1 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
