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

The document says ::(3,[]) is an expr #8094

Closed
vicuna opened this issue Apr 10, 2003 · 1 comment
Closed

The document says ::(3,[]) is an expr #8094

vicuna opened this issue Apr 10, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 10, 2003

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

Bug description

Using the grammar from the document, I get:

expr ::= ncconstr expr
::= ncconstr (3, [])
::= ncconstr-name (3, [])
::= :: (3, [])

However the implementation won't take "::(3,[])" as an expression.

I think the grammar in the document is wrong. I don't think it's a
good idea to try to accept "::" as both prefix and infix.

The questionable step in the derivation above is "::" being an
ncconstr-name. This production is used when deriving

type-definition ::= type x = :: of int * int

which is valid according to both the documented grammar and the
implementation. I think this is the only place you want to accept "::"
as a non-constant constructor name.

The best fix I can think of is to add this production to the document:

ncconstr-name-typedef ::= capitalized_ident | ::

and modify this one as follows:

constr-decl ::= cconstr-name | ncconstr-name-typedef of typexpr

--
Tim Freeman tim@fungible.com
Which is worse: ignorance or apathy? Who knows? Who cares?
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78

@vicuna
Copy link
Author

vicuna commented Jun 16, 2004

Comment author: administrator

fixed --DD 2004-06-16

@vicuna vicuna closed this as completed Jun 16, 2004
@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