diff options
author | Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr> | 2012-05-30 14:52:37 +0000 |
---|---|---|
committer | Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr> | 2012-05-30 14:52:37 +0000 |
commit | d39d43e55fab716fbe05cec3c89233f0dd208835 (patch) | |
tree | bf5c56aa9bb32a0e3d49509b8b2863a9ec407563 /ocamldoc/odoc_text_parser.mly | |
parent | e3d82817909dd7bc69dff4f75aa63c5ba606d9c8 (diff) |
merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_text_parser.mly')
-rw-r--r-- | ocamldoc/odoc_text_parser.mly | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ocamldoc/odoc_text_parser.mly b/ocamldoc/odoc_text_parser.mly index 478cfa074..55909141b 100644 --- a/ocamldoc/odoc_text_parser.mly +++ b/ocamldoc/odoc_text_parser.mly @@ -80,8 +80,9 @@ let print_DEBUG s = print_string s; print_newline () %token <string> Char /* Start Symbols */ -%start main +%start main located_element_list %type <Odoc_types.text> main +%type <(int * int * Odoc_types.text_element) list> located_element_list %% main: @@ -98,6 +99,16 @@ text_element_list: | text_element text_element_list { $1 :: $2 } ; +located_element_list: + located_element { [ $1 ] } +| located_element located_element_list { $1 :: $2 } +; + +located_element: + text_element { Parsing.symbol_start (), Parsing.symbol_end (), $1} +; + + ele_ref_kind: ELE_REF { None } | VAL_REF { Some RK_value } |