Merge branch 'master' into doc-private

This commit is contained in:
Rudi Grinberg 2018-06-07 20:09:41 +07:00 committed by GitHub
commit cbc3464a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 25 deletions

View File

@ -19,5 +19,6 @@ Welcome to jbuilder's documentation!
usage
advanced-topics
configurator
menhir
faq
known-issues

View File

@ -521,30 +521,8 @@ To use a different rule mode, use the long form:
menhir
------
The basic form for defining menhir parsers (analogous to ocamlyacc) is:
.. code:: scheme
(menhir
((modules (<parser1> <parser2> ...))))
Modular parsers can be defined by adding a ``merge_into`` field. This correspond
to the ``--base`` command line option of ``menhir``. With this option, a single
parser named ``base_name`` is generated.
.. code:: scheme
(menhir
((merge_into <base_name>)
(modules (<parser1> <parser2> ...))))
Extra flags can be passed to menhir using the ``flags`` flag:
.. code:: scheme
(menhir
((flags (<option1> <option2> ...))
(modules (<parser1> <parser2> ...))))
A ``menhir`` stanza is available to support the menhir_ parser generator. See
the :ref:`menhir-main` section for details.
alias
-----

32
doc/menhir.rst Normal file
View File

@ -0,0 +1,32 @@
.. _menhir-main:
******
Menhir
******
The basic form for defining menhir_ parsers (analogous to ocamlyacc) is:
.. code:: scheme
(menhir
((modules (<parser1> <parser2> ...))))
Modular parsers can be defined by adding a ``merge_into`` field. This correspond
to the ``--base`` command line option of ``menhir``. With this option, a single
parser named ``base_name`` is generated.
.. code:: scheme
(menhir
((merge_into <base_name>)
(modules (<parser1> <parser2> ...))))
Extra flags can be passed to menhir using the ``flags`` flag:
.. code:: scheme
(menhir
((flags (<option1> <option2> ...))
(modules (<parser1> <parser2> ...))))
.. _menhir: https://gitlab.inria.fr/fpottier/menhir

View File

@ -1,7 +1,7 @@
open! Import
module Name : sig
type t = private string
type t
val add_suffix : t -> string -> t