caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] 3 camlp4 questions
@ 2002-10-18  7:35 Chris Hecker
  2002-10-18 12:07 ` Daniel de Rauglaudre
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Hecker @ 2002-10-18  7:35 UTC (permalink / raw)
  To: caml-list


1.  Are the latest camlp4 manual and tutorial in the camlp4 cvs tree 
somewhere, or are they available as a tarball for downloading?  The 3.06 
versions are available as a tarball or as webpages, and the latest (3.06+6) 
are available as webpages, but I can't find them as a tarball.

2.  I'm trying to compile otags 3.04.3 but it's dying in pr.ml:

ocamlc -pp "camlp4o q_MLast.cmo" -c -I "`camlp4 -where`" pr.ml
File "pr.ml", line 105, characters 33-43:
While expanding quotation "class_type":
Parse error: ';' expected after [class signature item] (in [class type])
Preprocessor error
make: *** [pr.cmo] Error 2

That line looks like this:

     | <:class_type< object $cst$ $list:csf$ end >> ->
	List.iter pe_class_sig_item csf

This is with the cvs version of camlp4.  I don't know enough camlp4 yet to 
fix it.

3.  I'm trying to use camlp4o parsing in my toplevel running in emacs (on 
Win2k).  It works fine most of the time.  However, if I send a large buffer 
of text to the toplevel, emacs and the toplevel hang.  It's behaving 
exactly like a similar problem I had with the toplevel that I fixed and 
documented here:

http://groups.google.com/groups?selm=fa.grqn5sv.1c46apb%40ifi.uio.no

With that fix (taking out the output for comments and newlines in 
toploop.ml), the toplevel works fine without camlp4o on these big files, 
but with camlp4o (and the fix) it still hangs.  The question is, is there a 
similar place in the camlp4o source that's outputting something per newline 
parsed at the top level?  In other words, does camlp4 output anything while 
it's eating input, or just when it finishes?

Chris
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] 3 camlp4 questions
  2002-10-18  7:35 [Caml-list] 3 camlp4 questions Chris Hecker
@ 2002-10-18 12:07 ` Daniel de Rauglaudre
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel de Rauglaudre @ 2002-10-18 12:07 UTC (permalink / raw)
  To: caml-list

Hi,

On Fri, Oct 18, 2002 at 12:35:18AM -0700, Chris Hecker wrote:
> 
> 1.  Are the latest camlp4 manual and tutorial in the camlp4 cvs tree 
> somewhere, or are they available as a tarball for downloading?  The 3.06 
> versions are available as a tarball or as webpages, and the latest (3.06+6) 
> are available as webpages, but I can't find them as a tarball.

They were not, but ok, since I made recently a new section in the
tutorial, I installed the tarball of the DVI and HTML versions of the
current version: Camlp4 ftp distribution, directory NEW.

> 2.  I'm trying to compile otags 3.04.3 but it's dying in pr.ml:
> [...]
>      | <:class_type< object $cst$ $list:csf$ end >> ->

It was changed in version 3.05. Now the good syntax is:
         <:class_type< object $opt:cst$ $list:csf$ end >>

But, to remain compatible, I just added some code to allow the old
syntax to be accepted: it works but displays a warning. Just upgrade
your Camlp4 version.

> 3.  I'm trying to use camlp4o parsing in my toplevel running in emacs (on 
> Win2k).  It works fine most of the time.  However, if I send a large buffer 
> of text to the toplevel, emacs and the toplevel hang.  It's behaving 
> exactly like a similar problem I had with the toplevel that I fixed and 
> documented here:
> 
> http://groups.google.com/groups?selm=fa.grqn5sv.1c46apb%40ifi.uio.no

Oops, I have difficulties to understand your fix. And I don't
understand: if the fix applies to the function refill_lexbuff of the
Toplevel, it should work with Camlp4 since the toplevel of Camlp4 just
uses the lex buffer that OCaml provides.

But, ok, if you need to know where it speaks about the lex buffer, go
to the subdirectory "top" of the Camlp4 distribution, file "camlp4_top.ml".
If you find something which would fix your problem, please let me know
where and I can update the file.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Caml-list] 3 camlp4 questions
@ 2002-10-18  0:19 Chris Hecker
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Hecker @ 2002-10-18  0:19 UTC (permalink / raw)
  To: caml-list


1.  Are the latest camlp4 manual and tutorial in the camlp4 cvs tree 
somewhere, or are they available as a tarball for downloading?  The 3.06 
versions are available as a tarball or as webpages, and the latest (3.06+6) 
are available as webpages, but I can't find them as a tarball.

2.  I'm trying to compile otags 3.04.3 but it's dying in pr.ml:

ocamlc -pp "camlp4o q_MLast.cmo" -c -I "`camlp4 -where`" pr.ml
File "pr.ml", line 105, characters 33-43:
While expanding quotation "class_type":
Parse error: ';' expected after [class signature item] (in [class type])
Preprocessor error
make: *** [pr.cmo] Error 2

That line looks like this:

     | <:class_type< object $cst$ $list:csf$ end >> ->
	List.iter pe_class_sig_item csf

This is with the cvs version of camlp4.  I don't know enough camlp4 yet to 
fix it.

3.  I'm trying to use camlp4o parsing in my toplevel running in emacs (on 
Win2k).  It works fine most of the time.  However, if I send a large buffer 
of text to the toplevel, emacs and the toplevel hang.  It's behaving 
exactly like a similar problem I had with the toplevel that I fixed and 
documented here:

http://groups.google.com/groups?selm=fa.grqn5sv.1c46apb%40ifi.uio.no

With that fix (taking out the output for comments and newlines in 
toploop.ml), the toplevel works fine without camlp4o on these big files, 
but with camlp4o (and the fix) it still hangs.  The question is, is there a 
similar place in the camlp4o source that's outputting something per newline 
parsed at the top level?  In other words, does camlp4 output anything while 
it's eating input, or just when it finishes?

Chris
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-18 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-18  7:35 [Caml-list] 3 camlp4 questions Chris Hecker
2002-10-18 12:07 ` Daniel de Rauglaudre
  -- strict thread matches above, loose matches on Subject: below --
2002-10-18  0:19 Chris Hecker

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).