Stdlib.Parsing(3)
hii bestie π okay so this is the Stdlib.Parsing page from the OCaml library manual β manual name: Stdlib.Parsing(3). The header is doing its thing up top, weβre just folding the name in here so nobody copies a line, periodt.
β¨ NAME β¨
Stdlib.Parsing β the source literally says no description, bestie π. Thatβs it. Thatβs the whole NAME section.
π§© Module
Module Stdlib.Parsing
π Documentation
Module Parsing : (module Stdlib__Parsing)
val symbol_start : unit -> intβsymbol_startandParsing.symbol_endare to be called in the action part of a grammar rule only, okay? They return the offset of the string that matches the left-hand side of the rule:symbol_start()returns the offset of the first character;symbol_end()returns the offset after the last character. The first character in a file is at offset0. πval symbol_end : unit -> intβ seeParsing.symbol_startfor the whole vibe, bestie.val rhs_start : int -> intβ Same asParsing.symbol_startandParsing.symbol_end, but return the offset of the string matching the n th item on the right-hand side of the rule, where n is the integer parameter torhs_startandrhs_end. n is1for the leftmost item. β¨val rhs_end : int -> intβ SeeParsing.rhs_start. πval symbol_start_pos : unit -> Lexing.positionβ Same assymbol_start, but return a position instead of an offset. π¦val symbol_end_pos : unit -> Lexing.positionβ Same assymbol_end, but return a position instead of an offset. πΈval rhs_start_pos : int -> Lexing.positionβ Same asrhs_start, but return a position instead of an offset. πval rhs_end_pos : int -> Lexing.positionβ Same asrhs_end, but return a position instead of an offset. βval clear_parser : unit -> unitβ Empty the parser stack, bestie. Call it just after a parsing function has returned, to remove all pointers from the parser stack to structures that were built by semantic actions during parsing. This is optional, but lowers the memory requirements of the programs. π§Ήβ¨exception Parse_errorβ Raised when a parser encounters a syntax error. Can also be raised from the action part of a grammar rule, to initiate error recovery. ππval set_trace : bool -> boolβ Control debugging support forocamlyacc-generated parsers. AfterParsing.set_trace true, the pushdown automaton that executes the parsers prints a trace of its actions (reading a token, shifting a state, reducing by a rule) on standard output.Parsing.set_trace falseturns this debugging trace off. The boolean returned is the previous state of the trace flag. Since 3.11 π₯
mwah π thatβs the whole page, no cap. Cute lil footer sign-off: source/version is OCamldoc, date is 2026-06-22, and the page is Stdlib.Parsing(3). byeee π«Άβ¨
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms