diff options
author | Maxence Guesdon <maxence.guesdon@inria.fr> | 2010-03-08 16:54:13 +0000 |
---|---|---|
committer | Maxence Guesdon <maxence.guesdon@inria.fr> | 2010-03-08 16:54:13 +0000 |
commit | 470d7e9d269ac1f5418315499f4778f279d7e863 (patch) | |
tree | 7e23028e1da9c1736fb8bd03bd18dbcd02070ae3 /ocamldoc/odoc_text_parser.mly | |
parent | 4a15d709497e8a2174c2b5c53c5ca461a83cd6f1 (diff) |
PR#4915: new syntax {%format: code %} to put target format specific code
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9638 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_text_parser.mly')
-rw-r--r-- | ocamldoc/odoc_text_parser.mly | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ocamldoc/odoc_text_parser.mly b/ocamldoc/odoc_text_parser.mly index fe2fa7c9e..478cfa074 100644 --- a/ocamldoc/odoc_text_parser.mly +++ b/ocamldoc/odoc_text_parser.mly @@ -47,7 +47,8 @@ let print_DEBUG s = print_string s; print_newline () %token VERB %token END_VERB %token LATEX -%token END_LATEX +%token <string> Target +%token END_TARGET %token LBRACE %token ELE_REF @@ -145,7 +146,8 @@ text_element: } | INDEX_LIST { Index_list } | VERB string END_VERB { Verbatim $2 } -| LATEX string END_LATEX { Latex $2 } +| LATEX string END_TARGET { Latex $2 } +| Target string END_TARGET { Target ($1, $2) } | LINK string END text END { Link ($2, $4) } | BLANK_LINE { Newline } | BEGIN_SHORTCUT_LIST_ITEM shortcut_list END_SHORTCUT_LIST { List $2 } |