You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7512 Reporter: reuben.rowe Assigned to:@gasche Status: resolved (set by @gasche on 2017-03-29T18:30:28Z) Resolution: not a bug Priority: normal Severity: minor Platform: Linux OS: Ubuntu OS Version: 16.04 Version: 4.04.0 Category: lexing and parsing
The BNF grammar specifies the structure of the code, but it does not enforce the parenthesizing strategy -- this is specified by associativies and precedence rules that are not part of the more declarative BNF grammar. In this particular case, the current way grammar rules are organized in the parser rejects requires a bit more parenthesizing than what is strictly required for ambiguity rejection, but I believe that this should not be considered a bug -- at best, allowing the relaxed form could be a feature/tweak request. Given that the latter doesn't seem more readable for humans (and can easily be avoided in computer-generated code by adding parentheses around lazy), I marked this PR as "no change required".
Original bug ID: 7512
Reporter: reuben.rowe
Assigned to: @gasche
Status: resolved (set by @gasche on 2017-03-29T18:30:28Z)
Resolution: not a bug
Priority: normal
Severity: minor
Platform: Linux
OS: Ubuntu
OS Version: 16.04
Version: 4.04.0
Category: lexing and parsing
Bug description
According to the language specification
I should be able to write something like the following:
However this is reported as a syntax error by the compiler.
On the other hand, the following is fine:
Is this a bug, or have I missed something?
Steps to reproduce
Enter the following in an interactive session:
let v = lazy let s = "hello" in s ^ "world" ;;
The text was updated successfully, but these errors were encountered: