Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small camlp4 parsing bug #8057

Closed
vicuna opened this issue Mar 12, 2003 · 2 comments
Closed

small camlp4 parsing bug #8057

vicuna opened this issue Mar 12, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 12, 2003

Original bug ID: 1587
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Olivier Andrieu
Version: 3.06+
OS:
Submission from: akasha.ijm.jussieu.fr (134.157.173.57)

Bonjour,

camlp4 ne parse pas le type "unknown" pour les variants polymorphes ( [> ] ).
Voilà un petit patch corrigeant ça :

--- camlp4/etc/pa_o.ml 2002/07/19 14:53:45 1.43
+++ camlp4/etc/pa_o.ml 2003/03/12 10:38:26
@@ -1097,7 +1097,7 @@
ctyp: LEVEL "simple"
[ [ "["; OPT "|"; rfl = LIST0 row_field SEP "|"; "]" ->
<:ctyp< [ = $list:rfl$ ] >>

  •  | "["; ">"; OPT "|"; rfl = LIST1 row_field SEP "|"; "]" ->
    
  •  | "["; ">"; OPT "|"; rfl = LIST0 row_field SEP "|"; "]" ->
         <:ctyp< [ > $list:rfl$ ] >>
     | "[<"; OPT "|"; rfl = LIST1 row_field SEP "|"; "]" ->
         <:ctyp< [ < $list:rfl$ ] >>
    
@vicuna
Copy link
Author

vicuna commented Mar 12, 2003

Comment author: administrator

Bonjour,

C'est réparé dans le CVS de CamlP4 (celui qui est "à côté" d'OCaml, et
qui doit être mergé avec OCaml sous peu).

Ton patch marche, mais accepte aussi [> | ], à cause de la barre
verticale optionnelle. J'ai donc modifié un peu différemment (en
ajoutant la règle "[>" "]" qui correspond à ton cas 0 de LIST0
ci-dessous.

Merci pour le rapport,

-- Michel

andrieu@ijm.jussieu.fr wrote/écrivait (Mar 12 2003, 11:47AM +0100):

Full_Name: Olivier Andrieu
Version: 3.06+
OS:
Submission from: akasha.ijm.jussieu.fr (134.157.173.57)

Bonjour,

camlp4 ne parse pas le type "unknown" pour les variants polymorphes ( [> ] ).
Voilà un petit patch corrigeant ça :

--- camlp4/etc/pa_o.ml 2002/07/19 14:53:45 1.43
+++ camlp4/etc/pa_o.ml 2003/03/12 10:38:26
@@ -1097,7 +1097,7 @@
ctyp: LEVEL "simple"
[ [ "["; OPT "|"; rfl = LIST0 row_field SEP "|"; "]" ->
<:ctyp< [ = $list:rfl$ ] >>

  •  | "["; ">"; OPT "|"; rfl = LIST1 row_field SEP "|"; "]" ->
    
  •  | "["; ">"; OPT "|"; rfl = LIST0 row_field SEP "|"; "]" ->
         <:ctyp< [ > $list:rfl$ ] >>
     | "[<"; OPT "|"; rfl = LIST1 row_field SEP "|"; "]" ->
         <:ctyp< [ < $list:rfl$ ] >>
    

@vicuna
Copy link
Author

vicuna commented Mar 13, 2003

Comment author: administrator

Fixed by MM 2003-03-13

@vicuna vicuna closed this as completed Mar 13, 2003
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant