caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Max Kirillov <max630@mail.ru>
To: caml-list@inria.fr
Subject: Re: [Caml-list] stream parser jump-back
Date: Tue, 6 Aug 2002 10:05:23 +0700	[thread overview]
Message-ID: <20020806100523.D17263@max.home> (raw)
In-Reply-To: <20020805084039.F29829@verdot.inria.fr>; from daniel.de_rauglaudre@inria.fr on Mon, Aug 05, 2002 at 08:40:39AM +0200


On Mon, Aug 05, 2002 at 08:40:39AM +0200, Daniel de Rauglaudre wrote:
>> Is it possible in a stream parser to parse again already
>> accepted token.
> No.

Sad.

Well, in the case I can simply note that little of module_expr
may be misparsed as expr, and define something like

module_expr_or_expr:
    [[ ... -> (<:module_expr< ...>>,<:expr< ...>>)]]
expr:
    [[ (m1,_) = module_expr_or_expr; "." ... 
    | (_,e1) = module_expr_or_expr -> e1
    ]]

and so on.

> You can add a grammar entry defined by a parser. There are examples of
> that in the "normal" syntax (pa_o.ml, in Camlp4, subdirectory etc).
> See entries "test_ctyp_minusgreater", "test_label_eq",
> "test_typevar_list_dot". But I consider they are "hacks" to make
> some situation work.

Thank you.
That funcs use Stream.npeek to get a content of the stream,
than parse it manually. Hmm...

Max.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


      reply	other threads:[~2002-08-06  3:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-04 18:59 Max Kirillov
2002-08-05  6:40 ` Daniel de Rauglaudre
2002-08-06  3:05   ` Max Kirillov [this message]

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=20020806100523.D17263@max.home \
    --to=max630@mail.ru \
    --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;
as well as URLs for NNTP newsgroup(s).