Skip to content

Commit

Permalink
Work through error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ibdafna committed Aug 12, 2022
1 parent 60d74b2 commit c786941
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions compiler/src/parsing/parser.messages
Original file line number Diff line number Diff line change
Expand Up @@ -2921,24 +2921,6 @@ program: IMPORT LBRACE WHILE

Expected a list of comma-separated identifiers.

program: IMPORT LPAREN WHILE
##
## Ends in an error in state: 125.
##
## non_modid -> lparen . special_op rparen [ THICKARROW STAREQ STAR SLASHEQ SLASH SEMI RPAREN RCARET RBRACK RBRACE PLUSPLUS PLUSEQ PLUS PIPEPIPE PIPE PERCENTEQ PERCENT NOTEQ LPAREN LESSEQ LCARETLCARET LCARET LBRACK ISNT IS GREATEREQ GETS FROM EQUAL EQEQ EOL EOF ELSE DOT DASHEQ DASH COMMA COLON CARET AS AMPAMP AMP ]
##
## The known suffix of the stack is as follows:
## lparen
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 2, spurious reduction of production lparen -> LPAREN
##

Expected an infix or prefix operator, e.g. `+`, `-`, `!`.

program: IMPORT STAR EXCEPT LBRACE WHILE
##
## Ends in an error in state: 850.
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/parsing/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ import_ids:
| lseparated_nonempty_list(comma, aliasable(id)) comma? {$1}

import_shape:
| id { PImportModule $1 }
| type_id { PImportModule $1 }
| STAR import_exception? { PImportAllExcept (Option.value ~default:[] $2) }
| lbrace import_ids? rbrace { PImportValues (Option.value ~default:[] $2) }

Expand Down

0 comments on commit c786941

Please sign in to comment.