Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000200OCamlOCaml generalpublic2000-10-12 14:012001-01-12 11:32
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000200: rhs_start and ...
Description


Hi,

I have two remarks about ocaml.

1/ the function "Parsing.rhs_start" gives sometimes erroneous results;
It seems that it is the case when the lexer have several entrypoints

2/ is there any fundamental reason to restrict the pattern-matching in
    the "try-with" construction?

# exception Toto of int*int;;
exception Toto of int * int
# try raise (Toto(3,2));(4,4)
  with Toto(res)-> res
  ;;
Characters 33-42:
The constructor Toto expects 2 argument(s),
but is here applied to 1 argument(s)

Best regards,
---
Amok.


TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002160)
administrator (administrator)
2000-10-12 15:53

Salut Amokrane,

On Thu, Oct 12, 2000 at 01:58:45PM +0200, Amokrane.SAIBI@simulog.fr wrote:

> # exception Toto of int*int;;
> # try raise (Toto(3,2));(4,4)
> with Toto(res)-> res
> ;;
> Characters 33-42:
> The constructor Toto expects 2 argument(s),

C'est parce que la déclaration "Toto of int*int" définit un constructeur
avec 2 paramètres, ce qui est différent d'un constructeur avec un seul
paramètre de type couple ("Toto of (int*int)").

J'avais suggéré que l'on écrive de tels constructeurs avec la syntaxe
"currifiée" (Toto 3 2 et non Toto(3, 2)), ce qui aide à comprendre pourquoi
"with Toto(res)" est incorrect, mais ça n'a pas eu l'air de déclencher
l'enthousiasme des foules...

--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/ [^]

(0002161)
administrator (administrator)
2001-01-12 11:32

Not enough context to understand problem 1.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker