From: skaller <skaller@users.sourceforge.net>
To: Alessandro Baretta <a.baretta@barettadeit.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Another nasty with ocamlyacc: magic needed?
Date: Mon, 05 Dec 2005 19:52:49 +1100 [thread overview]
Message-ID: <1133772769.8957.168.camel@rosella> (raw)
In-Reply-To: <4393E75C.9000608@barettadeit.com>
On Mon, 2005-12-05 at 08:08 +0100, Alessandro Baretta wrote:
> skaller wrote:
> > I have what looks like a showstopper (meaning black magic
> > seems to be the only solution).
> >
> > I need two *distinct* parsers which use the same set
> > of tokens. This is currently impossible AFAICS without
> > magic (distinct -- in a different module entirely)
> Let's not overstate the problem. Yacc is an imperfect tool.
Yup :)
> Firstly, remember that can
> define as many parser entry points as your heat desires.
I do. It is useful. But the secondary parser is an RD parser
interpreter. The idea isn't to allow arbitrary grammar
extensions .. only to make particular yacc productions
open-recursive closed by the dynamically built table
of extensions.
Thus the RD parser calls back into yacc entry points,
and, the yacc productions call into the RD parser entry
points. This is organised via the lexer.
> Secondly, after compiling the automaton with ocamlyacc, you can always
> delete and regenerate the interface with ocamlc -i.
Yes, that is possible, but the result is contains undesired
entry points (tables and whatnot). It also isn't clear
how good a solution this is if I have to paste many other
modules into it -- I can always build the whole program
as a single module :)
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
next prev parent reply other threads:[~2005-12-05 8:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 5:35 skaller
2005-12-05 6:25 ` [Caml-list] " Geoff Wozniak
2005-12-05 7:08 ` Alessandro Baretta
2005-12-05 8:52 ` skaller [this message]
2005-12-05 9:05 ` Alessandro Baretta
2005-12-06 0:41 ` skaller
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=1133772769.8957.168.camel@rosella \
--to=skaller@users.sourceforge.net \
--cc=a.baretta@barettadeit.com \
--cc=caml-list@yquem.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