summaryrefslogtreecommitdiff
path: root/stdlib/parsing.mli
diff options
context:
space:
mode:
authorMaxence Guesdon <maxence.guesdon@inria.fr>2001-10-26 22:38:48 +0000
committerMaxence Guesdon <maxence.guesdon@inria.fr>2001-10-26 22:38:48 +0000
commitb95796f46183761597e00edfaa495134f75a2559 (patch)
tree384497c174f6362c20f93dac13f0b8d64dfc3fb9 /stdlib/parsing.mli
parent7c6c78a292f25df48d3dd4197a065231fc090292 (diff)
downloadocaml-b95796f46183761597e00edfaa495134f75a2559.tar.gz
Modification emplacement et syntaxe commentaires pour OCamldoc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3926 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/parsing.mli')
-rw-r--r--stdlib/parsing.mli49
1 files changed, 29 insertions, 20 deletions
diff --git a/stdlib/parsing.mli b/stdlib/parsing.mli
index fd67a126b1..144c7e28e0 100644
--- a/stdlib/parsing.mli
+++ b/stdlib/parsing.mli
@@ -12,37 +12,46 @@
(* $Id$ *)
-(* Module [Parsing]: the run-time library for parsers generated by [ocamlyacc]*)
+(** The run-time library for parsers generated by [ocamlyacc]. *)
+(** [symbol_start] and {!Parsing.symbol_end} are to be called in the action part
+ of a grammar rule only. They return the position of the string that
+ matches the left-hand side of the rule: [symbol_start()] returns
+ the position of the first character; [symbol_end()] returns the
+ position of the last character, plus one. The first character
+ in a file is at position 0. *)
val symbol_start : unit -> int
+
+(** See {!Parsing.symbol_start}. *)
val symbol_end : unit -> int
- (* [symbol_start] and [symbol_end] are to be called in the action part
- of a grammar rule only. They return the position of the string that
- matches the left-hand side of the rule: [symbol_start()] returns
- the position of the first character; [symbol_end()] returns the
- position of the last character, plus one. The first character
- in a file is at position 0. *)
+
+(** Same as {!Parsing.symbol_start} and {!Parsing.symbol_end}, but return the
+ position of the string matching the [n]th item on the
+ right-hand side of the rule, where [n] is the integer parameter
+ to [lhs_start] and [lhs_end]. [n] is 1 for the leftmost item. *)
val rhs_start: int -> int
+
+(** See {!Parsing.rhs_start}. *)
val rhs_end: int -> int
- (* Same as [symbol_start] and [symbol_end], but return the
- position of the string matching the [n]th item on the
- right-hand side of the rule, where [n] is the integer parameter
- to [lhs_start] and [lhs_end]. [n] is 1 for the leftmost item. *)
+
+(** Empty the parser stack. 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. *)
val clear_parser : unit -> unit
- (* Empty the parser stack. 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. *)
+(** Raised when a parser encounters a syntax error.
+ Can also be raised from the action part of a grammar rule,
+ to initiate error recovery. *)
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. *)
+
(*--*)
-(* The following definitions are used by the generated parsers only.
+(** {2 } *)
+
+(** The following definitions are used by the generated parsers only.
They are not intended to be used by user programs. *)
type parser_env