From: Joel Reymont <joelr1@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: Menhir and ocamlyacc: Ambiguous grammar
Date: Tue, 1 May 2007 20:16:33 +0100 [thread overview]
Message-ID: <8E37041B-229B-4C5C-9964-C468C347E426@gmail.com> (raw)
name_shares:
| LP expr RP expr SHARES { (Some $2, `Qty $4) }
| LP expr RP { (Some $2, `All) }
| expr SHARES { (None, `Qty $1) }
| { (None, `All) }
This is intended to parse a "name" that is followed by the # of shares.
The problem is that expr itself can be LP expr LP in which case the
only differentiator is the SHARES that follows.
Is there any way to parse this using ocamlyacc or Menhir?
Thanks, Joel
--
http://wagerlabs.com/
reply other threads:[~2007-05-01 19:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8E37041B-229B-4C5C-9964-C468C347E426@gmail.com \
--to=joelr1@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox