|
|
| "ocaml_beginners"::[] stream
syntax |

|
2006-11-23 19:06:22 |
|
Hello
cam somebody tell me why Syntax error here :
loc>ocaml
Objective Caml version 3.09.2
# [< >] ;;
Syntax error
Thanks
François Colonna
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax |

|
2006-11-23 19:40:51 |
|
2006/11/23, Francois Colonna < colonna%40ccr.jussieu.fr">colonna ccr.jussieu.fr>:
> Objective Caml version 3.09.2
>
> # [< >] ;;
> Syntax error
you need camlp4 :
Objective Caml version 3.09.2
# [< >];;
Syntax error
# #load "camlp4o.cma";;
Camlp4 Parsing version 3.09.2
# [< >];;
- : 'a Stream.t = <abstr>
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax |

|
2006-11-23 19:44:09 |
|
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax |

|
2006-11-23 19:54:22 |
|
Remi Vanicat wrote:
> 2006/11/23, Francois Colonna < colonna%40ccr.jussieu.fr">colonna ccr.jussieu.fr>:
>
>> Objective Caml version 3.09.2
>>
>> # [< >] ;;
>> Syntax error
>>
>
> you need camlp4 :
> Objective Caml version 3.09.2
>
> # [< >];;
> Syntax error
> # #load "camlp4o.cma";;
> Camlp4 Parsing version 3.09.2
>
> # [< >];;
> - : 'a Stream.t = <abstr>
>
>
Thanks.
F. Colonna
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax |

|
2006-11-23 20:19:21 |
|
Francois Colonna:
> loc>ocaml
> Objective Caml version 3.09.2
>
> # [< >] ;;
> Syntax error
thierry brume ~ $ ocaml
Objective Caml version 3.09.2
# #load "camlp4o.cma";;
Camlp4 Parsing version 3.09.2
# [< >];;
- : 'a Stream.t = <abstr>
--
Thierry.
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax again |

|
2006-11-24 10:46:40 |
|
Hello
adding #load "camlp4o.cma";;
helps in the socalled toplevel mode not in "batch" mode.
the file stream.ml
loc>cat stream.ml
(**
* stream problem
*)
#load "camlp4o.cma";;
[< >];;
which gives
# [< >];;
- : 'a Stream.t = <abstr>
with tuareg, gives
loc>ocaml stream.ml
File "stream.ml", line 6, characters 0-2:
Syntax error
when using ocaml.
thanks for helping.
François Colonna
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax again |

|
2006-11-24 11:47:29 |
|
Francois Colonna a écrit :
> Hello
>
> adding #load "camlp4o.cma";;
> helps in the socalled toplevel mode not in "batch" mode.
> the file stream.ml
>
> loc>cat stream.ml
> (**
> * stream problem
> *)
> #load "camlp4o.cma";;
> [< >];;
>
>
> which gives
> # [< >];;
> - : 'a Stream.t = <abstr>
>
> with tuareg, gives
>
> loc>ocaml stream.ml
> File "stream.ml", line 6, characters 0-2:
> Syntax error
>
> when using ocaml.
>
> thanks for helping.
>
> François Colonna
>
>
This is the same thing. Your file must be pre-processed.
I do not have the right incantation, but you will find it in Martin
Jambon's nice tutorial:
http://martin.jambon.free.fr/extend-ocaml-syntax.html
Salutations
Matt
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax again |

|
2006-11-24 12:21:46 |
|
Matthieu Dubuget wrote:
> Francois Colonna a écrit :
>
>> Hello
>>
>> adding #load "camlp4o.cma";;
>> helps in the socalled toplevel mode not in "batch" mode.
>> the file stream.ml
>>
>> loc>cat stream.ml
>> (**
>> * stream problem
>> *)
>> #load "camlp4o.cma";;
>> [< >];;
>>
>>
>> which gives
>> # [< >];;
>> - : 'a Stream.t = <abstr>
>>
>> with tuareg, gives
>>
>> loc>ocaml stream.ml
>> File "stream.ml", line 6, characters 0-2:
>> Syntax error
>>
>> when using ocaml.
>>
>> thanks for helping.
>>
>> François Colonna
>>
>>
>>
>
> This is the same thing. Your file must be pre-processed.
> I do not have the right incantation, but you will find it in Martin
> Jambon's nice tutorial:
>
> http://martin.jambon.free.fr/extend-ocaml-syntax.html
>
> Salutations
>
> Matt
>
>
>
Thanks for the reference.
I do not understand why should I preprocess the *.ml file to use streams.
Streams are part of the language, aren't they ?
Best
François
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax again |

|
2006-11-24 12:51:20 |
|
On Fri, Nov 24, 2006 at 01:21:46PM +0100, Francois Colonna wrote:
> Thanks for the reference.
> I do not understand why should I preprocess the *.ml file to use streams.
> Streams are part of the language, aren't they ?
No, they're _not_ part of the base language at all. OCaml allows you
to define syntax extensions to the language using a meta-language
called camlp4, and streams are one such camlp4 extension.
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Internet Marketing and AdWords courses - http://merjis.com/courses - NEW!
Merjis blog - http://blog.merjis.com - NEW!
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] stream
syntax again |

|
2006-11-24 13:22:42 |
|
On Fri, Nov 24, 2006 at 12:51:20PM +0000, Richard Jones wrote:
> On Fri, Nov 24, 2006 at 01:21:46PM +0100, Francois Colonna wrote:
> > Thanks for the reference.
> > I do not understand why should I preprocess the *.ml file to use streams.
> > Streams are part of the language, aren't they ?
>
> No, they're _not_ part of the base language at all. OCaml allows you
> to define syntax extensions to the language using a meta-language
> called camlp4, and streams are one such camlp4 extension.
That seems like an ironic choice of term, considering the ml at the end
of the language name OCaml stands for "meta-language". Feel free to
ignore this minor digression, of course. . . .
--
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
"There comes a time in the history of any project when it becomes necessary
to shoot the engineers and begin production." - MacUser, November 1990
__._,_.___
.
__,_._,___
|